My thoughts on Slackware, life and everything

Tag: usb (Page 1 of 2)

Beta3 of Slackware Live Edition is available

blueSW-64pxIt took me a while to get to a level where I could do another public update of my “liveslak” scripts for the Slackware Live Edition. The previous two articles about the Live OS generated quite some feedback and I think I was able to address a lot of those remarks and suggestions in the updated code. My TODO has however only shrunk with one item…

A “Beta3” is what we have now. My milestone for emitting a new Beta was to have a working UEFI boot. And I hope I managed that. Works here… for what it’s worth.

What is Slackware Live Edition?

Please read the previous two articles, “Slackware Live Edition” and “Beta 2” to get a better understanding and so that I do not have to repeat myself too much 🙂

Update 06-jan-2016: please continue reading and commenting in my follow-up article on “Beta 5“.

We’re talking about a “live OS” here, which you can run off a CDROM, a DVD or a USB stick and does not have to be installed to a computer hard drive. You can carry the USB stick version with you in your pocket. You’ll have a pre-configured Slackware OS up & running in a minute wherever you can get your hands on a computer with a USB port. The USB version is “persistent” meaning that the OS stores your updates on the stick. The CD/DVD versions (and the USB stick if you configure it accordingly) run without persistence, which means that all the changes you make to the OS are lost on reboot.

I created “Slackware Live Edition” as a showcase for the development of Slackware. It is not meant as a generic Live Distro generator – it will only support the latest slackware-current. A tool to satisfy your curiosity!

The main script “make_slackware_live.sh” creates an ISO from scratch. The script installs Slackware packages or package sets into compressed “squashfs” modules, configures and optimizes the target filesystem to be run as a Live environment, and then generates an initial ramdisk that will assemble the Live environment when you boot. All that is put into a bootable ISO image file. Thanks to Linux kernel 4.x and the squashfs-tools package added to Slackware-current, the process requires no compilation nor does it need non-standard packages to create a Slackware Live Edition (of course, the Plasma, Mate and Cinnamon flavours do require 3rd party packages). The downside is that the ISO has to be created on Slackware-current (older versions of Slackware do not have the proper tools). It follows that the only Slackware release which is supported as a Live Edition is the “-current” development tree. All future releases will be supported too of course.

The “liveslak” scripts can generate a variety of Slackware flavors. The default script action is to create an ISO from scratch that will give you a complete 64bit Slackware-current Live Edition. The scripts can also create a 700 MB slimmed-down XFCE version with XDM as the graphical login manager which fits on a CDROM medium or a 1 GB USB stick; and for my own enjoyment (as well as yours I may hope) it can create a 3.0 GB ISO image of Slackware64-current but containing Plasma 5 instead of KDE 4, as well as an addition of several other packages I maintain: vlc, libreoffice, calibre, qbittorrent, ffmpeg, chromium, openjdk, veracrypt.

Since Beta 2 the scripts are also capable of generating a Mate and a Cinnamon flavour of Slackware (replacing Slackware’s KDE 4) courtesy of Willy Sudiarto Raharjo’s repositories.

slackwarelive_syslinux_beta2

How to create a persistent USB stick?

The ISO can be burnt to a DVD or copied to USB stick using ‘dd’ or just plain ‘cp’, but that will give you a read-only medium where all changes to the Live OS happen in RAM. You can use the ‘iso2usb.sh‘ script to create a Live OS on the USB device with persistence. Changes you make while running Slackware Live will then be preserved across reboots because the OS will write all these changes to the directory “persistence” in the root of the USB device. Typically you would run the script with an input and an output parameter at a minimum:

# ./iso2usb.sh -i ~/Download/slackware64-live-current.iso -o /dev/sdX

… where /dev/sdX is the device name of your USB stick which will get formatted – erasing all data currently stored on it. The iso2usb.sh script will pause to show you the characteristics of the target device and ask you once more if you really want to continue erasing it. You will not easily destroy your harddrive unless you are really not paying attention!

Booting the Live OS

When you boot Slackware Live on a BIOS computer, Syslinux will handle the boot and show the following menu:

  • Start (SLACKWARE | PLASMA5 | XFCE | MATE) Live (depending on which of the ISOs you boot)
  • Non-US Keyboard selection
  • Non-US Language selection
  • Memory test with memtest86+

You can select a keyboard mapping that matches your computer’s. And/or boot Slackware in another language than US English. You will probably want to change the timezone; syslinux allows you to edit the boot commandline by pressing <TAB> because the syslinux bootmenu does not offer you a selection of timezones.

On UEFI computers, GRUB2 handles the boot and it will show a menu similar (and similarly themed) as the Syslinux menu:

  • Start (SLACKWARE | PLASMA5 | XFCE | MATE) Live (depending on which of the ISOs you boot)
  • Non-US Keyboard selection
  • Non-US Language selection
  • Non-US Timezone selection
  • Detect/boot any installed operating system
  • Memory test with memtest86+

Grub understands variables, which simplified the creation of the menu greatly and allowed me to add a timezone selection menu. Editing a Grub menu is possible by pressing the ‘e’ key. After making your changes to the boot commandline, press <F10> to boot.

Another difference between Syslinux and Grub menus: in Grub you select keyboard, language and/or timezone and you’ll return to the main menu every time. You still have to select “Start Slackware Live” to boot. In the Syslinux menu, only the keyboard selection menu will return you to (apparently bot not actually) the same main menu. The non-US language selection will boot you into Slackware Live immediately without returning to the main menu. A limitation of syslinux, which could only be overcome by generating a lot more syslinux menu files than we already have.

 

Boot parameters & tweaks

You can use the following tweaks to the boot commandline:

  • 0|1|2|3|4|5|6|S|s|single (Select another runlevel to start with; the default is 4 for graphical login)
  • lang=nl_NL kbd=nl tz=Europe/Amsterdam (Example of language, keyboard and/or timezone customization)
  • nop (No persistence, i.e. boot the virgin installation in case your ‘persistence’ directory got corrupted)
  • nomodeset (Boot with kernel mode setting for graphics — needed with some machines)
  • load=nvidia (Load and configure binary Nvidia drivers that are present in some of the ISOs)
  • rootdelay=10 (Add 10 second delay to give the kernel more time to initialize USB – try this if the Live OS fails to boot)
  • hostname=aliens (Change the hostname for the OS; default hostname is “darkstar
  • livepw=”somestring” (Change the password for the ‘live’ user)
  • rootpw=”somestring” (Change the password for the ‘root’ user)
  • load=mod1[,mod2[…]] (load one or more squashfs modules that are present in the directory “/liveslack/optional”; by default none of the modules in the “optional” directory are loaded)
  • noload=mod1[,mod2[…]] (Prevent loading of one or more squashfs modules that are present in the directory “/liveslack/addons”; by default all of the modules in the “addons” directory are loaded on boot)
  • rescue (After initialization, you will be dropped in a rescue shell where you can perform lowlevel maintenance; the same happens anyway if the OS fails to boot)
  • debug (During init, pause at strategical locations while assembling the overlay filesystem and show relevant mount information)
  • swap (Allow the Live OS to activate all swap partitions it finds on the local hardware; by default, the hard drive will not be touched at all)
  • livemedia=/dev/sdX (Tell the init script which partition contains the Slackware Live OS you want to boot; this can become necessary if you have another copy of Slackware Live already installed to another drive partition)
  • livemain=directoryname (Use this if you copied the content of the ISO to a different directory than the default “liveslak” directory)

Download the ISO images

I have created ISO images for the SLACKWARE, XFCE, PLASMA5 and MATE flavours using the latest packages available today. You can find them at any of the following locations:

Please allow some time to synchronize these mirror servers.

The ISOs have two user accounts: root (with password ‘root’) and live (with password ‘live’). My advice: login as user live and use “su” or “sudo” to get root access.

Can I create an ISO myself?

Certainly! You can download my sources and have a go at it. Apart from the sources & scripts, you will need local copies of the repositories where the packages will be taken from. The Slackware and XFCE ISOs will of course need a mirror of the official Slackware64-current package tree. The Plasma5 ISO requires that you have mirrored my ‘ktown‘ repository as well as my regular SlackBuild repository. The Mate ISO depends on the Slackware mirror as well as Willy’s Mate mirror.

The git repository for the scripts can be found here: http://taper.alienbase.nl/cgit/liveslak/

A checkout of this repository can be found in http://www.slackware.com/~alien/liveslak/ and http://taper.alienbase.nl/mirrors/people/alien/liveslak/

If you wonder how I created the squashfs module (0060-nvidia-352.63_4.1.15-current-x86_64.sxz) containing the Nvidia drivers:  I used the SBo scripts for nvidia-kernel and nvidia-driver to compile two packages. I then created a temporary directory and installed the resulting nvidia-kernel, nvidia-driver packages together with Slackware’s xf86-video-nouveau-blacklist package all into that directory (using the command “installpkg –root”). Then I ran the “makemod” script with the temporary directory as first parameter and “0060-nvidia-352.63_4.1.15-current-x86_64.sxz” as the second parameter which created the .SXZ squashfs module which you find in ./graphics/. Simple!

Happy hacking! Eric

Slackware Live Edition – Beta 2

blueSW-64pxThanks for all the valuable feedback on the first public beta of my Slackware Live Edition. It allowed me to fix quite a few bugs in the Live scripts (thanks again!), add new functionality (requested by you or from my own TODO) and I took the opportunity to fix the packages in my Plasma 5 repository so that its Live Edition should actually work now.

What is Slackware Live Edition?

If you’re new here: Slackware Live Edition is a “live OS” meaning it does not have to be installed to a harddrive and can run straight off a CDROM or DVD medium, or off a USB stick. Slackware Live Edition is meant to showcase the development of Slackware. Therefore it will boot slackware-current and no other OS. It is meant as an ideal opportunity for people who are curious what two years of Slackware development have resulted in. You do not have to erase your current OS, just copy the ISO to a suitable medium, boot from the medium and check it out. The previous article I wrote explains in more detail why I wanted to write my own Live scripts instead of just using one of the available solutions.

What’s with these three ISO’s?

Slackware Live Edition comes in three flavors (for now). There’s a 700 MB slimmed-down XFCE version with XDM as the graphical login manager; then there is the actual complete Slackware-current with KDE4 and using KDM as the graphical login manager (2.6 GB in size); and finally you can download a 3.0 GB ISO image of Slackware-current with Plasma 5 and the SDDM graphical login manager. The Plasma 5 edition has some cool extras like vlc, libreoffice, calibre, qbittorrent ffmpeg, chromium, openjdk, veracrypt… and more from my own repository.

slackwarelive_syslinux_beta2

How do I use the ISO?

The ISO can be burnt to a DVD (XFCE version will fit on CDROM even) or copied to USB stick. Since the ISOs are ‘hybrid’ just copying to the USB device using ‘dd’ or ‘cp’ will get you a fully functional bootable medium, albeit without persistence (it’s still technically a read-only CDROM filesystem that you’ve copied to the USB stick). The OS will not be bothered by this, because it thinks it can write to the filesystem. That is the trick of a Live OS – all these write operations are done to a RAM based filesystem. The changes are gone once you reboot.

But when using the ‘iso2usb.sh‘ script you can create a real Live OS on the USB device with persistence, meaning that the things you change will be preserved across reboots. All your modifications will be stored in the directory “persistency” in the root of the USB device. Therefore you are actually able to use the USB stick as your pocket-OS on the go:

# ./iso2usb.sh -i ~/Download/slackware64-live-current.iso -o /dev/sdX

… where /dev/sdX is the device name of your USB stick. Don’t worry about accidentally overwriting the content of your hard drive – the script will first show you details about the sdX device and wants your confirmation that this is actually the device you want to reformat.

When you boot Slackware Live you will be presented with a Syslinux boot menu:

  • Start (SLACKWARE | PLASMA5 | XFCE) Live (depending on which of the three ISOs you boot)
  • Non-US Keyboard selection
  • Non-US Language selection
  • Memory test with memtest86+

The first entry boots you straight into the Live OS, using US keyboard mapping and a “en_US.utf8” locale. If you have a non-US keyboard layout and/or want your Linux to show itself in a non-US Language, you can use the second and third menu entries to configure one of the languages I selected ( I picked what I thought were the most commonly used). If your language or keyboard is not listed, just hit the <TAB> key and change the values for the “kbd” and “locale” parameters. Likewise for the timezone parameter which by default is associated with your choice of language.

The memtest option was copied from the Slackware installer – it allows you to test your RAM sticks for hardware errors very thoroughly.

More parameters

The syslinux boot menu allows you to modify the boot command line. Press <TAB> to edit the command line. You will see several parameters you can edit but you can also add more. The <F2> key will show a couple of those.

  • 0|1|2|3|4|5|6|S|s|single (Select another runlevel to start with; the default is  4 for graphical login)
  • lang=nl_NL kbd=nl tz=Europe/Amsterdam (Example of language, keyboard and/or timezone customization)
  • nop (No persistence, i.e. boot the virgin installation)
  • nomodeset (Boot with kernel mode setting for graphics — needed with some machines)
  • load=nvidia (Load and configure binary Nvidia drivers that are present in the ISO)
  • rootdelay=10 (Add 10 second delay to allow proper USB initialization)

But there are some others, and some of these have been added after readers of this blog suggested them:

  • hostname=aliens (Change the hostname for the OS; default hostname is “darkstar“)
  • livepw=”somestring” (Change the password for the ‘live’ user)
  • rootpw=”somestring” (Change the password for the ‘root’ user)
  • load=mod1[,mod2[…]] (load one or more squashfs modules that are present in the directory “/liveslack/optional”; by default none of the modules in the “optional” directory are loaded)
  • noload=mod1[,mod2[…]] (prevent loading of one or more squashfs modules that are present in the directory “/liveslack/addons”; by default all of the modules in the “addons” directory are loaded on boot)
  • rescue (After initialization, you will be dropped in a rescue shell where you can perform lowlevel maintenance; the same happens anyway if the OS fails to boot)
  • swap (Allow the Live OS to activate all swap partitions it finds on the local hardware; by default, the hard drive will not be touched at all)

I get errors and booting fails

Booting an OS off a USB medium is tricky. Linux kernel initializes the storage and the usb subsystems in parallel. If you have a fast computer and slow USB medium or you use a USB-1 / USB-2 port, the probability is pretty high that the USB stick is not yet ready when the OS starts its mount attempts. There’s a parameter you can add to the boot command line to give the USB device some extra time to settle – try adding “rootdelay=10” or even “rootdelay=20” which will add 10 (or 20) seconds pause to the boot process. The iso2usb.sh script configures a default delay of 5 seconds which should be sufficient for most computers.

Instead of “rootdelay” you can use the parameter “waitforroot” with identical result.

Slackware Live does not log me on automatically!

Correct. This is a demonstration environment, with the purpose of getting you acquainted with Slackware, remember?

You already saw all these intimidating kernel messages scrolling across the screen while booting the OS, and now you have two choices for login:

  • user ‘root’ with the password ‘root’ (at least that is the default – you can change it using a boot parameter if you want)
  • user ‘live’ with the password ‘live’ (idem about the default value).

I would suggest using the ‘live’ user account to logon to the Live OS, because KDE 4 and Plasma 5 will not appreciate it when you login as root directly. If you need root access, then just run “sudo -i” or “su -” (both commands will request you to enter the password of user ‘live’, not the root password!).

What’s still on the TODO?

There are a couple of items that I did not get to but they should really be looked into to bring this out of Beta:

  • UEFI boot needs to work (must have)
  • Better documentation about how the scripts work (must have)
  • Documentation on all the boot parameters (must have)
  • Slackware installer as part of the ISO, perhaps even Didier’s polyglot installer (nice to have, only in the Plasma5 version)
  • A ‘copy2ram‘ function to run the OS entirely in RAM (nice to have)
  • Persistence directory inside a loop-mounted ext4 container file, so that the persistent USB stick can have a single FAT partition (nice to have)
  • Homedirectory of a persistent Live OS inside a loop-mounted LUKS-encrypted container file, to protect your private data (nice to have)
  • … tell me more! Or post patches!

Download the ISO images

Show me the source!

Git repository for the scripts can be found here: http://taper.alienbase.nl/cgit/liveslak/

A checkout of the repository can be found in http://www.slackware.com/~alien/liveslak/ and http://taper.alienbase.nl/mirrors/people/alien/liveslak/

Hopefully soon, I will write a proper README which takes you through the inner workings of the scripts. If you are curious you can of course check out the sources – they are full of comments. But there are some design decisions at the core which you need to be aware of before you start on these scripts.

Happy hacking! Eric

Update 25-dec-2015: please continue reading the follow-up article on “Beta 3“.

Update 24-jan-2016: please continue reading and commenting in my follow-up article “Beta 4″.

 

Slackware Live Edition

I thought it would be a cool idea to celebrate the “farewell to udev”. With the abandoned ConsoleKit replaced by ConsoleKit2 which is actively maintained by the Slackware-friendly XFCE crew, and Gentoo’s eudev taking the place of udev, we are well equipped to keep systemd out of our distro for a while. Basically eudev contains the udev code as found in the systemd sources, but then stripped from all standards-violating systemd crap and with a sane build system. Hooray, we’re back in business and eudev gained some more traction. Win-win.

How to celebrate the occasion? Easy! By releasing the Slackware Live Edition.

liveslak-1.0.0

Please also check out the original announcement text (moved to a different page) and the follow-up articles on “liveslak” which explain how this project grew from its humble beginnings.

First teasing screenshots of my (then still called) “Project X” were revealed in a blog post in November 2015. I wrote the original annoucement a week later, also in November, on this exact blog page. However, the original text talked about being beta, incomplete and in need of testing. In the meantime, this page’s URL is being linked to from everywhere and I get many questions about “when will it be ready” so I decided to re-write this text into a proper reference page and moved the original text to a different location for posterity.

Note for clueless newbies

The Slackware Live Edition comes with two user accounts: user ‘root’ (with password ‘root’) and user ‘live’ (with password ‘live’). My advice is to login as user live and use “su” or “sudo” to get root access.

Note: the “su” and “sudo” commands will ask for the ‘live’ user’s password!

What is Slackware Live Edition, and what is liveslak?

Slackware Live Edition:
It is a version of Slackware (14.2 and newer)  that can be booted and run directly from a DVD or a USB stick. It is distributed as an ISO image and meant to be a showcase of what Slackware is about. You get the default install, no customizations, but with all the power. You do not have to install Slackware to your harddisk first to experience it first-hand.

Liveslak:
The combination of scripts, bitmaps and configurations to generate the ISO images are called project “liveslak“.

Let me state the reasons I had for starting this “liveslak” project (apart from sheer curiosity):

  1. Provide a Live version of Slackware proper – i.e. show Slackware as it is, but without having to install it. No hiding of kernel messages scrolling across the screen at boot – no custom wallpapers, etcetera. Meant for education and demonstration purposes.
  2. The target should be slackware-current – the bleeding edge. Many people want to know what that looks like but are hesitant to install slackware-current for fear that it breaks stuff and causes productivity loss.
  3. Provide a way to generate a Live ISO with just Slackware packages as the source – fully scripted and deterministic.
  4. Still be able to customize its content – for instance provide stripped-down or minimalist versions of Slackware but also allow for the inclusion of 3rd party packages.
  5. Option to create a bootable USB stick running Slackware Live (which is different from ‘dd’-ing the hybrid ISO to a USB stick!)
  6. Keep It Simple Stupid!

… but I had not anticipated the expansion of scope that can be attributed to the people who have been testing all my Beta versions. They came up with real-life use-cases, worthwhile additions and fixes. My thanks go out to all of you! The “liveslak” is so much more now then I initially conceived. Instead of being just a simple demo-toy it is now usable as a full-blown Live work environment in its own right. I carry a USB stick with a secured Slackware Live on my key chain all the time.

Highlights of Slackware Live Edition

Properly documented

The Slackware Documentation Project contains extensive documentation about “liveslak“, both for users of the Live OS and for people who want to know “how it works”  and want to develop a custom Live OS.
Check it out please, in particular all the boot options for the Live OS.

Good hardware support

The Live OS boots on “good old” BIOS computers but also on modern UEFI hardware (disable secure boot first). The kernel and userland software in the OS is fully up to date and supports modern and older hardware. If your computer does not support a 64bit Operating System then you can just download the 32bit version of Slackware Live Edition.

Persistence

Slackware Live Edition is persistent if you install its ISO to a USB stick using the “iso2usb.sh” script. Persistence of a Live OS means, the things you change or add (or delete) are stored on the USB medium and will survive a reboot. As opposed to the raw ISO image (burnt to a DVD or ‘dd’-ed to a USB stick) which is a pure Live OS where all your modifications are written to a RAM disk and gone when you reboot.

A feature I consider crucial for a persistent Live OS on a USB stick that you carry around with you in your jacket pocket is… data protection!

Data encryption

How do you protect the stuff you are accumulating in your live user’s homedirectory, such as passwords, confidential documents, GPG and SSH keys etc? You lose the USB stick, someone else may steal it – your sensitive files will be compromised. Therefore the Slackware Live Edition allows you to apply strong, unbreakable encryption to your precious data. You have the option to create a LUKS-encrypted container file in the Linux filesystem of the USB stick. The filesystem inside that encrypted container will then be mounted on the /home directory of the Live OS when it boots.
When creating the LUKS container you must enter a passphrase which will be used to encrypt all your data. During the boot-up of the Live OS, you will be prompted to enter this exact passphrase again which will then unlock the container and make your data available. On shutdown, the container will be locked again and a potential thief of your USB stick will be unable to get to the files  (i.e. your homedirectory) which reside in the encrypted LUKS container.

Multiple OS variants or flavors

The “liveslak” scripts are able to generate a variety of Slackware Live ISO flavors: SLACKWARE, XFCE, PLASMA5, MATE, CINNAMON, CUSTOM. The locations where you can download these ISO files are shown in the next paragraph.

  1. By default, “liveslak” creates a 3 GB large ISO from scratch that will give you a complete 64bit Slackware-current Live Edition.
  2. The scripts can also create a 700 MB slimmed-down XFCE version with XDM as the graphical login manager which fits on a CDROM medium or a 1 GB USB stick.
  3. A 4 GB ISO image of Slackware64-current containing Plasma 5 instead of KDE 4 is also an option. The PLASMA5 variant is spiced up with several other packages I maintain: vlc, libreoffice, calibre, qbittorrent, ffmpeg, chromium, openjdk, veracrypt.
  4. The option to generate a 2 GB ISO containing either the Mate or the Cinnamon desktop instead of Slackware’s own KDE 4 could be added courtesy of Willy Sudiarto Raharjo’s repositories.
  5. The “liveslak” scripts allow a large degree of customization so that you can create “your own” variant of a Slackware based Live OS. One example of what’s possible is the Live Edition of Cinelerra CV.

 No custom kernel or 3rd party tools needed

The main script “make_slackware_live.sh” creates an ISO from scratch. The script installs Slackware packages or package sets into compressed “squashfs” modules, configures and optimizes the target filesystem to be run as a Live environment, and then generates an initial ramdisk that will assemble the Live environment when you boot. All that is put into a bootable ISO image file. Thanks to Linux kernel 4.x and the squashfs-tools package added to Slackware 14.2, the process requires no compilation nor does it need non-standard packages to create a Slackware Live Edition (of course, the Plasma, Mate and Cinnamon flavours do require 3rd party packages). The downside is that the ISO has to be created on Slackware 14.2 (older versions of Slackware do not have the proper tools or kernels). It follows that the only Slackware release which is supported as a Live Edition is 14.2 and the “-current” development tree. All future releases will be supported too of course.

Install the Live OS to your hard drive easily

The included program “setup2hd” (all ISOs except the small XFCE variant) is a modified Slackware installer which will guide you through the familiar setup menus and install the content of the Slackware Live Edition to your hard disk. The “setup2hd” program can be run from your X session so that you can keep interacting with the Internet while Slackware installs itself.

setup2hd

Start the builtin PXE server and let the whole LAN run Slackware Live

Load the Live OS into RAM using the “toram” boot parameter and then start “pxeserver” from an X terminal. All computers in your LAN will be able to boot Slackware Live Edition from the network now. Ideal for a hackfest.

pxeserver

Download the ISO images

As stated above, you can choose between several variants of Slackware Live Edition. ISO images for the SLACKWARE, XFCE, PLASMA5 and MATE flavours using the latest Slackware-current packages are available.

The ISO images (with MD5 checksum and GPG signature) are available on the master (bear) and its mirror servers. A symlink called “latest” will always point to the latest set of ISO images.

And if you love the bleeding edge, an ISO file for slackware64-current is automatically (re-)generated every time there is an update to the ChangeLog.txt of Slackware-current. You can find this ISO image here:

Download the source

Git repository for the scripts can be found here:

A checkout of the repository can be found here:

Transfer the ISO content to a medium

  • You can burn the ISO file to a CDROM medium (only the XFCE Edition fits on a CD) or to a DVD,using your favorite burning program like k3b (KDE), xfburn (XFCE), xcdroast (plain X-Window) or brasero (GNOME)… or a Windows burning program if you want.
    Make sure you inform the application that this is a bootable ISO, i.e. do not simply burn the contents of the ISO to a disk.
  • Or, you use the program ‘dd’ or else ‘cp’ to transfer the ISO to a USB stick (aka flash drive). Any of the following two commandlines will do the job, provided your USB stick is known by your Linux computer as “/dev/sdX“. Note that sdX means the whole disk, not a partition on the disk!

    $ dd if=slackware-live-14.2.iso of=/dev/sdX
    $ cp slackware-live-14.2.iso /dev/sdX

    This creates a read-only bootable USB medium containing Slackware Live. Readonly means that you will not get persistence this way. This method is similar to using a DVD medium. If you want a writable USB stick instead, read the next option.

  • You can use the ‘iso2usb.sh’ script to transfer the content of the ISO to a USB stick, thereby adding persistence to the Live OS on the stick. The stick will remain writable and you can add new modules later on if you want.
    You can find extensive documentation on the usage of that script on the Slackware Documentation Wiki.

Booting the Live OS

When you boot Slackware Live on a BIOS computer, Syslinux will handle the boot and show the following menu:

  • Start (SLACKWARE | PLASMA5 | XFCE | MATE) Live (depending on which of the ISOs you boot)
  • Non-US Keyboard selection
  • Non-US Language selection
  • Memory test with memtest86+

You can select a keyboard mapping that matches your computer’s. And/or boot Slackware in another language than US English. You will probably want to change the timezone; syslinux allows you to edit the boot commandline by pressing <TAB> because the syslinux bootmenu does not offer you a selection of timezones.

On UEFI computers, GRUB2 handles the boot and it will show a menu similar (and similarly themed) as the Syslinux menu:

  • Start (SLACKWARE | PLASMA5 | XFCE | MATE) Live (depending on which of the ISOs you boot)
  • Non-US Keyboard selection
  • Non-US Language selection
  • Non-US Timezone selection
  • Memory test with memtest86+

Editing a Grub menu is possible by pressing the ‘e’ key. After making your changes to the boot commandline, press <F10> to boot.

Another difference between Syslinux and Grub menus: in Grub you select keyboard, language and/or timezone and you’ll return to the main menu every time. You still have to select “Start Slackware Live” to boot. In the Syslinux menu, only the keyboard selection menu will return you to (apparently bot not actually) the same main menu. The non-US language selection will boot you into Slackware Live immediately without returning to the main menu. A limitation of syslinux.

liveslak-0.9.0-xfce

 

Things to remember when you boot the ISO

Slackware Live does not log you on automatically! This is a demonstration environment, with the purpose of getting you acquainted with Slackware, remember? Therefore you will first see all these intimidating kernel messages scrolling across the screen while booting the OS. Then you need to login manually.

Consult the documentation for assistance with the various boot parameters you can use to tailor the Live OS to your needs. The syslinux boot has help screens behind the F2, F3, F4 and F5 function keys and the grub boot screen has a “help on boot parameters” menu entry.

How to create a persistent USB stick from the ISO?

The ISO can be burnt to a DVD or copied to USB stick using ‘dd’ or just plain ‘cp’, but that will give you a read-only medium because all changes to the Live OS are in fact written to your computer’s RAM and lost when you reboot.

Use the ‘iso2usb.sh‘ script to create a Live OS on the USB device with persistence.

Note: The “iso2usb.sh” script can also be found in “/usr/local/sbin” when you boot Slackware Live Edition.

By default, the changes you make while running Slackware Live will then be preserved across reboots because the OS will write all these changes to the directory “persistence” in the root of the USB device. The script requires an input and an output parameter at a minimum:

# ./iso2usb.sh -i ~/Download/slackware64-live-14.2.iso -o /dev/sdX

… where /dev/sdX is the device name of your USB stick (the actual device, not a partition on the device).

Alternatively you can use a file “persistence.img” in the root of the USB device which will be loop-mounted by the Live OS and changes to the system will be written to the filesystem inside this container file. A feature which should be appreciated by people who want to use a USB stick with a VFAT partition instead of a Linux ext4 partition. The script requires an additional parameter “-P” in this case:

# ./iso2usb.sh -P -i ~/Download/slackware64-live-current.iso -o /dev/sdX

Note that your USB stick will get formatted by the script – erasing all data currently stored on it. The iso2usb.sh script will pause to show you the characteristics of the target device and ask you once more if you really want to continue erasing it. You will not easily destroy your hard drive unless you are really not paying attention!

How to create a LUKS encrypted homedirectory container?

The iso2usb.sh script has a parameter “-c” which takes a size argument. If you want to create a 400 MB encrypted container file to hide your homedirectory in, then you need to specify “-c 400M”. If you want 2.5 GB for your homedirectory, use “-c 2.5G”. If you are not concerned so much with the exact size but want to allocate a percentage of the free space on the stick, then use “-c 40%” to create a LUKS container that uses 40% of the available free space.

Now to put that into an actual example command line which will create a file (its name will be “slhome.img”) using up 50% of the free space on the stick:

# ./iso2usb.sh -i slackware64-live-xfce-current.iso -o /dev/sdX -c 50%

When the script gets to the point where it creates the LUKS container file, it will prompt you for a passphrase which will be used for encrypting and decrypting the container’s data. Right after that, the script will prompt you to enter that passphrase again when the LUKS container is unlocked and the ISO’s /home content is copied into the container.

Help, I messed up my persistent USB stick!

You can still boot a USB stick containing persistence and/or encrypted LUKS homedirectory to a “pristine condition”.

Suppose you screwed up somehow and the USB stick won’t work properly anymore or won’t even boot to the desktop. If this happens, you can still boot the original unmodified Live OS, discarding all your accumulated persistent changes. The unmodified OS should always boot unless your USB stick is physically damaged.

You have two options to solve the levels of brokenness:

  1. Start by adding the boot command parameter “nop” which stands for “no persistence”. The “nop” boot parameter will  cause Slackware Live to ignore your persistent data, as most probably the persistent data store will contain the cause of your issue. Even when passing “nop” to grub or syslinux, Slackware Live will still mount your encrypted LUKS container on the /home directory if you are using that. It is possible that your issue is somewhere in your homedirectory (for instance you might have an issue with configuration files in ~/.local ~/.config or ~/.kde).
  2. If you want to ignore any LUKS container as well as ignoring the persistent storage, and use the /home directory of the original Live OS, an additional parameter “luksvol=” must be added to the boot commandline. Note that there is nothing at the right side of that equal sign! The two parameters together look like “nop luksvol=“.

After logging in to a pristine Slackware Live you can then remount the Linux partition of your USB stick to make it writable:

# mount -o remount,rw /mnt/livemedia

Now that the USB stick’s partition is writable you can either prune the persistence directory “/mnt/livemedia/persistence” (i.e. delete all data in there) and/or fix the content of your LUKS container file “/mnt/livemedia/slhome.img“.

Have fun! Eric

Below, you will find all the comments made by visitors since the original announcement was posted here on the blog.

Why the relative silence?

I realize that I have been kind of silent on the blog these past weeks. There are several reasons for that.

Primary reason was that I was training helpdesk teams in Asia – and no, unfortunately I did not get to travel there despite original suggestions… higher authorities deemed it better (read: cheaper) to use Microsoft Lync for the training sessions. Two weeks of looking at my computer screen while talking to electrons… that was pretty exhausting.

Also, I have been working on the next Plasma 5 batch aka my ‘ktown-testing‘ package set. Almost finished compiling, I will be waiting with my upload until the sources for Frameworks are officially released – should be tomorrow.

And finally, two years after speaking about it for the first time, I finally sat down and started working in earnest on my new “Project X”. Errr?

Riding the top of my TODO list for a long time, I have been meaning to create a Live version of Slackware. I know, there’s Porteus of course (they have an impressive ISO generator wizard by the way), and SLAX. Both are great Live distros based on Slackware. And there is SlackEX and Salix Live, and possibly some others too. Then why the urge to create yet another Live version of Slackware? Simply: because those others are Slackware-derived, and they have carved a niche of their own, but none of them are really Slackware. Also, I have been irritated by past distro reviews where the reviewer complained that Slackware did not have a Live version. Meaning, to give it a test run they would have to install the distro to an actual computer – which would lead to the usual moaning about the arcane installer and “Slackware not keeping up with time”.

So what were my goals?

  1. Provide a Live version of Slackware proper – i.e. show Slackware as it is, but without having to install it. No hiding of kernel messages scrolling across the screen at boot – no custom wallpapers, etcetera. Meant for education and demonstration purposes.
  2. Target should be slackware-current – the bleeding edge. Many people want to know what that looks like but are hesitant to install slackware-current for fear that it breaks stuff and causes productivity loss.
  3. Provide a way to generate a Live ISO with just Slackware packages as the source – fully scripted and deterministic.
  4. Still be able to customize its content – for instance provide stripped-down or minimalist versions of Slackware but also allow for the inclusion of 3rd party packages.
  5. Option to create a bootable USB stick running Slackware Live (which is different from ‘dd’-ing the hybrid ISO to a USB stick!)
  6. Keep It Simple Stupid!

Foremost, this was meant to be a learning experience. I had no idea how a Live CD/DVD worked. I knew it had to be different from how a regular installation to a USB stick would work. Booting from a CD or DVD implicates that whenever the OS wants to write to disk, some measures have to be taken so that write operations would still be possible. Writing to a read-only CD medium is impossible so writes have to be done to RAM somehow. Still learning! Without doubt, the work done by Porteus, Slackware-Live scripts, Salix and Slackel was an inspiration during my journey to discover how this stuff works, but I did not have a need for all their complexity. I tried to keep my scripts simple and barebones and stick to the goals of creating an education and demonstration tool.

So far, I have indeed been able to stick to my goals. But I am far from done, and I would consider the current state of things at most to be “Beta Quality”. Nevertheless I wanted to share a few screenshots to probe the interest in such Slackware Live media. The screenshots show that I did actually do some customization: the initial boot looks fancier than the regular Slackware system. Just to attract more newbies 🙂

I am using syslinux and its sibling extlinux for booting up the Live environment… not lilo or grub or elilo. Why? Because I wanted to know more about Syslinux’ capabilities.

slackwarelive_syslinux

Slackware Live – Syslinux boot menu showing language choices

I created a 700 MB ISO (fits on a CDROM!) containing a stripped-down Slackware with XFCE as the Desktop Environment and XDM as the graphical login manager. I also “prettified” XDM as you can see below. XDM now has proper “halt” and “reboot” buttons and Slackware logo.

slackwarelive_xdm

Slackware Live – XDM graphical login

I have two versions of full Slackware; one containing the actual Slackware-current full install with KDE 4 as the default Desktop Environment, and a second one with Plasma 5 instead:

slackwarelive_plasma5

Slackware Live running Plasma 5.4.3

The Plasma 5 version uses SDDM as the graphical login manager:

slackwarelive_sddm

Slackware Live – SDDM graphical login manager

The version of Plasma 5 shown in the screenshots is my still unreleased ktown package set by the way – showing that this Slackware Live would be a powerful way of showing what Slackware is capable of.

Note: my live scripts are using features only available in 4.0 kernels and higher. This makes my live environment unfit for any released version of Slackware. That is not bad. In fact, if you are looking for production-ready live OSes you are probably better of by using any of the previously mentioned distros. My version of Slackware Live is a real demo tool for the development tree of Slackware. Its core is a single script “make_slackware_live.sh” and a set of configuration files. Plus a “live init” script which replaces Slackware’s init script in the initrd image which is created by “mkinitrd”. Essentially it will be so basic that everyone should understand how this works in no time at all.

After all these big words, is there more to show than just screenshot teasers? Well, no. I am nagging the coreteam to give the ISOs a test run and this has already exposed some bugs that I am working on eradicating. When I feel confident enough I will probably upload the XFCE and Plasma 5 versions, and when the feedback is OK (and I fixed all the glaring bugs you guys will surely uncover) I will also release the scripts. For now… it’s just the screenshots.

What do you think, is this worth while? Or do you think it is redundant?

Welcome Windows user!

… I am going to show you how to create a Slackware USB installer when all you have is a Windows computer.

As a Linux user, this would not cause you any problems since there is a shell script that does the work for you – all you need is the Slackware DVD and a re-usable USB stick of sufficient size.

If you run Windows, it is still possible to create a bootable USB stick that can start Slackware’s installer. If the stick is big enough (2 GB in size) you can even add Slackware’s packages to it and avoid the use of a Slackware DVD as the package source entirely.

The requirements:

What tools will you need for the job at hand?

  • A version of dd for Windows. This is needed to copy a USB image file to the USB stick. You can obtain it here at chrysocome.net., the same site that also hosts RAWRITE.EXE which ships with Slackware in the isolinux/sbootmgr directory.
  • The syslinux tool from syslinux.zytor.com. This will be used to make your stick bootable. Download it directly from kernel.org – the .zip file contains a Windows executable.
  • A program like Winimage (a shareware program, free 30-day trial), or IZarc (might be a good free alternative to Winimage) that is able to open the usbboot.img disk image file and extract its content to your hard drive.
  • Of course you need a Slackware DVD. Either buy it at the Slackware Store (which helps keeing the distro alive) or download a DVD ISO image from any Slackware mirror. It is also possible to use a local copy of a Slackware package tree (either downloaded from a Slackware mirror or copied off a DVD). In the examples below I am using “slackware-13.0” which is the 32-bit Slackware version 13.0. The instructions are not limited to this particular version of Slackware – you can do this for every recent version of Slackware, including the 64-bit release.
  • And finally, a USB stick with a (single) FAT32 partition. If it has 40 MB of  free space, you can use this stick as a bootable Slackware installer but still need the DVD or a set of CDROMs for the actual packages. If the stick has 2 GB of available free space, you will be able to copy all Slackware packages to the stick as well. The resulting bootable USB stick will be all you need in order to install Slackware. Ideal for netbooks that do not have a DVD drive!

Preparations:

First things first:

  1. Insert the Slackware DVD or make sure you have a copy of a Slackware tree somewhere on your local drive (more specifically: everything on the Slackware DVD with the exception of the source and slackbook directories will be required). In the examples below I will assume that the top of the Slackware tree is “D:\slackware-13.0\“. For other releases of Slackware or for the 64-bit version of Slackware the pathnames will be a bit different of course, but the same procedure applies.
  2. Insert the USB stick, make sure it gets assigned a drive letter. In the examples below I assume that the drive letter for the USB stick is “U:
  3. Now, you have to decide what to do with your stick. This depends on how much data it can contain (less than 2GB, or more than 2GB). See below, there is a set of instructions for both cases.

If you have (much) less than 2 GB available on the stick, we can transform the stick into a bootable Slackware setup disk.

NOTE: the following procedure will erase all existing data on the USB stick, so be careful and check what’s on it before you proceed.

  1. Install the Windows version of dd (see above) onto your Windows computer.
  2. Open a DOS box (i.e. get a command prompt) by running
    cmd.exe
  3. Run the following command at the prompt:
    dd if=d:\usb-and-pxe-installers\usbboot.img of=\\.\u:
  4. That’s it! You have created a bootable Slackware setup USB stick

If you have 2 GB or more available on the stick, we will be creating a full “USB equivalent” to a Slackware DVD:

NOTE: The following procedure is non-destructive; meaning that no files on the stick will have to be deleted.

  1. Install Winimage and the Windows version of syslinux (see above) onto your Windows computer.
  2. Create a directory “U:\boot\syslinux\” on the USB stick
  3. Use Winimage to extract the content of the image file “D:\usb-and-pxe-installers\usbboot.img” to the newly created directory “U:\boot\syslinux\” on the stick
  4. Remove the file “U:\boot\syslinux\ldlinux.sys
  5. Open a DOS box (i.e. get a command prompt) by running
    cmd.exe
    On Vista at least, you have to run cmd.exe as Administrator to avoid the “Accessing physical drive: access denied” message when running the syslinux command in the next step.
  6. Run the following command at the prompt to make the stick bootable (you will notice the directory /boot/syslinux in that command which is the directory we just populated):
    syslinux.exe -m -a -d /boot/syslinux u:
  7. Using Windows Explorer, give the U: drive the label “USBSLACKINS
  8. Copy the whole Slackware tree “D:\slackware-13.0” to the root of the USB stick, “U:\“. Exclude the slackbook, source and usb-and-pxe-installers directories while copying if you have just about 2 GB free. If you have a 4 GB stick you will find that everything will fit nicely. Using a Windows Explorer for this is probably easiest. As the end result you should have a “U:\slackware-13.0” directory on the stick with (among others) a file “PACKAGES.TXT” and a directory “slackware” below that.

Booting the USB stick and installing Slackware:

When booting this USB installer (the version containing the Slackware packages), you have to mount the USB partition before starting “setup” because you can access your packages only after mounting it. You cannot use the directory “/mnt” to mount this partition because the Slackware installer uses “/mnt” already. After the booting has finished and it delivers you to a command-prompt, you create a new directory in the installer, for instance “/usbinstall“:

mkdir /usbinstall

After you have created this mount point, you have to find out the name of your partition (you can run “fdisk -l” or “blkid” to find out) and then use the following mount command to preserve upper case filenames:

mount -t vfat -o ro,shortname=mixed $(/sbin/blkid -t LABEL=USBSLACKINS | cut -f1 -d:) /usbinstall

The “shortname” option used in that mount command is required, and Slackware installation will fail if you forget it.

If you labeled the stick’s partition “USBSLACKINS” in step 7 above, then you can use the following command instead of the previous mount command. It will find the correct partition automatically (note that what follows is a single command line !):

mount -t vfat -o ro,shortname=mixed $(/sbin/blkid -t LABEL=USBSLACKINS | cut -f1 -d:) /usbinstall

Then afterwards, when it is time to specify the package SOURCE directory, you type:

/usbinstall/slackware-13.0/slackware

The rest of the installation will proceed as usual. Give me feedback in the comment section below if you encounter any problems.

Good luck! I hope this small tutorial will be able to snatch you away from the Dark Side 😉

Eric

« Older posts

© 2024 Alien Pastures

Theme by Anders NorenUp ↑