Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been running Ubuntu as a dual boot with XP on a caddy. I also run XP in a VirtualBox guest. My last upgrade to Natty worked fine and automatically mounted all of my internal drives (13 partitions).

I have upgraded to 11.10 and, because it doesn't automatically mount all of my drives, I am having all sorts of problems. If I cold boot the machine, fdisk -l tells me the allocations to sda, sdd etc but, if I restart (warm boot), all of these allocations change. What was on sda is now on sdc and sdc is now sde and so on.

I want to (am running) Virtualbox with the vdi on what is sdc1 at boot up. At the moment, if I set up fstab to auto mount sdc1 with these settings and then restart, I get all sorts of errors. Is there any way to force LVM or whatever to maintain the allocations through a restart?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Mount partitions by UUID to solve the problems of disk drives changing their device name.

You can find out the UUID of a disk device with the blkid command:

$ sudo blkid -p /dev/sda1
/dev/sda1: UUID="af340d98-0e91-4990-8cc9-17566264db2b" VERSION="1.0" TYPE="ext4" USAGE="filesystem" 

Then you can replace the /dev/sda1 line in /etc/fstab with the UUID=... version. For instance:

UUID=af340d98-0e91-4990-8cc9-17566264db2b  /  ext4 rw,errors=remount-ro
share|improve this answer
    
Thanks Riccardo, that solved it. See below. –  Alan McTavish Oct 23 '11 at 15:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.