HOWTO create easy multi-boot USB Puppy from Linux

How to do things, solutions, recipes, tutorials
Message
Author
gcmartin

#41 Post by gcmartin »

The following are 3 different ways to tell the boot process which USB/HDD device to boot go looking for the additional info needed for booting the system.
  • find --set-root /TESTRUN/initrd.gz
  • root (hd0,1)
  • uuid 65a8ce93-769e-425a-b02b-e32494af59ef
EITHER one of them, each, do about the same exact thing in identifying where to look.

Here to help

Adagio

#42 Post by Adagio »

The easiest way for a novice to get the UUIDs for this is to use the attached Grub4DOS .pet.
It is from Puppy Precise 5.42, and should work on all 5x series Pups.
I have used it on most of them.
Just install over the current one.

Don't know about earlier Pups. Should be ok.
Attachments
grub4dos-0.4.4.v1.8.0-1.pet
(180.42 KiB) Downloaded 515 times

trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

#43 Post by trueriver »

Scooby wrote:
...
During boot press F2 key

and then write the following

Code: Select all

puppy psavemark=1
then savefile will work, This can be somewhat tedious so will see if it can be automated somehow?
This problem arises because easy2boot presents the puppy files on an iso, and isofs is defined to be a readonly filesystem. Effectively Puppy "thinks" it is running from a CD not a USB stick.

Ideas.

1. Extension of Puppy's repertoire to recognise when it is on iso-on-a-flash

This option is serious work for someone who really knows Puppy internals. (Puppy vetinarian?) and would be beyond me to implement

An isofs can be extended by writing another "session" to it (which is how Puppy works on a CDR when you save your work to the same CD). Incidentally, multi-session was invented by Kodak for their photo-CDs so you could burn extra pics to an existing Kodak photoCD.

This would be the best way of doing this, if you know enough about writing iso filesystems: write a into a "second session" iso and append that to the original iso. That is *exactly* what happens when you burn a second session onto the disk, but you'd have to do it using dd rather than a disk burner.

This would need extra functionality built into Puppy, so that it somehow recognises it is running from cd-on-flash mode. Once Puppy isos are released with the new capability the problem goes away

2. Workaround for existing Puppy iso

Extract the iso file to a folder on disk, alter the file isolinux.cfg changing cd to usbflash so the last line now reads

Code: Select all

append initrd=initrd.gz pmedia=usbflash
and then re-create the iso from that folder. This process of extract->replace->rebuild could easily be automated.

WARNING: this modified iso would no longer be suitable for burning to CD unless you changed it back. If you burnt this new file, Puppy would boot but would believe it was running on a flash stick ... goodness knows what issues this would cause. For this reason, I personally don't like this workaround.

3. Use easy2boot as an installation & testing platform.

BarryK has always said the best way to get Puppy on a USB stick is to burn a CD first, then use the CD to install to USB.

This workaround uses two usb sticks, one temporary and one permanent. First, you would get Puppy working under easy2boot, but only use that system for testing and (if happy with the test) installing to the permanent USB stick just as you would from the CD.

I have tested this, it works. And also the second-stage USB boots a lot faster than easy2boot (because it only has to do one thing, not scan for isos, work out what to do with them, and then offer you a lot of other options).

4. Make a "mongrel" easy2boot and permanent system.

Like 3 above, but you install onto the same usb stick that you are using for easy2boot, somewhere outside of the easy2boot directories. Don't let the installer alter the mbr in any way.

Then add an apprpriate grub stanza to menu.lst, so that the first option in the menu is the grub equivalent of the above syslinux line.

Once installed delete the iso.

Then you can use the installed Puppy for serious work, and get the efficiency savings of not working through an extra filesystem all the time. When you want to test a new Puppy, or another flavour of Linux, drop that iso into the \_ISO\Linux\AUTO folder and use the easy2boot intelligence to boot that system. But again: whether it is Puppy or some other Linux, use that platform to test or install, not as a permanent installation.

5. Separate partitions on a USB stick / USB drive

Like 4 above, but on separate partitions on the same USB stick. Though most people think of this only for internal drives, GParted will quite happily partition a usb stick for you.

