Multiboot Porteus USB stick

Post tutorials, HOWTO's and other useful resources here.
Post Reply
Posts: 1
Joined: 21 Oct 2014, 22:40
Distribution: Porteus :)
Location: Calgary

Multiboot Porteus USB stick

Post#1 by Dueckuwanga » 21 Oct 2014, 22:52

I wrote this How-to as a reply to a thread in this news site: I hope it's of some use to someone. I'd credit the how-tos I followed to get here, but I haven't the time to do that kind of citation, so I'll now prostrate myself before the FOSS community.

I wanted multiple Linuxes on one USB flash drive in order to robustify my desktop OS (cheap and easy to clone despite that I barely know how to `dd bs=4096 if=/dev/sdX of=/dev/sdY`) and give me some separation of environments (one for web browsing, one for money/communication matters, one for regular work). The following worked for me with a 16GB USB 3.0 stick I got for $12; there are drawbacks; it's convenient and maybe someone will benefit, so here goes (critique this setup to my delight!):

From some Linux:
1. I used to download some precompiled images with some options to my taste.
2. I downloaded a Debian Live DVD, to give GRUB2 a home. (I used the Debian ‘Rescue’ Live DVD, to save space while providing some omgwtf utilities).
3. I used GParted to make some ext4 partitions on the USB flash drive, plus a swap partition and a partition for files. For config convenience, I gave the partitions memorable labels (‘PrivatePorteus,’ ‘PublicPorteus,’ and ‘DesktopPorteus’)
4. I unpacked the Porteus images each into their respective partitions.
5. In each Porteus partition, I found the .sgn file and gave it a memorable name (‘DesktopPorteus.sgn,’ etc.).

Booted into the Live DVD:
6. I installed Debian to the first partition. *** WHEN INTALLING DEBIAN I CHOSE TO SPECIFY THE GRUB INSTALLATION PARTITION TO BE SURE IT WAS INSTALLED TO THE DEBIAN PARTITION RATHER THAN INSTALL TO THE FIRST HARD DRIVE (BTW if you overwrite your boot sector you might find Boot-Repair-Disc handy).

I booted into the Debian install on my USB stick:
7. I opened /etc/grub.d/40_custom and added a menuentry for each of the Porteus builds. When I saved, I changed the name to ‘06_custom’ so that those entries appear at the top of the GRUB menu. Here’s some of my 06_custom:

Code: Select all

exec tail -n +3 $0
menuentry ‘Desktop Porteus’ {
	search --no-floppy --set=root --label DesktopPorteus
	linux /boot/syslinux/vmlinuz nomagic zram=30% noauto timezone=Canada/Mountain login=guest sgnfile=DesktopPorteus.sgn changes=/porteus
	initrd /boot/syslinux/initrd.xz
I made a similar entry for each of the Porteus installs. The --label and the sgnfile= options must be unique.
8. From a command line I entered ‘update-grub.’
After hair-tearing and rebooting and reading internet, I found my typo in 06_custom and am now happily multibooting from USB stick.
If you want any of the Porteus installs to become more or less “read-only,” you can add the option ‘changes-ro’ to the options in the 06_custom menuentry line that begins with ‘linux.’ One more thing I liked: the XFCE version has a checkbox in the logoff screen to change your mind about saving the session!

1. Downloaded .iso’s from gave me some .iso’s
2. Downloaded a Debian Live DVD.
3. GParted the USB stick with GPT partition table, an ext4 partition for each OS, a swap partition, and an ext4 partition for files.
4. Unpacked the Porteus .iso’s into their respective partitions.
5. Gave the Porteuses’ .sgn files a unique name each.
6. Installed Debian from Live DVD into the first partition; installed GRUB2 into that same partition from the Debian installer.
7. Booted into the installed Debian and edited /etc/grub.d/06_custom like above.
8. Entered update-grub and rebooted to see a GRUB menu with my custom entries.

User avatar
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Multiboot Porteus USB stick

Post#2 by francois » 23 Oct 2014, 12:46

Thanks for this how to. Why don`t you call it: multi boot porteus-debian usb stick?
Voltaire: Le mieux est l'ennemi du bien.

Post Reply