Blog of Raivo Laanemets

Stories about web development, freelancing and personal computers.

ALT Linux text-based live USB for backups

Last week I needed to make a backup dump from my main desktop disk. The hardware is pretty new and not stable with many live CD/USB images. The Skylake CPU has built-in GPU and everything seems to crash when trying to initialize it. I use my Nvidia PCI-E graphics card daily with proprietary binary drivers on Slackware and it's very stable. Unfortunately, live CD/USB images do not contain these drivers, try to initialize the built-in GPU and crash. I think it's possible to initialize and use the built-in graphics but it requires very very recent Xorg drivers and libraries. These are missing, too.

This led me to look for a text-based live system that I can use solely for the backups. The system would need to have the following features:

  • Bootable from USB (I haven't had optical drive for many years).
  • Able to initialize network connection.
  • Text-based boot that does not require hard-to-remember long boot options.
  • Supports NVMe disks.
  • Comes with the standard set of disk tools (dd, tar, etc).

This rules out Debian Live (does not boot, USB image uses DOS partition table, MSI boot selector only recognizes GPT USB disks), Ubuntu Live (cannot select text mode, graphical boot is unstable), Slackware Live (cannot select text mode, graphical boot comes up with a blank screen).

I also noticed that many Live systems come with an older kernel (pre 4.x), including SystemRescueCd. After looking through these and many other live systems, I found an usable system provided by ALT Linux.

ALT Linux

ALT Linux is a Linux distribution with multiple live and install images. It also has a nice text-based rescue image. It boots straight into the text mode and has a very recent kernel (4.4.x). It does not crash and lacks unneeded bullshit. All the standard tools are there.

I use the following commands to create my disk backups.

Select the Estonian keyboard layout:

loadkeys et

Initialize the network connection (dhcpcd forks to background):

dhcpcd eth0

Create mountpoint for NAS:

mkdir /mnt/backups

Mount NAS over NFS:

mount /mnt/backups

Copy the whole disk:

dd if=/dev/nvme0n1 of=/mnt/backups/desktop-`date -I`.img bs=128K conv=noerror,sync

Then, to watch the progress on the other terminal (switch with Alt+F2):

watch stat /mnt/backups/desktop-`date -I`.img

This will show the dump file size periodically.

I usually take these whole disk dumps once per 2-3 months or on special occasions before and after large changes in the system.

ALT Linux worked much better for this than any other Live CD based solution. GUI-based live systems provide no value here as the commands above are specific enough. Text-based system is just better to work with in critical tasks and has a smaller number of moving parts to break and crash.


No comments have been added so far.

Email is not displayed anywhere.
URLs (max 3) starting with http:// or https:// can be used. Use @Name to mention someone.