near disaster averted - "can not find /dev/by-id/xxxx"

Goh Lip g.lip at
Wed May 19 15:51:13 UTC 2010

On 05/19/2010 11:21 PM, Michael Hirsch wrote:
> On Wed, May 19, 2010 at 8:54 AM, Goh Lip<g.lip at>  wrote:
>> O. Sinclair wrote:
>>> Goh Lip wrote:
>>>> On Wed, 19 May 2010 14:40:13 +0200
>>>> "O. Sinclair"<o.sinclair at>  wrote:
>>>>> Have no idea what happened but if this helps someone landing in the
>>>>> same trouble then it is worth the effort of documenting it.
>>>>> I am still on Karmic with all updates. Last night I was online and
>>>>> left the computer on over the night. No problems, all worked this
>>>>> morning. Shut it down to take it to where I am currently working (it
>>>>> is a laptop and I am currently travelling).
>>>>> On next boot I get to the splash and then I get "BSOD" - Black Screen
>>>>> of Death. A black monitor, no activity or message or anything.
>>>>> Reboot and go to "recovery option" that after a while ends up with
>>>>> the line: ...can not find /dev/by-id/xxxx long string of UUID here
>>>>> I am dropped into Busybox shell and can do nothing worthwhile. I
>>>>> reboot with a usb flash I have and can see that all works and the
>>>>> disks are there (one disk, 3 partitions including swap). I check
>>>>> grub.cfg, I check /etc/fstab and all LOOKS perfect. But no boot.
>>>>> I tried the 3-4 kernels and none worked. Scouted around internet for a
>>>>> solution and there were a few suggestion ranging from rebuilding the
>>>>> kernel to what eventually worked and was simple:
>>>>> on bootup get into the Grub menu by hitting ESC, Shift or both
>>>>> choose a "recovery kernel",  I chose an earlier than the latest just
>>>>> to be on safe side
>>>>> press "e" to get to edit mode
>>>>> replace all UUID-strings with /dev/sda(your root number), in my case
>>>>> /dev/sda2
>>>>> press ctrl+x to boot with those settings
>>>>> drop to a root shell
>>>>> run update-grub
>>>>> reboot
>>>>> all worked as before.... except now grub.cfg points to /dev/sda2
>>>>> instead of /dev/uuid-string
>>>>> Phew,
>>>>> Sinclair
>>>> You've 'sudo update-grub' and grub.cfg shows /dev/sda2?
>>>> Strange.  You may want to double check that.
>>>> But glad you've got this sorted out.
>>>> Regards - Goh Lip
>>> after manually editing the grub as described I dropped to a root-shell.
>>> So no need for "sudo" but update-grub. And yes, following that /dev/sda2
>>> has replaced /dev/uuid-endless-string
>> Sinclair, sorry for being so persistent, but I find that unusual, so I
>> replicated your steps, using older kernel, dev/sdax, recovery mode,
>> root-shell, update-grub (no sudo), reboot and checked the grub.cfg.
> Goh,
> If I understand what Sinclair wrote, he manually replaced the
> UUID-stuff with the appropriate /dev/sdx.  This will certainly work.

Yes, I understand; it'll work and should boot with correct /dev/sdax 
instead of UUID=xxxxx. But I was surprised that grub-update (in root) 
would remain in /dev/sdax unless that was specified in 
/etc/default/grub.d thus...
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
# Linux

> These UUID problems shows once again that labels are often a better
> way to go.  Label your partitions and mount by label.  Labels won't
> change when you expand partitions, etc.

True again, I concur wholeheartedly, especially as labels are easily 
understood and remembered - Who can remember UUID's? - and also when you 
change partition for whatever reason, applies too to fstab very much.

That said, its best not to use (hdx,y) or /dev/sdax and do this instead

search --no-floppy --label --set <label>
linux /vmlinuz-2.6.xx-xx-generic root=LABEL=<label> ro quiet splash

and there is no real need to use
set root=(hd0,x)   <or>
linux (hd0,x)/vmlinuz-2.6.xx-xx-generic root= blah blah blah

> That said, I don't understand how or why Sinclair's UUIDs got changed.

Me too, we agree too much  :)

> Michael
Take care - Goh Lip

More information about the kubuntu-users mailing list