Commit e0aa88b7 authored by Anton Midyukov's avatar Anton Midyukov

grub: Add EFI_BOOTARGS into BOOT/EFI/grub.cfg

Pay attention to what you are adding to the variable. No need to add language and live_rw there! Они нужны только для refind.
parent 40fb799e
......@@ -3,7 +3,7 @@ default='linux'
menuentry 'Install @relname@' --hotkey 'i' --id 'linux' {
echo "Loading Linux vmlinuz$KFLAVOUR ..."
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@ lang=$lang
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@ @efi_bootargs@ lang=$lang
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'VNC install @relname@ (edit to set server IP address)' --id 'vncconnect' {
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP lang=$lang
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ @efi_bootargs@ headless no_alt_virt_keyboard vncconnect=IP lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'VNC install @relname@ (edit to set password and connect here)' --id 'vncpasswd' {
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ @efi_bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'LiveCD (no hard disk needed)' --id 'live' {
echo "Loading Linux vmlinuz$KFLAVOUR ..."
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@ lang=$lang
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@ @efi_bootargs@ lang=$lang
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
......
menuentry 'LiveCD with sessions support' --id 'session' {
echo "Loading Linux vmlinuz$KFLAVOUR ..."
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@ lang=$lang
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@ @efi_bootargs@ lang=$lang
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Rescue LiveCD' --id 'rescue' {
echo "Loading Linux vmlinuz$KFLAVOUR ..."
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ @efi_bootargs@
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Rescue with sessions support' --id 'rescue_session' {
echo "Loading Linux vmlinuz$KFLAVOUR ..."
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ @efi_bootargs@ live_rw
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Forensic mode (leave disks alone)' --id 'rescue_forensic' {
echo "Loading Linux vmlinuz$KFLAVOUR ..."
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 forensic hash=@rescue_hash@
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ @efi_bootargs@ max_loop=16 forensic hash=@rescue_hash@
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full.cz
}
menuentry 'Rescue with remote SSH access (DHCP)' --id 'rescue_remote' {
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 ip=dhcp port=22 rootpw=AUTO hash=@rescue_hash@
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ @efi_bootargs@ max_loop=16 ip=dhcp port=22 rootpw=AUTO hash=@rescue_hash@
echo 'Loading initial ramdisk ...'
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Check this media for defects' --id 'mediachk' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@
linux@linux_suffix@ @boot_path@/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@ @efi_bootargs@
initrd@linux_suffix@ @boot_path@/full.cz
}
......@@ -73,8 +73,13 @@ distro: bootargs
# pass over additional parameters, if any
bootargs: clean
@if [ -n "$(EFI_BOOTARGS)" ]; then \
echo "$(EFI_BOOTARGS)" > $(DSTDIR)/EFI_BOOTARGS; \
fi
@if [ -n "$(STAGE2_BOOTARGS)" ]; then \
sed -i "s,@bootargs@,$(STAGE2_BOOTARGS)," $(DSTCFGS); \
[ -f $(DSTDIR)/EFI_BOOTARGS ] && \
sed -i "s/$(STAGE2_BOOTARGS)//" $(DSTDIR)/EFI_BOOTARGS; \
fi; \
sed -i "s,@bootargs@,," $(DSTCFGS)
@if [ -n "$(RESCUE_BOOTARGS)" ]; then \
......
......@@ -5,6 +5,8 @@
CFG="$WORKDIR/boot/grub/grub.cfg"
CFG_EFI="$WORKDIR/EFI/BOOT/grub.cfg"
if [ -n "$GLOBAL_EFI_BOOTLOADER" -a ! "$GLOBAL_EFI_BOOTLOADER" = "grub-efi" ]; then
rm -fr "$WORKDIR/boot"
exit 0
......@@ -64,11 +66,19 @@ fi
if [ -f "$CFG" ]; then
default_change "$CFG"
sed -i 's,@boot_path@,/boot,g' "$CFG"
sed -i 's,@efi_bootargs@,,g' "$CFG"
fi
if [ -f .in/EFI_BOOTARGS ]; then
EFI_BOOTARGS=$(cat .in/EFI_BOOTARGS)
fi
if [ -f "$CFG_EFI" ]; then
default_change "$CFG_EFI"
sed -i 's,@boot_path@,/EFI/BOOT,g' "$CFG_EFI"
[ -n "$EFI_BOOTARGS" ] &&
sed -i "s,@efi_bootargs@,$EFI_BOOTARGS,g" "$CFG_EFI"
sed -i "s, @efi_bootargs@,,g" "$CFG_EFI"
fi
# change @linux_suffix@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment