Boot puppy by iso file using grub2

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

Boot puppy by iso file using grub2

#1 Post by watchdog »

Assuming you put your puppy.iso in sdb1 at root directory and the frugal install in mnt/sdb1/puppy, for example, the menu entry in /etc/grub.d/40_custom should be:

menuentry "Your puppy ISO" {
set root=(hd1,1)
loopback loop /puppy.iso
linux (loop)/vmlinuz pmedia=usbhd psubdir=puppy pfix=fsck
initrd (loop)/initrd.gz
}

The standard menu entry for a frugal install of wary 5.5 did not work with my machinery giving "out of disk" error processing vmlinuz and I found this workaround which does the job. Change the example to suit your case.

Edit: I forgot to remember to you to edit isolinux.cfg in the frugal install changing pmedia=cd with pmedia=atahd or pmedia=usbhd as your case needs.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

Boot puppy by iso file using grub2

#2 Post by Monsie »

watchdog,

Since the grub bootloader config is broken in Wary 5.5 did you first install the Service Pack available here which corrects this problem and others? If you did, and you still had to implement your workaround, then I'm thinking that you should report your issue as a bug --if you have not done so already.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

Re: Boot puppy by iso file using grub2

#3 Post by watchdog »

Monsie wrote:watchdog,

Since the grub bootloader config is broken in Wary 5.5 did you first install the Service Pack available here which corrects this problem and others? If you did, and you still had to implement your workaround, then I'm thinking that you should report your issue as a bug --if you have not done so already.

Monsie
The grub2 "out of disk" error is an already reported bug which afflicts some external usb hard-disks when you try to boot partitions or custom entries as the case of frugal puppies. It also afflicts grub4dos as "bad file or directory type" error. I had this error first trying booting precise 5.7.1 after restoring a backup: see my last posts in Bug's report precise's thread. After solving precise 5.7.1 booting by restoring a backup again the problem afflicted my frugal wary 5.5. I found this workaround which you can use with also grub4dos if you access advanced menu and "Find grub2" so using the same menuentry in grub2. I have both: grub4dos and ubuntu's grub2.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#4 Post by watchdog »

This trick to boot the iso file using grub2 has worked for me as workaround to solve a "pup-431.sfs not found" reported using grub4dos. I wonder if this would work in other cases of "puppy.sfs not found" errors reported so many times booting from cd or grub4dos.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

Every mount, every link, pipes, sockets, everything in a file system has to be "resolved" to access it.

So having files inside an ISO file just adds cpu cycles and slows everything down.
Squash (SFS) files do the same, a full install with bare files is the fastest setup.
But this leaves the files open to corruption and viruses, so Squash files have advantages.
.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#6 Post by Karl Godt »

watchdog wrote:This trick to boot the iso file using grub2 has worked for me as workaround to solve a "pup-431.sfs not found" reported using grub4dos. I wonder if this would work in other cases of "puppy.sfs not found" errors reported so many times booting from cd or grub4dos.
The problem is that even if usb-storage is compiled into the kernel, the kernel forks the usb-driver and goes on .
This may result into a state where the older Puppy initrd.gz already tries to determine all recognized partitions, while many USB-HD partitions still are on the way to be registered in /proc and /sys .
This results into a state, where the partition is *not known* to the /init script , thus the pup-431.sfs doesn't gets found .

For full installations there are

rootdelay= [KNL] Delay (in seconds) to pause before attempting to
mount the root filesystem
rootwait [KNL] Wait (indefinitely) for root device to show up.
Useful for devices that are detected asynchronously
(e.g. USB and MMC devices).

kernel parameters .

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#7 Post by mikeb »

I adopted the slax approach of relooking for the modules folder 6 times with a small delay after each search before giving up . This is fast for such as a hard drive install as there is no waiting around for usb but gives enough time for usb to initialise in case that is the home of the system.

mike

gcmartin

#8 Post by gcmartin »

Booting the ISO directly allows testing without having to do prior setups or creation of DVD/CDs.

This approach as well as the utility tool efforts of @Rcrsn51 as well as the other utility tool efforts of @Scooby are additional methods of booting ISOs, directly. Their approaches attempt to remove the GRUB4DOS setup complexities required to boot ISOs immediately upon downloading.

FYI

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#9 Post by watchdog »

You can boot a puppy.iso file using a pendrive and grub4dos, too. Thanks to rcrsn51 who first wrote about this. This can be used as workaround to boot a puppy.iso when the error "puppy.sfs not found" is reported. Using another working puppy format the pendrive fat32 and as you have freshly formatted copy the puppy.iso on it: this because the puppy.iso must be contiguous in the partition. Run in console:

Code: Select all

blkid


and read the uuid of the pendrive. Say it is "xxyyzz". Install grub4dos to the pendrive and in menu.lst put an entry like:

Code: Select all

title Puppy 4.31 ISO on sdb1
    uuid xxyyzz
    map /pup-431.iso (hd32)
    map --hook 
    root (hd32)
    chainloader (hd32)
    boot
In the example I used a Puppy 4.31 iso in sdb1 but the uuid system makes it working for any partition the pendrive is. Boot the pendrive choosing this menu entry and at boot prompt type:

Code: Select all

boot: puppy pmedia=atahd
(or usbhd...) to find your frugal install.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#10 Post by Scooby »

gcmartin wrote:Booting the ISO directly allows testing without having to do prior setups or creation of DVD/CDs.
watchdog wrote:You can boot a puppy.iso file using a pendrive and grub4dos
I made an implementation of iso-scan. It fascilitates directly booting of puppy iso's
using grub2. iso-scan feature is like that of ubuntu.
Upside is you dont have to care about the contiguous problem of grub4dos

please check out

A proposal for an Implementation of ISO-Scan

...

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#11 Post by watchdog »

I wanted to test using grub2 from puppy installed on main sda hd using the grub2-1.98-i486.pet provided by forum member rcrsn51 in isobooter thread:

http://www.murga-linux.com/puppy/viewtopic.php?t=67235

Last evening I found the time to test. I used a laptop with windows7, linux mint in extended partition and its grub2 version 1.99, and a frugal install in ntfs partition of wary 5.3. The laptop had the mint's grub2 installed. I booted wary and installed rcrsn51's pet. Then in console:

Code: Select all

grub-install --force --no-floppy --root-directory=/mnt/home /dev/sda
Then I copied the grub.cfg in /boot/grub in /mnt/home (ntfs partition where was w7). Then I copied the menu entries to boot w7, linux mint and the frugal wary from the /boot/grub/grub.cfg of mint's grub2. Rcrsn51's pet has not os-prober and update-grub but if you know the right entries in grub.cfg you can use this pet. The test has had success.

Post Reply