My thoughts on Slackware, life and everything

Tag: installer

Installing Slackware using USB thumb drive

There are several ways to install Slackware to your computer. You have network installation options available (where the packages are on a remote NFS/FTP/HTTP/Samba server) and local options (where the packages are on a DVD/CDROM or a local directory).

In all these cases you need to boot your computer with Slackware’s installer. Traditionally you can boot from a DVD or CDROM of course, or even from a floppy if you are creative. If your computer does not have a DVD/CD drive then there is still the network boot (aka PXE boot) or using a USB thumb drive to boot from.

It is the USB thumb drive I want to talk about in this blog post.

Slackware ships with a USB image file “usbboot.img” since the 12.0 release (see http://slackware.osuosl.org/slackware-13.0/usb-and-pxe-installers/usbboot.img for instance). Using “dd” this image can be transfered to a USB thumb drive which transforms the USB drive to a bootable Slackware installer. The packages will still have to be available on a local or network medium, because the “usbboot.img” image only contains kernels and setup files… no packages.

If you do not want to “sacrifice” a USB thumb drive for this (note that dumping the image file on the USB stick will destroy all data already present on the stick), there is a solution: Slackware also ships with a script “usbimg2disk.sh” since the 13.0 release (see http://slackware.osuosl.org/slackware-13.0/usb-and-pxe-installers/usbimg2disk.sh for instance). This script extracts the content from the “usbboot.img” image file and uses this to transform a regular USB thumb drive into a bootable Slackware installer  non-destructively (i.e. any existing files on the stick will not be touched), as long as there is some 30 MB of available free space on the stick.

The “usbimg2disk.sh” script is also convenient if your computer refuses to boot from a USB stick loaded with the “usbboot.img” file. The BIOS of some computers will not understand the format of the default Slackware USB image. Using the “usbimg2disk.sh” script, you create an alternative bootable USB stick that will be recognized by your computer’s BIOS.

All nice, but there is still a problem that remains to be solved.

If you have a netbook for instance.

The average netbook computer (like my own Asus EeePC 1000H) comes without DVD drive. If you are mobile and without access to wired network, it will not be easy to install Slackware packages after booting from the USB stick.

In such circumstances you need to copy the complete Slackware package tree to a disk partition of your netbook before you start the Slackware installation. This is not always efficient, or even feasible.

Now, I have been creating “multi-partition USB images” for several Slackware releases in the past (more accurately, I have written the scripts that let you create the image and then transfer it to a big enough USB stick using the ” dd” command). You can find those scripts here: http://slackware.com/~alien/tools/usbinstall/ . This is an elegant way to create a USB Slackware installer that has all packages “on board” but I wanted something that was more basic, and thus potentially easier to use for a Slackware newbie.

The “old” scripts at http://slackware.com/~alien/tools/usbinstall/ create a secoind, EXT2-formatted partition to store the Slackware packages. This makes it harder to add more files if you are on a Windows computer for instance. I wanted to have a USB stick with a single large FAT partition – and fortunately the bootloader I am using (syslinux) allows this.

So I took Slackware’s “usbimg2disk.sh” script (which I incidentally wrote too) and expanded its functionality. What is new? The script can now copy the Slackware setup files, kernels and packages all to a regular USB thumb drive, if that has a minimum of 2GB free space available.And it still retains its original functionality (to create a bootable installer as long as there is 30 MB of available free space on the stick).

The USB stick does not even have to be formatted! So, if you already have data on the stick, it will not be destroyed.

There is one advantage to formatting though: if you allow the script to format the USB stick, it will make your future Slackware installation easier. The formatting step assigns a label “USBSLACKINS” to the fat partition. This enables Slackware’s setup to recognize and mount the USB partition automatically after boot, and pre-fill the SOURCE setup dialog “Install from a pre-mounted directory” with the correct directory path. Just hit ENTER a few times to start the installation!

If you did not format the USB stick but used an existing VFAT-formatted stick, you have two options:

  1. either you assign  the label “USBSLACKINS” to the stick’s fat partition manually,
  2. or else you do the following after booting from the USB stick but before running setup: mount the USB partition yourself using the following commands (for this eaxmple I am assuming that the installer recognized the drive as “/dev/sdX“):
mkdir /usbinstall
mount -t vfat -o ro,shortname=mixed /dev/sdX /usbinstall/

And then after you’ve started “setup” and have come to the “SOURCE selection” dialog, you use the directory “/usbinstall/slackware-<version>/slackware” as the source location where setup should look for Slackware packages.

This is how the help text for the script looks:

./usbimg2disk.sh -h
#
# Purpose #1: to use the content of Slackware's usbboot.img and
#   transform a standard USB thumb drive with a single vfat partition
#   into a bootable medium containing the Slackware Linux installer.
#
# Purpose #2: to use the contents of a Slackware directory tree
#   and transform a standard USB thumb drive with
#   a single vfat partition and 2GB of free space into
#   a self-contained USB installation medium for Slackware Linux.
#
#
# Your USB thumb drive may contain data!
# This data will *not* be overwritten, unless you have
#   explicitly chosen to format the drive by using the '-f' parameter.
#
# usbimg2disk.sh accepts the following parameters:
#   -h|--help                  This help
#   -f|--format                Format the USB drive before use
#   -i|--infile <filename>     Full path to the usbboot.img file
#   -l|--logfile <filename>    Optional logfile to catch fdisk output
#   -o|--outdev <filename>     The device name of your USB drive
#   -s|--slackdir <dir>        Use 'dir' as the root of Slackware tree
#   -u|--unattended            Do not ask any questions
#
# Examples:
#
# usbimg2disk.sh -i ~/download/usbboot.img -o /dev/sdX
# usbimg2disk.sh -f -s /home/ftp/pub/slackware-13.0 -o /dev/sdX
#
# The second example shows how to create a fully functional Slackware
# installer on a USB stick (it needs a Slackware tree as the source).

The enhanced script is here: http://connie.slackware.com/~alien/tools/usbimg2disk.sh …get itwhile it’s hot!

I hope it will get added to the Slackware tree soon. Tell me if you liked it! Any questions or remarks, you can leave them below this post.

Cheers, Eric

Massive updates in slackware-current

Today, Pat Volkerding published a massive amount of package updates to the slackware-current tree. The entry in the Slackware ChangeLog.txt measures more than 200 lines, and is probably the largest update to the development tree ever.

Many of the core packages have received an version upgrade, but those changes may not be immediately visible to the average end user. Some of the absolute highlights mentioned in the ChangeLog are indication of a big step forward for Slackware: a new kernel (2.6.28.7), new gcc (4.3.3), new glibc (still called 2.9 but the snapshot we use is more like 2.10), a new XFCE (4.6.0) and most importantly: KDE 3.5.10 is gone, replaced by KDE 4.2.1 (which had been living in the /testing directory for a long time).

I have been working with KDE4 releases for nearly a year now, running it as my default desktop, and 4.2.1 is stable, fast and beautiful. People who heard or read that the new KDE is bloated and slow, should try it out and decide for themselves; I think it performs better than KDE3. I also ran the new XFCE for a while and it looks sweet. Note that when you upgrade from XFCE 4.4 you may experience missing icons in the panel. This happens because the Rodent icon theme was removed from XFCE in the new release. The file CHANGES_AND_HINTS.TXT (located in the toplevel directory of slackware-current) explains this issue and what you can do about it.

One neat feature addition which did not make the ChangeLog, but is definitely worth mentioning: the initrd.img and usbboot.img files which contain the Slackware installer,  have also been updated for the new 2.6.28.7 kernel. As a result, you can now install Slackware to an ext4 filesystem!

If anyone out there with a Netbook (one of those Intel Atom powered, 9 or 10 inch sized laptops with long battery life) is going to install Slackware-current on it, I would like to hear your impressions. Leave a comment to this blog post.

Have fun, Eric

Slackware 12.2 is nearing release

The Slackware ChangeLog.txt is full of frenzied activity these days. It may be obvious that the next official release is just around the corner. I was taken by surprise when I saw the ChangeLog entry of Mon Dec 8 22:31:55 CST 2008:

isolinux/initrd.img:  Added missing mount.nfs.
       Added INSSMB, an installer script to use a Samba source.
       Thanks to Eric Hameleers.

I had not expected to see the Samba network installation choice appear in this release… I wrote this fairly recently and it was targeted to be added only after 12.2 was officially released. Anyway, it is nice to see it appear now. All you need to use it, is a Samba share (using a Samba or even a Windows server) that does not require authentication.

This is how that looks when you are installing Slackware 12.2:

Network install options

Slackware 12.2 network install options

Hope you all like it! It will certainly make life easier for those who only have a Windows server to store the Slackware directory tree on.

A related note:

At the same time, we (the http://slackbuilds.org admin team) are working hard behind the screens to get all the SlackBuild scripts in our “12.1” repository validated for the new 12.2 release. We have asked all maintainers to test their own contributions when possible, and for those who do not have a slackware-current system available, we will do the validation ourselves. The http://slackbuilds.org web site is already prepared, so the update should be fast and painless.

Cheers, Eric

© 2024 Alien Pastures

Theme by Anders NorenUp ↑