Bug#586544: add rescue instructions, accessible right there from inside grub

jidanni at jidanni.org jidanni at jidanni.org
Sun Jun 20 12:39:51 UTC 2010


Package: grub-rescue-pc
Version: 1.98+20100617-1
Severity: wishlist
File: /usr/share/doc/grub-rescue-pc/README

What is really needed is an explanation of how one can use his rescue
disk in times of trouble.

Not only does in need to be in the README file, but also right there
available on the grub command line, and how to read it mentioned when
one types
grub> help

As it may very well be the only documentation available (can't even
boot, so forget about Google)  it should give a scenario of how to
explore ones disks for the right filenames to put on the boot command
line.

OK, let's take a look at what we have to work with

# mount -t auto -o loop /usr/lib/grub-rescue/grub-rescue-cdrom.iso /mnt/somewhere
# less /mnt/somewhere/boot/grub/grub.cfg
(Mention the above two lines in README as a way to examine what is on
the rescue disk)

# For booting GNU/Linux
menuentry "GNU/Linux" {
        set root=(hd0,1)
        linux /vmlinuz root=/dev/sda1
        initrd /initrd.img
}

OK, but our task it to change this by hand to
something more like
# less /boot/grub/grub.cfg, which we don't have access to (unless you
mention the commands needed to view it there in grub):

menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set cfc96b80-b2ec-45b2-90d7-c4b64d4651b6
	echo	'Loading Linux 2.6.32-5-686 ...'
	linux	/boot/vmlinuz-2.6.32-5-686 root=UUID=cfc96b80-b2ec-45b2-90d7-c4b64d4651b6 ro
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-686
}

which is still a far cry from what is on the rescue disk, even if we
whittle it down to

menuentry 'Debian' {
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set cfc96b80-b2ec-45b2-90d7-c4b64d4651b6
	linux /vmlinuz root=UUID=cfc96b80-b2ec-45b2-90d7-c4b64d4651b6
        initrd /initrd.img
}

We note right off the bat though the rescue disk takes advantage of the
symlinks in /, it lacks the vital UUID jazz... but that is too disk-
specific for a rescue disk anyway...

Anyway, you had better mention how to cat the /boot/grub/grub.cfg so the
user can copy all those UUID numbers etc. down on paper so he can type
them back in when crafting the grub command line, because even if he
changes the (hd0,1) to (hd0,msdos1), it is just not enough to boot these
days. Try it yourself.

P.S., when boot fails, we are thrown back into grub interaction with no
message as to what went wrong.





More information about the Pkg-grub-devel mailing list