installer.sh: add vga=xxx and nomodeset kernel options to installed system if found in live /proc/cmdline
This commit is contained in:
parent
f9d8281bff
commit
8047151ceb
@ -435,6 +435,23 @@ if [ "$INSTALL_BOOTLOADER_DEVICE" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
CMDLINE=`cat /proc/cmdline`
|
||||
echo $"Current kernel command line is '$CMDLINE'"
|
||||
VGA_ADD=`echo $CMDLINE | grep "vga=" | sed "s|.*\(vga=[0-9]*\).*|\1|"`
|
||||
NOMODESET_ADD=`echo $CMDLINE | grep "nomodeset" | sed "s|.*\(nomodeset\).*|\1|"`
|
||||
if [ "$VGA_ADD" ]; then
|
||||
GRUB_CMDLINE_ADD="$VGA_ADD"
|
||||
echo $"Adding $VGA_ADD to kernel command line"
|
||||
fi
|
||||
if [ "$NOMODESET_ADD" ]; then
|
||||
GRUB_CMDLINE_ADD="$GRUB_CMDLINE_ADD $NOMODESET_ADD"
|
||||
echo $"Adding '$NOMODESET_ADD' to kernel command line"
|
||||
fi
|
||||
if [ "$GRUB_CMDLINE_ADD" ]; then
|
||||
sed -i "s|GRUB_CMDLINE_LINUX=\"\(.*\)\"|GRUB_CMDLINE_LINUX=\"\1 $GRUB_CMDLINE_ADD\"|" $MOUNTPOINT/etc/default/grub
|
||||
fi
|
||||
|
||||
echo "GRUB_INSTALL_DEVICE=$INSTALL_BOOTLOADER_DEVICE_BYID" >> $MOUNTPOINT/etc/sysconfig/grub
|
||||
if [ "$INSTALL_BOOTLOADER_DEVICE_INTERNAL" != "1" ]; then
|
||||
echo $"Installing grub bootloader on removable device $INSTALL_BOOTLOADER_DEVICE"
|
||||
|
Loading…
Reference in New Issue
Block a user