View Full Version : [SOLVED] Startup issue, not sure if Grub2 related
enginemusic
Feb 28th 2012, 12:27 AM
Gidday,
A couple of weeks ago I moved my install from one partition to another using dd. Since then, as I boot, I get a prompt during splash screen (blue with marching dots) that both a windows partition and another listed by UUID cannot be found, and startup halts until I press S for skip. These partitions (the Windows one anyway) still exist but are not where they used to be.
How can I get the startup to re-learn which partitions I have? I thought it was a Grub2 issue, so installed the Kcm-Grub2 editor and updated with no effect.
Thanks for any help.
SecretCode
Feb 28th 2012, 08:18 AM
The issue of not finding partitions during bootup - and having to skip mounting - isn't a GRUB issue (though you may also have a GRUB issue if you can't boot some of your other installed OSes) - it's most likely an fstab issue.
The file /etc/fstab controls what partitions are mounted during bootup. In theory a partition identified by UUID should be found even if you've moved it, but maybe there are other issues.
Post the contents of your /etc/fstab and also post the output of sudo blkid. This command lists all file systems (technically, block-mode devices) found, even if they're not mounted.
james147
Feb 28th 2012, 11:00 PM
The file /etc/fstab controls what partitions are mounted during bootup. In theory a partition identified by UUID should be found even if you've moved it, but maybe there are other issues. This isn't true if the files where moved to a new partition, though it should be try if dd was used. (uuid is stored as part the file-system I think)
Post the contents of your /etc/fstab and also post the output of sudo blkid. This command lists all file systems (technically, block-mode devices) found, even if they're not mounted.
I find its generally better to use "sudo blkid -c /dev/null" to void blkids cache (and get a more upto date info in case something had changed, ie you just formatted a new partition or plugged in a device)
oshunluvr
Feb 29th 2012, 12:27 AM
I find adding "-o list" to your blkid command produces a more readable output.
james147
Feb 29th 2012, 12:34 AM
I find adding "-o list" to your blkid command produces a more readable output.
or "sudo blkid -c /dev/null -o export | grep UUID | sudo tee -a /etc/fstab " if you want an easy way to use the uuids for mounting :) (or ":r !blkid -c/dev/null -o export" in vim :D )
SecretCode
Feb 29th 2012, 04:50 AM
or "sudo blkid -c /dev/null -o export | grep UUID | sudo tee -a /etc/fstab " if you want an easy way to use the uuids for mounting :) (or ":r !blkid -c/dev/null -o export" in vim :D )
:eek: Better to write to a temporary file than append directly to fstab, especially as that includes repeats of mounts that may already be there, has no mount points or mount options, and loses hints on fs_type and label. Just while we're tweaking command lines :)
enginemusic
Feb 29th 2012, 06:22 AM
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=ddfe3719-4205-4a02-9d7d-6a3d85452ec6 / ext4 errors=remount-ro 0 1
# /windows was on /dev/sda2 during installation
UUID=96441D97441D7B67 /windows ntfs defaults,umask=007,gid=46 0 0
# swap was on /dev/sda6 during installation
UUID=34cfb867-0f29-4116-8651-fa728d33bb22 none swap sw 0 0
/dev/sda1: UUID="ddfe3719-4205-4a02-9d7d-6a3d85452ec6" TYPE="ext4"
/dev/sda2: LABEL="swop" UUID="bbc6464f-5b37-46a9-a3df-2f546787468d" TYPE="swap"
/dev/sdb1: LABEL="backup" UUID="7025d426-4395-42a5-85a5-00d8b2e87b0a" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb2: LABEL="MUSICBACKUP" UUID="F80B-0E0F" TYPE="vfat"
(dev/sdb2 is USB HD)
Right, so I'm guessing the idiot's way out of this is to copy fstab to fstabold, then edit fstab to remove the references to the 2nd two entries then reboot. I realised after posting originally that I no longer have (or need :) ) an XP partition on this box.
Or if I was feeling daring
sudo blkid -c /dev/null -o export | grep UUID | sudo tee -a /etc/fstabnew
mv /etc/fstab /etc/fstabold
mv /etc/fstabnew /etc/fstab
At what point is fstab generated or modified by the machine?
Also, am I just a numpty or can you not drag and drop text from Konsole?
Cheers for the help folks.
enginemusic
Feb 29th 2012, 07:08 AM
Also, am I just a numpty or can you not drag and drop text from Konsole?
Why yes, I AM a numpty, I RTFM (docs/kde/org) and find you just have to hold down the ctrl key. Wow, I should try that more often {eyeroll emoticon}
SecretCode
Feb 29th 2012, 07:57 AM
At what point is fstab generated or modified by the machine?
Only during installation or manually by the administrator (that's you!) - it's not dynamically updated by any core system components.
edit fstab to remove the references to the 2nd two entries then reboot
Yes, but you should keep the swap line and just change its UUID
Do you want to automatically mount the backup and MUSICBACKUP volumes? I would say not, unless the USB HDD is always attached and you always need access.
So your fstab should now look like
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=ddfe3719-4205-4a02-9d7d-6a3d85452ec6 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=bbc6464f-5b37-46a9-a3df-2f546787468d none swap sw 0 0
james147
Feb 29th 2012, 09:53 PM
:eek: Better to write to a temporary file than append directly to fstab, especially as that includes repeats of mounts that may already be there, has no mount points or mount options, and loses hints on fs_type and label. Just while we're tweaking command lines :)
Your probably right :) though I generally use the vim :r command to dump the output in vims buffer before editing and saving it :D
enginemusic
Mar 7th 2012, 06:15 AM
Thanks guys, I got it sorted, and in the process understood why it originally did what it did.
James147's suggested command didn't work - I ran it and then it didn't give me the command prompt back. I don't fully understand how it works but guess that it's supposed to read the UUIDs and automagically insert them into the fstab.
I ended up taking SecretCode's suggestion of manually editing the fstab (twice, cause I forgot to invoke Sudo the first time and couldn't save it :) and then renamed old to old and new to new, if you catch my drift. Worked a treat.
Two more bugs to work out before I've got the system pretty much how I want it (Squeezebox server and Windows under Virtualbox both taking too much proc time). Will probably sort both out just in time to upgrade to Precise.
Good on ya!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.