also see bootstrapping slackware on xen and on kvm
this is similar to the slackware KVM guest guide as it requires not only userland but also a kernel
it is also very similar to the hbamode hack for releasing the smart array lock
what’s specific here is that we point to a flash reader e.g.
device=/dev/sdb
and we are operating there
cd /mnt/
cd /mnt/ mkdir lala/ (install pkgtools) fdisk -l
create an empty DOS partition table
fdisk $device o w
create root and swap partitions
cfdisk $device 25GB or whatever fits / bootable (whatever is left) swap
ready to go
mkfs.ext4 ${device}1
mkswap ${device}2
in case you’re using a recent system (here ubuntu 25), you might need to downgrade the target filesystem, as e2fsck version is older on slackware
tune2fs -l ${device}1
tune2fs -O ^orphan_file ${device}1
you might also want to hardcode a precise disk identifier in view to define PARTUUID
e.g. for node2
fdisk $device
x
i
0xf9a43002
r
w
blkid ${device}1
==> check PARTUUID
and finally mount the thing
mount ${device}1 lala/
vi slackstart.conf #mirror=http://ftp6.gwdg.de/pub/linux/slackware/slackware64-15.0/ #mirror=http://ftp.tu-chemnitz.de/pub/linux/slackware/slackware64-15.0/ mirror=http://mirror.rol.ru/slackware/slackware64-15.0/
and proceed
# https://pub.nethence.com/bin/slackstart/slackstrap.bash time ./slackstrap.bash lala
if this is a REISER4 file-system, let the guest eventually fsck itself at boot time
wget https://lab.nethence.com/slackpkgs/libaal-1.0.7-x86_64-2_SBo.tgz
wget https://lab.nethence.com/slackpkgs/reiser4progs-1.2.2-x86_64-2_SBo.tgz
ls -lF /root/slackpkgs/libaal-*_SBo.tgz
ls -lF /root/slackpkgs/reiser4progs-*_SBo.tgz
installpkg --terse --root lala/ /root/slackpkgs/libaal-*_SBo.tgz
installpkg --terse --root lala/ /root/slackpkgs/reiser4progs-*_SBo.tgz
you need a custom kernel in there and not necessarily the stock one
# todo - tweak that script to avoid installing the stock kernel time ./slackstrap.bash lala kernel
here’s a few custom ones:
cd lala/ # https://lab.nethence.com/nunux/hbamode-and-mass-storage/ cp -f /tftpboot/vmlinuz.hbamode ./ cp -f /tftpboot/vmlinuz.hbamode.config ./ ln -s vmlinuz.hbamode vmlinuz
mkdir -p lib/modules/ cd lib/modules/ cp -f /tftpboot/vmlinuz.hbamode.5.18.19.tar.gz ./ tar xzf vmlinuz.hbamode.5.18.19.tar.gz
cd lala/ wget https://lab.nethence.com/nunux/dom0/5.18.19.xen-ufs-usb.config wget https://lab.nethence.com/nunux/dom0/5.18.19.xen-ufs-usb.vmlinuz ln -s 5.18.19.xen-ufs-usb.vmlinuz vmlinuz
mkdir -p lib/modules/ cd lib/modules/ wget https://lab.nethence.com/nunux/dom0/5.18.19.xen-ufs-usb.modules.tar.gz tar xzf 5.18.19.xen-ufs-usb.modules.tar.gz
timezone, mount points and console
slackstrap is not enough for syslinux to be happy (probably fstab is required) – so the syslinux part comes within that script
vi slackstart.conf # # slackprep # tz=Europe/Moscow fs=ext4 #fs=reiser4 #fs=btrfs #fs=f2fs # xen #boot_partition=/dev/xvda1 # kvm #boot_partition=/dev/vda1 #swap_partition=/dev/vda2 # bare-metal memstick e.g. (CHANGE ACCORDINGLY) boot_partition=/dev/sdb1 swap_partition=/dev/sdb2 # default serial port COM1 #serial=ttyS0 # ilo vsp serial port COM2 #serial=ttyS1 swap=1 boot=syslinux
proceed
# https://pub.nethence.com/bin/slackstart/slackprep.bash ./slackprep.bash lala
eventually update the package repository cache
mount -o bind /dev lala/dev
mount -o bind /dev/pts lala/dev/pts
mount -o bind /proc lala/proc
mount -o bind /sys lala/sys
chroot lala/ bash
ping -c1 opendns.com
cat /etc/slackpkg/mirrors
slackpkg update
history -c
^D
rm -f lala/root/.bash_history
eventually proceed with a brutal network setup
vi slackstart.conf host= cidr= gw= dns= # https://pub.nethence.com/bin/slackstart/slacknet.bash ./slacknet.bash $guest lala
du -sh lala/ cat lala/boot/syslinux/syslinux.cfg cat lala/etc/fstab sync umount lala/ rmdir lala/