help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: list options & set-default for 'Advanced options'? " Please don't us


From: Andrei Borzenkov
Subject: Re: list options & set-default for 'Advanced options'? " Please don't use old title" ?
Date: Sat, 28 Jan 2017 09:34:52 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

27.01.2017 21:31, address@hidden пишет:
> I run
> 
>       grub2-mkconfig --version
>               grub2-mkconfig (GRUB2) 2.02~beta3
> 
> I've used a convenience script to list Grub2 options to console
> 
>       grub2-select_2.sh
>               #!/bin/bash
>               oIFS="$IFS"
>               IFS="'\""
>               grep menuentry /boot/grub2/grub.cfg | \
>                while read ignore line ignoreb ; do
>                 echo "$line"|grep -ve ^\\$ -ve ^\-
>                done
>               IFS="$oIFS"
> 
> E.g.
> 
>       sh /usr/local/scripts/grub2-select_2.sh
> 
> returns
> 
>       openSUSE Leap 42.2
>       Advanced options for openSUSE Leap 42.2
>       openSUSE Leap 42.2, with Linux 4.9.6-1.gd1207ac-default
>       openSUSE Leap 42.2, with Linux 4.9.6-1.gd1207ac-default (recovery mode)
>       openSUSE Leap 42.2, with Linux 4.9.6-1.g413b315-default
>       openSUSE Leap 42.2, with Linux 4.9.6-1.g413b315-default (recovery mode)
>       openSUSE Leap 42.2, with Linux 4.9.5-3.g9bb1a8a-default
>       openSUSE Leap 42.2, with Linux 4.9.5-3.g9bb1a8a-default (recovery mode)
>       openSUSE Leap 42.2, with Linux 4.8.11-2.gff417d1-default
>       openSUSE Leap 42.2, with Linux 4.8.11-2.gff417d1-default (recovery mode)
>       halt
> 
> If I set the grub default
> 
>       grub2-set-default "openSUSE Leap 42.2, with Linux 
> 4.9.5-3.g9bb1a8a-default"
> 
> it completes successfully, reporting no error at console.
> 
> BUT, If I next
> 
>       grub2-mkconfig -o /boot/grub2/grub.cfg
> 
> it now/recently returns a warning
> 
>       ...
>       Warning: Please don't use old title `openSUSE Leap 42.2, with Linux 
> 4.9.5-3.g9bb1a8a-default' for GRUB_DEFAULT, use `Advanced options for 
> openSUSE Leap 42.2>openSUSE Leap 42.2, with Linux 4.9.5-3.g9bb1a8a-default' 
> (for versions before 2.00) or 
> `gnulinux-advanced-1a627a30-b16c-49f0-96e2-1916939bac89>gnulinux-4.9.5-3.g9bb1a8a-default-advanced-1a627a30-b16c-49f0-96e2-1916939bac89'
>  (for 2.00 or later)
>       ...
>       done
>       ...
> 
> Setting
> 
>       grub2-set-default 
> "gnulinux-advanced-1a627a30-b16c-49f0-96e2-1916939bac89>gnulinux-4.9.5-3.g9bb1a8a-default-advanced-1a627a30-b16c-49f0-96e2-1916939bac89"
> 
> works jsut fine, and there's no further complaint from grub2-mkconfig.
> 
> Is there a more elucidating way to list the available Grub2 options in more 
> detail to start?  I.e., to get to the 
> 
>       
> gnulinux-advanced-1a627a30-b16c-49f0-96e2-1916939bac89>gnulinux-4.9.5-3.g9bb1a8a-default-advanced-1a627a30-b16c-49f0-96e2-1916939bac89
> 
> right off the bat?
> 

Change your script to output it instead of menu title. Not sure I
understand the question, sorry.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]