preparing a slackware usb stick

warningwarning

you will need a custom kernel with usb mass storage within, unless you do that with a ramdisk (initrd / initramfs).

the resulting kernel is available here: https://lab.nethence.com/nunux/hbamode-and-mass-storage/

usb stick setupusb stick setup

cd /mnt/
mkdir usb/
touch usb/NOT_MOUNTED

(install pkgtools)

create an empty DOS partition table

assuming target stick is /dev/sdb

fdisk /dev/sdb

o
w

create a 1GB swap and all the rest for root folder

cfdisk /dev/sdb

1GB                 swap
(all the rest)      /           bootable

ready to go

mkswap /dev/sdb1
mkfs.ext4 /dev/sdb2

in case you’re using a recent system (here ubuntu 25), you might need to downgrade the target filesystem

# e2fsck is older on slackware
tune2fs -O ^orphan_file /dev/sdb2

mount /dev/sdb2 usb/

deploy slackware with slackstartdeploy slackware with slackstart

cd /mnt/
vi slackstart.conf

mirror=http://mirror.rol.ru/slackware/slackware64-15.0/
tz=Europe/Moscow
fs=ext4
vpartition=/dev/sda2

# ilo vsp
serial=ttyS1

swap=1
boot=syslinux

and proceed

# https://pub.nethence.com/bin/slackstart/slackstrap.bash
time bash slackstrap.bash usb

you need a custom kernel in there and not necessarily the stock one

# todo - tweak that script to avoid installing the stock kernel
time bash slackstrap.bash usb kernel

– here’s the custom one

# https://lab.nethence.com/nunux/hbamode-and-mass-storage/
cp -f /tftpboot/vmlinuz.hbamode usb/boot/
cp -f /tftpboot/vmlinuz.hbamode.config usb/boot/
mkdir usb/lib/modules/
tar xzf /tftpboot/vmlinuz.hbamode.5.18.19.tar.gz -C usb/lib/modules/

install boot blocks and further polishing

bash slackprep.bash usb

take good care of the target root partition definition

vi usb/boot/syslinux/syslinux.cfg

default hbamode

label hbamode
        linux /boot/vmlinuz.hbamode
        append root=/dev/sda2 ro console=tty1 console=ttyS0,115200n8 mitigations=off vga=791

ready to goready to go

umount -R usb/
sync

troublestroubles

etc etc-15.0-x86_64-17: system configuration files .............[ 130K]
chown: warning: '.' should be ':': ‘root.utmp’
chown: warning: '.' should be ':': ‘root.shadow’
eudev eudev-3.2.11-x86_64-1: dynamic device directory system ...[ 8.8M]

==> that’s not harmful, just a warning about chown usage that differs from one system to another

/dev/sda2 has unsupported feature(s): FEATURE_C12

==> disable orphan_file ext4 filesystem feature

https://askubuntu.com/questions/1497523/feature-c12-e2fsck-get-a-newer-version-of-e2fsck


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Licensed under MIT