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.
I modified grub to have an additional boot option called 'CUSTOM-TEST' and booted into that.
$ ent="Ubuntu, with Linux $(uname -r)" custom. cfg emul_unplug= unnecessary, ,' /boot/grub/ custom. cfg CUSTOM- TEST entry=Ubuntu, with Linux 2.6.37-12-virtual custom. cfg $linux_ gfx_mode d0de-4c19- b130-794dbd905a 44 2.6.37- 12-virtual root=UUID= f7ac8333- d0de-4c19- b130-794dbd905a 44 ro vt.handoff=7 console=ttyS0 img-2.6. 37-12-virtual
$ cust="CUSTOM-TEST"
$ sed -n -e "s/${ent}/${cust}/" \
-e "/^menuentry '${cust}'/,/}/p" \
< /boot/grub/grub.cfg | sudo tee /boot/grub/
$ sudo sed -i 's,xen_
$ sudo grub-set-default "${ent}"
$ sudo grub-reboot "${cust}"
$ sudo update-grub
$ grep -v "^#" /boot/grub/grubenv
saved_entry=
prev_saved_
$ cat /boot/grub/
menuentry 'CUSTOM-TEST' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set=root f7ac8333-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
$ sudo reboot
The above does a "boot once" into that custom test kernel, so that subsequent reboots will go back into working kernel.