Puppy + Ubuntu: Pupbuntu?
I got a wild hair up my ass to get Puppy and Ubuntu both booting off my 1G USB drive.
Oddly enough, it worked pretty well, but it took a bit of work.
First, I followed the instructions at pendrivelinux.com. It worked well enough to get Ubuntu up and running off the drive.
Then I thought to myself, “I wonder if I could shoehorn Puppy Linux in on the same drive, alongside Ubuntu.
The problem was that I only had a 1G drive, the Puppy drive weighed in at around 99M, and the USB drive only had about 36M left after Ubuntu.
My first idea was to try accessing the filesystem directly with the loop driver, but it turns out squashfs is read-only. Bummer. I’d have to do basically the same thing as I would if I were remastering an ISO: extract the filesystem, modify it, recreate it, and copy it back.
(Note: the following is executed as root)
# mount /media/ubuntu/casper/filesystem.squashfs /mnt/loop -o loop -t squashfs # cp -dpRv /mnt/loop ~/custom
I now have a full mirror of the squashfs under /root/custom. Then a bit more trickery:
# chroot ~/custom /bin/bash
Now I’m in a shell that thinks /root/custom is the root directory (/), the upshot of which is that I can now (mostly) use apt-get!
At this point, I did a manual apt-get remove of packages (from dpkg -l) that I figured were unnecessary, or that I’d never use, until I felt I’d trimmed enough fat and could fit Puppy in. I exited the chrooted shell and created a new filesystem image:
# mksquashfs -nopad /root/custom ~/custom.squashfs
Then copied it back to /media/ubuntu/casper/filesystem.squashfs. Checked the disk space, and I was now well over the 99M or so that Puppy needed.
Not quite ready yet. There’s a bit more trickery. We can’t have Puppy and Ubuntu both fighting over the MBR, so we just let Ubuntu’s ISOLINUX handle it. We also need to put the *.sfs files that Puppy wants somewhere it can find them (e.g., /media/ubuntu, the root directory of both Ubuntu and Puppy).
So, we mount the ISO image:
# mount puppy-3.01-seamonkey.iso /mnt/loop -o loop
And copy everything over.
# cp *.sfs /media/ubuntu # mkdir /media/ubuntu/puppy # cp initrd.gz vmlinuz /media/ubuntu/puppy
One more thing: we need to update ISOLINUX’s configuration file, /media/ubuntu/isolinux.cfg so it knows that it has a pet Puppy. I put the Puppy entry underneath the “live” entry (making it third in the list).
LABEL puppy menu label ^Start Puppy Linux kernel puppy/vmlinuz append initrd=puppy/initrd.gz pmedia=usb --
That’s it! Unmount everything, wait for it to flush its caches, and boot up.
Still working on the custom bootlogo.

No comments yet.