You are not logged in.

#1 2024-07-21 19:40:34

saleem
Member
Registered: 2011-09-21
Posts: 168

{SOLVED} Booting arch linux ISO from Hard disk

Hi,

I am experimenting with booting archlinux iso from hard disk through my existing grub , I placed iso inside a folder at the root of existing arch linux with grub working and entered the following entry for iso into the grub

menuentry "Arch ISO" {
    set isofile="/bobiso/archlinux.iso"
    set dri="free"
    set lang="en_US"
    set keytable="us"
    set timezone="Europe/Helsinki"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=abc
    set pqr="/dev/disk/by-uuid/$abc"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_loop=$isofile driver=$dri tz=$timezone lang=$lang keytable=$keytable copytoram
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img 
}

Iso boots from grub but stops and keeps looking for

"/dev/disk/by-uuid/$abc" 

and then drops me into # shell

What can I change in the above entry to make this iso boot from hard disk?

Last edited by saleem (2024-07-21 20:51:34)

Offline

#2 2024-07-21 20:16:30

kermit63
Member
Registered: 2018-07-04
Posts: 370

Re: {SOLVED} Booting arch linux ISO from Hard disk

Is your root an lvm partition?

The reason I'm asking is I can never get this to work if the iso is contained within an lvm, even if I added insmod_lvm to grub. However, it works if I move the iso into a partition outside the lvm.

BTW, your config is pretty similar to mine.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#3 2024-07-21 20:32:14

saleem
Member
Registered: 2011-09-21
Posts: 168

Re: {SOLVED} Booting arch linux ISO from Hard disk

kermit63 wrote:

Is your root an lvm partition?

The reason I'm asking is I can never get this to work if the iso is contained within an lvm, even if I added insmod_lvm to grub. However, it works if I move the iso into a partition outside the lvm.

BTW, your config is pretty similar to mine.

No the ISO is in the root directory within a folder , no lvm . I made some changes to the entry as below but I still get the same error

menuentry "Arch ISO" {
    insmod ext2
    insmod loopback
    insmod iso9660
    set root=(hd0,20)
    #set isopartition=hd0,20
    search --no-floppy --fs-uuid --set=root e29834fc-6815-49a4-acdf-2bebabc6721b
    set isofile="/bobiso/archlinux.iso"
    set dri="free"
    set lang="en_US"
    set keytable="us"
    set timezone="Europe/Helsinki"
    loopback loop (hd0,20)$isofile
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=/dev/disk/by-uuid/$isouuid img_loop=$isofile copytoram
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img 
}

Im wondering what if I add UUID of the iso into the line will it boot the iso?
search --no-floppy --fs-uuid --set=root e29834fc-6815-49a4-acdf-2bebabc6721b

Offline

#4 2024-07-21 20:55:23

saleem
Member
Registered: 2011-09-21
Posts: 168

Re: {SOLVED} Booting arch linux ISO from Hard disk

Ok I managed to fix and boot the iso successfully by making following changes

menuentry "Arch ISO" {
    insmod ext2
    insmod loopback
    insmod iso9660
    set isopartition=hd0,20
    set imgdevuuid=e29834fc-6815-49a4-acdf-2bebabc6721b
    search --no-floppy --set=root --fs-uuid e29834fc-6815-49a4-acdf-2bebabc6721b
    set isofile="/bobiso/archlinux.iso"
    set dri="free"
    set lang="en_US"
    set keytable="us"
    set timezone="Europe/Helsinki"
    loopback loop $isofile
    #loopback loop (hd0,20)$isofile
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=UUID=$imgdevuuid img_loop=$isofile copytoram
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img 
}

took some reading on the forum but its worth it , no need to copy iso to a USB anymore or extracting contents of iso onto a partition and chrooting into it and completing installation indirectly , this is the most easy and quick method for me to install from any arch iso booting it from a hard disk ,

Offline

#5 2024-07-22 13:32:32

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 714

Re: {SOLVED} Booting arch linux ISO from Hard disk

You don't need to specify the linux and initrd manually since the ISO contains a loopback.cfg file which will do it for you. See https://wiki.archlinux.org/title/Multib … ly_release

Offline

#6 2024-08-01 13:22:17

saleem
Member
Registered: 2011-09-21
Posts: 168

Re: {SOLVED} Booting arch linux ISO from Hard disk

nl6720 wrote:

You don't need to specify the linux and initrd manually since the ISO contains a loopback.cfg file which will do it for you. See https://wiki.archlinux.org/title/Multib … ly_release

Thanks , will test it , I am just about to test the new ISO so will give it a try now .

Offline

Board footer

Powered by FluxBB