Skywave Linux: Frugal Installs (Updated 2024/03/11)

Written and curated by Webmaster - Developer Philip Collier
HOME Using Skywave Linux Downloads Bug Fixes Radio Computing

Internet SDR Map Internet SDR List VOLMETs 8992 kHz Live 11175 kHz Live 15016 kHz Live


Advertisement
KiwiSDR: 21st Century Radio for the People
How the KiwiSDR is your best radio for internet shortwave listening.

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

The Frugal Linux Installation

Instructions given below are for a "frugal install" using an iso 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 drive to hold the iso file and bootloader. Frugal installs can be added to an existing system with minimal cost in drive space, and updates are a simple matter of copying a new iso file. The critical step is installing the bootloader.

Create a disk partition separate from the computer's main system to hold Skywave Linux and any other Linux 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 the iso files on a different partition...

Prerequisites (Systems Already Running Linux)

  1. A mainstream Linux system already installed, such as Debian, Ubuntu, Arch, Linux Mint, or other type with Grub2 as the bootloader.
  2. Enough free space available to contain the Skywave Linux iso file.
  3. A Skywave Linux ISO file. Get it from here.

In this example, 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 Skywave 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 Skywave 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 Skywave 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 Skywave Linux

For versions 5.0 and later, booting the iso along with a fully installed Ubuntu system.
  1. In the Ubuntu system, open the file manager, as root, and 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.

# First drive, first partition
set root=(hd0,1)

menuentry 'Skywave Linux v5.0.0 (Debian)' {
    set isofile="/isofiles/skywavelinux-5.0.0.iso"
    loopback loop 
    linux (loop)/live/vmlinuz boot=live findiso= threadirqs mitigations=off
    initrd (loop)/live/initrd.img
}

menuentry 'Skywave Linux NEXT v5.x.x (Debian)' {
    set isofile="/isofiles/skywavelinux-next.iso"
    loopback loop 
    linux (loop)/live/vmlinuz boot=live findiso= threadirqs mitigations=off
    initrd (loop)/live/initrd.img
}

For versions earlier than 5.0
  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.

# First drive, second partition
menuentry 'Skywave Linux v4.0.0 (Ubuntu)' {
    insmod ext2
    set isofile='/isofiles/skywavelinux-4.0.0.iso'
    search --no-floppy --file --set=root 
    loopback loop (hd0,2)
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename= 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 Skywave 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 Skywave Linux Frugally on Windows Machines.

Yes, it is entirely possible to put Skywave 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 Skywave Linux iso file and Grub2 configuration files. This example depicts a hard drive with Windows on the first partition and Skywave 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 Skywave 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 Skywave 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

# First drive, second partition
menuentry 'Skywave Linux v5.0.0 (Debian)' {
    set isofile="/isofiles/skywavelinux-5.0.0.iso"
    loopback loop (hd0,2)
    linux (loop)/live/vmlinuz boot=live findiso= threadirqs mitigations=off
    initrd (loop)/live/initrd.img
}
menuentry 'Skywave Linux 1.0.0 (Ubuntu)' {
    insmod ext2
    set isofile='/isofiles/skywavelinux-1.0.0.iso'
    loopback loop (hd0,2)
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename= quiet splash threadirqs --
    initrd (loop)/casper/initrd
}
menuentry 'MOFO Linux 7.0 (Ubuntu)' {
    insmod ext2
    set root='(hd0,2)'
        set isofile='/isofiles/mofolinux-7.0.iso'
    loopback loop (hd0,2)
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename= quiet splash threadirqs --
    initrd (loop)/casper/initrd
}
menuentry 'Windows 10' {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    chainloader +1
}

Booting the Skywave Linux Frugal Install

To run Skywave Linux, simply boot the computer and await the appearance of Grub2's menu. It should list both the main system and also Skywave Linux. Select Skywave 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 Skywave Linux. Kali Linux, Slitaz, SLAX, Siduction, Knoppix, or any other live CD or DVD may be installed alongside Skywave 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.

You can even set up a multiboot hard drive, doing all of your daily computing on live Linux systems.

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 Skywave 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 Skywave Linux and MOFO Linux. Be aware that Grub counts drives starting at zero and partitions starting at one:

set timeout=20
set default=0
# set root location and insmod ext2 for all menu entries
set root=(hd0,2)
insmod ext2

menuentry 'Skywave Linux v5.0.0 (Debian)' {
    set isofile="/isofiles/skywavelinux-5.0.0.iso"
    loopback loop 
    linux (loop)/live/vmlinuz boot=live findiso= threadirqs mitigations=off
    initrd (loop)/live/initrd.img
}
menuentry 'Skywave Linux 3.1 (Ubuntu)' {
    set isofile='/isofiles/skywavelinux-3.1.iso'
    search --no-floppy --file --set=root 
    loopback loop 
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename= quiet splash threadirqs --
    initrd (loop)/casper/initrd.lz
}
menuentry 'MOFO Linux 7.0 (Ubuntu)' {
    set isofile='/isofiles/mofolinux-7.0.iso'
    search --no-floppy --file --set=root 
    loopback loop 
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename= 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.




© 2015 - 2024 Skywavelinux.com, All Rights Reserved.
Contact, Privacy Policy and Affiliate Disclosure, XML Sitemap.

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