4

In Ubuntu, one can boot a live USB fully to ram using toram option. adding toram option

However this procedure is GUI based. Is there anyway to just write down the toram option to the ISO file so that the bootable USB directly boots from RAM?

The GUI based way to boot Ubuntu from RAM is described here.

Edit: All of the mentioned and proposed idea works. Although, I accepted one solution, One can try any of those methods according to their necessity.

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
Tokai
  • 43

1 Answers1

4

Booting ISO file toram

If you are booting an ISO file,you are likely using GRUB2. You can add toram to the linux line of grub.cfg. right after quiet splash or at the end, one space after --

Boot ISO menuentry may look like:

menuentry "Ubuntu 20.04 ISO" {
    rmmod tpm
    set root=(hd0,1)
    set isofile="/isos/ubuntu-20.04-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile persistent persistent-path=/ub2004-1/ fsck.mode=skip quiet splash toram -- 
        initrd (loop)/casper/initrd
}

More on booting ISO files using a simple BIOS/UEFI template image here: BIOS/UEFI Template Image for Booting ISO Files

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125