[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Lost Ubuntu partitions from grub.cfg. How to most easily recover?

Op Sun, 1 May 2011 22:36:09 +0200 Camaleón wrote:
> I wonder what happened with the old good habit of adding the OS menu 
> entries manually like we used to do with GRUB Legacy... I hope that's 
> still possible in GRUB2 :-)

Yes it is.  Make /etc/grub.d/30_os-prober non-executable and manually
add your entries in a file named 09_custom or 11_custom, depending on
the position you want it to have in the Grub2 menu.

The first two lines should always be as in the example below, then add
your entry from line 4 on.

#! /bin/sh -e
exec tail -n +4 $0

menuentry "Ubuntu 9.10, kernel 2.6.31-17-generic (on /dev/sdb2)" {
set root=(hd1,2)
linux /boot/vmlinuz-2.6.31-17-generic root=/dev/sdb2 vga=788 ro
initrd /boot/initrd.img-2.6.31-17-generic

Reply to: