Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to boot on iso file from USB boot to hdd iso file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
luddeycy
n00b
n00b


Joined: 22 Nov 2024
Posts: 2

PostPosted: Fri Nov 22, 2024 7:15 pm    Post subject: How to boot on iso file from USB boot to hdd iso file Reply with quote

Hi all,

i just started to try using gentoo...
i usually, with others distro, boot on a USB stick...and continue the boot process on a "iso file" available on hdd...

in the loader options

with debian, i used :
boot=live live-media=/dev/disk/by-label/blah live-media-path=/the/path/where/iso/is

with slackware, i used :
livemedia=/dev/disk/by-label/blah:/the/path/where/iso/is/ISO_FILE.iso

with fedora, i used :
root=live:LABEL=blah rd.live.image rd.live.dir=/the/path/where/iso/is/LiveOS

with manjaro, i used :
img_dev=/dev/disk/by-uuid/1234ABCDblahblah img_loop=/the/path/where/iso/is/ISO_FILE.iso


but with gentoo iso file, transfered in this HDD, i didn't find the way to do same thing...
root=LABEL....
root=live:....

could you please help me find the "right" cmdline options to be able to boot with iso file on HDD ?

NOTE : the system boot is currently refind, but not sur it's important....i need to know the cmdline ?


THANKS in advance.

David
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3742
Location: Rasi, Finland

PostPosted: Sun Nov 24, 2024 7:20 pm    Post subject: Reply with quote

As far as I know refind doesn't support loading bootable disk images from filesystem.
Refind is just a boot manager.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
luddeycy
n00b
n00b


Joined: 22 Nov 2024
Posts: 2

PostPosted: Mon Nov 25, 2024 9:13 pm    Post subject: Reply with quote

Hi,

i spent lot of time to understand....and i have some informations....

Refind is not really the root cause...
I usually extract the kernels from the images and copy them into the USB key....so it's possible to boot wih the "right" kernel and initramfs....
Once the initramfs is running, the process can mount images like iso to "continue the boot process"...

However, with Gentoo and the dracut system, i found 2 issues :

-1- FIRST, it seems that the initramfs built on "official" liveGUI doesn't include the "ntfs" module...and on my firsts step i put the iso file on NTFS filesystem...
For the next steps, i tried with ext4 ( and also XFS ) filesystems and it was better

-2- SECOND, i think that there is a problem with the dracut documentation...
The documentation give example
menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class os {
set isolabel=Fedora-Live-LXDE-x86_64-20-1
set isofile="/boot/iso/Fedora-Live-LXDE-x86_64-20-1.iso"
loopback loop $isofile
linux (loop)/isolinux/vmlinuz0 boot=isolinux iso-scan/filename=$isofile root=live:LABEL=$isolabel ro rd.live.image quiet rhgb
initrd (loop)/isolinux/initrd0.img
}


BUT iso-scan process and root=live:LABEL are not compatible each other....the first one indicates "scan the FS to find the iso file"...and the second one indicates that the root FS is the labelled disk LABEL...
the only compatible option with iso-scan is to use root=live:/*.iso
AND the mount command used in this case use the full "directiry+iso file" ... which is ONLY in /run/initramfs/isoscan/ ( found and mounted BY iso-scan script )

The right solution i found is finally :
    iso-scan/filename=/Gentoo/livegui-amd64-20241117T163407Z.iso root=live:/run/initramfs/isoscan/Gentoo/livegui-amd64-20241117T163407Z.iso


AND the final Refind conf line is
Code:
    loader /gentoo/gentoo
    options "initrd=/gentoo/gentoo.igz nodhcp secureconsole   iso-scan/filename=/Gentoo/livegui-amd64-20241117T163407Z.iso root=live:/run/initramfs/isoscan/Gentoo/livegui-amd64-20241117T163407Z.iso ro rd.live.image   rd.live.dir=/ rd.live.squashimg=image.squashfs cdroot"


Conclusion :
The first issue doesn't matter...we just have to choose a filesystem different than NTFS ( i used this in the past because i had a windows system necessarily in a NTFS ... )
The second issue is more a "dracut" misunderstanding with /run/initramfs/isoscan i was able to find with a debug option giving informations when the boot process stoped in the shell dracut...

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum