A responsive operating system for code writing, data scraping and analysis.
Disclosure: Catbirdlinux.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program such that this site earns advertising fees by linking to Amazon.com. If you make a qualifying purchase after clicking a link on this website, the associate affiliated with this site may earn a comission at no cost to you.

#Advert: Content creator laptops from MSI - ready for your ideas.


Main Menu --- Click to Unfold --- HOME
Downloads
i3 Keybindings
Neovim Keybindings
Tmux Keybindings
Bash Aliases
Source Code
Other Top Notch Linux Distros
Catbird Linux Hard Drive Installation
Catbird Linux USB Installation

How to Install Catbird Linux On A Hard Drive.

UPDATED 11/15/2020: This method works, but is no longer the best. Use the TimeShift package to back up your running live environment to a separate medium, then do a "restore" onto the device you want to use as your daily driver.

UPDATED 5/17/2019: Changes to conventional installer method.

Conventional Linux Installation

Catbird Linux is a fast and lightweight operating system, built on top of Ubuntu, and distributed as a live CD iso file. Before we explore options based on directly booting from the iso file, be aware that Catbird Linux may be installed as a conventional Linux system using either the "Ubiquity or "Calamares packages. Either one will install your running system as a regular, non-iso-based Linux system. Here is an example of code to run in the terminal:

#Advert: Great scenes deserve a great LG monitor.

sudo apt update
sudo apt install ubiquity

sudo apt update
sudo apt install calamares

After installing, open the menu and click the apropriate launcher. Use caution and select the proper drive and make sure the bootloader is installed to the root of the device if it has multiple partitions. There is one exception to the practice of installing Grub to the root of the drive: if installing multiple systems to a device, install Grub to the partition containing the new system and "chainload" to it.

The Frugal Linux Installation

Instructions given below are for a "frugal install" using an iso image or files copied from an image. It is much smaller than a full-on installation because the filesystem is maintained in compressed form as found on a DVD. A frugal install only requires enough space on a USB stick to hold the iso file and bootloader. Frugal installs can be added to an existing system with minimal cost in drive space.

It is suggested to create a disk partition separate from the computer's main system to hold Catbird Linux 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 Catbird Linux on a different partition...


Prerequisites (Systems Already Running Linux)

  1. A mainstream Linux system already installed, such as Debian, Ubuntu, Arch, Mint, or other type with Grub2 as the bootloader.
  2. At least 2GB of free space available for Catbird Linux
  3. A Catbird Linux ISO file. Get Catbird Linux 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 a frugal installation of Catbird 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.


Copying the Catbird Linux ISO File

  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 "isofiles"
  4. Navigate to the Catbird Linux ISO file, and copy it (CTRL-C).
  5. Paste the disc image into the newly created "isofiles" folder (CTRL-V).

Configuring Grub2 to Boot Catbird Linux

  1. In the file manager, as root, navigate into the folder /etc/grub.d
  2. Create (or edit) the file "40_custom" and paste in the following code:
#!/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 'Catbird Linux v1.0.0' {
        insmod part_msdos
        insmod ext2
	set root='(hd0,2)'
        set isofile='/isofiles/catbirdlinux-1.0.0.iso'
        search --no-floppy --file --set=root $isofile
        loopback loop $isofile
	linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile boot=casper quiet splash threadirqs ---
	initrd (loop)/casper/initrd
}

  1. Startup options included after vmlinuz.efi can be changed to suit user preferences."
  2. For multiple Catbird Linux startup options, create more "menuentry" items and give each its own specific codes.

After editing /etc/grub.d/40_custom, open a terminal window and update grub2:

sudo update-grub

Installing Catbird Linux Frugally on Windows Machines.

Yes, it is entirely possible to put Catbird Linux on a machine with Windows already installed! Similar to other dual boot setups, it is necessary to create a partition separate from Windows and install Grub2 as the bootloader on that partition. It is actually much like the dedicated USB installation shown below, but instead of a separate flash memory device, the files and bootloader are installed to an extra partition just above Windows. To boot windows, Grub2 is set up to chainload the Windows bootloader.

For accomplishing this sort of installation, you must correctly determine the partition to be used for holding the Catbird Linux iso file and Grub2 configuration files. This example depicts a hard drive with Windows on the first partition and Catbird Linux on the second. Expect Windows to occupy /dev/sda1; install Grub2 and MOFO Linux to /dev/sda2.

We will begin by installing Grub2 to the second partition on the hard drive. Boot the machine into Linux from a live DVD or USB stick, mount the partition, and then write the Grub2 data to the second partition as shown below:

1) Open the terminal and get root priveleges:

sudo su

2) Verify the location of the second drive partition:

fdisk -l

3) Set up a mount point to work on the partition. You may delete it later:

mkdir /mnt/CBIRDPARTITION && mount /dev/sda2 /mnt/CBIRDPARTITION

4) Install Grub2 to the drive:

grub-install --force --no-floppy --boot-directory=/mnt/CBIRDPARTITION/boot /dev/sda2

5) Create a directory to hold the one or more isofiles:

mkdir /mnt/CBIRDPARTITION/isofiles

6) Use your file manager, drag and drop the Catbird Linux iso file into the "isofiles" directory in the partition.

7) Create a "grub.cfg" file located at /boot/grub/grub.cfg in the partition which will hold menu data and direct grub to boot using one or more isofiles. In this example we will configure for booting Catbird Linux, MOFO Linux, and Windows 7. Be aware that Grub counts drives starting at zero and partitions starting at one:

set timeout=20
set default=0

menuentry 'Catbird Linux 1.0.0' {
        insmod part_msdos
        insmod ext2
	set root='(hd0,2)'
        set isofile='/isofiles/catbirdlinux-1.0.0.iso'
        search --no-floppy --file --set=root $isofile
        loopback loop $isofile
	linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash threadirqs --
	initrd (loop)/casper/initrd
}
menuentry 'MOFO Linux 7.0' {
        insmod part_msdos
        insmod ext2
	set root='(hd0,2)'
        set isofile='/isofiles/mofolinux-7.0.iso'
        search --no-floppy --file --set=root $isofile
        loopback loop $isofile
	linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash threadirqs --
	initrd (loop)/casper/initrd
}
menuentry 'Windows 10' {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos1)'
        chainloader +1
}

Booting the Catbird Linux Frugal Install

To run Catbird Linux, simply boot the computer and await the appearance of Grub2's menu. It should list both the main system and also Catbird Linux. Select Catbird Linux, 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.

Other systems may be added in the same manner as Catbird Linux. Kali Linux, Slitaz, SLAX, Siduction, Knoppix, or any other live CD or DVD may be installed alongside Catbird Linux. The iso files may all reside in one group, but each will need its own entry (plus startup options) written to "/etc/grub.d/40_custom."


A Dedicated USB Stick For Frugal Installs

Yet another option is putting multiple systems onto a large USB stick or SD card. In that case, you must install grub to the USB stick and then use the file "/boot/grub/grub.cfg" for the menu entries. There are computer users who actually use nothing but frugal installs on a large USB stick, with the hard drive strictly storing documents, multimedia files, and so forth.

To install Grub2 to the boot sector of a USB stick, you will plug in the stick, mount it, and then write the Grub2 data to the stick. In the following example, we'll install to a USB flashdrive plugged into a machine running Linux on the hard drive. The hard drive is "sda" and the USB stick is "sdb". The first partition on the USB stick is "sdb1".

1) Open the terminal and get root priveleges:

sudo su

2) Verify the location of the USB stick:

fdisk -l

3) Set up a mount point to work on the USB drive. You may delete it later:

mkdir /mnt/USBDRIVE && mount /dev/sdb1 /mnt/USBDRIVE

4) Install Grub2 to the drive:

grub-install --force --no-floppy --boot-directory=/mnt/USBDRIVE/boot /dev/sdb

5) Create a directory to hold the isofiles:

mkdir /mnt/USBDRIVE/isofiles

6) Use your file manager, drag and drop the Catbird Linux iso file into the "isofiles" directory on the USB stick.

7) Create a "grub.cfg" file located at /boot/grub/grub.cfg on the USB stick which will hold menu data and direct grub to boot using one or more isofiles. In this example we will configure for booting Catbird Linux and Catbird Linux. Be aware that Grub counts drives starting at zero and partitions starting at one:

set timeout=20
set default=0

menuentry 'Catbird Linux 3.1' {
        insmod part_msdos
        insmod ext2
        set root='(hd0,2)'
        set isofile='/isofiles/catbirdlinux-3.1.iso'
        search --no-floppy --file --set=root $isofile
        loopback loop $isofile
	linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile quiet splash threadirqs --
	initrd (loop)/casper/initrd.lz
}
menuentry 'MOFO Linux 7.0' {
        insmod part_msdos
        insmod ext2
        set root='(hd0,2)'
        set isofile='/isofiles/mofolinux-7.0.iso'
        search --no-floppy --file --set=root $isofile
        loopback loop $isofile
	linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile quiet splash threadirqs --
	initrd (loop)/casper/initrd.lz
}

Test the USB stick by rebooting the computer system and making sure the BIOS is set to look for the stick as either a USB flash memory or as a hard drive on the system. If necessary, use "E" to edit the Grub commands at boot time and find out what works. Most problems involve pointing Grub to the isofile, then to the vmlinuz and initrd files within the iso.

Persistence: How to Keep Your Changes

There is no need to lose files you create or changes you make while operating your system from an iso file! Configure the system to boot with persistence enabled. In the persistent mode, new data and settings are written to a dedicated partition which holds them safely between shutdown and subsequent restarts. Sure, it is possible to manually save your files before shutting down at the end of a computing session, but why bother when persistent mode does it automatically? You can even install software and retain it for future computing sessions.

Persistence requires two things: a dedicated partition of at least 128 MB and an additional boot parameter. When setting up partitions, create one in EXT2 or EXT3 format and label it "casper-rw". Persistence can be added to an existing USB stick or SD card by creating a new partition and setting the label to "casper-rw". For best results, consider making the partition 1GB to 2GB in size. Then add "persistent" to the kernel boot options in grub2. At start-up, the system will find and use the partition for any changes made.

Good luck, and enjoy the convenience and robustness of having one or more operating systems frugally installed to an inexpensive USB drive.


Tags:Linux Multiboot Grub2, Catbird Linux Grub2, Customize Grub2
©2015-2020 Catbirdlinux.com, All Rights Reserved.
Contact Us, Privacy Policy and Affiliate Disclosure, XML Sitemap.