1

i want boot ubuntu iso file pure from ramdisk/memdisk so hdd only used for copying or extracting the iso image to ramdisk, so partition is not locked by system cause used by iso file.....i was read to using memdisk but failed with error message kernel must load first

My grub2 Config :

menuentry "Ubuntu Desktop 20.04" --class ubuntu {
        insmod ntfs
        insmod memdisk
        set isoDRV=(hd2,gpt2)
        set isoDIR="/ISO-SOFT/OS/LINUX"
        set IsoFILE="ubuntu-20.04-desktop-amd64.iso"
    ## i just try this but fail :(
    linux16 memdisk $isoDRV/$isoDIR/$IsoFILE 
    initrd16 (memdisk)/casper/initrd
  }

can this be done as I mean?

Mortred
  • 46

1 Answers1

2

Experience with Booting ISO file toram

I booted a Ubuntu ISO file using GRUB2 with the following menuentry.

menuentry "Ubuntu 20.04 ISO" {
    rmmod tpm
    set root=(hd0,3)
    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
}

Opened Nautilus and entered sudo umount -lrf /dev/sdxy Where sdxy is the partition containing the running ISO file.

Then opened Nautilus and clicked the little triangle on the left next to a partition on the ISO's USB.

Received a message that it was safe to remove the drive. I did so.

Then plugged the USB drive back in and proceeded to modify the unlocked partition.

When work was complete shut down the computer as normal.

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