mkimage-profiles/features.in/grub/cfg.in/80rescue.cfg
Dmitriy Terekhin efec47fa42 grub: save ang read default menu item
If the ISO image has a FAT partition and the image is written
to a flash drive, then it is possible to write to this partition
of the flash drive.
This is necessary, for example, if the user
does not want to install the system, but wants to constantly work
in LiveCD mode with or without recording sessions.
In order for this code to work, you need to make changes
to the FAT partition of the image on the flash drive:
Add the 1st line to the grub.cfg file:
set pfxfat=${prefix}
Write a 1kb file grubenv.
If grub.cfg contains a line like '^default=id',
then the read value is not used.
2021-05-19 15:55:44 +04:00

8 lines
384 B
INI

menuentry $"Rescue LiveCD" --id 'rescue' {
savedefault
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
linux$linux_suffix /boot/vmlinuz$KFLAVOUR changedisk fastboot live @initrd_bootargs@ @stagename@=rescue ramdisk_size=@rescue_size@ splash=0 showopts @rescue_bootargs@ $EFI_BOOTARGS
echo $"Loading initial ramdisk ..."
initrd$linux_suffix /boot/@initrd@$KFLAVOUR.@initrd_ext@
}