Jag har en partition som inte är monterad, hur skirver jag i fstab så den blir det vid uppstart?
fstab
Linux & BSDur Mac OS, Unix, Linux & BSD
5 svar · 255 visningar · startad av benken
Det beror på vilken enhet den ligger på, vilket filsystem det är, vart du vill ha den monterad osv. Det enklaste är att titta på de andra raderna i fstab och härma dem.
OBS: Testa alltid att det du ändrat/lagt till i fstab fungerar innan du bootar om! Du vill inte ha en trasig fstab!!
jag härmade den andra raden, å det funkade inte, så här ser den ut:
LABEL=/1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
jag har en partition som heter hda3, ext3 filsystem. Hur gör jag??
raden:
/dev/hda3 /bla ext3 defaults 0 0
bör fungera (kommer att montera den på /bla). Men som sagt, se till att testa efter att du lagt till något i fstab! I det här fallet genom att testa "mount /bla" resp "umount /bla".
Eventuellt kan du ersätta ext3 med "auto" i raden ovan.
okej, men vad betyder de där 0 0 ??
man fstab:
The fifth field, (fs_freq), is used for these filesystems
by the dump(8) command to determine which filesystems need
to be dumped. If the fifth field is not present, a value
of zero is returned and dump will assume that the filesys_
tem does not need to be dumped.The sixth field, (fs_passno), is used by the fsck(8) pro\_ gram to determine the order in which filesystem checks are done at reboot time. The root filesystem should be speci\_ fied with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not pre\_ sent or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.