How to to boot from an ISO file with GRUB2?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
Zerg
Posts: 3
Joined: Tue Oct 24, 2023 6:41 pm

How to to boot from an ISO file with GRUB2?

Post 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?

Attachments
123.jpg
123.jpg (114.17 KiB) Viewed 857 times
williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

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

Post 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

Zerg
Posts: 3
Joined: Tue Oct 24, 2023 6:41 pm

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

Post 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?

williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

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

Post 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)

Zerg
Posts: 3
Joined: Tue Oct 24, 2023 6:41 pm

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

Post 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?

Attachments
2a.jpg
2a.jpg (141.64 KiB) Viewed 775 times
williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

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

Post 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

Last edited by williwaw on Thu Oct 26, 2023 8:19 am, edited 1 time in total.
Geek3579
Posts: 253
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 64 times

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

Post 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.

williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

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

Post 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?

Clarity
Posts: 3425
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1409 times
Been thanked: 452 times

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

Post 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.

Geek3579
Posts: 253
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 64 times

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

Post 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.

williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

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

Post 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?

Geek3579
Posts: 253
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 64 times

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

Post 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.

Post Reply

Return to “Beginners Help”