Discussion:
slackware on zroot
(too old to reply)
tom
2021-10-10 04:51:21 UTC
Permalink
How does one install slackware onto a zfs boot environment? I just have
one storage pool on my computer and use that, instead of individual
drives. Is using slackware with zfs something I'm going to have to
fight the system over or will it work without hassle?

also, how does one install slackware from a chroot and minirootfs? The
typical slackware install requires the use of a setup tool, which is
not what i want and it requires setting up partitions, something I
don't need or want since I use zfs datasets.

I'd also like to install slackware from my already working and booted
Gentoo system via chrooting into the zboote.

for those unaware, this is how the boot works:

EFI->grub2.efi

grub2 reads and loads kernel, initramfs, and cpu microcode from a ext2
filesystem which contains zfs kernel module

linux loads into initramfs, loads zfs, and attempts to attach storage
pool. Ounce storage pool is attached a boot environment is specified to
mount as the root (ZFS=tank/ROOT/gentoo) or (ZFS=tank/ROOT/slackware
perhaps?), /sbin/init is execed, init loads other datasets in place and
system goes multiuser mode.
Henrik Carlqvist
2021-10-10 10:10:05 UTC
Permalink
Post by tom
How does one install slackware onto a zfs boot environment?
Sorry, I have no experience from zfs, but I have done some custimizations
of the Slackware installation scripts.
Post by tom
Is using slackware with zfs something I'm going to have to fight
the system over or will it work without hassle?
Most of all you will need a compiled kernel which supports zfs. Life will
probably be easier if you choose a kernel version and configuration which
closely looks like the kernel that came with Slackware.
Post by tom
also, how does one install slackware from a chroot and minirootfs?
If I remember right, the Slackware install scripts does not even require
you to chroot, they simply unpack tar files (the Slackware packages) in
the directory you point them to.
Post by tom
The typical slackware install requires the use of a setup tool, which
is not what i want and it requires setting up partitions, something I
don't need or want since I use zfs datasets.
The "setup tool" is simply a script running a number of other scripts.
There is nothing that requires you to run those scripts during
installation, you might just as well do all the steps by hand. Basically
what those scripts do is:

1) Selects a keyboard layout for the installation
2) Selects an mountes some source for the Slackware packages
3) Selects destination partition(s) to be mounted and create an fstab
for the installed system
4) Unpacks all packages
5) Runs the scripts which the packages has placed in /var/log/setup
to let you configure stuff like running services and bootloaders.

In my custom installations I don't do those steps manually, instead I
have modified the scripts which lives in /usr/lib/setup in the initrd.img
on the installation media. I have also written some custom packages which
replaces some of the scripts other packages place in /var/log/setup. The
main purpose of my customization has been to make a quick "no questions
asked", "fire and forget" installation.

regards Henrik
Javier
2021-10-10 13:07:25 UTC
Permalink
Post by Henrik Carlqvist
Post by tom
also, how does one install slackware from a chroot and minirootfs?
If I remember right, the Slackware install scripts does not even require
you to chroot, they simply unpack tar files (the Slackware packages) in
the directory you point them to.
You are right, Slackware does not need chroot to install.
I install it with an script unpacking files without any chroot.

This is the script I use myself. It only lacks the installation
of the bootloader (LILO or other).

Just check again the list of package groups may have grown larger in 15.0.
I have not tried 15.0, but Iguess the compression format continues to be txz.

#!/usr/bin/env bash

mounted_root_dir=/new_slack
TARGET_boot=/dev/sda1
TARGET_root=/dev/sda2


mkdir -p ${mounted_root_dir}
mount -t ext4 ${TARGET_root} ${mounted_root_dir}
mkdir -p ${mounted_root_dir}/boot
mount -t ext3 ${TARGET_boot} ${mounted_root_dir}/boot

slack_mirror="https://mirrors.slackware.com/slackware"
slack_arch=slackware64
slack_ver=15.0
slack_pkg_dir=/tmp/slack_download/pkgs
slack_kernel_dir=/tmp/slack_download/kernels

slack_pkgs="${slack_arch}/{a,ap,d,e,f,l,n,t,tcl,x,xap,y}
extra/bash-completion
extra/bittornado
extra/bittorrent
extra/dip-3.3.7p
extra/wicd
extra/xf86-video-fbdev
extra/getty-ps
extra/xv
extra/xfractint
pasture" # firefox, thunderbird, ampd
# kde,kdei,xfce, y (bsdgames), k (kernel src)

mkdir -p ${slack_pkg_dir}
pushd ${slack_pkg_dir}

for i in ${slack_pkgs}; do
wget -m --no-parent --no-host-directories \
${slack_mirror}/${slack_arch}-${slack_ver}/${i}
done
popd

mkdir -p ${slack_kernel_dir}
pushd ${slack_kernel_dir}
wget -m --no-parent \
${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/kernels
popd


cp ${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/kernels/huge.s/bzImage \
${mounted_root_dir}/boot/SLACK_HUGE_bzImage
cp ${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/kernels/huge.s/System.map.gz \
${mounted_root_dir}/boot/SLACK_HUGE_System.map.gz

pkgtools=$(find ${slack_pkg_dir} | grep 'pkgtools-.*z$')

# ${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/a/pkgtools-*.txz
grep -q 'txz$' <<< ${pkgtools_txz}
pushd ${slack_pkg_dir}
tar xJf ${pkgtools_txz}
# ${slack_pkg_dir}/sbin/installpkg
popd

find ${slack_pkg_dir} | grep 't.?z$' | xargs -n 1 \
${slack_pkg_dir}/sbin/installpkg --root ${mounted_root_dir}
tom
2021-10-16 03:20:50 UTC
Permalink
Thank you all, especially Javier with your script that pointed me in
the right direction.

Loading...