Re: [opensuse] Howto set next OS to boot from CLI like done with KDE logout/shutdown??



On Thu, 25 Jun 2009, 07:14:41 +0200, David C. Rankin wrote:
Listmates (Anders -- you listening??)

In KDE when I select shutdown, I can choose which OS to boot
next on restart from the drop down list which apparently reads
the grub entries and then sets a flag to boot one of the other
OS's.

What flag or variable is being set by the little restart menu
options ... and ... how do I set it from the command line?

There is not just one option to do this, of course. If you're using a
_standard_ Grub setup, i.e. just *one* Grub on the disk, you can call

grubonce

This will list the bootable items available with a number prefixed. Then
call

grubonce number

where number is the variant you want to boot into.

Another, perhaps more interesting option is using "kexec" to preload
another kernel image (you can even specify completely different kernel
options than those given in the Grub configuration); when you reboot the
system (and you're on a pretty current installation: grep for kexec in
/etc/init.d/reboot), the system shuts down and then immediately boots
into the new/preloaded kernel, bypassing all slow BIOS
initializations...

I use a _non_standard_ Grub setup (stacked Grub's, with the MBR Grub
configured to chainload each other OS/Grub), so the first option is not
that easy to achieve (solution would be to use a different "grubonce").

HTH, cheers.

l8er
manfred
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: changing default os in grub
    ... > I've just installed a 2.6.8 kernel in Sarge and was ... > hoping the adjustment to grub would return Sarge to ... # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST ... # This entry automatically added by the Debian installer for an existing ...
    (Debian-User)
  • Re: booting linux using a floppy
    ... which kernel of the list to boot from. ... Note that this will at this point remove your ability to boot into windows. ... I think I recall that you said the grub loader... ... and grub will search for a partition containing grub's stage2 file ...
    (comp.os.linux.misc)
  • Re: Debian bootable on external USB-harddisk
    ... > They are all on the external harddisk since I want to boot from this ... >> fail if you have placed the kernel and initrd on the external ... >> available from BIOS. ... >> grub stage one on the external disk. ...
    (comp.os.linux.setup)
  • Re: Installing grub for a different computer
    ... > root ... > menu - I guess there's only one kernel present). ... Boot with the floppy ... After entering the commands above for root, kernel and initrd grub is ...
    (Fedora)
  • Re: Naming harddisks (Linux)
    ... But I also see that for an USB drive it uses /dev/sdas the ... Does GRUB recognize SCSI drives? ... The first step in understanding the boot process is to ... The bootloader's job is to load the OSs kernel. ...
    (comp.os.linux.misc)