Comment 3 for bug 704022

Revision history for this message
Scott Moser (smoser) wrote :

I modified grub to have an additional boot option called 'CUSTOM-TEST' and booted into that.

$ ent="Ubuntu, with Linux $(uname -r)"
$ cust="CUSTOM-TEST"
$ sed -n -e "s/${ent}/${cust}/" \
  -e "/^menuentry '${cust}'/,/}/p" \
  < /boot/grub/grub.cfg | sudo tee /boot/grub/custom.cfg
$ sudo sed -i 's,xen_emul_unplug=unnecessary,,' /boot/grub/custom.cfg
$ sudo grub-set-default "${ent}"
$ sudo grub-reboot "${cust}"
$ sudo update-grub
$ grep -v "^#" /boot/grub/grubenv
saved_entry=CUSTOM-TEST
prev_saved_entry=Ubuntu, with Linux 2.6.37-12-virtual
$ cat /boot/grub/custom.cfg
menuentry 'CUSTOM-TEST' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 set gfxpayload=$linux_gfx_mode
 insmod part_msdos
 insmod ext2
 set root='(hd2,msdos1)'
 search --no-floppy --fs-uuid --set=root f7ac8333-d0de-4c19-b130-794dbd905a44
 linux /boot/vmlinuz-2.6.37-12-virtual root=UUID=f7ac8333-d0de-4c19-b130-794dbd905a44 ro vt.handoff=7 console=ttyS0
 initrd /boot/initrd.img-2.6.37-12-virtual
}
$ sudo reboot

The above does a "boot once" into that custom test kernel, so that subsequent reboots will go back into working kernel.