2

I located iso file on (hd0,gpt7)/iso/ubuntu-20.10-desktop-amd64.iso

On GRUB commandline, I typed like below.

set root=(hd0,gpt7)
set iso=/iso/ubuntu-20.10-desktop-amd64.iso
loopback l $iso
linux (l)/casper/vmlinuz root=casper iso-scan/filename=$iso
initrd (l)/casper/initrd
boot

Ubuntu booted. But could not installed Ubuntu with error. It took so many hours checking system.

user645265
  • 29
  • 2
  • Does this answer your question? [Is checking disc necessary while booting Ubuntu from USB?](https://askubuntu.com/questions/1299014/is-checking-disc-necessary-while-booting-ubuntu-from-usb) – karel Feb 21 '21 at 01:58
  • 1
    If it took that long to check the system, you would do well to verify the .iso. – KGIII Feb 21 '21 at 02:19
  • You need to add the parameter `toram` at the end of the linux line if you want to install Ubuntu to a running system Then you will need to unmount isodevice before installing. `sudo umount -lrf /isodevice`. I will write out a proper answer for you. The procedure is similar to the instructions on this page: https://askubuntu.com/questions/855039/can-ubuntu-be-installed-to-the-pendrive-it-was-booted-from – C.S.Cameron Feb 21 '21 at 03:35

1 Answers1

4

Installing Ubuntu to Internal HDD from ISO booted on the HDD

Your /boot/grub/grub.cfg file should have a menuentry similar to:

menuentry "isoname ISO" {
    set root=(hdX,Y)
    set isofile="/[path]/[name].iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram --
        initrd (loop)/casper/initrd
}

The toram item is critical.

Boot the computer selecting the above menuentry.

Unmount all partitions. To unmount the Live iso run:

sudo umount -lrf /isodevice

Confirm all partitions are unmounted. You should be running totally in RAM.

Run the Ubuntu installer. I generally use the Something else option.

You may want to run sudo update-grub on reboot.

C.S.Cameron
  • 18,890
  • 10
  • 64
  • 105