Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Operating Systems list order on grub2 (openSuse 12.2)

  1. #1

    Default Operating Systems list order on grub2 (openSuse 12.2)

    Hi, there!
    How can I change the order of the list of Operating Systems to boot on Grub 2?
    I couldn't find this option by mean of Yast.

    Can somebody help me?

    Thank you very much.
    [Adrián E. Córdoba]

  2. #2

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    Under GRUB legacy you would have to edit menu.lst.

    There should be a comparable file under GRUB 2.

    There should be manuals for GRUB 2 explaining this.

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Operating Systems list order on grub2 (openSuse 12.2)

    Quote Originally Posted by aecordoba View Post
    Hi, there!
    How can I change the order of the list of Operating Systems to boot on Grub 2?
    I couldn't find this option by mean of Yast.

    Can somebody help me?

    Thank you very much.
    As best as I can tell, there is no method included to set the menu order. You can however edit the grub.cfg file, once you understand how it is constructed, to move menu entries around. Any such changes will be over written on the next grub 2 update. A few certain things seem to occur.

    1. The top entry, just called openSUSE, will be the more recent kernel version installed on the system.
    2. The advanced option will be all kernel versions installed, they seem be displayed with the most recent on top. The most recent kernel installed with then appear twice taking the openSUSE name and its full name by kernel version.
    3. The menu entries for a standard load and its recovery entry are shown in pairs, standard first, recovery second.
    4. If a Windows boot entry is found, it will appear on the first menu screen, below the advanced menu entry. (Most recent first entry called openSUSE, Advanced menu options second and Windows option, third, if it exists.)

    I have a bash script, useful in managing and editing Grub 2 files you can find here:

    GNU Grub2 Command Help/Config Editor - Version: 1.80 - Blogs - openSUSE Forums

    Thank You,
    Last edited by jdmcdaniel3; 14-Sep-2012 at 14:25.
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    "Simply" add your own pipe in /etc/grub.d/30_os-prober to achieve the sort order you want. Depending on what you have to sort and how, the command line might be more or less tricky. For example, on a sytem where os-prober outputs this:

    Code:
    # os-prober
      No volume groups found
    /dev/sda1:Windows NT/2000/XP (loader):Windows:chain
    /dev/sda13:Fedora release 16 (Verne):Fedora:linux
    /dev/sda15:Debian GNU/Linux (squeeze/sid):Debian:linux
    /dev/sda6:Ubuntu 12.04.1 LTS (12.04):Ubuntu:linux
    /dev/sdb1:Windows NT/2000/XP (loader):Windows1:chain
    /dev/sdb3:FreeBSD:FreeBSD 8.1-RELEASE:freebsd
    /dev/sdb6:Arch Linux (rolling):archlinux:linux
    The following sort command would put Windows entries last:

    Code:
    # os-prober | sort -t ":" -k 2
      No volume groups found
    /dev/sdb6:Arch Linux (rolling):archlinux:linux
    /dev/sda15:Debian GNU/Linux (squeeze/sid):Debian:linux
    /dev/sda13:Fedora release 16 (Verne):Fedora:linux
    /dev/sdb3:FreeBSD:FreeBSD 8.1-RELEASE:freebsd
    /dev/sda6:Ubuntu 12.04.1 LTS (12.04):Ubuntu:linux
    /dev/sdb1:Windows NT/2000/XP (loader):Windows1:chain
    /dev/sda1:Windows NT/2000/XP (loader):Windows:chain
    This one would put Windows entries first:
    Code:
    # os-prober | sort -r -t ":" -k 2
      No volume groups found
    /dev/sda1:Windows NT/2000/XP (loader):Windows:chain
    /dev/sdb1:Windows NT/2000/XP (loader):Windows1:chain
    /dev/sda6:Ubuntu 12.04.1 LTS (12.04):Ubuntu:linux
    /dev/sdb3:FreeBSD:FreeBSD 8.1-RELEASE:freebsd
    /dev/sda13:Fedora release 16 (Verne):Fedora:linux
    /dev/sda15:Debian GNU/Linux (squeeze/sid):Debian:linux
    /dev/sdb6:Arch Linux (rolling):archlinux:linux
    So if you want Windows entrie to appear after all other entries (at least the ones detected by os-prober) you would have to replace this line in /etc/grub.d/30_os-prober
    Code:
    OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
    with:
    Code:
    OSPROBED="`os-prober | sort -t ":" -k 2 | tr ' ' '^' | paste -s -d ' '`"
    That's a very simple case though. If you need a more complicated sorting, you might have to use a more complicated command, which could involve some awk and sed magic.

  5. #5

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    Quote Originally Posted by ratzi View Post

    There should be a comparable file under GRUB 2.

    There should be manuals for GRUB 2 explaining this.
    There should be more helpful answers ...

  6. #6

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    Would be nice to have a Yast module to configure the boot order,like in grub 1...just dreaming!

  7. #7
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    I don't pretend to have fully understood it, but there is a lot of info here:
    openSUSE 12.2: Chapter 10. The Boot Loader GRUB2

    And what seems to be on first look, a nice tutorial here:
    GRUB 2 bootloader - Full tutorial

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  8. #8
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    And as some of you know only too well, I am a bit of an idiot when it comes to linuxery, but here is a GUI Grub customizer app, it needs to be compiled from sorce, but there is a very clear step-by-step... I have just done it, and although I have not yet messed with my GRUB2, and am using a sandbox non-vital install ATM, it seems to work, or at least start... The last step, launching it, must of course be changed to # kdesu grub-customizer

    https://answers.launchpad.net/grub-customizer/+faq/1397

    Some instructions for use here (for 'buntu, but still):

    How to Configure the Linux Grub2 Boot Menu the Easy Way - How-To Geek

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  9. #9
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    Well... It SEEMS to work, but the menu changes I make seem not to take effect. Also the environment needs to be adjusted to suit openSuse layout...
    Here is what I have done, I could not find one entry, perhaps someone could point me in the right direction!


    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  10. #10

    Default Re: Operating Systems list order on grub2 (openSuse 12.2)

    Quote Originally Posted by wakou View Post
    And as some of you know only too well, I am a bit of an idiot when it comes to linuxery, but here is a GUI Grub customizer app, it needs to be compiled from sorce, but there is a very clear step-by-step... I have just done it, and although I have not yet messed with my GRUB2, and am using a sandbox non-vital install ATM, it seems to work, or at least start... The last step, launching it, must of course be changed to # kdesu grub-customizer
    If it's about sorting boot entries, I implemented this feature in the meantime in updategrub. You just need to install this package from my repo, set the variables GRUB_OS_PROBER_SORT and GRUB_OS_PROBER_SKIP in /etc/default/grub and refresh the Grub menu - as often as you need - with the command:

    Code:
    # updategrub -a
    The option "-a" means that it is going to use an alternate os-prober script called 30_os-prober_alt. This script is included in updategrub package.

    Here's what I'm using:

    Code:
    GRUB_OS_PROBER_SORT="Ubuntu Mint openSUSE Mandriva Fedora Arch Debian Gentoo FreeBSD NetBSD OpenBSD Windows"
    GRUB_OS_PROBER_SKIP="recovery failsafe fallback single-user"
    If you're afraid of writing grub.cfg (I bet you are) or don't trust me (I bet you don't), you can add the option "-d" to print the menu to standard ouput and do what you want with this output - including redirecting it to a file.

    Code:
    # updategrub -ad
    This command won't modify grub.cfg.
    Although updategrub will work with os-prober 1.49 from standard repo and doesn't require a higher version, it will work even better with os-prober 1.56 from my repo. (last time I checked openSUSE 12.2 was still using os-prober 1.49 . Right now, I don't know, as the package search doesn't seem to respond.)



    * For french readers, this topic was widely discussed in the french forum - among other things - starting at post #29 of this thread: http://forums.opensuse.org/franaais-...ml#post2497763.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •