mkimage-profiles/features.in/grub/cfg.in/30live.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

10 lines
400 B
INI

menuentry $"LiveCD (no hard disk needed)" --id 'live' {
savedefault
echo $"Loading Linux vmlinuz$KFLAVOUR ..."
linux$linux_suffix /boot/vmlinuz$KFLAVOUR fastboot live @initrd_bootargs@ @stagename@=live ramdisk_size=@live_size@ showopts lowmem vga=@bootvga@ @bootargs@ $EFI_BOOTARGS lang=$lang
echo $"Loading initial ramdisk ..."
initrd$linux_suffix /boot/@initrd@$KFLAVOUR.@initrd_ext@
}