grubby

Tod Merley todbot88 at gmail.com
Mon Nov 5 02:25:52 UTC 2007


On Nov 4, 2007 11:25 AM, fuzzie1300 <fuzzie1300 at optonline.net> wrote:
> How do I use grubby to set a kernel to boot once then reset to another
> kernel?
>
>  Previously I did this on FC 5:
>
>  echo "savedefault --default=1 --once quit" | grub
>
>  grub.conf:
>  default saved
>  default=0
>  timeout=5
>  splashimage=(hd0,0)/grub/splash.xpm.gz
>  hiddenmenu
>  title FC (2.6.18-1.2239.fc5smp)
>  root (hd0,0)
>  kernel /vmlinuz-2.6.18-1.2239.fc5smp ro root=/dev/rootvg/rootlv01
>  initrd /initrd-2.6.18-1.2239.fc5smp.img
>  savedefault
>
>  title Power Off
>  savedefault --default=0
>  halt
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>

Hi  fuzzie1300,

I would probably find a good place in the shutdown process, test for
the use of the onetime kernel and then have it swap out
/boot/grub/grub.conf with one pointing to the new kernel.  Since it
looks for the use of the old kernel it would never execute again, as
if that mattered.

Good Hunting!

Tod




More information about the fedora-list mailing list