You are not logged in.

#1 2018-01-15 05:25:46

moham_96
Member
Registered: 2016-08-10
Posts: 10

grub-mkconfig not applying grub_cmdline_linux on other distros

Hi,
i have an arch installation on sda2 and swap partition on sda1 and now i added a manjaro install on sda4 (without installing manjaro's bootloader) so the master bootloader is controlled by arch

/dev/sda1: LABEL="swap" UUID="7dcf0f9f-7990-42ff-baf7-515af0bde0d0" TYPE="swap" PARTUUID="797e5b2a-01"
/dev/sda2: LABEL="Arch" UUID="7ee864f2-0f3f-4aef-ab09-d0695e6ead7c" TYPE="ext4" PARTUUID="797e5b2a-02"
/dev/sda3: LABEL="Data" UUID="15f60cbe-3ae5-4df4-aba5-ef27e0c33eea" TYPE="ext4" PARTUUID="797e5b2a-03"
/dev/sda4: LABEL="manjaro" UUID="3c6aa801-65dd-4d29-89d3-39ae05f9cecf" TYPE="ext4" PARTUUID="797e5b2a-04"

I have this config in my /etc/default/grub:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=7dcf0f9f-7990-42ff-baf7-515af0bde0d0"
GRUB_CMDLINE_LINUX=""

so that i want the resume parameter to be passed to all my distros when creating grub config but it's only being applied to arch's kernel

when running sudo grub-mkconfig -o /boot/grub/grub.cfg


Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image(s) in /boot: intel-ucode.img initramfs-linux.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
Found Manjaro Linux (17.1.1) on /dev/sda4
done

so manjaro partition is identified and added to the /boot/grub/grub.cfg but the resume is not added to it

this is the arch portion in my /boot/grub/grub.cfg

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7ee864f2-0f3f-4aef-ab09-d0695e6ead7c' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7ee864f2-0f3f-4aef-ab09-d0695e6ead7c
	else
	  search --no-floppy --fs-uuid --set=root 7ee864f2-0f3f-4aef-ab09-d0695e6ead7c
	fi
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=7ee864f2-0f3f-4aef-ab09-d0695e6ead7c rw  resume=UUID=7dcf0f9f-7990-42ff-baf7-515af0bde0d0
	echo	'Loading initial ramdisk ...'
	initrd  /boot/intel-ucode.img /boot/initramfs-linux.img
}

And this is manjaro section

menuentry 'Manjaro Linux (17.1.1) (on /dev/sda4)' --class manjarolinux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-3c6aa801-65dd-4d29-89d3-39ae05f9cecf' {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos4'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4  3c6aa801-65dd-4d29-89d3-39ae05f9cecf
	else
	  search --no-floppy --fs-uuid --set=root 3c6aa801-65dd-4d29-89d3-39ae05f9cecf
	fi
	linux /boot/vmlinuz-4.9-x86_64 root=UUID=3c6aa801-65dd-4d29-89d3-39ae05f9cecf rw quiet
	initrd /boot/intel-ucode.img
}

Is this a bug in grub-mkconfig or am i missing something?

Offline

#2 2018-01-15 06:29:05

moham_96
Member
Registered: 2016-08-10
Posts: 10

Re: grub-mkconfig not applying grub_cmdline_linux on other distros

Hi, I  just noticed another problem with grub-mkconfig is that for manjaro it added  /boot/intel-ucode.img as the only initrd while it should have been something like

/boot/intel-ucode.img /boot/initramfs-4.9-x86_64.img

Offline

#3 2018-01-15 06:44:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: grub-mkconfig not applying grub_cmdline_linux on other distros

You know you can just edit it yourself, right? You don't have to accept whatever the tool outputs...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2018-01-15 06:56:53

moham_96
Member
Registered: 2016-08-10
Posts: 10

Re: grub-mkconfig not applying grub_cmdline_linux on other distros

jasonwryan wrote:

You know you can just edit it yourself, right? You don't have to accept whatever the tool outputs...

I know and this is what i've done for the time being but to me this is workaround and this should be fixed in os-prober (or grub-mkconfig not sure) so i don't have to edit the config each time i need to add an argument to all my distros

Offline

#5 2018-01-15 07:12:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: grub-mkconfig not applying grub_cmdline_linux on other distros

moham_96 wrote:

this should be fixed

It won't get fixed if a bug ticket isn't opened upstream.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB