Skip to content

Commit

Permalink
mxgrub: Do not use old command line on reboot
Browse files Browse the repository at this point in the history
When we use `mxgrub --reboot` we don't want to reuse the previous kernel
command line.

Generate a new command line for kexec.

This way, changes we make to $KERNEL_PARAMETER in this script can be activated
by `mxgrub --reboot` as well.
  • Loading branch information
donald committed Aug 2, 2019
1 parent cc211e0 commit 31c784c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mxgrub/mxgrub
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ sub cmd_reboot {
my $image=label_to_image($chosen);
-e "/boot/$image" or die "/boot/$image: no such file\n";
sys('sync');
sys('kexec',"/boot/$image",'--reuse-cmdline','--initrd=/boot/grub/initramfs.igz');
sys('kexec',"/boot/$image",'--initrd=/boot/grub/initramfs.igz',"--command-line=root=LABEL=root $KERNEL_PARAMETER");
}

umask 022;
Expand Down

0 comments on commit 31c784c

Please sign in to comment.