PDA

View Full Version : 10.04 partition mount fstab - strange problem



jwvraets
May 1st, 2010, 08:02 PM
Having one hell of a time with 10.04 - goes from bad to worse it seems. End of ranting.

System description: AMD Athalon II x4 cpu on a Gigabyte MA785GMT-UD2H mobo with 4 gig RAM. Has 2 hard drives: a 500 gig ATA set up as a slave to a DVD writer and a 1.5 Terra SATA. The 500 gig is for Windows XP Pro and the 1.5 Terra is for Linux (i.e Ubuntu) and this has run fine as a dual boot since shortly after 9.10 was released.

The partitions on the drives are as follows:

500 gig: (in order)
-------
31 gig NTFS for Windows XP Pro "C:" dirive - Call this one winc to keep it clear.

100 gig Extended divided into a 31 gig NTFS partition named winos_spare reserved for a planned install and an unallocated space of 75 gig)

363 gig NTFS maned "data" for general data storage for Windows. - Call this one windata to keep it clear.


1.5 Terra: (in order)
----------
105 gig ext4 Extended for Ubuntu's "/"

1.4 Terra ext3 named "data" for general data storage under Ubuntu - Call this one ubdata to keep it clear

11 gig Extended - the SWAP for Ubuntu



I did the 9.10 to 10.04 upgrade of the system updates. Blew away the system (-don't ask - results in a really long and unproductive tirade) and lost access to Windows as well. I wanted to recover some residual (nice to have, not critical) un-backed-up Windows data as a prelude to a Windows reinstall and first wanted to mount the ubdata partition on a mount point called /data (chmod 777. Note the data is accessible in Ubuntu via Nautilus/file manager using "computer" to list the partitions and simply clicking on them - goes for winc, windata and ubdata). I wanted to automount the ubdata onto /data at startup (as I had it going under 9.10) so I edited /etc/fstab to add the following line to the freshly installed version:

/dev/sda3 /data auto defaults 0 0

I got the sda3 id from System > Administration > Disk Utility, which incidentally identified the 500 gig windata as "sdb3". Rebooted. Looked in /data and what do I see but the contents of windata. Figuring I had finger issues I checked /etc/fstab and confirmed the typing. Checked System > Administration > Disk Utility and imagine my surprise to find the designations or the 500 gig and 1.5 terra wre now swapped (i.e. sda3 was now sdb3 and vice-versa). So I edited /etc/fstab to try to mount ubdata and rebooted, looked in /data. Bet you know where this is going - YUP still showing the contents of windata and a check of System > Administration > Disk Utility had reversed themselves again. This did absolutely noting good for my blood pressure.

It seems that anything I do to change /etc/fstab, there is no change in what is actually accessible in /data. I have never seen anything like this before and can think of no way to fix it but this is becoming a show stopper for me.

Has anyone else experienced this? Has anyone any idea how I can fix this?

Fuming in the Great White North

JW

prshah
May 1st, 2010, 08:46 PM
I edited /etc/fstab to add the following line to the freshly installed version:
/dev/sda3 /data auto defaults 0 0


It is never a good idea to use device names (Eg /dev/sda) in the fstab since these can be easily swapped around or reassigned by the BIOS.

I suggest you replace /dev/sda3 with the actual UUID of the partition in question (which you call ubdata). To get the UUID, use
sudo blkid /dev/sda3 (or sdb3 or whatever).

Further, your added line is wrong. The correct line will be similar to
# ubdata
UUID=366129c7-Sd2a-4c47-901e-fd64a113aOac /data ext4 defaults,auto 0 2

Where:
1) Replace example UUID with correct UUID from blkid command
2) Replace filesystem type with correct filesystem type (again check blkid command output)
3) Replace "0" with "2"; a value of "0" will ensure that the filesystem is not checked when "dirty", eg, when not cleanly shutdown/rebooted.

I hope this goes some way in clearing things up for you. Post back if you need more information or further help.

jwvraets
May 1st, 2010, 09:40 PM
SOLVED:
I replaced the /etc/fstab line as follows:

Was:

/dev/sda3 /data auto defaults 0 0

Now is:

/dev/sda3 /data ext3 defaults 0 0

Rebooted and it works -go figure. There are days like this when frustration gets the better of you.


And prshaw: I like your suggestion and will try it. Seems a much cleaner approach all-in-all. Thanks for the tip.

Calmer in the Great White North




JW

jwvraets
May 1st, 2010, 10:06 PM
prshaw:

Your suggestion was excellent. Implemented it and it works just fine. Goes into my books as the right way to do it.

Thanks again

JW