AB9IL.net: A simple frugall install for multibooting with Grub2.

Written and curated by Philip Collier / AB9IL
HOME Software Defined Radio WiFi Antennas Air and Space Radio Linux or Windows Digital Audio Liberation Tech Video Gallery Photo Gallery

Live Internet SDR List Radio Caroline BBC Radio 4 LW


Advertisement
Airband Radio on the RTL-SDR
How to maximize RTL-SDR performance for aeronautical comms.

We earn a commission if you make a purchase, at no additional cost to you.

Porteus Linux is a fast and lightweight operating system distributed as a live CD iso file. While many users prefer to run it directly from a CD or installed to a USB stick, you may want to put it on your hard drive as an option in a dual boot or multiboot setup. This is called a "frugal install" using an iso image or files copied from an image. It makes a perfect companion to larger Linux distributions such as Ubuntu, Mint,or Arch Linux. Use the instructions below to easly configure an existing Linux system to optionally boot and run Porteus.

It is suggested to create a disk partition separate from the computer's main system to hold Porteus and other special frugal installs. This will ensure that updates or clean-ups for one system do not damage or clutter the other one. The webmaster has accidentally erased frugal installs kept on his main system during overzealous maintenance. Take the lesson and keep Porteus on a different partition...


Prerequisites

  1. A mainstream Linux system such as Debian, Ubuntu, Arch, Mint, or other type with Grub2 as the bootloader.
  2. At least 500 MB of free space available for Porteus Linux
  3. A Porteus live CD, ISO file, or USB stick. Get Porteus from here.

In the example used here, the computer has one hard drive, and it is divided into two partitions. The main system runs on the first partition and the second partition serves as storage for documents, backups, and frugal installation of Porteus Linux. Be aware that the drive and partitioning scheme is peculiar: the first drive is "hd0" while the first partition is numbered "1" and so forth.


Installing the Porteus Files

  1. Start up the main operating system on the computer.
  2. Open the file manager as root.
  3. On the hard drive, in the partition to be used for frugal installations, create a folder called "porteus."
  4. Navigae to the Porteus CD or ISO image, and open it. Select and copy all of the contents. Try "CTRL-A then CTRL-C to do that.
  5. Paste all of those files and folders to the newly created "porteus" folder. Use "CTRL-V" to paste.

Configuring Grub2 to Boot Porteus

  1. In the file manager, as root, navigate into the folder /etc/grub.d
  2. Create (or edit) the file "40_custom" to contain the following:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'Porteus Linux - Normal User' {
	insmod ext2
    set isofile="/porteus/porteus-5.0.2.iso"
    loopback loop (hd0,2)
	linux (loop)/boot/syslinux/vmlinuz nomagic base_only norootcopy zram=60% noauto timezone=GMT-0 login=guest
	initrd (loop)/boot/syslinux/initrd.xz
}

menuentry 'Porteus Linux - Root User' {
	insmod ext2
    set isofile="/porteus/porteus-5.0.2.iso"
    loopback loop (hd0,2)
	linux (loop)/boot/syslinux/vmlinuz nomagic base_only norootcopy zram=60% noauto timezone=GMT-0 login=root
	initrd (loop)/boot/syslinux/initrd.xz
}
  1. Startup options included after vmlinuz were taken from the file "porteus.cfg" and can be changed to suit user preferences."
  2. For multiple Porteus startup options, create more "menuentry" items and give each its own cheatcodes.

Starting the Porteus Frugal Install

To run Porteus, simply boot the computer and await the appearance of Grub2's menu. It should list both the main system and also Porteus Linux. Select Porteus, and observe a normal startup sequence. After a few seconds of scrolling messages, the desktop should appear. At this point, the system is ready to run.


Going Further with Frugal Installs

Other systems may be added in the same manner as Porteus. Kali Linux, Slitaz, SLAX, Siduction, Knoppix, or any other live CD or DVD may be installed alongside Porteus. Each should be extracted and placed in its own folder and each will need its own entry (plus startup cheatcodes) written to "/etc/grub.d/40_custom."

Multiple versions of Porteus, or Porteus derivatives such as MOFO Linux require slight changes. Each version needs a unique name for the *.sgn file contained within its "porteus" folder AND a cheatcode sgnfile=something.sgn in the grub entry. Otherwise, Porteus will boot using files associated with the first sgn file it finds.

Good luck, and enjoy the convenience and robustness of having two (or more) separate operating systems installed to the same hardware. For more information, be sure to visit the Porteus forums. There are many, many computer users with Porteus on their hard drives.




© 2005 - 2024 AB9IL.net, All Rights Reserved.
About Philip Collier / AB9IL, Commentaries and Op-Eds, Contact, Privacy Policy and Affiliate Disclosure, XML Sitemap.

This website is reader-supported. As an Amazon affiliate, I earn from qualifying purchases.