Booting Slax 9.4.0 From an Existing Debian Installation
Slax
Linux has long been one of my favorite portable Linux distributions,
and the latest version, 9.4.0 did not disappoint me in its power and
grace. It is now based on Debian, so thousands of software packages
are available with a simple “apt” command. I have the 64 bit
version installed on a USB pen drive, and decided to install
Slax to a small partition on my hard drive, along with my existing
system.
The
installation for the pen drive was as simple as mounting the Slax iso
file and copying over the files to the pen drive, where I had
previously created an ext4 partition. Then I opened a terminal,
changed directories to the /slax/boot directory on the pen drive and
ran $ ./bootinst.sh
This
sets up the ldlinux.sys bootloader. On booting from the pen drive,
three options are presented: fresh boot, boot with persistent
changes, or boot to RAM.
Now,
when installing Slax to the hard drive, I decided to forgo the
installation step, and boot directly with Grub2 from my Debian
system.
First,
I needed the UUID of the root partition of my Slax installation, so I
opened a root terminal and ran # blkid The
results included the partition I was interested in, which
was: /dev/sda6: LABEL="slax"
UUID="7a130a42-5c23-4148-80c9-c9a8e78f311c" TYPE="ext4"
PARTUUID="c04ff9fd-76a7-4e19-be5f-588f230dd9f3"
I am running
Debian Buster on my desktop, which uses the Grub2 boatloader. In
order to get Grub2 set up to boot Slax,
I edited the custom boot entry file. To do this, I opened a
terminal and ran the following (as root): #
nano /etc/grub.d/40_custom
The
file, 40_custom, looks like this before editing:
#!/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.
Without
removing any text in the file, I added my entry at the bottom, adding
the UUID for /dev/sda6 where appropriate. I am using "vmlinuz" for the linux line and "initrfs.img" for the init root directory line.
I want to always boot with persistance, so I added the “perch”
bootcode to the end of the line that starts with "linux":
menuentry
"Slax with persistence on sda6" {
insmod
part_gpt
insmod
ext2
set
root='hd0,gpt6'
search
--no-floppy --fs-uuid --set 7a130a42-5c23-4148-80c9-c9a8e78f311c
linux
/slax/boot/vmlinuz root=7a130a42-5c23-4148-80c9-c9a8e78f311c perch
initrd
/slax/boot/initrfs.img
}
I
hit ctrl+x to save the file, then ran # update-grub.
I rebooted and the custom Slax entry was at the bottom of my Grub2
menu list.
I
started up Slax, opened a terminal, and ran # dpkg-reconfigure
tzdata , changed the time zone then did a shutdown. I restarted
to test persistence, and the time zone changes were indeed retained.
A few final
thoughts. Slax is a real joy to run, and its creator, Tomas
Matejicek, is something of a Linux alchemist. Slax is powered his very innovative Linux Live Kit project.
I probably won’t
keep Slax installed to my hard drive, though, unless I can prevent it
from automatically logging in to the root account. When I look at the
file tree, there appears to be a guest account, but I can’t figure
out a way to log in to the system manually. I don’t see any
options in the published bootcodes that would allow logging into a
user account prior to starting X.
What I tried doing with mixed success was to set a password for the root account, then delete the "guest" user and add a new user. Then I installed the SDDM display manager, and rebooted. This appeared to work, in that I was presented with a login screen with SDDM, and I was able to login with my new user account to either blackbox or fluxbox. I lost all of the Slax graphical embellishments, though, and just had a "normal" looking Debian Stretch desktop.
What I tried doing with mixed success was to set a password for the root account, then delete the "guest" user and add a new user. Then I installed the SDDM display manager, and rebooted. This appeared to work, in that I was presented with a login screen with SDDM, and I was able to login with my new user account to either blackbox or fluxbox. I lost all of the Slax graphical embellishments, though, and just had a "normal" looking Debian Stretch desktop.
Anyone who has found a better solution to logging in to a user account on Slax 9.4.0, please leave a note in the comments.
Comments
Post a Comment