Building Sabotage Linux

sabotage | build chroot | docker image | pkg build | xen guest

tested on slack150 and jammy

Build stage 0

possibly as user

git clone https://github.com/sabotage-linux/sabotage.git
cd sabotage/
cp -pi KEEP/config.stage0 config
grep ^proc /proc/cpuinfo

rm -rf $HOME/images/sabotage-stage1/sabotage/
mkdir -p $HOME/images/sabotage-stage1/sabotage/
vi config

export SABOTAGE_BUILDDIR="$HOME/images/sabotage-stage1/sabotage"

export MAKE_THREADS=32

time ./build-stage0
# 2m5.782s @powerslack x32
# 3m3,139s 3m2,617s @bravo17 x12
# 2m39,160s @alpha15 x8

Build core –or– stage 1

./enter-chroot

build the core system + build chain and clean-up

within the chroot

#time butch install core

time butch install stage1
# 4m 52.67s @powerslack x32
# 10m 56.90s @bravo17 x12
# 10m 59.61s idem
# 11m 4.40s @alpha15

/src/utils/clean-stage1.sh
rm -rf /src/build*

^D

Ready to go

back to the host system

as docker image

cd ~/images/sabotage-stage1/

sudo chroot sabotage/ which gcc

we keep user perms for building the docker image – only that fix taken from root-perms.sh

ls -alF sabotage/var/empty/
chmod 755 sabotage/var/empty/

clean-up

ls -lF sabotage/root/.ash_history
rm -f sabotage/root/.ash_history

vi sabotage/src/config

export MAKE_THREADS=2

as rootfs

check size and fix perms

du -sh sabotage/
# stage1 265M @powerslack
# stage1 239M @bravo17 & @alpha15

sudo ./utils/root-perms.sh $HOME/images/sabotage-stage1/sabotage

system archive

sudo tar czpSf sabotage-stage1.tar.gz sabotage/

disk image

utils/write-hd-image.sh $HOME/images/sabotage-stage1.img $HOME/images/sabotage-stage1/sabotage/ 10G

Resources

https://github.com/sabotage-linux/sabotage/blob/master/README.md


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun