This is useful if you have a machine with lots of ram (at least 1GiB
larger than the iso) in the machine, and would like to remove the USB
stick after the image has booted.
This has been tested on the Arch, Ubuntu, and Tails images.
insmod progress
insmod regexp
search --set=root --label $PARTITION_LABEL
insmod progress
insmod regexp
search --set=root --label $PARTITION_LABEL
+set maybe_to_ram=''
+
+menuentry "Copy ISO image to ram before booting" {
+ # copytoram is used by arch
+ # toram is used by casper based images (tails, Ubuntu, etc)
+ set maybe_to_ram="copytoram toram"
+}
function setup_arch {
menuentry "\$1" {
loopback loop \$1
echo "Loading kernel..."
function setup_arch {
menuentry "\$1" {
loopback loop \$1
echo "Loading kernel..."
- linux (loop)/arch/boot/x86_64/vmlinuz-* img_label=${PARTITION_LABEL} img_loop=\$1 archisobasedir=arch earlymodules=loop
+ linux (loop)/arch/boot/x86_64/vmlinuz-* img_label=${PARTITION_LABEL} img_loop=\$1 archisobasedir=arch earlymodules=loop \$maybe_to_ram
echo "Loading initrd (and microcode if they exist)..."
initrd (loop)/arch/boot/*.img (loop)/arch/boot/x86_64/initramfs-*.img
}
echo "Loading initrd (and microcode if they exist)..."
initrd (loop)/arch/boot/*.img (loop)/arch/boot/x86_64/initramfs-*.img
}
menuentry "\$1" {
loopback loop \$1
echo "Loading kernel..."
menuentry "\$1" {
loopback loop \$1
echo "Loading kernel..."
- linux (loop)/live/vmlinuz* initrd=/live/initrd.img boot=live config iso-scan/filename=\$1 findiso=\$1 nopersistence noprompt timezone=Etc/UTC noautologin module=Tails slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 init_on_free=1 mds=full,nosmt splash quiet
+ linux (loop)/live/vmlinuz* initrd=/live/initrd.img boot=live config iso-scan/filename=\$1 findiso=\$1 nopersistence noprompt timezone=Etc/UTC noautologin module=Tails slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 init_on_free=1 mds=full,nosmt splash quiet \$maybe_to_ram
echo "Loading initrd..."
initrd (loop)/live/initrd*
}
echo "Loading initrd..."
initrd (loop)/live/initrd*
}