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.

9
  • Hi..this question may have the answer as one of the point in the below link..
    – PRATAP
    Commented Aug 21, 2020 at 9:56
  • askubuntu.com/q/1175819/739431 point No.5 in the answer..
    – PRATAP
    Commented Aug 21, 2020 at 9:57
  • If you create a persistent live USB boot drive with the tool mkusb, you will find an option, that lets you boot 'live-only to RAM'. You can easily edit the grub.cfg file (in partition #3 of the USB boot drive) to move this menuentry to the top (or even remove the other menuentries).
    – sudodus
    Commented Aug 21, 2020 at 11:19
  • 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 -- will work. I will add a proper answer as soon as I have time. Commented Aug 21, 2020 at 11:44
  • 1
    @sudodus I got the C.S. Cameron's idea. It seems the solution link provided by UnKnown and C.S. Cameron and you , point almost in same direction. Cubic provides a gui in where a menuentry provided by Cameron has to be pasted. Which edits the grub.cfg file you mentioned. I just read a bit and now understand better :) I am trying out all the the ideas for learning. Thanks for your kind notes. I will update the answer after I finish playing with these methods.
    – Tokai
    Commented Aug 21, 2020 at 12:38

1 Answer 1

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

2
  • @Tokai, This works provided that the file system is read/write :-) This is why I suggested a persistent live drive by mkusb, or a 'grub-n-iso' alias 'isoboot' method. (In standard (cloned directly from the iso file) USB boot drives, there is a iso9660 file system which is read-only.)
    – sudodus
    Commented Aug 21, 2020 at 12:29
  • @Tokai: I should mention that sudodus has been working on a Template image for booting ISO files in BIOS and in UEFI modes. It can be installed to a USB from Windows using Rufus or Etcher. It can be installed in Linux using mkusb and Disks. once flashed just add an ISO, or a few, and update grub.cfg if necessary. See: ubuntuforums.org/… for more details. Commented Aug 21, 2020 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .