Reactivated KLV-Boxer, a KLV with a JWM Desktop

Moderator: Forum moderators

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

Took the KLV-Boxer PLUG file out of hibernation and did some work on it. Basically I took the KLV-Airedale plug and replaced the XFCE4 desktop configuration with a JWM desktop and a ROX pinboard.

So it has many of the features of KLV-Airedale like audio is pulseaudio-pipewire and networkmanager is doing the network connections.
ISO file is 608 M

PLUG recipe file for building a rootfs:
Updated: 16:06 09Sep2024

f_00_Void_KLV_JWM_no-kernel_FRteam-rc5.plug.tar.gz
Decompress the file!
(3.94 KiB) Downloaded 36 times

Download KLV-Boxer-rc4.iso
Check hash

Screenshot(18).jpg
Screenshot(18).jpg (17.59 KiB) Viewed 3350 times
Screenshot(19).jpg
Screenshot(19).jpg (27.48 KiB) Viewed 3350 times

It is very responsive using a huge 6.6.0-rock-rt15 a high frequency full real time kernel. I am really happy with the KLV-Spectr performance reports using the Spectrwm tiling window manager as a base OS for audio/music production machines, so decided to bring out a new updated PLUG and assemble a rootfs, put togther a KLV ISO and try it out.

Testing currently in a QEMU virtual machine:

Screenshot(22).jpg
Screenshot(22).jpg (45.61 KiB) Viewed 3337 times
Screenshot(23).jpg
Screenshot(23).jpg (54 KiB) Viewed 3336 times
geo_c
Posts: 3060
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2379 times
Been thanked: 947 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by geo_c »

Well, having installed bookworm, and kind of getting back into JWM, I'd certainly be interested in Boxer. I'm also looking at Slitaz pup, and QuickPup, because the idea of installing many kinds of packages I find intriguing.

It'd be nice if you could make some of these plugs available. I'd like to try some audio distro building at some point.

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@geo_c here it is...it's on-going and isn't fully polished. Missing the creation of /usr/local/bin/defaultterminal script and the backgrounds download and installation is in need of changes to complete the desktop.

Some of the steps may not complete error free. Test carefully.

There is a lot of room for improvements. :ugeek: :shock: :thumbup2:

f_00_Void_KLV_JWM_no-kernel_FRteam-rc1.plug

Code: Select all

./build_firstrib_rootfs.sh void rolling amd64 f_00_Void_KLV_JWM_no-kernel_FRteam-rc1.plug

You will get the hang of it. :thumbup:

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

Kind of leaning on xLuncher for the suspend/reboot/shutdown controls:

Screenshot(24).jpg
Screenshot(24).jpg (48.62 KiB) Viewed 3331 times

Need a better power manger console that includes a logout/reboot/shutdown since KLV-Boxer like KLV-Airedale is multi-user capable

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

rockedge wrote: Fri Aug 02, 2024 3:24 am

Kind of leaning on xLuncher for the suspend/reboot/shutdown controls:
Screenshot(24).jpg

Need a better power manger console that includes a logout/reboot/shutdown since KLV-Boxer like KLV-Airedale is multi-user capable

Should be a somewhat leaner and faster distro I imagine. Nice one to have a reliable f_plug for as a template?

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

Clarity
Posts: 4244
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1817 times
Been thanked: 571 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by Clarity »

Hello @rockedge

rockedge wrote: Fri Aug 02, 2024 1:29 am

... Testing currently in a QEMU virtual machine: ...

Questions:

  • Would you post your QEMU stanza? I want to replicate the virtual PC you've used in my tests.

  • Is there an ISO/IMG available?

geo_c
Posts: 3060
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2379 times
Been thanked: 947 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by geo_c »

rockedge wrote: Fri Aug 02, 2024 3:16 am

Code: Select all

./build_firstrib_rootfs.sh void rolling amd64 f_00_Void_KLV_JWM_no-kernel_FRteam-rc1.plug

You will get the hang of it. :thumbup:

This is great.

I think I can build a JWM Void Audio distro with this eventually.

The first line I quoted there, that's the command to start the build, right? (After I put the f_[plug] in the build directory, using which firstrib no X script?

This one?
firstribit.sh

wiak mod says the latest version should generally ALWAYS be used and fetched as follows:

Code: Select all

wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/firstribit-latest.sh -O firstribit.sh && chmod +x firstribit.sh

Code: Select all

#!/bin/bash
# Creation Date: 14feb2022 (greatly modified in 30Jun2024 release)
progname="firstribit.sh"; version="022"; revision="-rc1" #Revision Date: 07July2024
# Copyright wiak (William McEwan) 14feb2022+; Licence MIT (aka X11 license)
# Run this script from directory you want to frugal boot from.

# List follows of URLs for a few distros you might want auto-downloaded,
# particularly those whose download site is difficult to find,
# but overall best to download iso manually
# To expand this you'd also need to add to case statement near line 270:
# 	case "$distro" in  # expand list with suitable distro/URL fetches

# TinyCorePure64-current can be downloaded via: https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/
# The one you need as subdir of above is release.x/x86_64/release/TinyCorePure64-current.iso. Example provided currently:
URL18="https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/release/TinyCorePure64-current.iso"
# Fedora can cloud image isos can be downloaded via https://fedoraproject.org/cloud/ and click tab "Get Fedora"
# I then used 'Spins' LXQt but plenty of alternatives are available there
URL33="https://download.fedoraproject.org/pub/fedora/linux/releases/40/Spins/x86_64/iso/Fedora-LXQt-Live-x86_64-40-1.14.iso"

firstribitplugin="f_it00.plug"			# contains extra commandlines to execute at very end of build
										# For example, using wget to download more addons, or could perhaps:
										# Uncompress main root filesystem (sometimes) and chroot into it and
										# run package manager commands and/or config scripts and so on...
[ "$1" ] && firstribitplugin="$1"		# optional first parameter specifies alternative fxxxit... plugin name										

_firstribit_plug (){
  [ -s ./"${firstribitplugin}" ] && . ./"${firstribitplugin}"
}

