grub-devel
[Top][All Lists]
Advanced

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

Re: Openwrt x86_64 grub2 fallback feature


From: Alex Nikitenko
Subject: Re: Openwrt x86_64 grub2 fallback feature
Date: Thu, 9 Oct 2014 18:18:13 +0300

Hello, Andrei.

Thank you for you fast reply. I was able to copy this function to grub.cfg. It worked for me with save_env.

Thanks a lot.
Alex





2014-10-09 12:02 GMT+03:00 Andrei Borzenkov <address@hidden>:
On Thu, Oct 9, 2014 at 12:40 PM, Alex Nikitenko
<address@hidden> wrote:
> Hello.
>
> I was trying to bring up GRUB fallback feature on x86_64 based OpenWRT
> build.
> I used this article as a reference.
> http://www.linuxscrew.com/2012/04/24/grub-fallback-boot-good-kernel-if-new-one-crashes/
> It's for Fedora, but I hope, that I can do something similar for openwrt.
>
> Here's my config:
>
> serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1
> terminal_input console serial; terminal_output console serial
>
>
> set default="saved"
> set timeout="5"
> set root='(hd0,msdos1)'
> set fallback="0 1"
>
> menuentry "OpenWrt" {
>         linux /boot/vmlinuz root=/dev/sda2 rootfstype=ext4 rootwait
> console=tty0 console=ttyS0,38400n8 noinitrd
>         savedefault fallback
> }
>
> menuentry "OpenWrt-backup" {
>         linux /boot/vmlinuz-backup root=/dev/sda3 rootfstype=ext4 rootwait
> console=tty0 console=ttyS0,38400n8 noinitrd
>         savedefault fallback
> }
>
> menuentry "OpenWrt (failsafe)" {
>         linux /boot/vmlinuz failsafe=true root=/dev/sda2 rootfstype=ext4
> rootwait console=tty0 console=ttyS0,38400n8 noinitrd
> }
>
> But, when I try to boot  openwrt with this config I get message, that
> command is not recognized.
>
> Booting `OpenWrt'
> error: can't find command `savedefault'.

savedefault is function defined in /etc/grub.d/00_header which is used
by grub-mkconfig. If you do not use grub-mkconfig, you need to simply
use save_env explicitly or copy function in your grub.cfg.

> Press any key to continue...
>
> I believe, that in order to make fallback feature work, I need loadenv
> module enabled. I enabled it, but it didn't help.
> I also found an information, that I might be getting troubles with
> savedefault because my kernel and rootfs are stored on 4GB USB stick. Is
> this a problem?
> Can I reconfigure a grub somehow in order to have this feature?
>
> Thanks,
> Alex
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel


reply via email to

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