PDA

View Full Version : Boot live iso from hdd



duportail
30th August 2017, 12:19 PM
I am booting fedora live iso from hdd with grub:
menuentry "fedora" {
set isoname="Fedora-Workstation-Live-x86_64-26-1.5.iso"
set isofile='/iso/Fedora-Workstation-Live-x86_64-26-1.5.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-WS-Live-26-1-5 iso-scan/filename=$isofile rd.live.image quiet rd.live.ram
initrd (loop)/isolinux/initrd.img
}

Fedora boots up but the hdd is mounted:
/dev/sda1 /run/initramfs/isoscan

So i am not able to install fedora on the hdd because it is mounted.
Can only install when umount -l -r -f /run/initramfs/isoscan
How to prevent this mount?

nsnbm
30th August 2017, 12:57 PM
As I understand it, you would need to install from the iso to another partition on the hard disk. That partition wouldn't be mounted. If you try and install on the hard disk partition that is running the installation, it would have to format itself which would destroy itself.

duportail
30th August 2017, 01:16 PM
As I understand it, you would need to install from the iso to another partition on the hard disk. That partition wouldn't be mounted. If you try and install on the hard disk partition that is running the installation, it would have to format itself which would destroy itself.

No, I want to install fedora to /dev/sda.(format it and create a new sda1)It is possible with umount -l -r -f /run/initramfs/isoscan before the installer starts. Without the umount, the installer wants to shrink the hdd.
Fedora live should be loaded fully in ram, without mounting any hdd.
Ofcourse the fedora iso is on the hdd, but that is no problem.
In debian and ubuntu, i can unmount with preseed early_command.
Manjaro has the copytoram boot option to do that.

nsnbm
30th August 2017, 01:40 PM
Sorry, I missed that.

satanselbow
30th August 2017, 02:43 PM
This is a dracut/redhat thing and is not (currently) do-able in fedora - there is an outstanding feature request that has been blanked for aeons...

You will need a 2nd partition/hdd/usbstick and corresponding bootloader entry to achieve what you want :(

A (fedora/redhat) live ISO is still dependent on it's source as it only loads the resources needed to boot and refers back to the mounted source for additional materials as the user demands...

You could create a separate partition for the ISO at the far end of the drive then re-number the partitions (sort command within gdisk) post install if you are set on having "sda1" as the root/efi partition - although is by no means required or necessary!

duportail
30th August 2017, 03:02 PM
This is a dracut/redhat thing and is not (currently) do-able in fedora - there is an outstanding feature request that has been blanked for aeons...

You will need a 2nd partition/hdd/usbstick and corresponding bootloader entry to achieve what you want :(

A (fedora/redhat) live ISO is still dependent on it's source as it only loads the resources needed to boot and refers back to the mounted source for additional materials as the user demands...

You could create a separate partition for the ISO at the far end of the drive then re-number the partitions (sort command within gdisk) post install if you are set on having "sda1" as the root/efi partition - although is by no means required or necessary!

Thanks, got it.
Is there a way to unmount the hdd after fedora live boot in a automatic way?

kldixon
30th August 2017, 04:02 PM
I always do a network install and the following works:


menuentry 'Install Fedora 26' --class fedora --class gnu-linux --class gnu --class os {
insmod loopback
set isofile=Fedora-Workstation-netinst-x86_64-26-1.5.iso
loopback loop (hd0,gpt3)/$isofile
set root=(loop)
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:UUID=********-****-****-****-************:/$isofile inst.graphical inst.lang=en_GB.UTF-8 inst.keymap=uk vconsole.keymap=uk quiet
initrdefi /images/pxeboot/initrd.img
}
menuentry 'Live Fedora 26' --class fedora --class gnu-linux --class gnu --class os {
insmod loopback
set isolabel=Fedora-WS-Live-26-1-5
set isofile=Fedora-Workstation-Live-x86_64-26-1.5.iso
loopback loop (hd0,gpt3)/$isofile
set root=(loop)
linuxefi /images/pxeboot/vmlinuz iso-scan/filename=$isofile root=live:CDLABEL=$isolabel ro rd.live.image quiet rhgb
initrdefi /images/pxeboot/initrd.img
}

I do have the iso on a non system partition. This did not work for a few releases from F23 but has worked for F25 and F26. See:
https://www.redhat.com/archives/anaconda-devel-list/2015-October/msg00028.html
I have not tried installing from the Live iso. However, apparently, that worked in F23. See:
https://forums.fedoraforum.org/showthread.php?t=307202