kanotix.com

General Support - fstab file

sk11 - 15.11.2006, 19:52 Uhr
Titel: fstab file
I have an external usb HD, with several partitions on it. Here is a print out of my fstab file:
Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
usbfs  /proc/bus/usb  usbfs  devmode=0666  0  0
/dev/hda6       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda5       /home           ext3    defaults        0       2
/dev/hda1       /media/hda1     ntfs    ro,umask=000    0       0
/dev/hda7       none            swap    sw              0       0
/dev/sdb1       /media/flash    auto    defaults,rw,user,noauto  0      0
/dev/sda1       /media/h1       ntfs    noauto,users,exec,ro,umask=000 0       0
/dev/sda3       /media/h3    vfat    noauto,users,exec,umask=000,shortname=mixed,quiet 0       0
/dev/sda5       /media/h5      ext3    noauto,users,exec 0       0
/dev/sda6       /media/h6     ext3    noauto,users,exec 0       0
/dev/cdrom      /media/cdrw     udf,iso9660 user,noauto     0       0
none /sys sysfs defaults 0 0


Sometimes, the partitions get linked as sdbx instead of sdax, I then have to alter my fstab file accordingly and mount each of the partitions. This happens very regularly, at random. Is there no way to make it permanently stick with either sdax or sdbx?
slh - 15.11.2006, 20:23 Uhr
Titel: RE: fstab file
You could use /dev/disk/by-id/* for fstab.
h2 - 15.11.2006, 21:19 Uhr
Titel: RE: fstab file
Found a nice how to for labels, uuid, id stuff. Sometimes the ubuntu guys come through with some nice documentation, this is one of those times, that page pretty much covers everything you need to know.
sk11 - 15.11.2006, 21:56 Uhr
Titel: RE: fstab file
The /dev/disks/by-label dir is missing partitions h5 and h6, so I tried to rectify this using:

Code:

umount /media/h5
mke2fs -L h5 /dev/sda5


No new labels appeared in /dev/disks/by-label and I'm now no longer able to mount h5, the error message I get is:

Code:

mount: wrong fs type, bad option, bad superblock on /dev/sda5,
       missing codepage or other error


According to syslog:
Code:

kernel: ext3: No journal on filesystem on sda5

mzilikazi - 15.11.2006, 22:34 Uhr
Titel: Re: RE: fstab file
sk11 hat folgendes geschrieben::
The /dev/disks/by-label dir is missing partitions h5 and h6, so I tried to rectify this using:

Code:

umount /media/h5
mke2fs -L h5 /dev/sda5


No new labels appeared in /dev/disks/by-label and I'm now no longer able to mount h5, the error message I get is:

Code:

mount: wrong fs type, bad option, bad superblock on /dev/sda5,
       missing codepage or other error


According to syslog:
Code:

kernel: ext3: No journal on filesystem on sda5


For ext3 the syntax is:
Code:
mke2fs -j

sk11 - 15.11.2006, 23:34 Uhr
Titel: RE: Re: RE: fstab file
OH shit, I used mke2fs and mounted h5 only to find nothing on it!!! Tell me I didn't just wipe a whole 100G of data that wasn't backed up!!!
Crest - 16.11.2006, 01:14 Uhr
Titel: RE: Re: RE: fstab file
Smells like serious trouble.
h2 - 16.11.2006, 02:36 Uhr
Titel: RE: Re: RE: fstab file
http://www.cgsecurity.org/wiki/TestDisk

try that, should be installed already, testdisk.
man testdisk for more information on how to use it.

In the future, I would avoid using command line partition tools as root until you actually understand what they do. Labeling, as for example gparted will tell you before you click ok, will destroy all the data on the partition. Well, I doubt it destroy it, it just changes the partition table, which I think testdisk will let you recover if you don't do too many more other things.

However, read up on the tool you use BEFORE you use it, or you may not be able to recover your data at all.

testdisk may recover it, I don't know, never used it.
http://www.tldp.org/HOWTO/Partition/recovering.html
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007