You are not logged in.

#1 2010-04-09 17:26:51

gun26
Member
Registered: 2007-07-05
Posts: 55

[SOLVED] grub2 kernel command line customization

On my laptop I've got the Arch grub2 installed and working okay. grub-mkconfig generates a good grub.cfg for me, with one exception: on my manually edited  configuration, I had a couple of parameters on the kernel command line that aren't there in the generated grub.cfg. I've searched for the answer on our wiki and elsewhere and no one seems to address my question, namely, how does one add one's own parameters on the kernel command line in grub2? I'd have thought it would be somewhere in /etc/grub.d/10_linux, or /etc/default/grub, but for the life of me I can't find it.

Last edited by gun26 (2010-04-10 23:18:57)

Offline

#2 2010-04-10 10:33:36

jurkan
Member
From: Germany
Registered: 2010-04-03
Posts: 23

Re: [SOLVED] grub2 kernel command line customization

Look into /etc/default/grub and add:

GRUB_CMDLINE_LINUX="" # Arguments for normal boot and recovery boot
GRUB_CMDLINE_LINUX_EXTRA="" # Arguments for normal boot only

Or manually add an entry in "/etc/grub.d/40_custom".

Offline

#3 2010-04-10 23:18:23

gun26
Member
Registered: 2007-07-05
Posts: 55

Re: [SOLVED] grub2 kernel command line customization

DOH! Thanks for the help, jurkan. Right at the top of my /etc/default/grub I have two lines "GRUB_CMDLINE_LINUX" and "GRUB_CMDLINE_LINUX_DEFAULT". The first one had a null entry but the second already had "quiet" and looks to be the place to add my additional parameters (for rootfstype=ext4 and resume=... ). Dunno what the difference is between your _EXTRA and the _DEFAULT I found in mine. I'll mark this solved. If the grub.cfg I just generated works, I can try out a theme or two. I already have GRUB_GFXMODE and a background image working.

Last edited by gun26 (2010-04-11 00:09:03)

Offline

#4 2010-04-11 07:37:46

jurkan
Member
From: Germany
Registered: 2010-04-03
Posts: 23

Re: [SOLVED] grub2 kernel command line customization

I also don't know the difference between _EXTRA and _DEFAULT, but they are both possible. There maybe a difference when using custom scripts or when autodetecting other OS . . .

Last edited by jurkan (2010-04-11 07:38:02)

Offline

#5 2011-12-19 01:47:53

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

Re: [SOLVED] grub2 kernel command line customization

Note: I tried with both _EXTRA and _DEFAULT and only the latter made any difference to the grub.cfg generated...


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