Troubleshooters.Com®, Linux Library, and DIY Linux Present:
DIY Continuing Education: Installing Plop Linux
Copyright © 2015 by Steve Litt
See the Troubleshooters.Com Bookstore.
Contents:
This document walks you through installing Plop Linux on a VirtualBox VM, and is probably valid for bare metal too. Plop Linux is a bare bones, boot-to-root Linux that's indispensable for experimentation. Plop experimentation will be detailed in later web pages, and linked from here as they're completed.
The other cool thing about installing Plop is it's one of the simplest no-script installations. See the next section...
Most Linuxes I've used perform the installation for me, using scripts. Redhat, Caldera, Mandrake/Mandriva (may it rest in peace), Ubuntu, Debian, Manjaro: Their install CDs all boot up and script you through the entire process. Easy.
Others, like Slackware, Arch, Gentoo and Funtoo, make the user do it manually. Plop is like those, but much simpler. Plop installation could serve as a proof of concept for installing the rest.
Here's the distinctive concept of manual installation: What you're really doing is preparing one or more file systems on a hard disk, copying all files to that/those file system(s), doing just enough configuration to enable booting, and installing a bootloader. Once again:
If you're not doing RAID, LVM or disk encryption, it's actually pretty simple. With Plop Linux, the bare minimal configuration turns out to be preparing /etc/fstab.
So think about it once more. When you do that big, bad, 40 manual step Arch installation, what you're really doing is the following:
Note:
It's very possible that, under the hood, the scripting type installations of distros like Redhat, Debian, Ubuntu, Manjaro and the like follow this very same process, but you don't see it. With the Plop Linux installation, this process is up close, personal, and in your face.
If you examine the eight steps, it's obvious you must already be running Linux to perform those eight steps. You've either stuck the new hard disk in a running Linux box, or much more likely, you booted to Linux with a CD, DVD or thumb drive, and are performing the actions from that booted Linux.
Here's your main gotcha: You must keep in mind whether to use programs from the currently booted Linux, or from the Linux you've copied to the hard disk. This is why most installations include a chroot. By using chroot, you're limited exclusively to the programs that have been copied to the hard disk. You'd better believe that you need to do all bootloader installation with the bootloader commands copied to the hard disk.
A second gotcha is that the booted kernel must bear some resemblance to the kernel on the new system you're builting. Otherwise you might get a "Panic: Kernel too old" when you try a chroot, or you might get errors on installing the bootloader. If you're installing from an installation CD, that install CD is guaranteed to have a similar kernel. Otherwise, you just have to hope. I can safely tell you that installing Plop Linux while booted to System Rescue CD is difficult to impossible. Luckily, there is a Plop Live CD, so you can boot to that and then copy software from the Plop Desktop .tgz file.
There are some gotchas specific to Plop Linux, but those are covered in the Plop installation section.
This section assumes you're familiar with VirtualBox. If not, read my VirtualBox documentation.
Warning!
Plop Linux uses the ancient /dev/hda designation for hard drives, instead of the 21st century /dev/sda designation like every other distro made in the last 10 years. I have no idea why.
What I do know is that if you aren't constantly aware of this, it will kick you in the shins over and over again. Remember it when you change /etc/fstab. Remember it when you change /etc/lilo.conf. Remember it when you do your lilo -M /dev/hda command.
Download the Plop live ISO file and the desktop tarball to your host's (not guest's, host's) /tmp/xfer directory (create it on the host if need be). For the purpose of this document, I'm assuming you put both your Plop live ISO file and your Plop desktop TGZ file on your host's /tmp/xfer directory. If you put them elsewhere, change commands during this process to reflect their locations.
For the purpose of this document, those files are:
The preceding files are obviously for Intel/AMD type 64 bit hardware. If your hardware is 32 bit, or ARM, or whatever, your files will be named differently. They'll also be named differently as time goes on and new versions are made.
First, you need to get your VM up and running. Run VirtualBox, click the "New" button, and make a VM whose RAM is 2 to 4GB, disk space 8GB, and whose CD drive is /tmp/xfer/ploplinux-4.3.0-x86_64.iso. Start your VM. You'll be operating live off the Plop Live ISO, and will have 8GB of disk space in the guest's /dev/hda (remember Plop's device naming?) This is pretty much the same situation as you'd have if you were installing to bare metal, except on bare metal your IP address would be different from the VM standard 10.0.2.whatever.
Warning!
Don't even think of using a live CD except Plop. It will make things much more difficult or downright impossible. System Rescue CD is the wrong tool for this job.
The following is a summary of the rest of your install job:
After booting your new VM, you're left at a command prompt of the live CD, logged in as root. Run startx to access your Xfce GUI. If you don't like the transparent terminals (I don't, bad vision), handle it in ~/.config/xfce4/terminal/terminalrc file. Then run the gparted program either from the menu (under "System") or from the command prompt. From the menu, Gparted->devices and choose /dev/hda, then Device->Create_partition_table to give /dev/hda an MSDOS partition table, and then create and format /dev/hda1 as an ext3 (Plop can't use ext4) partition that uses all but 1000MB of the disk space. Then create and format /dev/hda2 as a swap partition. Make sure the formatting gets done in both cases.
Last but not least, use gparted to make /dev/hda1 bootable. This is necessary when installing LILO later on.
Exit gparted, and use lsblk and blkid to make sure the partitions are the way you think they are.
You're almost done with copying all files to the new root directory. Your last copy is to copy the live CD's /dev directory to the /dev directory on the new root. If this sounds sketchy to you, it's because most serious distros require you to do all sorts of work to build the /dev directory, and most likely /proc and maybe /sys too. Plop Linux is so ultra-simple that, as long as you're booted to the same Plop version as you're creating on the hard disk, you can simply do the copy. So perform the following to finalize your copy to the new root:
That's it. All the necessary files have been copied to the new root.
Perform the following commands:
Now you cannot see anything from the booted CD. The only vestiges of the booted CD are its running kernel, which is presumably the same kernel as is installed on the new root, and the $PATH, which theoretically should be changed, but in this case is good enough to leave alone. Now, any programs you run, are programs from the new installation, not from the booted CD.
Note that in this chroot environment, many GUI programs, including gvim, won't run. You could probably fix that, but it's easier just to run CLI programs in your existing GUI terminal program (xfce4-terminal).
Get into the /etc directory and edit files fstab and lilo.conf. In fstab, make sure to change all "sda" to "hda", and make sure the right partitions are mounted to the right places. In file lilo.conf, make sure to change all "sda" to "hda", change the timeout figure near the top to 70, so you have lots of time to explore different boot options. Save both files.
Remembering that you already prepared /etc/lilo.conf and that you already copied /dev from the CD to the new installation, perform the following two commands to install the bootloader:
exit
The preceding command exits the chroot environment so you can unmount everything and perform an orderly shutdown.
Your hard disk won't get written, or it will be corrupted, unless its partitions are unmounted. Unmount them by doing the following:
Use the GUI or the poweroff or halt command or whatever.
If you don't do this, it will boot to the live CD again, instead of to the OS you just laid down on the VM's /dev/hda1. This is the equivalent of pulling out the CD after installation on bare metal.
It should boot into the VM's hard disk installation's boot menu, from which you can select the default and run plop.
Arch, Slackware, Gentoo, and Funtoo all share this: The main component of installation is copying the files to their file structure. In the case of Gentoo and Funtoo, compiling goes along with the copying. Although all of them seem like neverending recipes of commands, in fact they all operate pretty much like this:
If you can put a 40 step install recipe within the preceding framework, you'll be much more aware of where you are in your install, why you're doing what you're doing, and perhaps how to perform steps that are ambiguously documented. Above all, when viewed in the preceding framework, manual installation isn't rocket science.
Plop Linux is an outlier. A distro made for experimentation. It boots into the root user, for gosh sakes. Few if any would use it for "real work." The beauty of Plop Linux is it's so incredibly simple that its actual activities closely parallel Linux concepts. For instance, actually installing Plop is almost a one to one correspondence with the conceptual steps of manually installing a complex distro. Plop is the picture that's worth a thousand words.
This document detailed how to install Plop Linux on a VirtualBox VM. This is very easy because of Plop's simplicity. That simplicity aids learning, because the technical steps correspond to the concepts. If you're wondering about a Linux concept, Plop on a VM is a very quick way to learn and test.
Don't delete your Plop VM, because in the near future I'll be write more articles whose experiments involve Plop Linux. The whole reason I picked up Plop in the first place was as a test bed for Suckless Init.
[ Training | Troubleshooters.Com | Email Steve Litt ]