Note that easy2boot creates a "virtual" primary partition no 4, so you are limited to two primiary partitions, plus an extended partition to hold any further partitions. Make sure GParted numbers these as 1,2,3 so that 4 remains free for easy2boot.

------

Number 3 is my current recommendation, I have done this and it works.

I will be testing number 4 and reporting back eventually, but not soon as I have other stuff that is becoming pressing. It would be great to be able to download onto a usbstick and then boot the new iso with no further ado. This is something I have wanted to do since around the time that Vista was released.

I am not doing any work on 1,2, or 5 at present, just offer then as ideas in case they inspire anyone else to continue / extend the good work.

River~~

rmprep
Posts: 17
Joined: Sun 06 Jan 2013, 15:08

#44 Post by rmprep »

You can boot from ISO but you need to extract the sfs file - so you might as well just extract all three files.

here are both menu entries for precise sku - use whichever one you like and you can change the folder name if you like to match your distro.

Code: Select all

# Extract files to /precise (only vmlinuz, initrd.gz and sfs needed)
# rename PUPPY_PR.SFS to lower case puppy_precise_5.4.3.sfs
title Precise
kernel /precise/vmlinuz pmedia=usbflash psubdir=precise fix=fsck  psavemark=1
initrd /precise/initrd.gz 

# Extract sfs to /precise
# rename PUPPY_PR.SFS to lower case puppy_precise_5.4.3.sfs and place in \precise folder
title puppy boot from ISO
map /_ISO/Linux/precise-5.4.3.iso (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbflash psavemark=1 fix=fsck  psubdir=precise
initrd /initrd.gz
I am not sure if the fix=fsck is required - seems to work OK without it.

Note: ONLY WORKS ON REAL SYSTEM and NOT in QEMU!

I used a FAT32 USB boot drive and settings were not saved on exit.
They may be saved if you use ext2 format.

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

Re: HOWTO create easy multi-boot USB Puppy from Linux

#45 Post by Scooby »

trueriver wrote:
Scooby wrote:...
Alternative 2 - the second easiest way

This did not work for me with the instructions as given (at least if I understood them correctly). I did find a slightly different way to do things.


Thank you for comments

I agree it needs some reworking and I will do it.

I'm sure you can help me test it then.

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

#46 Post by Scooby »

trueriver wrote: 2. Workaround for existing Puppy iso

Extract the iso file to a folder on disk, alter the file isolinux.cfg changing cd to usbflash so the last line now reads

Code: Select all

append initrd=initrd.gz pmedia=usbflash
and then re-create the iso from that folder. This process of extract->replace->rebuild could easily be automated.
I created a script for editing ISO's

it worked for me and can set whatever boot parameters you like for example
pmedia=cd

I'm thinking of incorporate a way of booting with psavemark boot option passed.
Look at discussion here

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

#47 Post by Scooby »

rmprep wrote:You can boot from ISO but you need to extract the sfs file - so you might as well just extract all three files.

here are both menu entries for precise sku - use whichever one you like and you can change the folder name if you like to match your distro.

Code: Select all

# Extract files to /precise (only vmlinuz, initrd.gz and sfs needed)
# rename PUPPY_PR.SFS to lower case puppy_precise_5.4.3.sfs
title Precise
kernel /precise/vmlinuz pmedia=usbflash psubdir=precise fix=fsck  psavemark=1
initrd /precise/initrd.gz 

# Extract sfs to /precise
# rename PUPPY_PR.SFS to lower case puppy_precise_5.4.3.sfs and place in \precise folder
title puppy boot from ISO
map /_ISO/Linux/precise-5.4.3.iso (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbflash psavemark=1 fix=fsck  psubdir=precise
initrd /initrd.gz
I am not sure if the fix=fsck is required - seems to work OK without it.

Note: ONLY WORKS ON REAL SYSTEM and NOT in QEMU!

I used a FAT32 USB boot drive and settings were not saved on exit.
They may be saved if you use ext2 format.

Code: Select all

title puppy boot from ISO
partnew (hd0,3) 0x00 (hd0,0)/_ISO/Linux/precise-5.4.3.iso
map  (hd0,0)/_ISO/Linux/precise-5.4.3.iso (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbflash psavemark=1 fix=fsck  psubdir=precise
initrd /initrd.gz
Steve I know this works as well and needs no extraction of files from ISO.

Is there any special reason you don't recommend using it this way?

And Steve I really love your work with Easy2Boot, thank you :!:

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#48 Post by nooby »

Wrong thread for my question sorry
Last edited by nooby on Sat 09 Feb 2013, 17:56, edited 1 time in total.
I use Google Search on Puppy Forum
not an ideal solution though

rmprep
Posts: 17
Joined: Sun 06 Jan 2013, 15:08

#49 Post by rmprep »

Code: Select all

title puppy boot from ISO
partnew (hd0,3) 0x00 (hd0,0)/_ISO/Linux/precise-5.4.3.iso
map  (hd0,0)/_ISO/Linux/precise-5.4.3.iso (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbflash psavemark=1 fix=fsck  psubdir=precise
initrd /initrd.gz
Steve I know this works as well and needs no extraction of files from ISO.
Is there any special reason you don't recommend using it this way?
Hi
I can't make that work? It needs to have the sfs file in the \precise folder??? If you just have the iso file it fails to boot???


If you make a file called Precise.mnu and place it in the \_ISO\Linux folder, it will be listed in the first menu in Easy2Boot. :D

rmprep
Posts: 17
Joined: Sun 06 Jan 2013, 15:08

#50 Post by rmprep »

OK
This works on a fresh, clean USB drive

Code: Select all

title puppy boot from ISO 
partnew (hd0,3) 0x00 (hd0,0)/_ISO/Linux/precise-5.4.3.iso 
map  (hd0,0)/_ISO/Linux/precise-5.4.3.iso (0xff) 
map --hook 
root (0xff) 
kernel /vmlinuz pmedia=usbflash psavemark=1 fix=fsck
initrd /initrd.gz
you must omit the subdir=precise parameter.

I have added the .mnu file to the Easy2Boot Tutorial on my site.

trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

#51 Post by trueriver »

rmprep wrote:OK
This works on a fresh, clean USB drive ...
then the issue is probably that the .iso was fragmented on the pre-used drive.

River~~

trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

#52 Post by trueriver »

Please note: I just edited an earlier post to update the location of the bootlace.com file. To save you looking back I'll repeat the corrected info here.

The bootlace program is in the grub4dos zip file downloadable from
grub4dos version 0.4.5c

or check the project's downloads page in case there is an even newer version.

Regards,
River~~

trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

#53 Post by trueriver »

Scooby wrote:...

Code: Select all

title puppy boot from ISO
partnew (hd0,3) 0x00 (hd0,0)/_ISO/Linux/precise-5.4.3.iso
map  (hd0,0)/_ISO/Linux/precise-5.4.3.iso (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbflash psavemark=1 fix=fsck  psubdir=precise
initrd /initrd.gz
Steve I know this works as well and needs no extraction of files from ISO.

Is there any special reason you don't recommend using it this way?
This does not work with most flavours of linux. That is why people who are familiar with Grub4dos will tend not to think of this option, and (I am guessing) this might well be one of the motivations behind the easy2boot extensions to grub4dos. And indeed it is why I personally was delighted to be pointed towards that project by this thread.

Try doing it with Ubuntu for example and it tells you it can't find root and it drops you into a busybox prompt to let you sort it out.

The reason it does not work is that the linux kernel does not know where its files are. It crashes at the point where it usually mounts the true root volume, and that is just before it stops running the initrd and comes out into the real world.

The typical fix is to pass the kernel a parameter which tells it where the iso is on the filesystem (Ubuntu, for example, has a normal syntax of root=/dev/sda1 but needs a different syntax when the files are inside an iso). So the initrd has to know how to parse that paramter and what to do with it, and different distros do this in various ways. Some distros do not bother at all, and then it becomes almost impossible to boot them from an iso file without using the easy2boot extensions.

As you have noticed. it *does* work with Puppy without the need for any special fix.

The reason for this is that when Puppy runs from an .iso or from a frugal install, it never leaves the initrd. The kernel does not need to know where the root file system is, because it is inside the initrd, and that has be preloaded for it by grub / syslinux / etc

BarryK does this so that Puppy runs faster when running normal system commands - the downside is that ram is taken up with stuff that is on the disk on "most" Linuxes.

But a side effect is that because Puppy never leaves the initrd, it never panics with ther "unable to find root" message. I do not know if this was a deliberate part of the original design, or whether it is a just an accidental :wink: bone-us.

But you are right to use the older (grub4dos) method when you know it works: it is often faster.

R~~

trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

#54 Post by trueriver »

Hi everyone.

A few days ago I said
trueriver wrote:...
Ideas.
...
4. Make a "mongrel" easy2boot and permanent system.
...
Just to let you know I have now got this working, and have posted a separate HowTo here

I posted it separately as it is quite long and I did not want to break the flow of this thread.

At the top of the first post on the new thread I compare my approach with the one being offered here - there are clear advantages to each method.

R~~

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

#55 Post by Scooby »

Updated first post with a new alternative 0 - the ultimate way!

Go There Now!!!

A pet-file is available for download!
Last edited by Scooby on Mon 25 Feb 2013, 19:57, edited 1 time in total.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#56 Post by nooby »

Scooby I am a noob that is why I have that name.
hope it is okay to ask this here. How are your latest
0 version compared to rcrsn51's Isobooter way of doing it.

I have tested that one now for many iso's and some fail
but most works. He bases his version on your thoughts
so them maybe are very similar.

In your latest version presented today what is different
what improvement did you do?
I use Google Search on Puppy Forum
not an ideal solution though

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

#57 Post by Scooby »

nooby wrote: How are your latest
0 version compared to rcrsn51's Isobooter


Well I never tried isobooter though it seems like a good enough software

My version is for USB only - I am not sure of isobooter?

My version doesnt require any use of other partitioning tools.
The whole USB will be formatted using mine.

My version uses gtk dialogs - should be easy for a noob but only you can
say if I succeeded :wink: I think isobooter is a terminal script?

I think isobooter automatically searches and installs isos? my version you have to do the copying yourself.

Since I never tried nor read the code I cannot say much about isobooter
I would say they are fairly similar.

If you provide the isos that fail I will be happy to test them?

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#58 Post by nooby »

isobooter is extremely easy to use.

I'll test your Alternative 0 now
within 30 minute or so. Rebooting ...
I use Google Search on Puppy Forum
not an ideal solution though

gcmartin

#59 Post by gcmartin »

nooby wrote:isobooter is extremely easy to use.

I'll test your Alternative 0 now
within 30 minute or so. Rebooting ...
I have not tested using "0". but, have, in the past weeks found Easy2Boot extremely simple without requiring the need to "reset" the GRUB4DOS menu system that ISObooter requires.

Both of these methods, ISObooter and Easy2Boot, achieve what they advertise; namely to modify a USB or HDDs Bootmanager to allow ISOs to be booted after download to that USB.

Here to help

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#60 Post by nooby »

Yes sorry if my clumsy way of expressing myself
comes through as any kind of criticism. I think E2B
works good for some and Isobooter works better
for me and maybe others that are noobs like me.

Sorry for the big delay. i promised 30 minutes but
obviously it took many hours. Voi.

So now I have tested 4 different isos on a 4GB USB
and to me IsoBooter is magnitudes easier to handle.

Took me very long time to get how E2B wants me to
behave. Sorry I am just different I trust it is the best
for you and others. So to each his own.

Hasty report. Both fail with same isos.
Could be something I set up wrong but
the consistency tells me it is rather something
with the iso and not how one boot it.

Porteus lxde has this error message at boot and lock itself
xterm: Cannot load font ....

slitaz requests events from the kernel and lock.

Antix 13 Can not mount SDA1 but that could be
a very known thing. So not related to either E2B or isobooter
it fails on both to mount the NTFS formatted SDA1

I am in a Slacko puppy now that I will most likely go on using
without savefile. Seems to be the one easiest to set up fresh
each time.
I use Google Search on Puppy Forum
not an ideal solution though

Post Reply