Mounting partitions
Nils Kassube
kassube at gmx.net
Fri Apr 2 12:10:10 UTC 2010
alan duval wrote:
> I have installed a larger 500G HD, and used Gparted to make 4
> partitions.
> Partition 1 for Ubuntu9.04
> Partition2 for Swap
> Partition3 for Home
> Partition4 for Virtual operating systems
>
> I then transferred Ubuntu and my Home partition from my smaller disk
> to the larger using Acronis.
> However Ubuntu then couldn't mount the new Virtual partition. Message
> said
> "Can't find sda7 (my virtual partition) in /etc/fstab or /etc/mtab".
> I looked at fstab but didn't know what values to put for sda7.
You can find out the UUID of the partitions with the command
ls -l /dev/disk/by-uuid
in a terminal. There should be a line like this:
d7351921-3fb9-48b5-a5ae-799bbbbd682d -> ../../sda7
The name of the link is the UUID for the partition /dev/sda7 and you can
use it in your fstab. It should be something like
UUID=d7351921-3fb9-48b5-a5ae-799bbbbd682d /Virtual ext3 relatime 0 0
where you replace the UUID with the one found by the command above. Then
use the command
sudo mount -a
and the new fstab entry should be used.
> I then opened mtab and it looked simpler, so I added the line:
> /dev/sda7 /Virtual ext3 rw,relatime 0 0
> which is similar to the line for sda6
>
> This then loaded my Virtual partition in the media folder and I am
> able to use it but I notice that the line I inserted in mtab has
> disappeared.
>
> Although this works I doubt that I have followed accepted practice.
Well, it is your system after all and you are free to do with it
whatever you want. :)
But the right file to change is always fstab and not mtab which is used
by the system to list the actually mounted partitions.
Nils
More information about the ubuntu-users
mailing list