_get_FR_initrd (){
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd-latest.gz -O initrd.gz  # FR skeleton initrd
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/w_init-latest -O w_init  # FR w_init
  # Some useful FirstRib utilities in case you want to modify the initrd or the 07firstrib_rootfs
  # All these utilities have --help option
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig && chmod +x wd_grubconfig  # When run finds correct grub menu stanza for your system
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh && chmod +x modify_initrd_gz.sh  # For 'experts' to modify initrd.gz
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh && chmod +x mount_chroot.sh  # To enter rootfs in a chroot
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh && chmod +x umount_chroot.sh  # to 'clean up mounts used by above mount_chroot.sh'
  mv initrd.gz initrdSKEL.gz
  mkdir -p initrd_decompressed
  cd initrd_decompressed
  sync;sync
  zcat ../initrdSKEL.gz | cpio -idm
  cp -a /tmp/firstribit/fsroot/usr/lib/modules/* usr/lib/modules/		
  echo "Result being compressed. Please wait patiently ..."
  sync;sync
  find . | cpio -oH newc 2>/dev/null | gzip > ../initrd.gz 
  cd ..
}
_get_FR_initrd_kmod (){ # kmod needed just now for zstd compressed modules
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd_kmod-latest.gz -O initrd.gz # FR skeleton initrd_kmod
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/w_init-latest -O w_init  # FR w_init
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig && chmod +x wd_grubconfig  # When run finds correct grub menu stanza for your system
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh && chmod +x modify_initrd_gz.sh  # For 'experts' to modify initrd.gz
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh && chmod +x mount_chroot.sh  # To enter rootfs in a chroot
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh && chmod +x umount_chroot.sh  # to 'clean up mounts used by above mount_chroot.sh'
  mv initrd.gz initrdSKEL.gz
  mkdir -p initrd_decompressed
  cd initrd_decompressed
  sync;sync
  zcat ../initrdSKEL.gz | cpio -idm
  cp -a /tmp/firstribit/fsroot/usr/lib/modules/* usr/lib/modules/		
  echo "Result being compressed. Please wait patiently ..."
  sync;sync
  find . | cpio -oH newc 2>/dev/null | gzip > ../initrd.gz 
  cd ..
}

_get_layer_addons01 (){
  wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/12KL_gtkdialogGTK3filemnt64.tar
  tar xvf 12KL_gtkdialogGTK3filemnt64.tar
  sleep 1
  rm 12KL_gtkdialogGTK3filemnt64.tar
  mv 12* 12w_mods01
}

_set_passwords (){ # for root user and normal user firstrib
  # So here is how to make a temporary overlay of ro X.sfs and rw directory 12w_mods01/
  [ ! -d 12w_mods01 ] && mkdir -p 12w_mods01
  mkdir -p work
  sudo mount -t overlay -o \
lowerdir=/tmp/firstribit/fsroot,\
upperdir=12w_mods01,\
workdir=work \
overlay_result /tmp/firstribit/merged
  # simple chroot but not mounting /proc /dev and so on here - might need in more complex additions followed by umount -l. Following may need 'tweaked' but seems ok
  cat << INSIDE_CHROOT | LC_ALL=C chroot /tmp/firstribit/merged sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
printf "root\nroot" | passwd root >/dev/null 2>&1 # Quietly set default root passwd to "root"
useradd -m -s /bin/bash firstrib # create user firstrib with home dir and bash sh
printf "firstrib\nfirstrib" | passwd firstrib >/dev/null 2>&1 # Quietly set default firstrib passwd to "firstrib"
usermod -G sudo firstrib # adds firstrib to group sudo if it exists
usermod -G wheel firstrib # adds firstrib to group wheel if it exists
exit
INSIDE_CHROOT
}

_set_passwords2 (){
  cat << INSIDE_CHROOT2 | LC_ALL=C chroot "$1" sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
printf "root\nroot" | passwd root >/dev/null 2>&1 # Quietly set default root passwd to "root"
useradd -m -s /bin/bash firstrib # create user firstrib with home dir and bash sh
printf "firstrib\nfirstrib" | passwd firstrib >/dev/null 2>&1 # Quietly set default firstrib passwd to "firstrib"
usermod -G sudo firstrib # adds firstrib to group sudo if it exists
usermod -G wheel firstrib # adds firstrib to group wheel if it exists
exit
INSIDE_CHROOT2
}

_grub_config (){
	cd "$HERE"
	subdir="$bootdir"
	bootuuid=`df . | awk '/^\/dev/ {print $1}' | xargs blkid -s UUID | awk -F\" '{print $2}'`
	bootlabel=`df . | awk '/^\/dev/ {print $1}' | xargs blkid -s LABEL | awk -F\" '{print $2}'`
	printf "
You should now create appropriate grub.conf or menu.lst stanza
If different, substitute in your own uuid and bootdir_name details
Check the actual names for files vmlinuz and initrd.gz in bootdir_name

#####menu.lst (note the LABEL or UUID options below):
title $subdir
  find --set-root --ignore-floppies /${subdir}/grub_config.txt
  kernel /$subdir/vmlinuz w_bootfrom=LABEL=${bootlabel}=/$subdir w_changes=RAM2
  initrd /$subdir/initrd.gz
#############################OR uuid method:
title $subdir
  find --set-root uuid () $bootuuid
  kernel /$subdir/vmlinuz w_bootfrom=UUID=${bootuuid}=/$subdir w_changes=RAM2
  initrd /$subdir/initrd.gz

#####grub.cfg (note the UUID or LABEL options below):
menuentry \"${subdir}\" {
  insmod ext2
  search --no-floppy --label $bootlabel --set
  linux /$subdir/vmlinuz w_bootfrom=LABEL=${bootlabel}=/$subdir w_changes=RAM2
  initrd /$subdir/initrd.gz
}
#############################OR uuid method:
menuentry \"${subdir}\" {
  insmod ext2
  search --no-floppy --fs-uuid --set $bootuuid
  linux /$subdir/vmlinuz w_bootfrom=UUID=${bootuuid}=/$subdir w_changes=RAM2
  initrd /$subdir/initrd.gz
}

Once grub is configured you should be able to boot the new install

FOR LOGIN user:password check distro websites or try 
firstrib:firstrib or root:root; very occasionally password is blank
Rarely, you need to edit upper_changes/etc/passwd to remove root
password (which is the x in for example: root:x:0:0:root:/root:/bin/bash)

Refer to $HERE/grub_config.txt for
copy of this information plus blkid info\n" | tee grub_config.txt
	blkid -s UUID >> grub_config.txt
}

# Following under test - only using for EndeavourOS and Pop!_OS at the moment
_extractiso () { # 14Apr2022 provided by Puppy forum member Keef, thanks!
    echo "Extracting large files from iso. Please wait patiently ..."
    mount $isoname /tmp/firstribit/miso
    cp -a $(find /tmp/firstribit/miso -name "vmlinuz*" | head -n 1) vmlinuz
    sqfs=$(find /tmp/firstribit/miso -type f -exec file {} \; | grep "Squashfs" | cut -d":" -f1)
    cp -a "$sqfs" 08filesystem.sfs
    sync;sync
    [ -s 08filesystem.sfs ] && mount 08filesystem.sfs /tmp/firstribit/fsroot  # for most common case
}

_extractiso_many () {
    echo "Extracting large files from iso. Please wait patiently ..."
    mount $isoname /tmp/firstribit/miso
    cp -a $(find /tmp/firstribit/miso -name "vmlinuz*" | head -n 1) vmlinuz
    find /tmp/firstribit/miso -type f -exec file {} \; | grep "Squashfs" | cut -d":" -f1 | xargs -I {} cp -a {} .
    sync;sync
    [ -s 08filesystem.sfs ] && mount 08filesystem.sfs /tmp/firstribit/fsroot  # for most common case
}

case "$1" in
  '--version') printf "$progname ${version}${revision}\n"; exit 0;;
  ''|'-h'|'--help'|'-?') 
		printf "$progname ${version}${revision}\n\n"
		printf "For optimum find iso reliability it is best to manually download
the iso to be FirstRibbed into the build directory and when firsribit
is executed, choose that same distro variant from menu of choices\n\n"
		printf "To make a FirstRibbed frugal install using FR wiak skeleton initrd

Simply execute this script with command:

./$progname optional_f_it_plugname\n"
		printf "
Note (I have to check this): for vanilladpup and some other newer pups 
you may need extra grub (kernel) linux argument: fwmod=usrlib

Once grub is configured you should be able to boot the new install

FOR LOGIN user:password check distro websites or try 
firstrib:firstrib or root:root; very occasionally password is blank
Rarely, you need to edit upper_changes/etc/passwd to remove root
password (which is the x in for example: root:x:0:0:root:/root:/bin/bash)\n";	exit 0;;
	'q') exit;;
esac

# Distros currently able to be converted
distro01="FirstRib anypup (default BookwormPup64_10.0.6.iso; rough shutdown)"
distro02="PopOS64"
distro03="EndeavourOS"
distro04="Manjaro"
distro07="MakuluLinux-Shift-x64-Ubuntu"
distro08="MX Linux X64"
distro13="Zorin"
distro14="NeonKDE"
distro15="Garuda"
distro16="Bodhi"
distro17="MassOS"
distro18="TinyCoreLinux64"
distro20="Intel Clear Linux"
distro21="Ubuntu_live"
distro23="linux-lite"
distro24="bunsen-lithium"
distro25="LXLE-Focal"
distro26="tails-amd64"
distro27="Debian_live"
distro28="Regata_OS"
distro29="Kodachi"
distro30="SysLinuxOS"
distro31="4MLinux" # extremely experimental FR conversion!
distro33="Fedora"
distro34="Xubuntu"
distro35="Lubuntu"
distro36="Mabox"
distro37="Sparky"
distro38="Spiral"
distro44="Linux Mint"
distro98="Generic Arch Linux based"
distro99="Generic Debian/Ubuntu based"

printf "
Make a FirstRibbed frugal install using FR skeleton wiak initrd
Choose a distro to firstribit

1 $distro01 firstribed using FR wiak initrd
2 $distro02
3 $distro03
4 $distro04
7 $distro07
8 $distro08
13 $distro13
14 $distro14
15 $distro15 (warning: Cancel out of disk partitioning install)
16 $distro16
17 $distro17
18 $distro18
20 $distro20
21 $distro21
23 $distro23
24 $distro24
25 $distro25
26 $distro26
27 $distro27
28 $distro28
29 $distro29
30 $distro30
31 $distro31
33 $distro33
34 $distro34
35 $distro35
36 $distro36
37 $distro37
38 $distro38
44 $distro44
98 $distro98
99 $distro99
q quit (more choices may come in later release)
Enter distro choice (i.e. 1, 2, 3 ...etc) or press q to quit: " 
# note: users are invited to add additional distros above!
read distro

# Create working directories
HERE="`pwd`"
bootdir=`basename "$HERE"` # for use with grub config
mkdir -p /tmp/firstribit/miso /tmp/firstribit/miso2 /tmp/firstribit/fsroot /tmp/firstribit/merged

if [ "$distro" = "999" ];then  # [ "$distro" = "999" -o $distro = "1000" ]
  :
else
while [ ! -s *.iso ]; do
	printf "\nYou need to download the relevant iso from
its website prior to continuing. 
Make sure to only have one iso in the install directory.
Once you have done the above, press Enter to continue, or q to quit\n"
	read getiso
	[ "$getiso" = "q" ] && exit 0
	case "$distro" in  # expand list with suitable distro/URL fetches
	  18) echo Downloading iso. Please wait patiently...
	  wget -c $URL18  # TinyCorePure64-current
	  ;;
	  33) echo Downloading iso. Please wait patiently...
	  wget -c $URL33  # Fedora LXQt Spin latest stable
	  ;;
	esac
done
isoname=*.iso
fi

case "$distro" in
  'q') exit;;
  1)	#distro="FR(KL)_Bookwormpup (can modify for ANY pup)"
		_extractiso_many
		pupversion=`ls puppy* | grep -o '[^puppy].*sfs'`
		echo pupversion is $pupversion
		mv puppy${pupversion} 08puppy${pupversion}		
		mv zdrv${pupversion} 00zdrv${pupversion}
		mv fdrv${pupversion} 01fdrv${pupversion}
		mv bdrv${pupversion} 02bdrv${pupversion}
		mv adrv${pupversion} 14adrv${pupversion}
		mv ydrv${pupversion} 15ydrv${pupversion}		
		kernelversion=`ls kbuild* | grep -o '[^kbuild-].*[^.sfs]'`		
		printf "if available, might also want:
16kbuild-${kernelversion}.sfs, 17devx_${pupversion}
18docx_${pupversion}, 19nslx_${pupversion}
20kernel_sources-${kernelversion}-kernel-kit.sfs\n"
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd-latest.gz -O initrd.gz  # FR skeleton initrd
		# Some useful FirstRib utilities in case you want to modify the initrd or the 07firstrib_rootfs
		# All these utilities have --help option
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig && chmod +x wd_grubconfig  # When run finds correct grub menu stanza for your system
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh && chmod +x modify_initrd_gz.sh  # For 'experts' to modify initrd.gz
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh && chmod +x mount_chroot.sh  # To enter rootfs in a chroot
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh && chmod +x umount_chroot.sh  # to 'clean up mounts used by above mount_chroot.sh'
		wget -c --no-check-certificate https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/25KL_forkpup_type1.tar
		tar xvf 25KL_forkpup_type1.tar
		[ "$mvpoweroff" = "true" ] && mv 25KL_forkpup_type1/usr/sbin/ 25KL_forkpup_type1/
#		_get_layer_addons02
		sleep 1; rm 25KL_forkpup_type1.tar
		;;
  2)	#distro="pop-os"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  3)	# distro="EndeavourOS"
		_extractiso
		_get_FR_initrd_kmod
		_get_layer_addons01
		_set_passwords
		;;
  4)	#distro="Manjaro"
		_extractiso_many
		mv rootfs.sfs 08filesystem.sfs
		mv desktopfs.sfs 09desktopfs.sfs
		mv mhwdfs.sfs 10mhwdfs.sfs
		mv livefs.sfs 11livefs.sfs
		mount 08filesystem.sfs /tmp/firstribit/fsroot
		_get_FR_initrd_kmod
		_get_layer_addons01
		_set_passwords
		;;
  7)	#distro="MakuluLinux-Shift-x64-U"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  8)	# distro="MX"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  13)	#distro="Zorin-OS"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  14)	distro="neon-user"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  15)	#distro="garuda"
		_extractiso_many
		mv rootfs.sfs 08filesystem.sfs
		mv desktopfs.sfs 09desktopfs.sfs
		mv mhwdfs.sfs 10mhwdfs.sfs
		mv livefs.sfs 11livefs.sfs
		mount 08filesystem.sfs /tmp/firstribit/fsroot
		_get_FR_initrd_kmod
		_get_layer_addons01
		_set_passwords
		;;
  16)	#distro="bodhi"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  17)	#distro="massos" (discontinued upstream?)
		_extractiso
		_get_FR_initrd #wiak remove: can't remember if needs kmod version - distro is discontinued though
		_get_layer_addons01
		_set_passwords
		;;
  18)	# Best to fetch TinyCorePure64-current via: https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/
		# The one you need as subdir of above is release_number.x/x86_64/release/TinyCorePure64-current.iso
		# For example: https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/release/TinyCorePure64-current.iso
		# CHECK online for the current iso url and filename prior to use
		# MODIFY the iso url and filename details at beginning of this script when necessary
		# Previously used tcz repos via: MIRROR="${MIRROR%/}/$(getMajorVer).x/$BUILD/tcz"
		# where MIRROR=repo.tinycorelinux.net and BUILD=x86_64
		# e.g. https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/tcz/rsync.tcz
		# and checked dependencies in file file.tcz.dep

		mount $isoname /tmp/firstribit/miso
		cp -a /tmp/firstribit/miso/cde/optional/* .
		rm -f *.md5.txt
		c=16
		for f in *.tcz; do  # rename required tcz apps to numbered sfs form
		  mv "$f" "${c}${f}.sfs"
		  c=$((c+1))
		done
		# need rsync and its deps libattr, libacl, and bash plus deps for snapmergepuppy so fetching here assuming tinycore 15.x version:
		for g in rsync attr acl bash ncursesw readline findutils coreutils gmp; do  # rename required tcz apps to numbered sfs form
		  f=${g}.tcz
		  wget -c https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/tcz/${f}
		  mv "$f" "${c}${f}.sfs"
		  c=$((c+1))
		done
#		OR can use individual wget commands:
#		wget -c https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/tcz/rsync.tcz
#		mv rsync.tcz "${c}rsync.sfs"; c=$((c+1))
#		wget -c https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/tcz/attr.tcz
#		mv rsync.tcz "${c}rsync.sfs"; c=$((c+1))
#		wget -c https://ftp.nluug.nl/os/Linux/distr/tinycorelinux/15.x/x86_64/tcz/acl.tcz
#		mv rsync.tcz "${c}rsync.sfs"; c=$((c+1))
		
		mkdir -p 08core # for core TCL root filesystem (uncompressed)
		cp -a /tmp/firstribit/miso/boot/corepure64.gz 08core/
		cd 08core && zcat corepure64.gz | cpio -idm
		sync;sync
		# sed -i.bak '/USER="tc"/iNOZSWAP=1' etc/init.d/tc-config
		# now done by /usr/local/tc_installed.sh as is echo Xfbdev > etc/sysconfig/Xserver
		rm -f corepure64.gz
		cd ..
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd-latest.gz -O initrd.gz  # FR skeleton initrd
		# Some useful FirstRib utilities in case you want to modify the initrd or the 07firstrib_rootfs
		# All these utilities have --help option
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig && chmod +x wd_grubconfig  # When run finds correct grub menu stanza for your system
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh && chmod +x modify_initrd_gz.sh  # For 'experts' to modify initrd.gz
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh && chmod +x mount_chroot.sh  # To enter rootfs in a chroot
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh && chmod +x umount_chroot.sh  # to 'clean up mounts used by above mount_chroot.sh'
	#wiak remove: will change name and download from firstrib gitlab on later release
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/WDLfork_TCL.tar
		tar xvf WDLfork_TCL.tar
		sync;sync
		# fetch KLV-Airedale kernel components (TCL kernel has no overlayfs)
		echo "Fetching huge kernel/modules/firmware. Please wait patiently ..."
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/kernel_usrmerge01/vmlinuz  # kernel
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/kernel_usrmerge01/00modules_usrmerge1.sfs # modules
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/kernel_usrmerge01/01firmware_usrmerge1.sfs  # firmware
		rm -f WDLfork_vdpup.tar
		sync;sync
		_get_layer_addons01
		sed -i 's@PATH="@PATH="/usr/local/bin:@' 12w_mods01/usr/bin/snapmergepuppy
		ln -s /usr/local/bin/bash 08core/bin/bash
#		_set_passwords
		;;
  20)	#distro="clearlinux"
		mount $isoname /tmp/firstribit/miso
		# horrible hack, but works to mount raw img "rootfs.img" as 08filesystem.sfs later:
		cp -a /tmp/firstribit/miso/images/rootfs.img 08filesystem.sfs
		sync;sync
		mount 08filesystem.sfs /tmp/firstribit/fsroot
		cp -a /tmp/firstribit/miso/kernel/kernel.xz vmlinuz
		_get_FR_initrd_kmod  # seems to be needed cos of zstd
		_get_layer_addons01
		_set_passwords
		;;
  21)	#distro="Ubuntu"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  23)	#distro="linux-lite"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  24)	#distro="bunsen-lithium"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  25)	#distro="LXLE-Focal" (discontinued upstream?)
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  26)	#distro="tails-amd64"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  27)	#distro="Debian"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  28)	#distro="Regata_OS"
		# Needing extra img decompress so cannot use this here: _extractiso
		echo "Extracting large files from iso. Please wait patiently ..."
		mount $isoname /tmp/firstribit/miso
		sleep 1
		mount /tmp/firstribit/miso/LiveOS/squashfs.img /tmp/firstribit/miso2
		sleep 1
		mount /tmp/firstribit/miso2/LiveOS/rootfs.img /tmp/firstribit/fsroot		
		sleep 1
		cp -a $(find /tmp/firstribit/fsroot -type f -name "vmlinuz*" | head -n 1) vmlinuz
		mksquashfs /tmp/firstribit/fsroot/ 08filesystem.sfs
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd_kmod-latest.gz -O initrd.gz # FR skeleton initrd_kmod
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/w_init-latest -O w_init  # FR w_init
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig && chmod +x wd_grubconfig  # When run finds correct grub menu stanza for your system
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh && chmod +x modify_initrd_gz.sh  # For 'experts' to modify initrd.gz
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh && chmod +x mount_chroot.sh  # To enter rootfs in a chroot
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh && chmod +x umount_chroot.sh  # to 'clean up mounts used by above mount_chroot.sh'
		mv initrd.gz initrdSKEL.gz
		mkdir -p initrd_decompressed
		cd initrd_decompressed
		sync;sync
		zcat ../initrdSKEL.gz | cpio -idm
		cp -a /tmp/firstribit/fsroot/lib/modules/* usr/lib/modules/		
		echo "Result being compressed. Please wait patiently ..."
		sync;sync
		find . | cpio -oH newc 2>/dev/null | gzip > ../initrd.gz 
		cd ..
		_get_layer_addons01
		_set_passwords # (password is blank, can: sudo password root to user:pw root:root)
		;;
  29)	#distro="Kodachi"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  30)	#distro="SysLinuxOS"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  31)	#distro="4MLinux"
		# Needing extra img decompress so cannot use this here: _extractiso
		echo "Extracting large files from iso. Please wait patiently ..."
		mount $isoname /tmp/firstribit/miso
		sleep 1
		mkdir -p 08initrd_decomp
		cd 08initrd_decomp
		zcat /tmp/firstribit/miso/boot/initrd.gz | cpio -idm
		tar xJvf /tmp/firstribit/miso/drivers/addon_modules-all*
		tar xJvf /tmp/firstribit/miso/drivers/addon_firmware*
		k=`ls lib/modules`
		depmod -a $k -b .
		cd ..
		mkdir -p initrd2_decomp
		cd initrd2_decomp
		zcat /tmp/firstribit/miso/boot/initrd2.gz | cpio -idm
		cd ..
		cp -a /tmp/firstribit/miso/boot/bzImage vmlinuz		
		_get_FR_initrd
		mv initrd.gz initrdSKEL.gz
		mkdir -p initrd_decompressed
		cd initrd_decompressed
		zcat ../initrdSKEL.gz | cpio -idm
		cp -a ../08initrd_decomp/lib/modules/* usr/lib/modules/		
		echo "Result being compressed. Please wait patiently ..."
		sync;sync
		find . | cpio -oH newc 2>/dev/null | gzip > ../initrd.gz 
		cd ..
		_get_layer_addons01
		_set_passwords # maybe not needed else password is blank or maybe austrumi, can: sudo password root to user:pw root:root
		;;
  33)	#distro="Fedora"
		# Fedora can cloud image isos can be downloaded via https://fedoraproject.org/cloud/ and click tab "Get Fedora"
		# I then used 'Spins' LxQt but plenty of alternatives are available there
		# Needing extra img decompress so cannot use this here: _extractiso
		echo "Extracting large files from iso. Please wait patiently ..."
		mount $isoname /tmp/firstribit/miso
		sleep 1
		mount /tmp/firstribit/miso/LiveOS/squashfs.img /tmp/firstribit/miso2
		sleep 1
		mount /tmp/firstribit/miso2/LiveOS/rootfs.img /tmp/firstribit/fsroot		
		sleep 1
		cp -a /tmp/firstribit/fsroot/etc/dnf/dnf.conf .
		mksquashfs /tmp/firstribit/fsroot/ 08filesystem.sfs
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/initrd_kmod-latest.gz -O initrd.gz # FR skeleton initrd_kmod
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/w_init-latest -O w_init  # FR w_init
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_grubconfig && chmod +x wd_grubconfig  # When run finds correct grub menu stanza for your system
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/modify_initrd_gz.sh && chmod +x modify_initrd_gz.sh  # For 'experts' to modify initrd.gz
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/mount_chroot.sh && chmod +x mount_chroot.sh  # To enter rootfs in a chroot
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/umount_chroot.sh && chmod +x umount_chroot.sh  # to 'clean up mounts used by above mount_chroot.sh'
		echo "Fetching huge kernel/modules/firmware. Please wait patiently ..."
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/kernel_usrmerge01/vmlinuz  # kernel
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/kernel_usrmerge01/00modules_usrmerge1.sfs # modules
		wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/huge_kernels/kernel_usrmerge01/01firmware_usrmerge1.sfs  # firmware
		sync;sync
		_get_layer_addons01
		#Avoid updating/fetching new kernels/modules later
		mkdir -p 12w_mods01/etc/dnf/
		cp -a dnf.conf 12w_mods01/etc/dnf/dnf.conf
		echo exclude=kernel* redhat-release* >> 12w_mods01/etc/dnf/dnf.conf
		_get_layer_addons01
		_set_passwords
		;;
  34)	#distro="xubuntu"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  35)	#distro="lubuntu"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  36)	#distro="mabox" # thanks TerryH
		_extractiso_many
		mv rootfs.sfs 08filesystem.sfs
		mv desktopfs.sfs 09desktopfs.sfs
		mv mhwdfs.sfs 10mhwdfs.sfs
		mv livefs.sfs 11livefs.sfs
		mount 08filesystem.sfs /tmp/firstribit/fsroot
		_get_FR_initrd_kmod
		_get_layer_addons01
		_set_passwords
		;;
  37)	#distro="Sparky" # Thanks esos
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  38)	#distro="Spiral"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  44)	#distro="Linux Mint"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
  98)	#distro="generic Arch Linux based"
		_extractiso_many
		mv rootfs.sfs 08filesystem.sfs
		mv desktopfs.sfs 09desktopfs.sfs
		mv mhwdfs.sfs 10mhwdfs.sfs
		mv livefs.sfs 11livefs.sfs
		mount 08filesystem.sfs /tmp/firstribit/fsroot
		_get_FR_initrd_kmod
		_get_layer_addons01
		_set_passwords  # not sure this works with Arch Linux based distros, but shouldn't cause harm(?)
		;;
  99)	#distro="generic Debian/Ubuntu based"
		_extractiso
		_get_FR_initrd
		_get_layer_addons01
		_set_passwords
		;;
	# note: users are invited to add additional distros above!
	*)	printf "$progname ${version}${revision}\n"; exit 0;;
esac

# clean up
sync;sync
umount -l /tmp/firstribit/merged
umount -l /tmp/firstribit/fsroot
umount -l /tmp/firstribit/miso
umount -l /tmp/firstribit/miso2
rm -rf /tmp/firstribit/
rm -rf initrd_decompressed
_grub_config
printf "\nNOTE that a ${firstribitplugin} plugin file has been detected.
This is simply a text file containing extra commands.
You can optionally modify its contents right now if you wish, then:
Press Enter key to use its commands,
or q to quit without using the plugin: "
read choice
if [ "$choice" = "q" ]; then
  exit 0
else
  _firstribit_plug  # source f_it plug file containing any extra commands you want to do.
					# For example use wget to download an addon or, say,
					# uncompress and modify an existing sfs file,
					# make an iso of frugal result, or whatever...
fi
exit 0

or this one?
build_firstrib_rootfs.sh
which I'll post below as I've exceeded the forum character limit.

geo_c
Old School Hipster, and Such

geo_c
Posts: 3060
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2379 times
Been thanked: 947 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by geo_c »

build_firstrib_rootfs.sh

Code: Select all

#!/bin/sh
## Build_firstrib_rootfs script to create
#    FirstRib rootfs (structure and contents)
# Uses busybox static plus relevant native package manager or debootstrap code
# Revision Date: 22Aug2023
# Copyright wiak (William McEwan) 30 May 2019+; Licence: MIT

##### Just run this script from an empty directory to create firstrib_rootfs
# NOTE: You should run this from appropriate Linux host architecture relevant to the build required
# It uses 32-bit busybox static for all system architectures
# ----------------------------------------------------------
version="8.0.0"; revision="-rc9"
export CONNECTION_TIMEOUT=-1

trap _trapcleanup INT TERM ERR

#### variables-used-in-script:
# re: script commandline arguments $1 $2 $3 $4 $5
distro="$1"; release="$2"; arch="$3"	
export distro release arch

# where distro is currently one of void, ubuntu, debian, devuan, arch, fedora or
#   vmini (xbps-static cmdline base Void system), vzstperl (mini) or vnopm (no package manager, just busybox and wiakwifi script).
# release is one of oldstable, stable, testing, or unstable.
# arch is currently one of i386 (i686 for Void), amd64 (x86_64 for Void), or arm64

firstribplugin="f_00.plug"			# contains extra commandlines to execute in chroot during build
									# e.g. xbps-install -y package_whatever (for Void flavour)
									# e.g. apt install -y package_whatever (for deb-based flavour)
									# e.g. pacman -Sy package_whatever (for Arch-Linux-based flavour)
[ "$4" ] && firstribplugin="$4"		# optional fourth parameter specifies alternative f_00 plugin name
firstribplugin01="f_01.plug"		# This second plugin will be sourced immediately after main firstribplugin has finished its work
[ "$5" ] && firstribplugin01="$5"	# optional fifth parameter specifies alternative f_01 plugin name

HERE="`pwd`"
bootdir=`basename "$HERE"` # for use with grub config
#### ----------------- end of variables used

#### functions-used-in-script:
_trapcleanup (){
	# Just a quick attempt to clean up some possible chroot-related mounts
	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
	exit
}

_grub_config (){
	cd "$HERE"
	subdir="$bootdir"
	bootuuid=`df . | awk '/^\/dev/ {print $1}' | xargs blkid -s UUID | awk -F\" '{print $2}'`
	bootlabel=`df . | awk '/^\/dev/ {print $1}' | xargs blkid -s LABEL | awk -F\" '{print $2}'`
	printf "
Assuming names: kernel is vmlinuz and initrd is initrd.gz and booting is
from this build directory and needed modules and firmware are present:

#####menu.lst (note the LABEL or UUID options below):
title $subdir
  find --set-root --ignore-floppies /${subdir}/grub_config.txt
  kernel /$subdir/vmlinuz w_bootfrom=LABEL=${bootlabel}=/$subdir
  initrd /$subdir/initrd.gz
#############################OR uuid method:
title $subdir
  find --set-root uuid () $bootuuid
  kernel /$subdir/vmlinuz w_bootfrom=UUID=${bootuuid}=/$subdir
  initrd /$subdir/initrd.gz

#####grub.cfg (note the UUID or LABEL options below):
menuentry \"${subdir}\" {
  insmod ext2
  search --no-floppy --label $bootlabel --set
  linux /$subdir/vmlinuz w_bootfrom=LABEL=${bootlabel}=/$subdir
  initrd /$subdir/initrd.gz
}
#############################OR uuid method:
menuentry \"${subdir}\" {
  insmod ext2
  search --no-floppy --fs-uuid --set $bootuuid
  linux /$subdir/vmlinuz w_bootfrom=UUID=${bootuuid}=/$subdir
  initrd /$subdir/initrd.gz
}

Refer to $HERE/grub_config.txt for
copy of this information plus blkid info\n" > grub_config.txt
	blkid -s UUID >> grub_config.txt
}

_getlatestfile (){
	# NOTE WELL: needs three quoted arguments in call ($3 is a command, usually grep command, for extra versatility)
	latest_file=`wget -q -O - $1 | grep -o -E "[^<>]*?${2}" | $3 | sort -V | tail -n 1`
	wget -c "${1}"/"${latest_file}"
}
_getlatestfile2 (){
	# NOTE WELL: needs three quoted arguments in call ($3 is a command, usually grep command, for extra versatility)
	latest_file2=`wget -q -O - $1 | grep -o -E "[^<>]*?${2}" | $3 | sort -V | tail -n 1`
	wget -c "${1}"/"${latest_file2}"
}

_usage (){
	case "$1" in
		'-v'|'--version') printf "Build FirstRib firstrib_rootfs Revision ${version}${revision}\n";exit;;

		''|'-h'|'--help'|'-?') printf '
Usage:
./build_firstrib_rootfsX.sh distro release arch [filename.plug(s)]

where distro is currently one of void, ubuntu, debian, devuan, [a|A]rch,
fedora, vmini (xbps-static cmdline Void system), vzstdperl (mini),
or vnopm (for Void Linux structure but no package manager)
Architecture (arch) can currently be one of amd64 or i686.
For distro void, Arch, or fedora, "release" can be "default".
For example:
./build_firstrib_rootfsX.sh void default amd64 f_00_Void_amd64-XXX.plug
All f_*.plug files automatically get copied into firstrib_rootfs/tmp
If it exists, the commands in optional primary plugin, f_00XX.plug are
automatically executed in a chroot after the core build is complete.
If it exists, additional plugin f_01XX.plug is then similarly sourced.
Either f_00, or f_01 plugin can of course themselves be used to access
other f_XX plugins that were copied into firstrib_rootfs/tmp (for
example: other f_XX lists of commands, or image files or whatever).
NOTE WELL that f_XX plugins (e.g. f_00XX.plug) are not exec scripts.
Rather they should simply contain a list of valid shell commandlines
without any hash bang shell header. Boot info provided on completion.
-v --version    display version information and exit
-h --help -?    display this help and exit
';exit;;
		"-*") echo "option $1 not available";exit;;
	esac
}

_void_repo_mirrors (){
	if [ -s "./firstrib.repo" ];then
		. "./firstrib.repo"
		# i.e. If firstrib.repo exists then source it to change build repo from above default
		# For example, for "us" repo, firstrib.repo text file should just contain the single commandline
		#     repo="https://alpha.us.repo.voidlinux.org"
	elif [ "$distro" = "vnopm" ];then
		repo="https://alpha.de.repo.voidlinux.org"
	else
		while :
		do
			printf '
Tier 1 mirrors
1 https://repo-de.voidlinux.org        EU: Germany
2 https://repo-fastly.voidlinux.org Global: Fastly Global CDN
3 https://mirrors.servercentral.com   USA: Chicago
4 https://repo-fi.voidlinux.org        EU: Finland
Tier 2 mirrors
5 https://mirror.aarnet.edu.au         AU: Canberra
6 https://ftp.swin.edu.au              AU: Melbourne
7 https://ftp.accum.se                 EU: Sweden
8 https://mirrors.dotsrc.org           EU: Denmark
9 https://void.webconverger.org      Asia: Singapore
10 https://mirrors.bfsu.edu.cn       Asia: China
11 https://ftp.lysator.liu.se          EU: Sweden
12 https://mirror.yandex.ru            RU: Russia
13 https://void.cijber.net             EU: Amsterdam, NL
14 https://mirror.clarkson.edu        USA: New York
q for quit this firstrib_rootfs build

https://repo-fi.voidlinux.org/
https://mirrors.servercentral.com/voidlinux/


Please make your choice '
			read choice
			case $choice in
				'1'|'01') repo="https://repo-de.voidlinux.org";break;;
				'2'|'02') repo="https://repo-fastly.voidlinux.org";break;;
				'3'|'03') repo="https://mirrors.servercentral.com/voidlinux";break;;
				'4'|'04') repo="https://repo-fi.voidlinux.org";break;;
				'5'|'05') repo="https://mirror.aarnet.edu.au/pub/voidlinux";break;;
				'6'|'06') repo="https://ftp.swin.edu.au/voidlinux";break;;
				'7'|'07') repo="https://ftp.accum.se/mirror/voidlinux";break;;
				'8'|'08') repo="https://mirrors.dotsrc.org/voidlinux";break;;
				'9'|'09') repo="https://void.webconverger.org";break;;
				'10') repo="https://mirrors.bfsu.edu.cn/voidlinux";break;;
				'11') repo="https://ftp.lysator.liu.se/pub/voidlinux";break;;
				'12') repo="https://mirror.yandex.ru/mirrors/voidlinux";break;;
				'13') repo="https://void.cijber.net";break;;
				'14') repo="https://mirror.clarkson.edu/voidlinux";break;;
				'q'|'Q') echo "build terminated";exit 0;;
				*) 
					echo "The choice you made is not available."
					echo "Press enter to return to this menu"
					read choice
				;;
			esac
		done
	fi
}

_arch_repo_mirrors (){ #wiak remove: currently not being used but keep in case needed later
	if [ -s "./firstrib.repo" ];then
		. "./firstrib.repo"
		# i.e. If firstrib.repo exists then source it to change build repo from above default
		# For example, for one South African mirror, firstrib.repo text file could just contain the single commandline
		#     repo="https://mirrors.urbanwave.co.za/archlinux"
	else
		while :
		do
			printf '
Some Arch Linux Repository Mirrors
For many more mirrors refer to: https://www.archlinux.org/mirrorlist/
1 https://mirror.rackspace.com        Worldwide
2 https://mirror.netcologne.de        EU: Germany
3 https://uk.mirror.allworldit.com    EU: UK
4 https://ftp.lysator.liu.se          EU: Sweden
5 https://mirrors.xtom.nl             EU: Netherlands
6 https://mirror.fsmg.org.nz          NZ 
7 https://mirror.aarnet.edu.au        AUS
8 https://mirrors.kernel.org          USA
9 https://mirrors.ocf.berkeley.edu    USA: California
10 https://ftp.lanet.kr               South Korea
11 https://ftp.jaist.ac.jp            Japan
12 https://www.caco.ic.unicamp.br     Brazil
13 https://mirror.rol.ru              Russia
14 https://mirrors.ustc.edu.cn        China
q for quit this firstrib_rootfs build
https://salsa.debian.org/installer-team/debootstrap.git
Please make your choice '
			read choice
			case $choice in
				'1'|'01') repo="https://mirror.rackspace.com/archlinux";break;;
				'2'|'02') repo="https://mirror.netcologne.de/archlinux";break;;
				'3'|'03') repo="https://archlinux.uk.mirror.allworldit.com/archlinux";break;;
				'4'|'04') repo="https://ftp.lysator.liu.se/pub/archlinux";break;;
				'5'|'05') repo="https://mirrors.xtom.nl/archlinux";break;;
				'6'|'06') repo="https://mirror.fsmg.org.nz/archlinux";break;;
				'7'|'07') repo="https://mirror.aarnet.edu.au/pub/archlinux";break;;
				'8'|'08') repo="https://mirrors.kernel.org/archlinux";break;;
				'9'|'09') repo="https://mirrors.ocf.berkeley.edu/archlinux";break;;
				'10') repo="https://ftp.lanet.kr/pub/archlinux";break;;
				'11') repo="https://ftp.jaist.ac.jp/pub/Linux/ArchLinux";break;;
				'12') repo="https://www.caco.ic.unicamp.br/archlinux";break;;
				'13') repo="https://mirror.rol.ru/archlinux";break;;
				'14') repo="https://mirrors.ustc.edu.cn/archlinux";break;;
				'q'|'Q') echo "build terminated";exit 0;;
				*) 
					echo "The choice you made is not available."
					echo "Press enter to return to this menu"
					read choice
				;;
			esac
		done
	fi
}

_void_x86_64 (){
    local distro="${1##*_}"  # call from _debian makes $1 temp_vzstdperl so this cuts off the temp_ part
	export XBPS_ARCH=x86_64
	_void_repo_mirrors # Choose Void repo to use for build
	# build firstrib_rootfs
	mkdir -p firstrib_rootfs
	cd firstrib_rootfs
	# make rootfilesystem directory structure
	mkdir -p boot/kernel dev/pts etc/skel etc/udhcpc etc/xbps.d home/void media mnt opt proc root run sys tmp usr/bin usr/lib usr/include usr/lib32 usr/libexec usr/local/bin usr/local/include usr/local/lib usr/local/sbin usr/local/share usr/share/udhcpc usr/share/xbps.d usr/src var/log

	# The following is per Void Linux structure. e.g. puts most all binaries in /bin and most all libs in /usr/lib:
	ln -sT usr/bin bin; ln -sT usr/lib lib; ln -sT usr/sbin sbin; ln -sT bin usr/sbin; ln -sT usr/lib lib64
	ln -sT usr/lib32 lib32         # In i686 version /usr/lib32 is just a symlink to /lib and there is no /lib32
	# ln -sT usr/lib usr/local/lib # Seems required in i686 32bit version but not I think in this one

	# Using i686 32-bit busybox to begin with, even in x86_64 build (user can install coreutils later if so wanted)
	wget -c -nc "$busybox_url" -P bin && chmod +x bin/busybox	
	# Make the command applet symlinks for busybox
	for i in `bin/busybox --list-full`; do ln -s /bin/busybox ${i}; done; mv bin/getty bin/gettyDISABLED

	# Fetch busybox udhcpc example simple.script renamed to etc/udhcpc/default.script 
	# For ethernet connection simply then need enter command: udhcpc -i <interface_name> 
	# You can find interface names with command: ip link, or ip address (for example eth0, eno1, ... etc, for ethernet)
	# Note that for wifi (interface_name: wlan0, wls1, etc), prior to obtaining dhcp lease you 
	# need to install, configure and run wpa_supplicant using following two wpa commands:
	# wpa_passphrase <wifiSSID> <wifiPassword> >> /etc/wpa_supplicant/wpa_supplicant.conf
	# wpa_supplicant -B -i <device> -c /etc/wpa_supplicant/wpa_supplicant.conf (option -B means run daemon in Background)
	# Note well that the provided simple network script /usr/local/bin/wiakwifi does the above for you if you wish to use it
	wget -c https://git.busybox.net/busybox/plain/examples/udhcp/simple.script -O etc/udhcpc/default.script && chmod +x etc/udhcpc/default.script
	sed -i 's/\$((metric++))/\$metric; metric=\$((metric+1))/' etc/udhcpc/default.script  # thanks rockedge for url of fix
	# But this static busybox udhcpc needs default.script in /usr/share/udhcpc (unlike debian shared busybox):
	mkdir -p usr/share/udhcpc && cp etc/udhcpc/default.script usr/share/udhcpc/default.script

	if [ "$distro" != "vnopm" ];then
		# The following puts xbps static binaries in firstrib_rootfs/usr/bin
		_getlatestfile2 "${repo}/static" ".i686-musl.tar.xz" "grep xbps-static"
		tar xJvf "${latest_file2}" && rm "${latest_file2}"
		
		# Default void repos use usr/share/xbps.d https repos, so ssl certs needed for these:
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		# If no sslcertificates available can use insecure temporary /etc/xbps.d non-https repos:
	fi

	# Install wiakwifi (can autostart on boot via /etc/profile/profile.d)
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wiakwifi -O usr/local/bin/wiakwifi && chmod +x usr/local/bin/wiakwifi
	# Install wd_mount
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_mount -O usr/local/bin/wd_mount && chmod +x usr/local/bin/wd_mount
	# cd to where we started this build (i.e. immediately outside of firstrib_rootfs):
	cd ..

	# Copy any firstrib plugins (f_*.plug) into firstrib_rootfs/tmp to be used (e.g. sourced) in chroot build part
	# The plugin file should contain any extra commandlines you want executed in chroot during build
	# e.g. For Void Linux might be: xbps-install -y package_whatever
	# NOTE WELL (for Void) the -y above, since chroot needs answer supplied
	# also note that the primary plugin is not a script, simply a list
	# of commandlines without any hash bang shell header
	cp -a f_* firstrib_rootfs/tmp

    [ -e firstrib_rootfs/etc/resolv.conf -o -L firstrib_rootfs/etc/resolv.conf ] && mv firstrib_rootfs/etc/resolv.conf firstrib_rootfs/etc/resolv.confORIG
    rm -f firstrib_rootfs/etc/resolv.conf
    cp -aL /etc/resolv.conf firstrib_rootfs/etc/resolv.conf  # changing etc/resolv.conf causes problems sometimes. For example, systemd distros want to auto-create resolv.conf as a symlink and cannot copy over dangling symlink

	# Next part of script does bind mounts (not really required unless using I/O) for chroot and installs extras required
	mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts
	# The following commands gets done inside firstrib_rootfs (via here_document pipe to chroot):
cat << INSIDE_CHROOT | LC_ALL=C chroot firstrib_rootfs sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "$distro" in
	vnopm)
		# The optional f_XXX plugin text files named in "$firstribplugin" and "$firstribplugin01"
		# should each simply contain a list of extra commands
		[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
	;;
	vmini)
		SSL_NO_VERIFY_PEER=1 xbps-install -Suy xbps-triggers 
		# make sure xbps continues to use desired main and non-free repos
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		sleep 1  # to give time for package installs to settle... maybe not required
		[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
	;;
    vzstdperl)	# include base, and full non-static xbps
		SSL_NO_VERIFY_PEER=1 xbps-install -Suy xbps-triggers base-files zstd perl xbps
        # NOTE WELL: if you wish to boot this root filesystem, you also need to install base-minimal,
        # and eudev, run commands, pwconv, and grpconv, and set passwd for root user
		# make sure xbps static continues to use desired main and non-free repos
		sleep 1  # to give time for xbps static to complete above installs
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		rm /usr/bin/xbps*.static  # Since dynamic xbps now installed
		sleep 1  # to give time to make sure shared lib xbps will be used
        if [ "$distro" = "$1" ]; then  # doesn't process f_plugs if actually part of Debian-based build
		  [ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		  [ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
        fi
	;;  
	*)	# include base, and full non-static xbps
		SSL_NO_VERIFY_PEER=1 xbps-install -Suy xbps-triggers base-files xbps
		# make sure xbps continues to use desired main and non-free repos
		sleep 1  # to give time for xbps static to complete above installs
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		rm /usr/bin/xbps*.static  # Since dynamic xbps now installed
		sleep 1  # to give time to make sure shared lib xbps will be used

		# NOTE WELL: if you want udev hotplug device/modules-autoload management daemon (most will)
		# and/or wpasupplicant you need to xbps-install -Syu them in an f_XXX build plugin
		# For example: xbps-install -Syu eudev wpa_supplicant
		# For a bootable system you'll also want linux kernel and appropriate firmware.
		# For some detailed examples, refer to already provided FirstRib Linux f_XXX plugin files available on download site.
		[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
	;;
esac
exit
INSIDE_CHROOT
    sync;sync
	# Finished doing the INSIDE_CHROOT stuff so can now clean up the chroot bind mounts:
	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
    rm -f firstrib_rootfs/etc/resolv.conf
    [ -e firstrib_rootfs/etc/resolv.confORIG -o -L firstrib_rootfs/etc/resolv.confORIG ] && mv firstrib_rootfs/etc/resolv.confORIG firstrib_rootfs/etc/resolv.conf  # put back resolv.conf to its original form
	rm -rf firstrib_rootfs/tmp/*
    [ -s ./addons_f.plug ] && . ./addons_f.plug  # for downloading layer addons and FR utils (e.g. 12KL...sfs; 11rox...sfs, wd_grubconfig)
    sync;sync
}

_void_i686 (){
    local distro="${1##*_}"  # call from _debian makes $1 temp_vzstdperl so this cuts off the temp_ part
	export XBPS_ARCH=i686
	_void_repo_mirrors # Choose Void repo to use for build
	# build firstrib_rootfs
	mkdir -p firstrib_rootfs
	cd firstrib_rootfs
	# make rootfilesystem directory structure
	mkdir -p boot/kernel dev/pts etc/skel etc/udhcpc etc/xbps.d home/void media mnt opt proc root run sys tmp usr/bin usr/lib usr/include usr/libexec usr/local/bin usr/local/include usr/local/lib usr/local/sbin usr/local/share usr/share/udhcpc usr/share/xbps.d usr/src var/log

	# The following is per Void Linux structure. e.g. puts most all binaries in /bin and most all libs in /usr/lib:
	ln -sT usr/bin bin; ln -sT usr/lib lib; ln -sT usr/sbin sbin; ln -sT bin usr/sbin
	# ln -sT usr/lib lib64       # Required in x86_64 version but not I think in this one
	ln -sT lib usr/lib32         # In x86_64 version /usr/lib32 is an actual directory not a symlink
	ln -sT usr/lib usr/local/lib # Seems to be required in i686 version - nah, gives irrelevant error, but just leave in case

	# Using i686 32-bit busybox to begin with (user can install coreutils later if so wanted)
	wget -c -nc "$busybox_url" -P bin && chmod +x bin/busybox	
	# Make the command applet symlinks for busybox
	for i in `bin/busybox --list-full`; do ln -s /bin/busybox ${i}; done; mv bin/getty bin/gettyDISABLED

	# Fetch busybox udhcpc example simple.script renamed to etc/udhcpc/default.script 
	wget -c https://git.busybox.net/busybox/plain/examples/udhcp/simple.script -O etc/udhcpc/default.script && chmod +x etc/udhcpc/default.script
	sed -i 's/\$((metric++))/\$metric; metric=\$((metric+1))/' etc/udhcpc/default.script  # thanks rockedge for url of fix
	# But this static busybox udhcpc needs default.script in /usr/share/udhcpc (unlike debian shared busybox):
	mkdir -p usr/share/udhcpc && cp etc/udhcpc/default.script usr/share/udhcpc/default.script

	if [ "$distro" != "vnopm" ];then
		# The following puts xbps static binaries in firstrib_rootfs/usr/bin
		_getlatestfile2 "${repo}/static" ".i686-musl.tar.xz" "grep xbps-static"
		tar xJvf "${latest_file2}" && rm "${latest_file2}"

		# Default void repos use usr/share/xbps.d https repos, so ssl certs needed for these:
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		# If no sslcertificates available can use insecure temporary /etc/xbps.d non-https repos:
	fi

	# Install wiakwifi (can autostart on boot via /etc/profile/profile.d)
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wiakwifi -O usr/local/bin/wiakwifi && chmod +x usr/local/bin/wiakwifi
	# Install wd_mount
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_mount -O usr/local/bin/wd_mount && chmod +x usr/local/bin/wd_mount
	# cd to where we started this build (i.e. immediately outside of firstrib_rootfs):
	cd ..

	# Copy any firstrib plugins (f_*.plug) into firstrib_rootfs/tmp to be used (e.g. sourced) in chroot build part
	cp -a f_* firstrib_rootfs/tmp

    [ -e firstrib_rootfs/etc/resolv.conf -o -L firstrib_rootfs/etc/resolv.conf ] && mv firstrib_rootfs/etc/resolv.conf firstrib_rootfs/etc/resolv.confORIG
    rm -f firstrib_rootfs/etc/resolv.conf
    cp -aL /etc/resolv.conf firstrib_rootfs/etc/resolv.conf  # changing etc/resolv.conf causes problems sometimes. For example, systemd distros want to auto-create resolv.conf as a symlink and cannot copy over dangling symlink

	# Next part of script does bind mounts (not really required unless using I/O) for chroot and installs extras required
	mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts

	# The following commands gets done inside firstrib_rootfs (via here_document pipe to chroot):
cat << INSIDE_CHROOT | LC_ALL=C chroot firstrib_rootfs sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "$distro" in
	vnopm)
		# The optional f_XXX plugin text files named in "$firstribplugin" and "$firstribplugin01"
		# should each simply contain a list of extra commands
		[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
	;;
	vmini)
		SSL_NO_VERIFY_PEER=1 xbps-install -Suy xbps-triggers 
		# make sure xbps continues to use desired main and non-free repos
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		sleep 1  # to give time for package installs to settle... maybe not required
		[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
	;;
	vzstdperl)	# include base, and full non-static xbps
		SSL_NO_VERIFY_PEER=1 xbps-install -Suy xbps-triggers base-files zstd perl xbps
        # NOTE WELL: if you wish to boot this root filesystem, you also need to install base-minimal,
        # and eudev, run commands, pwconv, and grpconv, and set passwd for root user
		# make sure xbps static continues to use desired main and non-free repos
		sleep 1  # to give time for xbps static to complete above installs
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		rm /usr/bin/xbps*.static  # Since dynamic xbps now installed
		sleep 1  # to give time to make sure shared lib xbps will be used
        if [ "$distro" = "$1" ]; then  # doesn't process f_plugs if actually part of Debian-based build
		  [ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		  [ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"
        fi
	;;
	*)	# include base, and full non-static xbps
		SSL_NO_VERIFY_PEER=1 xbps-install -Suy xbps-triggers base-files xbps
		# make sure xbps continues to use desired main and non-free repos
		sleep 1  # to give time for xbps static to complete above installs
		echo "repository=${repo}/current" > usr/share/xbps.d/00-repository-main.conf
		echo "repository=${repo}/current/nonfree" > usr/share/xbps.d/10-repository-nonfree.conf
		rm /usr/bin/xbps*.static  # Since dynamic xbps now installed
		sleep 1  # to give time to make sure shared lib xbps will be used
		[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
		[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"

		# NOTE WELL: if you want udev hotplug device/modules-autoload management daemon (most will)
		# and/or wpasupplicant you need to xbps-install -Syu them in an f_XXX build plugin
		# For example: xbps-install -Syu eudev wpa_supplicant
		# For a bootable system you'll also want linux kernel and appropriate firmware.
		# For some detailed examples, refer to already provided FirstRib Linux f_XXX plugin files available on download site.
	;;
esac
exit
INSIDE_CHROOT
    sync;sync
	# Finished doing the INSIDE_CHROOT stuff so can now clean up the chroot bind mounts and clean /tmp:
	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
    rm -f firstrib_rootfs/etc/resolv.conf
    [ -e firstrib_rootfs/etc/resolv.confORIG -o -L firstrib_rootfs/etc/resolv.confORIG ] && mv firstrib_rootfs/etc/resolv.confORIG firstrib_rootfs/etc/resolv.conf  # put back resolv.conf to its original form
	rm -rf firstrib_rootfs/tmp/*
    [ -s ./addons_f.plug ] && . ./addons_f.plug  # for downloading layer addons and FR utils (e.g. 12KL...sfs; 11rox...sfs, wd_grubconfig)
    sync;sync
}

_debian (){
	# If you want a variant other than minbase set env variable DBTSTRP_VARIANT to variant you desire
	# For example: export DBTSTRP_VARIANT=buildd (Refer: man debootstrap)
	local debootstrap_repo="$1"; local distro_repo="$2"; local latest_file="$3"; export distro_repo

	# build firstrib_rootfsDBTSTRP
    # mkdir -p firstrib_rootfsDBTSTRP
    if [ -d firstrib_rootfsDBTSTRP ]; then
        echo firstrib_rootfsDBTSTRP exists so no need to build mini Void Linux host distro
    elif [ -e vzstdperl.sfs ];then  # no need to build new vzstdperl mini Void Linux distro if exists as sfs
        unsquashfs -d firstrib_rootfsDBTSTRP vzstdperl.sfs  # the sfs contains vzstdperl minimum filesystem build
    else
        _void_x86_64 "temp_vzstdperl"; mv firstrib_rootfs firstrib_rootfsDBTSTRP  # ready for chroot debootstrap build
        # optionally if uncomment below you can archive the newly made firstrib_rootfsDBTSTRP as vzstdperl.sfs for easier next time Debian-based builds
        # mksquashfs firstrib_rootfsDBTSTRP vzstdperl.sfs
    fi
	cd firstrib_rootfsDBTSTRP; rm -f var/cache/xbps/*  # just slims it down a wee bit before debootstrap build
	# make rootfilesystem directory structure
    # mkdir -p bin boot/kernel dev/pts etc/apt etc/skel home/debian lib media mnt opt proc root sbin sys tmp usr/bin usr/include usr/lib32 usr/libexec usr/lib/debootstrap usr/local/bin usr/local/include usr/local/lib usr/local/sbin usr/local/share usr/sbin usr/share/udhcpc usr/src var/log  # etc/udh$repo/os/$archcpc
    mkdir -p etc/apt home/debian usr/lib/debootstrap  #wiak remove/check if necessary

	# Using i686 32-bit busybox to begin with (user can install coreutils later if so wanted)
    ##	wget -c -nc "$busybox_url" -P bin && chmod +x bin/busybox #(already done in vzstperl containing build)
	# Make the command applet symlinks for busybox
    ##	for i in `bin/busybox --list-full`; do ln -s /bin/busybox ${i}; done #(already done in vzstperl containing build)
	# Install Debian debootstrap into debian-based-build /usr hierarchy
	mkdir -p work
	cd work
	wget -c "${debootstrap_repo}"/"${latest_file}"
	ar -x "${latest_file}"  # ar -x filename
	cd ..
	zcat work/data.tar.gz | tar xv && rm -rf work
	# Download pkgdetails from firstrib github repo, for debootstrap
    # wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/pkgdetails_musl_static_wiak -O usr/lib/debootstrap/pkgdetails && chmod +x usr/lib/debootstrap/pkgdetails
    # Alternatively: cp  ../pkgdetails usr/lib/debootstrap && chmod +x usr/lib/debootstrap/pkgdetails #wiak remove_change
	# cd to where we started this build (i.e. immediately outside of firstrib_rootfsDBTSTRP):
	cd ..

	# Next part of script does bind mounts (not really required unless using I/O) for chroot used for debootstrap build
	mount --bind /proc firstrib_rootfsDBTSTRP/proc && mount --bind /sys firstrib_rootfsDBTSTRP/sys && mount --bind /dev firstrib_rootfsDBTSTRP/dev && mount -t devpts devpts firstrib_rootfsDBTSTRP/dev/pts
    [ -e firstrib_rootfsDBTSTRP/etc/resolv.conf ] && mv firstrib_rootfsDBTSTRP/etc/resolv.conf firstrib_rootfsDBTSTRP/etc/resolv.confORIG
    cp /etc/resolv.conf firstrib_rootfsDBTSTRP/etc/resolv.conf  # changing etc/resolv.conf causes problems sometimes. For example, systemd distros want to auto-create resolv.conf as a symlink

	# debootstrap build is created inside firstrib_rootfsDBTSTRP (via here_document pipe to chroot):
	# Host Linux system does not need debootstrap installed (or perl)
cat << INSIDE_CHROOT | LC_ALL=C chroot firstrib_rootfsDBTSTRP /bin/sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
variant="minbase"
[ "\$DBTSTRP_VARIANT" ] && variant="\$DBTSTRP_VARIANT"  # man debootstrap to see variants available
# Maybe --include apt-transport-https for older distro apt, but new distros (bionic) baulk since not needed
/usr/sbin/debootstrap --extractor=ar --arch=\$arch --variant=\$variant --include=ca-certificates \$release distro_root "\$distro_repo"
exit
INSIDE_CHROOT
    sync;sync
	# Finished doing the INSIDE_CHROOT stuff so can now clean up the chroot bind mounts:
	umount -l firstrib_rootfsDBTSTRP/proc && umount -l firstrib_rootfsDBTSTRP/sys && umount -l firstrib_rootfsDBTSTRP/dev/pts && umount -l firstrib_rootfsDBTSTRP/dev
    rm -f firstrib_rootfsDBTSTRP/etc/resolv.conf
    [ -e firstrib_rootfsDBTSTRP/etc/resolv.confORIG -o -L firstrib_rootfsDBTSTRP/etc/resolv.confORIG ] && mv firstrib_rootfsDBTSTRP/etc/resolv.confORIG firstrib_rootfsDBTSTRP/etc/resolv.conf  # put back resolv.conf to its original form
	rm -rf firstrib_rootfsDBTSTRP/tmp/*

	if [ ! -d firstrib_rootfsDBTSTRP/distro_root ]; then printf "\ndebootstrap download failed, please check its url\n";exit;fi
	cd firstrib_rootfsDBTSTRP/distro_root  # to add extra packages to debian-based filesystem
	mkdir -p etc/udhcpc
	# Fetch busybox udhcpc example simple.script renamed to etc/udhcpc/default.script 
	wget -c https://git.busybox.net/busybox/plain/examples/udhcp/simple.script -O etc/udhcpc/default.script && chmod +x etc/udhcpc/default.script
	sed -i 's/\$((metric++))/\$metric; metric=\$((metric+1))/' etc/udhcpc/default.script  # thanks rockedge for url of fix
	# But this static busybox udhcpc needs default.script in /usr/share/udhcpc (unlike debian shared busybox): wiak remove but maybe not here
	mkdir -p usr/share/udhcpc && cp etc/udhcpc/default.script usr/share/udhcpc/default.script  # wiak remove but maybe not needed here

	# Install wiakwifi (can autostart on boot via /etc/profile/profile.d)
	mkdir -p usr/local/bin && wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wiakwifi -O usr/local/bin/wiakwifi && chmod +x usr/local/bin/wiakwifi
	# Install wd_mount
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_mount -O usr/local/bin/wd_mount && chmod +x usr/local/bin/wd_mount
	# cd to where we started this build (i.e. immediately outside of firstrib_rootfsDBTSTRP):
	cd ../..

	# Extract distro_root, the debian-based firstrib_rootfs build out of firstrib_rootfsDBTSTRP
	mv firstrib_rootfsDBTSTRP/distro_root firstrib_rootfs

	# Copy any firstrib plugins (f_*.plug) into firstrib_rootfs/tmp to be used (e.g. sourced) in chroot build part
	cp -a f_* firstrib_rootfs/tmp

    [ -e firstrib_rootfs/etc/resolv.conf -o -L firstrib_rootfs/etc/resolv.conf ] && mv firstrib_rootfs/etc/resolv.conf firstrib_rootfs/etc/resolv.confORIG
    rm -f firstrib_rootfs/etc/resolv.conf
    cp -aL /etc/resolv.conf firstrib_rootfs/etc/resolv.conf  # changing etc/resolv.conf causes problems sometimes. For example, systemd distros want to auto-create resolv.conf as a symlink and cannot copy over dangling symlink

	# Next part of script does bind mounts (not really required unless using I/O) for chroot used to
	# directly install extras required or by means of f_00.plug
	mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts

	# The following commands gets done inside firstrib_rootfs (via here_document pipe to chroot):
cat << INSIDE_CHROOT2 | LC_ALL=C chroot firstrib_rootfs /bin/sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
apt update && apt install systemd systemd-sysv -y  # so can boot using huge-kernel arrangement without needing f_00 plug extra
printf "root\nroot\n" | passwd >/dev/null 2>&1 # Quietly set default root passwd to "root"
# The optional f_XXX plugin text files named in "$firstribplugin" and "$firstribplugin01"
# should each simply contain a list of extra commands
[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"

# NOTE WELL: if you want udev hotplug device/modules-autoload management daemon (most will)
# and/or wpasupplicant you need to apt install them in an f_XXX build plugin
# For a bootable system you'll also want linux kernel and appropriate firmware.
# You may also need to configure system for use of other repos (e.g. non-free).
# For some detailed examples, refer to already provided FirstRib Linux f_XXX plugin files available on download site.
exit
INSIDE_CHROOT2
    sync;sync
	# Finished doing the INSIDE_CHROOT2 stuff so can now clean up the chroot bind mounts:
	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
    rm -f firstrib_rootfs/etc/resolv.conf
    [ -e firstrib_rootfs/etc/resolv.confORIG -o -L firstrib_rootfs/etc/resolv.confORIG ] && mv firstrib_rootfs/etc/resolv.confORIG firstrib_rootfs/etc/resolv.conf  # put back resolv.conf to its original form
	rm -rf firstrib_rootfs/tmp/*
	# uncomment below to: Clean up no longer required build assembly
    if [ -e vzstdperl.sfs ]; then rm -rf firstrib_rootfsDBTSTRP; fi
    [ -s ./addons_f.plug ] && . ./addons_f.plug  # for downloading layer addons and FR utils (e.g. 12KL...sfs; 11rox...sfs, wd_grubconfig)
    sync;sync
}

_arch_amd64 (){
	# Currently auto-downloading and using archstrap_wiak_mod.sh to create the base Arch rootfs build.
	# https://gitlab.com/tearch-linux/applications-and-tools
	# However, archstrap has several dependencies: 
	# bash >= 4, busybox, sed, grep, tar, zstd
	# For simplicity building Arch base outside of chroot and relying on host system to provide these
	# _arch_repo_mirrors # Choose Arch Linux repo to use for build #wiak remove: currently not being used, but keep in case
	# export MIRROR="${repo}" #wiak remove: probably not required
	# Download archstrap scripts:
	# Previous (only works with http, not https): wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/arch-bootstrap.sh && chmod +x arch-bootstrap.sh
	# ./arch-bootstrap.sh -a $arch firstrib_rootfs #  -r "${repo}" 
	# Other (had issues): wget -c https://raw.githubusercontent.com/BiteDasher/archbashstrap/master/packages
	#./archbashstrap firstrib_rootfs
	#wget -c https://gitlab.com/tearch-linux/applications-and-tools/archstrap/-/raw/master/archstrap.sh && chmod +x archstrap.sh
	# ./archstrap.sh firstrib_rootfs  # wiak remove: not using chosen repo -r "${repo}/\\\$repo/os/\\\$arch"
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/archstrap_wiak_mod.sh && chmod +x archstrap_wiak_mod.sh
	./archstrap_wiak_mod.sh firstrib_rootfs  # not using repo -r
	cd firstrib_rootfs

	# pacman.conf configurations #wiak remove: maybe required or needs modified?
	sed -i 's/^CheckSpace/#CheckSpace/g' etc/pacman.conf
	sed -i 's/^#ParallelDownloads/ParallelDownloads/g' etc/pacman.conf
	sed -i "s/^[[:space:]]*\(CheckSpace\)/# \1/" etc/pacman.conf
	sed -i "s/^[[:space:]]*SigLevel[[:space:]]*=.*$/SigLevel = Never/" etc/pacman.conf
	cd .. # to immediately outside of firstrib_rootfs

	# Copy any firstrib plugins (f_*.plug) into firstrib_rootfs/tmp to be used (e.g. sourced) in chroot build part
	cp -a f_* firstrib_rootfs/tmp

    [ -e firstrib_rootfs/etc/resolv.conf -o -L firstrib_rootfs/etc/resolv.conf ] && mv firstrib_rootfs/etc/resolv.conf firstrib_rootfs/etc/resolv.confORIG
    rm -f firstrib_rootfs/etc/resolv.conf
    cp -aL /etc/resolv.conf firstrib_rootfs/etc/resolv.conf  # changing etc/resolv.conf causes problems sometimes. For example, systemd distros want to auto-create resolv.conf as a symlink and cannot copy over dangling symlink

	# Next part of script does bind mounts (not really required unless using I/O) for chroot and installs extras required
	mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts

	# The following commands gets done inside firstrib_rootfs (via here_document pipe to chroot):
cat << INSIDE_CHROOT | LC_ALL=C chroot firstrib_rootfs sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
# The optional f_XXX plugin text files named in "$firstribplugin" and "$firstribplugin01"
# should each simply contain a list of extra commands
[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"

# NOTE WELL: if you want udev hotplug device/modules-autoload management daemon (most will)
# and/or wpasupplicant you need to apt install them in an f_XXX build plugin
# For a bootable system you'll also want linux kernel and appropriate firmware.
# You may also need to configure system for use of other repos (e.g. non-free).
# For some detailed examples, refer to already provided FirstRib Linux f_XXX plugin files available on download site.
exit
INSIDE_CHROOT
    sync;sync
	# Finished doing the INSIDE_CHROOT stuff so can now clean up the chroot bind mounts:
	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
    rm -f firstrib_rootfs/etc/resolv.conf
    [ -e firstrib_rootfs/etc/resolv.confORIG -o -L firstrib_rootfs/etc/resolv.confORIG ] && mv firstrib_rootfs/etc/resolv.confORIG firstrib_rootfs/etc/resolv.conf  # put back resolv.conf to its original form
	rm -rf firstrib_rootfs/tmp/*
    [ -s ./addons_f.plug ] && . ./addons_f.plug  # for downloading layer addons and FR utils (e.g. 12KL...sfs; 11rox...sfs, wd_grubconfig)
    sync;sync
}

#*PREVIOUS WAY
#*_arch_amd64 (){
#*	# Currently auto-downloading and using arch-bootstrap to create the base Arch rootfs build.
#*	# However, arch_bootstrap has several dependencies: 
#*	# bash >= 4, coreutils, wget, sed, gawk, tar, gzip, chroot, xz
#*	# so for simplicity building Arch base outside of chroot and relying on host system to provide these
#*	_arch_repo_mirrors # Choose Arch Linux repo to use for build

#*    mkdir -p firstrib_rootfs
#*    cd firstrib_rootfs
#*    cd ..  # to immediately outside of firstrib_rootfs
#*	# build firstrib_rootfs
#*	# Download arch_debootstrap scripts:
#*	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/core_resources/arch-bootstrap.sh && chmod +x arch-bootstrap.sh
#*	./arch-bootstrap.sh -a $arch -r "${repo}" firstrib_rootfs
#*	cd firstrib_rootfs

#*	mkdir -p etc/udhcpc # needed to receive udhcpc default.script
#*	# Fetch busybox udhcpc example simple.script renamed to etc/udhcpc/default.script 
#*	wget -c https://git.busybox.net/busybox/plain/examples/udhcp/simple.script -O etc/udhcpc/default.script && chmod +x etc/udhcpc/default.script
#*	sed -i 's/\$((metric++))/\$metric; metric=\$((metric+1))/' etc/udhcpc/default.script  # thanks rockedge for url of fix
#*	# udhcpc sometimes needs default.script in /usr/share/udhcpc:
#*	mkdir -p usr/share/udhcpc && cp etc/udhcpc/default.script usr/share/udhcpc/default.script
#*	# Install wiakwifi (can autostart on boot via /etc/profile/profile.d)
#*	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wiakwifi -O usr/local/bin/wiakwifi && chmod +x usr/local/bin/wiakwifi
#*	# Install wd_mount
#*	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_mount -O usr/local/bin/wd_mount && chmod +x usr/local/bin/wd_mount
#*	cd .. # to immediately outside of firstrib_rootfs

#*	# Copy any firstrib plugins (f_*.plug) into firstrib_rootfs/tmp to be used (e.g. sourced) in chroot build part
#*	cp -a f_* firstrib_rootfs/tmp

#*	# Next part of script does bind mounts (not really required unless using I/O) for chroot and installs extras required
#*	mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts && cp /etc/resolv.conf firstrib_rootfs/etc/resolv.conf

#*	# The following commands gets done inside firstrib_rootfs (via here_document pipe to chroot):
#*cat << INSIDE_CHROOT | LC_ALL=C chroot firstrib_rootfs sh
#*export PATH=/sbin:/usr/sbin:/bin:/usr/bin
#*# The optional f_XXX plugin text files named in "$firstribplugin" and "$firstribplugin01"
#*# should each simply contain a list of extra commands
#*[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
#*[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"

#*# NOTE WELL: if you want udev hotplug device/modules-autoload management daemon (most will)
#*# and/or wpasupplicant you need to apt install them in an f_XXX build plugin
#*# For a bootable system you'll also want linux kernel and appropriate firmware.
#*# You may also need to configure system for use of other repos (e.g. non-free).
#*# For some detailed examples, refer to already provided FirstRib Linux f_XXX plugin files available on download site.
#*exit
#*INSIDE_CHROOT
#*  sync;sync
#*	# Finished doing the INSIDE_CHROOT stuff so can now clean up the chroot bind mounts:
#*	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
#*	rm -rf firstrib_rootfs/tmp/*
#*}

_fedora_amd64 (){ # wiak remove later: under dev/test
	# Currently auto-downloading and using fdstrap () to create the base fedora rootfs build.
	# https://gitlab.com/tearch-linux/applications-and-tools

	# build firstrib_rootfs
	# Download fdstrap scripts:
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/fdstrap.sh && chmod +x fdstrap.sh
#	wget -c https://gitlab.com/tearch-linux/applications-and-tools/fdstrap/-/raw/main/fdstrap.sh && chmod +x fdstrap.sh
	./fdstrap.sh firstrib_rootfs
	cd firstrib_rootfs
	mkdir -p etc/udhcpc # needed to receive udhcpc default.script
	# Fetch busybox udhcpc example simple.script renamed to etc/udhcpc/default.script 
	wget -c https://git.busybox.net/busybox/plain/examples/udhcp/simple.script -O etc/udhcpc/default.script && chmod +x etc/udhcpc/default.script
	sed -i 's/\$((metric++))/\$metric; metric=\$((metric+1))/' etc/udhcpc/default.script  # thanks rockedge for url of fix
	# udhcpc sometimes needs default.script in /usr/share/udhcpc:
	mkdir -p usr/share/udhcpc && cp etc/udhcpc/default.script usr/share/udhcpc/default.script
	# Install wiakwifi (can autostart on boot via /etc/profile/profile.d) - but optional since likely using NetworkManager now
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wiakwifi -O usr/local/bin/wiakwifi && chmod +x usr/local/bin/wiakwifi
	# Install wd_mount
	wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/wd_mount -O usr/local/bin/wd_mount && chmod +x usr/local/bin/wd_mount
	cd .. # to immediately outside of firstrib_rootfs

	# Copy any firstrib plugins (f_*.plug) into firstrib_rootfs/tmp to be used (e.g. sourced) in chroot build part
	cp -a f_* firstrib_rootfs/tmp

    [ -e firstrib_rootfs/etc/resolv.conf -o -L firstrib_rootfs/etc/resolv.conf ] && mv firstrib_rootfs/etc/resolv.conf firstrib_rootfs/etc/resolv.confORIG
    rm -f firstrib_rootfs/etc/resolv.conf
    cp -aL /etc/resolv.conf firstrib_rootfs/etc/resolv.conf  # changing etc/resolv.conf causes problems sometimes. For example, systemd distros want to auto-create resolv.conf as a symlink and cannot copy over dangling symlink

	# Next part of script does bind mounts (not really required unless using I/O) for chroot and installs extras required
	mount --bind /proc firstrib_rootfs/proc && mount --bind /sys firstrib_rootfs/sys && mount --bind /dev firstrib_rootfs/dev && mount -t devpts devpts firstrib_rootfs/dev/pts

	# The following commands gets done inside firstrib_rootfs (via here_document pipe to chroot):
cat << INSIDE_CHROOT | LC_ALL=C chroot firstrib_rootfs sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
printf "root\nroot\n" | passwd >/dev/null 2>&1 # Quietly set default root passwd to "root"
dnf upgrade && dnf install iproute -y; ln -s /sbin/busybox /sbin/udhcpc; ln -s /sbin/busybox /sbin/ping  # so can boot using huge-kernel arrangement without needing f_00 plug extra
# dnf clean all  # clean all package caches and so on
# The optional f_XXX plugin text files named in "$firstribplugin" and "$firstribplugin01"
# should each simply contain a list of extra commands
[ -s /tmp/"${firstribplugin}" ] && . /tmp/"${firstribplugin}"
[ -s /tmp/"${firstribplugin01}" ] && . /tmp/"${firstribplugin01}"

# NOTE WELL: If not using huge-kernel, 00modules/01firmware addons, you'll need dnf install kernel linux-firmware
exit
INSIDE_CHROOT
    sync;sync
	# Finished doing the INSIDE_CHROOT stuff so can now clean up the chroot bind mounts:
	umount -l firstrib_rootfs/proc && umount -l firstrib_rootfs/sys && umount -l firstrib_rootfs/dev/pts && umount -l firstrib_rootfs/dev
    rm -f firstrib_rootfs/etc/resolv.conf
    [ -e firstrib_rootfs/etc/resolv.confORIG -o -L firstrib_rootfs/etc/resolv.confORIG ] && mv firstrib_rootfs/etc/resolv.confORIG firstrib_rootfs/etc/resolv.conf  # put back resolv.conf to its original form
	rm -rf firstrib_rootfs/tmp/*
    [ -s ./addons_f.plug ] && . ./addons_f.plug  # for downloading layer addons and FR utils (e.g. 12KL...sfs; 11rox...sfs, wd_grubconfig)
    sync;sync
}

#### ----------------- end of functions used

_usage "$1"  # check if - or --cmdarg (e.g. --version or -h for help)
echo "Initialising FirstRib build. Please wait patiently..."
case "$distro" in
	arch|Arch) :
	;;
	*)
		busybox_repo="https://busybox.net/downloads/binaries/"
		busybox_dir=`wget -q -O - $busybox_repo | sed 's/a href=\"//' |  grep -o -E "[^<>]*?i686-linux-musl" | sort -V | tail -n 1` # thanks fredx181
		busybox_url="${busybox_repo}${busybox_dir}/busybox"
	;;
esac
case "$distro" in
	void|Void|vmini|vzstdperl|vnopm)
		case "$arch" in
			amd64)
				_void_x86_64 "$distro"	# call build Void amd64 function
			;;
			i686)
				_void_i686 "$distro"	# call build Void i386 function
			;;
			arm64)
				echo "arch $arch is supported by Void but not yet FirstRib";_usage "--help";exit
			;;
			*) # no such arch catered for
				echo "$distro $release $arch not currently available from FirstRib";_usage "--help";exit
			;;
		esac
	;;
	ubuntu|Ubuntu)
		case "$release" in
			oldstable|stable|testing|unstable|xenial|bionic|focal|jammy)
				case "$arch" in
					amd64|i386|arm64) # wiak: I have no arm64 hardware, so arm untested and for development only
						debootstrap_repo="http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap"
# very latest ubuntu debootstrap not currently working... _getlatestfile "$debootstrap_repo" "_all.deb" "grep -vE \(nmu|ubuntu\)"
latest_file="debootstrap_1.0.128+nmu2ubuntu1_all.deb" # wiak temporarily not using _getlatestfile routine for Ubuntu since most recent debootstrap version not including Ubuntu distros...
						distro_repo="http://archive.ubuntu.com/ubuntu/"
						_debian "$debootstrap_repo" "$distro_repo" "$latest_file" # call build debian function
					;;
					*) # no such arch catered for
						echo "$distro $release $arch not currently available from FirstRib";_usage "--help";exit
					;;
				esac
			;;
			*) # no such release catered for
				echo "$distro $release not currently available from FirstRib";_usage "--help";exit
			;;
		esac
	;;
	debian|Debian)
		case "$release" in
			oldstable|stable|testing|unstable|stretch|buster|sid)
				case "$arch" in
					amd64|i386|arm64) # wiak: I have no arm64 hardware, so arm untested and for development only
						debootstrap_repo="http://ftp.debian.org/debian/pool/main/d/debootstrap"
						_getlatestfile "$debootstrap_repo" "_all.deb" "grep -vE \(nmu|debian\)"
						distro_repo="http://ftp.us.debian.org/debian/"
						_debian "$debootstrap_repo" "$distro_repo" "$latest_file" # call build debian function
					;;
					*) # no such arch catered for
						echo "$distro $release $arch not currently available from FirstRib";_usage "--help";exit
					;;
				esac
			;;
			*) # no such release catered for
				echo "$distro $release not currently available from FirstRib";_usage "--help";exit
			;;
		esac
	;;
	devuan|Devuan)
		case "$release" in
			oldstable|stable|testing|unstable|ascii|beowulf|ceres|chimaera|daedalus)
				case "$arch" in
					amd64|i386|arm64) # wiak: I have no arm64 hardware, so arm untested and for development only
						debootstrap_repo="http://pkgmaster.devuan.org/devuan/pool/main/d/debootstrap"
						_getlatestfile "$debootstrap_repo" "_all.deb" "grep -vE \(nmu\)"
						distro_repo="http://pkgmaster.devuan.org/merged/"
						_debian "$debootstrap_repo" "$distro_repo" "$latest_file" # call build debian function
					;;
					*) # no such arch catered for
						echo "$distro $release $arch not currently available from FirstRib";_usage "--help";exit
					;;
				esac
			;;
			*) # no such release catered for
				echo "$distro $release not currently available from FirstRib";_usage "--help";exit
			;;
		esac
	;;
	arch|Arch)  # wiak remove later: Arch Linux - under development
		case "$arch" in
			amd64)
				arch=x86_64
				_arch_amd64  # call build Arch amd64 function
			;;
			*) # no such arch catered for
				echo "$distro $release $arch not currently available from FirstRib";_usage "--help";exit
			;;
		esac
	;;
	fedora|Fedora)  # wiak remove later: Fedora Linux - under development
		case "$arch" in
			amd64)
				arch=x86_64
				_fedora_amd64  # call build Arch amd64 function
			;;
			*) # no such arch catered for
				echo "$distro $release $arch not currently available from FirstRib";_usage "--help";exit
			;;
		esac
	;;
	*) # no such distro catered for
	echo "distro $distro not currently available from FirstRib";_usage "--help";exit
	;;
esac
sync
printf "
Assuming no errors have occurred above,
firstrib_rootfs flavour $distro $release $arch is now ready.
If you wish, you can now use it via convenience script,
./mount_chrootXXX.sh and after such use, exit, and, IMPORTANT:
run ./umount_chrootXXX.sh to clean up temporary mounts.
Or, you can make it bootable via wiak's FirstRib initrd (initramfs)
after downloading that and suitable huge-kernel/00modules/01firmware
Alternativly, can use non-huge-style kernel and run command:
./FRmake_initrd.sh (use that scripts --help for details)
which auto-downloads FR initrd-latest.gz and remakes it correctly or
earlier technique of running command:
./build_wiak_initrdXXX.sh <distroname> [OPTIONS], and then
frugal install it by copying the resultant initrdXX, vmlinuz,
and firstrib_rootfs.sfs (or firstrib_rootfs directory) into
/mnt/bootpartition/bootdir and configuring grub to boot it.
NOTE WELL: firstrib_rootfs needs renamed NN<anything> For example:
08rootfs or 08rootfs.sfs (if squashed using mksquashfs utility),
or for a pseudo-full-install only: rename uncompressed firstrib_rootfs
as upper_changes and mkdir -p NNdummy (e.g. 08dummy)
More details on booting at end of build_firstrib_initrd script.
Refer to $HERE/grub_config.txt for related booting information.
"
_grub_config
exit 0
script.
Refer to $HERE/grub_config.txt for related booting information.
"
_grub_config
exit 0

wiak mod says the latest version should generally ALWAYS be used and fetched as follows:

Code: Select all

wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/build_firstrib_rootfs.sh && chmod +x build_firstrib_rootfs.sh

geo_c
Old School Hipster, and Such

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

Well, geo_c, looking at gitlab firstrib site, the build_firstrib_rootfs.sh version you posted does seem to be the latest (presumably downloaded from there), but... it is not I am sure a good idea to publish versions in code boxes on the forum, unless of course you clearly insert text as disclaimer that the code shown may or may not be the latest. Either way, I would appreciate if you always include the appropriate wget command to download the actual latest - that prevents people mistakenly using old code for their builds, which cannot be guaranteed to work or provide the best builds. After all, development is all about improvement. ;-)

Same goes for any other FR code published in code boxes here. I hope you don't mind that I will thus add the appropriate wget command line(s) to your above posts. :-)

EDIT: Ah..., reading your post more closely, I see it was concerned with an uncertainly about how to make the build. Perhaps best I leave rockedge to explain that since it is a valid question that deserves a good answer! But I will say - that first of your posts is a 'frontend' script I originally wrote that using wget commands to download the likes of build_firstrib_rootfs.sh (main actual build script) and automates supplying the arguments to that. End result is that only that frontend script was needed and it automated all that happened thereafter to complete the build using all the parts it fetched via wget and so on. Sofiya has since then used that same frontend script and modified it for her own single script build purposes, which I was happy to see since makes building much more convenient than having to initially master the use of the underlying build_firstrib_rootfs.sh script (not that that is difficult...).

EDIT2: Oops sorry, I just noticed the earlier script you published is not what I thought. Rather it is my recent firstribit.sh script that is used to convert other distro isos into FirstRib-based frugal installs. Not to do with a normal FirstRib/KL distro building process AT ALL!

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

geo_c wrote: Fri Aug 02, 2024 2:06 pm
rockedge wrote: Fri Aug 02, 2024 3:16 am

Code: Select all

./build_firstrib_rootfs.sh void rolling amd64 f_00_Void_KLV_JWM_no-kernel_FRteam-rc1.plug

You will get the hang of it. :thumbup:

This is great.

I think I can build a JWM Void Audio distro with this eventually.

The first line I quoted there, that's the command to start the build, right? (After I put the f_[plug] in the build directory, using which firstrib no X script?

YES INDEED

This one?
firstribit.sh

NO.... Nothing at all to do with this process. See my post above regarding purpose of FIRSTRIBIT; a different thing altogether geo_c (albeit also using FR initrd in special way).

Code: Select all

#!/bin/bash
# Creation Date: 14feb2022 (greatly modified in 30Jun2024 release)
progname="firstribit.sh"; version="022"; revision="-rc1" #Revision Date: 07July2024
# Copyright wiak (William McEwan) 14feb2022+; Licence MIT (aka X11 license)
# Run this script from directory you want to frugal boot from.

# List follows of URLs for a few distros you might want auto-downloaded,
...

or this one?
build_firstrib_rootfs.sh
which I'll post below as I've exceeded the forum character limit.

Yes, build_firstrib_rootfs.sh (latest) is the one you need. You can get it using terminal wget command:

Code: Select all

wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/build_firstrib_rootfs.sh && chmod +x build_firstrib_rootfs.sh

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

geo_c
Posts: 3060
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2379 times
Been thanked: 947 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by geo_c »

wiak wrote: Fri Aug 02, 2024 2:30 pm

Yes, build_firstrib_rootfs.sh (latest) is the one you need. You can get it using terminal wget command:

Code: Select all

wget -c https://gitlab.com/firstrib/firstrib/-/raw/master/latest/build_system/build_firstrib_rootfs.sh && chmod +x build_firstrib_rootfs.sh

Thanks wiak, I will take a look at this later, I have run to the airport!

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@geo_c It is the second version that is correct.

Code: Select all

# ----------------------------------------------------------
version="8.0.0"; revision="-rc9"
  1. Create directory to build in for example: /mnt/home/KLV-Boxer_test-build

  2. Place the PLUG file and the script in the directory.

  3. Open a terminal in /mnt/home/KLV-Boxer_test-build and run:

  4. Code: Select all

    ./build_firstrib_rootfs.sh void rolling amd64 f_00_Void_KLV_JWM_no-kernel_FRteam-rc1.plug

This will assemble the firstrib_rootfs not squashed. It is now possible to use the mount/umount scripts to run the file system in a chroot.
The firstrib_rootfs can be rename to upper_changes and used in a PFI (Pseudo Full Install).

  • Look at the /var/cache to make sure the cache's are empty.

  • Check if /root/.cache is empty or does not yet exist.

  • Ensure that /mnt is empty

  • Check that /root/.bash_history is empty

Now the firstrib_rootfs can be squashed using PackIt for example if not from the command line to create 07KLV-boxer_rootfs.sfs

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

Since you mastered using multi-instance scripts @geo_c I have no doubt you will find using ./build_firstrib_rootfs.sh and so on absolutely straightforward (probably easier than multi-instance making, which is also easy as you know) and a frugal installed distro will result in whatever empty directory you do that in... Does take a LONG time building a new FR/KL frugal installed distro of course since many packages get downloaded and installed in the build process...

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

geo_c
Posts: 3060
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2379 times
Been thanked: 947 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by geo_c »

Thanks guys.

I did do a script build two times before, I think with bspwm. So I'm somewhat familiar.

I'll take a close look at all this later tonight, I have to run to the airport now.

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

Does take a LONG time building a new FR/KL frugal installed distro of course since many packages get downloaded and installed in the build process...

It takes the Dell PowerEdge R210 II 12 minutes with a fiber optic network connection to build this PLUG recipe.

The first 10 times I thought that something went wrong and the script bailed in errors.......no, it just finished that quickly.

Took a awhile to get used to it.

We could take a @Sofiya type framework and use a one script system builder to use the PLUG and build the rootfs and have the script install the other components.

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

I am running into similar problems getting the audio to work as encountered during the assemblies of KLV-Spectr and KLV-Airedale as pipewire - wireplumber is fully integrated.

UPDATE: Solved the audio sound problem by starting with pulseaudio, pavucontrol, pasystray and starting using run-as-spot

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@Clarity

here is a QEMU stanza using the Focal Fossa version:

Code: Select all

/usr/bin/qemu-system-x86_64  -smp 4 -device ac97 -machine accel=kvm -m 4096 -cdrom "/mnt/home/KLV-Boxer-rc1.iso" -hda "/root/.aqemu/KLV_Boxer_rc1_HDA.img" -boot once=d,menu=off -net nic -net user -rtc base=localtime -name "KLV-Boxer-rc1" -vnc 192.168.254.13:0 -cpu host -usb -usbdevice tablet $*

Or with a portable QEMU:

Code: Select all

/mnt/home/QEMU-2.11.1-ubu-18.04.AppImage qemu-system-x86_64  -smp 4 \
-vga std -machine accel=kvm -m 4096 -cdrom "/mnt/home/KLV-Boxer-rc1.iso" \
-hda "/root/.aqemu/KLV_Boxer_rc1_HDA.img" -boot once=d,menu=off -net nic -net user \
-rtc base=localtime -name "KLV-Boxer-rc1" -cpu host -usb -usbdevice tablet $*
geo_c
Posts: 3060
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2379 times
Been thanked: 947 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by geo_c »

rockedge wrote: Fri Aug 02, 2024 6:35 pm

I am running into similar problems getting the audio to work as encountered during the assemblies of KLV-Spectr and KLV-Airedale as pipewire - wireplumber is fully integrated.

I'm wondering if sticking with run-as-root is the way to go anymore, when it comes to things like pipewire and pulse, not to mention wayland.

Though I can barely function as regular user with the kind of integrated symlinked approach I take to data and portable apps, it might be time to make an adjustment. I can keep my symlinked OS cakes and eat the User cake too.

geo_c
Old School Hipster, and Such

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

geo_c wrote: Fri Aug 02, 2024 9:30 pm

I'm wondering if sticking with run-as-root is the way to go anymore, when it comes to things like pipewire and pulse, not to mention wayland.

Though I can barely function as regular user with the kind of integrated symlinked approach I take to data and portable apps, it might be time to make an adjustment. I can keep my symlinked OS cakes and eat the User cake too.

It's a matter of personal choice to some extent.
Personally I rarely run as root. I prefer to run as a normal user because that's how Linux was intended to be run and for most of my life I only used root when I wanted to do quick admin work. Running always as root is a great convenience - no sudo required... But nowadays lots of system facilities and even apps are very tricky to get working when run from root perspective. Perhaps I'm lazy in my approach but I like code to work per its design and consder all the complex workarounds regarding running as root more trouble than they are worth (to me). Life is too short for trying to change the design shape of wheels so I prefer sometimes to go with the flow and avoid what is otherwise a bit of a mess. That approach, for me at least, leaves much more time for actual innovation. Running as root is not innovative; it is just an overall limiting convenience. Puppy users are often hopeless at general Linux multiuser system administration - they simply dont have the experience and tend to use many quick-fix bad habits.

One of the many good aspects of FR/KL distros is that they can easily be altered to run as normal users so are additionally useful in education where Linux multiuser admin is a key component and for system admin employment. But main point here are indeed issues getting major system components to work without ugly workarounds. But each to their own - in KL world doesnt matter to me personally what default is used - well except that pipewire and similar are likely broken and need fixed.

Of course if purpose of distro really is just for admin system rescue work that is arguably sometimes a different matter.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Sofiya
Posts: 2475
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1532 times
Been thanked: 1691 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by Sofiya »

Honestly, I like the root user, BUT there are many reasons why I will choose the spot user (security, program compilation, many programs do not run as root, etc.....

At one time, I don’t remember that any operating system was installed as a root user. Only here on the forum I launched the system as root for the first time, it was Fossapup64 . This was certainly a novelty for me.Since I always worked as the spot user with Administrator rights

KL-Linux https://sofijacom.github.io
KL LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@Sofiya @geo_c It is easy to make KLV-Boxer boot as user spot. I might adjust the PLUG or leave instructions on how to autologin as user spot.

I have now pipewire and wireplumber working well. Using pasystray for the tray icon/controls.

I'll need to adjust the PLUG file with the latest tweaks :ugeek: :thumbup2:

Screenshot(29).jpg
Screenshot(29).jpg (23.86 KiB) Viewed 3106 times
Clarity
Posts: 4244
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1817 times
Been thanked: 571 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by Clarity »

Looking forward to the next version ISO file with the audio changes.

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@Clarity Here you go...raw as it is. Please see if it boots....

@geo_c This one with Cortile feels light and fast....perhaps see if the audio works........!! Might have some potential.....

Downloads for the PLUG file to construct a firstrib_rootfs and a ready to boot ISO with kernel 6.6.0-rt15 are both in the first post:
viewtopic.php?p=127768#p127768

Screenshot(31).jpg
Screenshot(31).jpg (15.99 KiB) Viewed 2992 times
User avatar
fredx181
Posts: 3386
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 438 times
Been thanked: 1485 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by fredx181 »

Hi @rockedge Tested boxer and found that save2flash is not working.
It's missing rsync and dialog, so I installed these and running save2flash from terminal works then, ok.
But then the console prompt Save/NoSave at shutdown still didn't appear and found that a fix is changing /etc/profile.d/autologin.sh to:

Code: Select all

# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx  # remove the exec if you want back to tty1 on exit X
fi

Same as it is in KLV-Airedale, then you need to login with password after exiting JWM and somehow :?: the console prompt at shutdown works because of that change.

Another thing, perhaps useful, here's a script to put in ~/Startup that forces transparency e.g. for conky (should work without compositor then):

setbackdrop.gz
Remove fake .gz , make executable and place in ~/Startup
(1.34 KiB) Downloaded 64 times

EDIT: The script assumes that the rox pinboard path is $HOME/.config/rox.sourceforge.net/ROX-Filer/pb_default (change that in case it's otherwise).
Required is to have hsetroot installed and the conky config needs to have own_window_argb_visual disabled : own_window_argb_visual = false,

Last edited by rockedge on Fri Aug 23, 2024 1:40 pm, edited 1 time in total.
Reason: fixed code block BBCode
User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

Though I have no actual need myself ever for a 32bit variant I decided to try a build using the first post f_plugin for i686 rather than amd64.

Oddly it borked out just at the stage it should source the f_plug. Not sure why yet.

However, the simple workaround I then tried was to use ./mount_chroot.sh to chroot into the firstrib_rootfs that was built but not completed. Then from my host system I simply copied the f_plug into firstrib_rootfs/tmp and sourced it from inside the chroot terminal window:

Code: Select all

. /tmp/f_blahblahblah

It is building away fine after doing that. Don't know what the final result will be, but obviously a 32bit variant can be built whether some minor teething issues with that or not. Might interest someone if we sort that out since not many such reliable and useful 32bit distros around any more. I wonder how long Void Linux will support that architecture?

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@wiak odd thing is I was thinking about trying this as a 32 bit variant to see if the build would complete!

I agree and will once a few more refinements are completed giving the 32 bit build a try so I am really glad your giving it a run.

Also I will be assembling a .xbps package with the Rox-filer 2.11 that I have now in a PFI installation of KLV-Boxer and install this version instead of the Rox in the Void Linux repo.

I have 3 fully functional DELL desktop towers that are 32 bit only I can swap the aging Tahr-6.0.5 and Bionic32 out of to bring these back on line.

Also want to see how it would stack up against peebee's VoidPup32

Also from peebee:

Current plans are that NoblePup32 will be that last UPup32 release as building 32-bit Pups from Ubuntu+Debian components is becoming increasingly difficult. There will not be an OracularPup32.

viewtopic.php?p=129491#p129491

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

I think the 32bit build is going to work okay. Not finished yet and time for bed, but the plug file is currently installing 32bit version of Firefox-129-xx.

EDIT: I suspect the initial failure may be to do with you using straight xbps-install commands. I found that can sometimes fail if network error or Void repo issue. Instead I found this way is much more reliable:

Code: Select all

echo base-minimal ncurses-base file \
| xargs -n1 xbps-install -Syu

The reason this works more reliably is that if any package is missing in the list being processed it doesn't matter - the build will continue. If you use straight xbps-install with a line of packages and one fails to download and install (e.g. no longer in Void repo) that build breaks thereafter.

Might not be related to the minor problem I encountered but worth bearing in mind for future f_plugs.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 7038
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3159 times
Been thanked: 2941 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by rockedge »

@wiak I have been meaning to switch over to this syntax after seeing how @Sofiya's PLUG and system assembly scripts are set up.

User avatar
wiak
Posts: 4311
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1296 times
Contact:

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by wiak »

rockedge wrote: Fri Aug 23, 2024 2:35 pm

@wiak I have been meaning to switch over to this syntax after seeing how @Sofiya's PLUG and system assembly scripts are set up.

Yes I was pleased to see that Sofiya had adopted the method - saves a lot of potential grief.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Sofiya
Posts: 2475
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1532 times
Been thanked: 1691 times

Re: Reactivated KLV-Boxer, a KLV with a JWM Desktop

Post by Sofiya »

KLV-Boxer-rc4

It's missing " rsync " and " dialog " for ( save2flash )

Attachments
Screenshot.png
Screenshot.png (149.54 KiB) Viewed 1707 times

KL-Linux https://sofijacom.github.io
KL LINUX Simple fast free

Post Reply

Return to “KL-Dev_Work”