You are not logged in.

#1 2012-01-08 00:49:44

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

grub2, fallback & recovery

I've been trying to understand the generation of grub.cfg and the different options available in grub2's menu at boot time. It seems much more complicated than yaboot!

/etc/default/grub contains lines for both GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.

It seems that GRUB_CMDLINE_LINUX options are added to kernel command lines for all linux options? And that GRUB_CMDLINE_LINUX_DEFAULT options are added to the command lines for normal and fallback linux options, but not recovery linux options?

Somebody in the forums also mentioned GRUB_CMDLINE_LINUX_EXTRA as intended for options which should only be applied to normal options but neither fallback nor recovery. However, this option doesn't seem to have any effect.

I'm curious about the exact purpose of the different options. Installing the LTS kernel in addition to the regular one, I seem to get:
- arch linux linux
- arch linux linux fallback
- arch linux linux recovery
- arch linux linux lts
- arch linux linux lts fallback
- arch linux linux lts recovery
But I had thought that the purpose of installing the LTS kernel was precisely to provide a fallback. So there's something I'm not understanding here. It seems that the fallback img files under /boot contain a lot more than the regular ones since the regular ones try to only include the modules etc. which are needed by, I guess, the particular system they are intended for. And the recovery option is simply a version of single-user mode. (I say "a version" just because this seems to have different characteristics on different systems and I'm used to os x's version where the file systems are not mounted automatically in this mode. But I know that's BSD-based.)

I tried booting the normal version of the LTS kernel and it seemed to boot into run level 3 rather than 5 so I think there's a piece missing somewhere and I still haven't got how this works. What tells the system to use level 3 in this case? I'm assuming it reads the same inittab which is where the default run level is defined. Is there a further config file specific to the LTS kernel?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB