This is not the only way to do this: Scooby gives a couple of alternative methods in this thread, and he is also working on further automation. My work here extends his idea, which in turn extend the work of the Easy2boot and Grub4dos projects. Thanks to them all for preparing the way for me.
Comparing my HowTo with Scooby's
Either method has the potential for considerable extension because both are based on Easy2boot.
I am fond of typing stuff at the command line (sad but true), so I am not automating anything for you. Scooby writes scripts to help you along.
Any number of non-puppy isos can be booted in Live mode under either system.
Any number of Puppyies can be booted under either system, but in mine one is a frugal install (allowing changes to persist) and the others can only be booted in live mode.
In Scooby's version, the .iso files are tweaked at install time so that any of them can be run and changes will persist. However Scooby's tweaked .iso files are probably no longer suitable for burning to a real CD.
The frugal install in my system will run slightly faster than the .iso - but not as fast as a fully installed Puppy would.
My method will take more work than Scooby's. That will take up more of your time (boo) but you might end up knowing more about how it all works (hooray)
OK: It is obvious that both systems have relative advantages and disadvantages.
Preparation
I have tried to give the commands in sufficient detail for someone fairly new to the command line to follow what is going on. Do please let me know if I have left anything unclear.
I tested this from an Ubuntu system installed on a hard disk, and used the command line at every step. It worked for me: let me know if it does not work for you. My intention is that it will work on any Linux system with a bash shell.
You will need a working Linux of some sort, and need to know how to run a terminal window or console. This might be an installed distro, or a live USB or live CD from any recent distro.
You also need to know how to run as root. (Not an issue on Puppy, as you are always root unless you are fido)
If your distro does not allow you to log in as root, then the first command in the terminal window or console will be
Code: Select all
sudo -i
Code: Select all
su --
If you are logged in as a normal user, the last character will be $.
Warning about using root when tweaking usb sticks. You can easily tweak the wrong one by mistake. Do back up every bit of data on any disk attached to the computer before doing any of this.
Downloads.
(i) You will need one .iso for the version of Puppy you want to for the frugal install.
(ii) Optional: You may want further Linux .iso files (could be more versions of Puppy or another distro).
Suggestion: If you want to try another distro but are stuck for which one, try WattOS - it lies somewhere between Ubuntu and Puppy in terms of size, speed, and suitability for older hardware. http://www.planetwatt.com/pages/downloads
(iii) You will need the easy2boot-grub4dos zipfile
Visit https://sites.google.com/a/rmprepusb.co ... o-maintain
Scroll down to the "Downloads" section at the foot of the page, and choose the latest version. At the time of writing this was v0.05
(iv) Check to see if you have the bootlace.com command: (As far as I know, Puppy is the only distro that includes this as standard, and maybe only some versions of Puppy)
At the command line type
Code: Select all
whereis bootlace.com
(v) Optional: download menu.lst.gz from the foot of this post (the alternative is to cut and paste in the code which is also given below)
OK, that is all the downloading you need to do and the rest can be done offline
This is what you do.
1. Plug in the target usb. As many versions of Linux will auto-mount it, you need to unmount it.
Code: Select all
umount /dev/sdx1
2. If you know you want to reformat the partition (delete all the existing files) skip to step 3. If there are files on the usb stick that you want to keep, check that the first or only partition is FAT32. GPARTED or the disk utility will tell you the partition type. FAT32 or FAT16 are ok; FAT32 is preferred.
To check from the command line
Code: Select all
fdisk -l /dev/sdx
Usually there will be just the one partition. If it shows several partitions, that is OK, so long as there is no partition 4 defined. (Partition numbers above or below 4 are fine). This is because Easy2boot relies on faking a partition no 4. Expert note: this means if you want more than 3 partitions, you create one or two primary partitions, then create an extended partition to hold all the other partitions you need. These so called "logical" partitions will be numbered from 5 upwards.
If all is OK with this skip forward to step 4.
Otherwise you will need to copy the files to somewhere safe, and proceed to reformat the partition in step 3. At the end of the process you can copy the files back.
3. Start fdisk
Code: Select all
fdisk /dev/sdx
Once the table is empty, use "u" (size units in sectors) and "c" (DOS compatibility not set)
"n" for a new partition, "p" for primary
1 for partition number
accept default values for start and end of the partition
When it has created the partition, it will be flagged as for Linux. "t" changes partition type, when asked for a hex code enter "c"
"p" will print the new partition table - it should show a partition of type W95 FAT32 LBA
"w" to write the new partition table and exit.
Note: while you are in fdisk, "m" will give you brief help (m for manual)
Now, make a FAT32 filesystem in that partition:
Code: Select all
mkdosfs -F32 -n mongrel-pup /dev/sdx1
4. Use bootlace to make the drive bootable
If you had the command properly installed use
Code: Select all
bootlace.com --time-out=0 --no-backup-mbr /dev/sdx
If you did not already have the command, extract bootlace.com from grub4dos as follows
Code: Select all
unzip /path/to/grub4dos-0.4.4.zip grub4dos-0.4.4/bootlace.com
This will place the command in a new folder grub4dos-0.4.4 under the current working directory.
Make bootlace executable and run it
Code: Select all
cd grub4dos-0.4.4
chmod u+x bootlace.com
./bootlace.com --time-out=0 --no-backup-mbr /dev/sdx
cd ..
In case you are wondering, the flags avoid an unnecessary question on every reboot.
If you want to know what all the possible bootlace options are, visit http://diddy.boot-land.net/grub4dos/files/bootlace.htm
5. Mount the new partition from the command line: create an empty directory and use it as a "mount point".
Code: Select all
mkdir /mnt/mp
mount /dev/sdx1 /mnt/mp
Code: Select all
unzip -d /mnt/mp /path/to/easy2boot-grub4dosxxxx.zip
7. Create the directory that will keep the "installed" puppy files separate from any easy2boot files
Code: Select all
mkdir /mnt/mp/installed
Code: Select all
mkdir /mnt/iso
mount -t iso9660 -o loop /path/to/puppyxxxx.iso /mnt/iso
Code: Select all
cp /mnt/iso/{vmlinuz,initrd.gz} /mnt/mp/installed
cp /mnt/iso/*.sfs /mnt/mp/installed
I'm going to give you two ways to do this at the command line. The obvious way is
Code: Select all
mv /mnt/mp/grub/menu.lst /mnt/mp/grub/easy2boot.lst
Code: Select all
mv /mnt/mp/grub/{menu,easy2boot}.lst
10. Create a new file with the following lines in it. You can cut and paste from the following code box, or if you downloaded the gzip unzip it directly to where it belongs like this:
Code: Select all
gunzip -c menu.lst.gz >/mnt/mp/grub/menu.lst
If you want puppy to run in ram, use pfix=ram in the first kernel line, and pfix=nox,ram in the second.
Leave out the windows stanzas if you are sure you won't want them: but it is rather cool to be able to rescue a windows system with a broken MBR (whether it was you who broke it or not).
Here is the code, in case you didn't download the gzip earlier:
Code: Select all
default 0
timeout 20
title Puppy Linux
root (hd0,0)
kernel /installed/vmlinuz pmedia=usbflash
initrd /installed/initrd.gz
title Puppy command line
root (hd0,0)
kernel /installed/vmlinuz pmedia=usbflash pfix=nox
initrd /installed/initrd.gz
title Easy2boot options
configfile /grub/easy2boot.lst
title Windows NT/2000/XP
find --set-root --ignore-floppies /NTLDR
chainloader /NTLDR
title Windows Vista / 7 / 8
find --set-root --ignore-floppies /bootmgr
chainloader /bootmgr
title Windows 95 / 98 / ME
find --set-root --ignore-floppies /io.sys
chainloader /io.sys
title reboot
reboot
11. (optional - this step can also be done later on, after the first boot)
Copy any other .iso files from prep step (ii) into the directory /mnt/mp/_ISO/Linux/AUTO
12. Unmount and remove mount points
Code: Select all
umount /mnt/iso
rmdir /mnt/iso
umount /mnt/mp
rmdir /mnt/mp
14. Now, when you want to test a different Linux (maybe a different Puppy, or maybe an entirely different distro), just drop the .iso into the AUTO directory on the usb drive. Reboot, choose easy2boot options, then look for the option to boot your .iso in that menu
You can stop here if you are content with that. But there are at least two ways of taking this further (without my help, I'm afraid).
15. If you wanted to install some non-Linux .isos, the time to do that is after you are sure Puppy is working, and at least one non-Puppy Linux. Once you have got them running, refer to these web pages here and here for further details.
Please do *not* ask for help of more details here - that would be off topic for these forums and certainly beyond my ability to help. I am sure people on either website would be able and willing to help you take it further.
16. Another development would be to make the usb stick into several partitions. Do a full Puppy install there, which should run faster than the frugal install (but take more space). Or install a different distro, keeping Puppy as a backup.
17. And you can do it all again on a hard drive (just tweak the pmedia= line appropriately)
Enjoy!
edit: typos
edit: corrected my misunderstanding of Scooby's method
edit: added download for menu.lst and adjusted method to suit
edit: added --time-out flag to the first bootlace command
edit: corrected W95 FAT32 (fdisk type "b") to W95 FAT32 LBA (type "c")