Bug#302276: update-grub does not use fallback
devlin
devlin <devlin@softhome.net>, 302276@bugs.debian.org
Wed, 30 Mar 2005 15:49:11 -0800
This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.
--=_jive-1434-1112226568-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Package: grub
Version: 0.95+cvs20040624-16
Tags: patch
Grub's fallback isn't supported by update-grub. If you want to use
update-grub and fallback, you need to edit menu.lst after each run of
update-grub.
I made a patch to update-grub that allows fallback. It creates a new
comment for grub's fallback option in the template configuration, and
creates a new update-grub option fallbackstanzas to use 'savedefault
fallback' to each automagic stanza.
With the patch, I'm running update-grub as usualy, and safely doing
remote reboots into new Debian and custom kernel packages.
--=_jive-1434-1112226568-0001-2
Content-Type: text/plain; name="update-grub.patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="update-grub.patch"
303a304,306
> # should grub create automagic stanzas to use fallback
> fallbackstanzas="true"
>
324a328,336
> ## fallback num
> # Set the fallback entry to the entry number NUM. Numbering starts from 0.
> # Requires 'default saved' above and 'savedefault fallback' in each stanza that
> # will fall back on failure. Also requires a numbered boot stanza that will be
> # the fallback. It is suggested to add a known-good stanza before the AUTOMAGIC
> # KERNEL LIST. To have grub use fallback in all automagic stanzas, use the
> # 'fallbackstanzas' option below.
> # fallback 1
>
560a573
> fallbackstanzas=${10}
577c590,594
< echo "savedefault" >> $buffer
---
> if test x"$fallbackstanzas" = x"true" ; then
> echo "savedefault fallback" >> $buffer
> else
> echo "savedefault" >> $buffer
> fi
645a663,665
> # Extract the fallbackstanzas value
> fallbackstanzas=$(GetMenuOpt "fallbackstanzas" "$fallbackstanzas")
>
704d723
<
710a730,735
> echo "## should update-grub create automagic stanzas to use fallback" >> $buffer
> echo "## e.g. fallbackstanzas=true" >> $buffer
> echo "## fallbackstanzas=false" >> $buffer
> echo "# fallbackstanzas=$fallbackstanzas" >> $buffer
> echo >> $buffer
>
799c824
< "$currentOpt" "" "$initrd" "true"
---
> "$currentOpt" "" "$initrd" "true" "$fallbackstanzas"
810c835
< "true"
---
> "true" "$fallbackstanzas"
829c854
< "$kernel" "$currentOpt" "" "$initrd" "false"
---
> "$kernel" "$currentOpt" "" "$initrd" "false" "$fallbackstanzas"
--=_jive-1434-1112226568-0001-2--