Page 1 of 1

How to to boot from an ISO file with GRUB2?

Posted: Tue Oct 24, 2023 7:07 pm
by Zerg

Hi,
I downloaded "fossapup64-9.5.iso" and want to add a new boot entry to the Grub2 menu.
I added lines in to a file /etc/grub.d/40_custom:

menuentry "Puppy ISO" {
set root=(hd0,gpt5)
loopback loop /iso/fossapup64-9.5.iso
linux (loop)/vmlinuz pmedia=cd
initrd (loop)/initrd.gz
}

and get result, see screen.
What am I doing wrong?


Re: How to to boot from an ISO file with GRUB2?

Posted: Tue Oct 24, 2023 8:40 pm
by williwaw
Zerg wrote: Tue Oct 24, 2023 7:07 pm

Hi,
I downloaded "fossapup64-9.5.iso" and want to add a new boot entry to the Grub2 menu.
I added lines in to a file /etc/grub.d/40_custom:

menuentry "Puppy ISO" {
set root=(hd0,gpt5)
loopback loop /iso/fossapup64-9.5.iso
linux (loop)/vmlinuz pmedia=cd
initrd (loop)/initrd.gz
}

and get result, see screen.
What am I doing wrong?

did you see this recent post?
viewtopic.php?t=9781


Re: How to to boot from an ISO file with GRUB2?

Posted: Tue Oct 24, 2023 9:17 pm
by Zerg
williwaw wrote: Tue Oct 24, 2023 8:40 pm

did you see this recent post?
viewtopic.php?t=9781

Thank you, it's working now!
Can you please tell me if there's a way to boot a Puppy ISO without a desktop environment, booting only a console?


Re: How to to boot from an ISO file with GRUB2?

Posted: Tue Oct 24, 2023 9:56 pm
by williwaw
Zerg wrote: Tue Oct 24, 2023 9:17 pm

Can you please tell me if there's a way to boot a Puppy ISO without a desktop environment, booting only a console?

add pfix=nox on the kernel line viewtopic.php?t=5484
possibly linux (loop)/vmlinuz find_iso=$isofile pmedia=cd pfix=nox
(or however your line now looks now. you might consider posting your boot stanza and what tool you used to get it working in order to help others)


Re: How to to boot from an ISO file with GRUB2?

Posted: Wed Oct 25, 2023 7:55 am
by Zerg

Thank you, everything is loading fine without the desktop! Question: How can I install a text editor like nano or vim if there is no internet connection? PPM doesn't work because there is no working desktop environment.

Or do I need to connect a USB drive with "package_file.deb" and then simply run command dpkg -i package_file.deb?


Re: How to to boot from an ISO file with GRUB2?

Posted: Wed Oct 25, 2023 8:57 pm
by williwaw

@Zerg

booting an iso will not save configuration changes or added programs. there are other ways of booting if you want to save.

If you take a moment and describe your expectations of your install it will help others respond correctly

Or do I need to connect a USB drive with "package_file.deb" and then simply run command dpkg -i package_file.deb?

something like that may work, but there may be easier ways depending on what you are trying to accomplish


Re: How to to boot from an ISO file with GRUB2?

Posted: Thu Oct 26, 2023 7:03 am
by Geek3579
williwaw wrote: Wed Oct 25, 2023 8:57 pm

@Zerg

booting an iso will not save configuration changes or added programs. there are other ways of booting if you want to save.

If you take a moment and describe your expectations of your install it will help others respond correctly

Or do I need to connect a USB drive with "package_file.deb" and then simply run command dpkg -i package_file.deb?

something like that may work, but there may be easier ways depending on what you are trying to accomplish

I often boot puppy ISOs in QEMU and create a savefolder at shutdown. Its just a shortcut to run the OS without building a frugal install. Should work the same way under a normal ISO boot.


Re: How to to boot from an ISO file with GRUB2?

Posted: Thu Oct 26, 2023 8:25 am
by williwaw
Geek3579 wrote: Thu Oct 26, 2023 7:03 am

I often boot puppy ISOs in QEMU and create a savefolder at shutdown. Its just a shortcut to run the OS without building a frugal install. Should work the same way under a normal ISO boot.

thanks for calling that out, I stand corrected.

what is a good kernel line in the boot stanza for that usage?


Re: How to to boot from an ISO file with GRUB2?

Posted: Thu Oct 26, 2023 8:33 am
by Clarity

Same as you would use on bare-metal. In QEMU, most cases, you accept the default stanza from the distro's boot-time menu.

QEMU is merely a PC...albeit virtual.

Hope this is helpful.


Re: How to to boot from an ISO file with GRUB2?

Posted: Fri Oct 27, 2023 4:58 am
by Geek3579
williwaw wrote: Thu Oct 26, 2023 8:25 am
Geek3579 wrote: Thu Oct 26, 2023 7:03 am

I often boot puppy ISOs in QEMU and create a savefolder at shutdown. Its just a shortcut to run the OS without building a frugal install. Should work the same way under a normal ISO boot.

thanks for calling that out, I stand corrected.

what is a good kernel line in the boot stanza for that usage?

For a virtual system, I premake a virtual drive as follows: qemu-img create -f qcow2 <Drv_Name>.img 8G
I then boot the ISO (in this case quickpup) as follows :

modprobe kvm-intel # start KVM
qemu-system-x86_64 -enable-kvm -m 4G -smp 4 -boot d -cdrom quickpup64_23.01-rc-3.iso -hda Quickpup64-180923.img \
-cpu host -vga std -usb -device usb-tablet -soundhw ac97

If you wanted a bare metal ISO grub stanza, it depends a bit on the OS. Much more tricky, which is why I replaced direct ISO booting ages ago for the speed of setup and consistency of QEMU.


Re: How to to boot from an ISO file with GRUB2?

Posted: Fri Oct 27, 2023 5:29 am
by williwaw
Geek3579 wrote: Fri Oct 27, 2023 4:58 am

I then boot the ISO (in this case quickpup) as follows :

modprobe kvm-intel # start KVM
qemu-system-x86_64 -enable-kvm -m 4G -smp 4 -boot d -cdrom quickpup64_23.01-rc-3.iso -hda Quickpup64-180923.img \
-cpu host -vga std -usb -device usb-tablet -soundhw ac97

you do not have to use psave= to tell puppy where to find the save? does the save need to be in a specific location?


Re: How to to boot from an ISO file with GRUB2?

Posted: Sat Oct 28, 2023 6:23 am
by Geek3579
williwaw wrote: Fri Oct 27, 2023 5:29 am
Geek3579 wrote: Fri Oct 27, 2023 4:58 am

I then boot the ISO (in this case quickpup) as follows :

modprobe kvm-intel # start KVM
qemu-system-x86_64 -enable-kvm -m 4G -smp 4 -boot d -cdrom quickpup64_23.01-rc-3.iso -hda Quickpup64-180923.img \
-cpu host -vga std -usb -device usb-tablet -soundhw ac97

you do not have to use psave= to tell puppy where to find the save? does the save need to be in a specific location?

If you have formatted sda (virtual drive - I use ext4 for the whole drive) it all happens automatically under the ISO grub boot. Unless you edit the ISO grub, you cant add any extra stanzas. In any case there is only one drive to write to, and look for the psave. However, you will be limited to automatically saving all changes at shutdown. A small price to pay for testing efficiency.