Browse Source

Init stable release

master
Cyril CONSTANTIN 2 weeks ago
parent
commit
b14f08536f
  1. 471
      customize_iso.sh
  2. 67
      firmware.sh
  3. 58
      lfs.sh
  4. 9
      lfs32.conf
  5. 9
      lfs64.conf
  6. 58
      preseed.cfg
  7. 94
      preseedvmlfs.cfg
  8. 10
      wanted-lfs.txt
  9. 283
      wanted-station.txt
  10. 282
      wanted.txt

471
customize_iso.sh

@ -1,41 +1,6 @@
#!/bin/bash #!/bin/bash
release=${1%-netinst.iso} SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
execution_directory=$(pwd)
release_name=${release}-netinst
newrelease=${release}-custom
myfiles=${HOME}/myfiles
wantedfile=${execution_directory}/wanted.txt
excludedfile=${execution_directory}/excluded.txt
# global parameters
original_iso=${execution_directory}/${release_name}.iso
newrelease_iso=${execution_directory}/${newrelease}.iso
cd "${execution_directory}" || exit 1
temp_file=/tmp/tmp_iso_directory.txt
if [ -e ${temp_file} ]
then
temp_dir=$(cat ${temp_file})
else
temp_dir=$(mktemp -d)
echo "${temp_dir}" > ${temp_file}
fi
if [ ! -e "${original_iso}" ]
then
echo "image not found : ${original_iso}"
exit 0
fi
package_list='xorriso isolinux python3-apt apt-utils python3-requests rsync wget'
# shellcheck disable=SC2086
if apt-get -s install ${package_list} |grep ^Inst
then
echo "sudo apt install ${package_list} !!!"
exit 0
fi
ask() { ask() {
USER_ANSWER="?"; USER_ANSWER="?";
@ -51,223 +16,287 @@ ask() {
fi fi
} }
if [ ! -e "${wantedfile}" ] check_tools()
then {
cat > "${wantedfile}" <<EOF package_list='xorriso isolinux python3-apt apt-utils python3-requests rsync wget'
# shellcheck disable=SC2086
if apt-get -s install ${package_list} |grep ^Inst
then
echo "Some tools are needed :"
echo "apt install ${package_list}"
exit 0
fi
}
check_tools
usage() {
cat <<EOF
Upgrade an existant official debian iso to last revision.
options:
-c|--configfile Specify a config file
-h|--help Show this message.
-i|--isofile Isofile to upgrade
-o|--offline Build a offline capable iso
-v Show more output.
Configfile contents example:
ISOFILE=$HOME/debian-13.0.0-amd64-netinst.iso
PRESEED=$HOME/preseed.cfg
NEWFLAVOR=custom
MYFILES=$HOME/myfiles
WANTED=$HOME/wanted.txt
SUGGESTED=false
POPCON=false
EXTRA_SCRIPT=$HOME/mycustom.sh
OFFLINE=1
EOF
}
main() {
cd "$SCRIPT_DIR" || exit 1
ISOFILE=""
VERBOSITY=0
OFFLINE=0
while [[ $# -gt 0 ]]; do
case $1 in
-c|--configfile)
CONFIGFILE=$2
[[ -z ${CONFIGFILE} ]] && echo "missing argument $1" && exit 1
if [ -e "${CONFIGFILE}" ]
then
# shellcheck source=/dev/null
source "${CONFIGFILE}"
else
echo "ERROR: specified configfile not found"*
exit 1
fi
shift
shift
;;
-h|--help)
usage
exit 0
;;
-i|--isofile)
ISOFILE=$2
[[ -z ${ISOFILE} ]] && echo "missing argument $1" && exit 1
shift
shift
;;
-o|--offline)
OFFLINE=1
shift
;;
-v|--verbose)
VERBOSITY=1
shift
;;
*)
echo "ERROR: unknown option: $1"
usage
exit 1
;;
esac
done
# default initialisation of vars
preseed=${PRESEED:-${SCRIPT_DIR}/preseed.cfg}
newflavor=${NEWFLAVOR:-custom}
myfiles=${MYFILES:-${HOME}/myfiles}
wantedfile=${WANTED:-${HOME}/wanted.txt}
excludedfile=${EXCLUDED:-${SCRIPT_DIR}/excluded.txt}
extra_script=${EXTRA_SCRIPT:-${HOME}/mycustom.sh}
# debian-13.0.0-amd64-netinst.iso
bnfile=$(basename "${ISOFILE}")
distribution=$( echo "${bnfile}" |cut --delimiter='-' --fields=1 )
majorversion=$( echo "${bnfile}" |cut --delimiter='-' --fields=2 |cut --delimiter='.' --fields=1 )
minorversion=$( echo "${bnfile}" |cut --delimiter='-' --fields=2 |cut --delimiter='.' --fields=2 )
incrementalversion=$( echo "${bnfile}" |cut --delimiter='-' --fields=2 |cut --delimiter='.' --fields=3 )
architecture=$( echo "${bnfile}" |cut --delimiter='-' --fields=3)
# flavor=$( echo "${bnfile}" |cut --delimiter='-' --fields=4 |cut --delimiter='.' --fields=1 )
# extension=$( echo "${bnfile}" |cut --delimiter='-' --fields=4 |cut --delimiter='.' --fields=2 )
destination=${distribution}-${majorversion}.${minorversion}.${incrementalversion}-${architecture}-${newflavor}.iso
if [ ! -e "${ISOFILE}" ]
then
echo "image not found : ${ISOFILE}"
exit 1
fi
if [ ! -e "${wantedfile}" ]
then
cat > "${wantedfile}" <<EOF
local-apt-repository local-apt-repository
rsync rsync
EOF EOF
fi fi
if [ ! -e "${excludedfile}" ] if [ ! -e "${excludedfile}" ]
then then
cat > "${excludedfile}" <<EOF cat > "${excludedfile}" <<EOF
gdm3 gdm3
chromium chromium
firefox firefox
EOF EOF
fi fi
echo "##### extracting iso"
if [ ! -e "${temp_dir}"/md5sum.txt ]
then
echo "extracting iso to ${temp_dir}"
xorriso -osirrox on -indev "${original_iso}" -extract / "${temp_dir}"
chmod -R +w "${temp_dir}"
fi
echo "##### myfiles generation" # create working dir (iso loop in /tmp)
if ask "populating myfiles with download_myfiles.py ?" temp_file=/tmp/tmp_iso_directory.txt
then if [ -e ${temp_file} ]
mkdir -p ~/myfiles
if ! python3 download_myfiles.py --isodir "${temp_dir}"
then then
echo "myfiles generation failure !!!" temp_dir=$(cat ${temp_file})
exit 1 else
temp_dir=$(mktemp -d)
echo "${temp_dir}" > ${temp_file}
fi fi
fi
echo "##### myfiles generation" echo "##### extracting iso"
if ask "populating myfiles with custom files ?" if [ ! -e "${temp_dir}"/md5sum.txt ]
then
mkdir -p ~/myfiles/zips
if [ ! -e ~/myfiles/zips/gnirehtet-java-v2.5.1.zip ]
then then
cd ~/myfiles/zips/ && wget https://github.com/Genymobile/gnirehtet/releases/download/v2.5.1/gnirehtet-java-v2.5.1.zip echo "extracting iso to ${temp_dir}"
xorriso -osirrox on -indev "${ISOFILE}" -extract / "${temp_dir}"
chmod -R +w "${temp_dir}"
fi fi
if [ ! -e ~/myfiles/zips/dvb-firmware-osmc.zip ]
if [ ! -d "${myfiles}" ]
then then
cd ~/myfiles/zips/ && wget https://github.com/osmc/dvb-firmware-osmc/archive/refs/heads/master.zip --output-document=dvb-firmware-osmc.zip mkdir -p "${myfiles}"
fi fi
if [ ! -e ~/myfiles/zips/alsa-firmware-1.2.4.tar.bz2 ]
echo "### download wanted packages"
if [ -e "${wantedfile}" ] && [ -e "${excludedfile}" ]
then then
cd ~/myfiles/zips/ && wget https://www.alsa-project.org/files/files/pub/firmware/alsa-firmware-1.2.4.tar.bz2 if python3 download_myfiles.py --isodir "${temp_dir}" \
--wanted "${wantedfile}" --excluded "${excludedfile}" \
--files "${myfiles}" --quiet
then
echo "### myfiles generation ok"
else
echo "### myfiles generation failure !!!"
exit 1
fi
else
echo "download_myfiles.py disabled"
fi fi
if [ ! -e ~/myfiles/zips/libdvdcss-1.4.3.tar.bz2 ]
echo "### add extra script content"
if [ -e "${extra_script}" ]
then then
cd ~/myfiles/zips/ && wget https://download.videolan.org/pub/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2 eval "$(cat "${extra_script}")"
fi fi
fi
#https://gitlab.com/Dark-Sky/rpi-linux-udl/-/blob/master/firmware/dvb-usb-dibusb-6.0.0.8.fw
#https://github.com/osmc/dvb-firmware-osmc/blob/master/dvb-usb-dibusb-6.0.0.8.fw
#https://github.com/osmc/dvb-firmware-osmc/archive/refs/heads/master.zip
echo "generate preseed.cfg"
cat > /tmp/preseed.cfg <<"EOF"
#_preseed_V1
### Locale configuration
d-i debian-installer/language string fr
d-i debian-installer/country string FR
d-i debian-installer/locale select fr_FR.UTF-8
d-i keyboard-configuration/xkb-keymap select fr(latin9)
#d-i keyboard-configuration/toggle select No toggling
d-i keyboard-configuration/layoutcode string fr
d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/variantcode string latin9
### Network configuration
d-i netcfg/enable boolean false
### account configuration
#d-i passwd/root-password-crypted password [$6$tYi0kNPyvi45IWqW$vOvUycJFPqZhg.N.g7wNZ96UriyvrxoumTuWpRD0OoRp47iuqGfvICxNrsVE0IRHaTs.KkU/btWqJYdetRlpE1]
#d-i passwd/user-fullname string Cyril CONSTANTIN
#d-i passwd/username string constcyr
#d-i passwd/user-password-crypted password [$6$tYi0kNPyvi45IWqW$vOvUycJFPqZhg.N.g7wNZ96UriyvrxoumTuWpRD0OoRp47iuqGfvICxNrsVE0IRHaTs.KkU/btWqJYdetRlpE1]
#d-i passwd/user-uid string 1000
#d-i passwd/user-default-groups string audio cdrom video
### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
#d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
#d-i clock-setup/ntp-server string ntp.example.com
### Partitioning
### Base system installation
### Apt setup
d-i apt-setup/use_mirror boolean false
apt-cdrom-setup apt-setup/cdrom/set-next boolean false
### Package selection
popularity-contest popularity-contest/participate boolean false
EOF
cat > "${myfiles}"/libdvdcss2.README <<"EOF"
libdvd-pkg: Downloading orig source...
I: libdvdcss_1.4.3
/usr/bin/wget --tries=3 --timeout=40 --read-timeout=40 --continue -O libdvdcss_1.4.3.orig.tar.bz2 \
https://download.videolan.org/pub/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2 \
|| /usr/bin/uscan --noconf --verbose --rename --destdir=/usr/src/libdvd-pkg --check-dirname-level=0 --force-download --download-current-version /usr/share/libdvd-pkg/debian
--2026-01-02 21:06:57-- https://download.videolan.org/pub/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2
Résolution de download.videolan.org (download.videolan.org)… 213.36.253.2, 2a01:e0d:1:3:58bf:fa02:c0de:5
Connexion à download.videolan.org (download.videolan.org)|213.36.253.2|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille: 388404 (379K) [application/octet-stream]
Sauvegarde en: «libdvdcss_1.4.3.orig.tar.bz2»
libdvdcss_1.4.3.orig.tar.bz2 100%[==============================================================>] 379,30K 725KB/s ds 0,5s
2026-01-02 21:06:58 (725 KB/s) — «libdvdcss_1.4.3.orig.tar.bz2» sauvegardé [388404/388404]
EOF
cat > "${myfiles}"/cs46xx.README <<"EOF" if [[ ${OFFLINE} -gt 0 ]]
# not included then
apt install alsa-utils if ! grep local-apt-repository "${wantedfile}"
tar xvf alsa-firmware-1.2.4.tar.bz2 then
cd alsa-firmware-1.2.4/cs46xx echo "ERROR: local-apt-repository is required in wanted file for offline mode"
mkdir /lib/firmware/cs46xx exit 1
cp ba1 cwc4630 cwcasync cwcbinhack cwcdma cwcsnoop /lib/firmware/cs46xx else
modprobe -r snd-cs46xx cat > ${myfiles}/local-apt-repository.sh <<"EOEF"
modprobe snd-cs46xx #!/usr/bin/env bash
adduser yourusername audio echo "### Activate apt cdrom"
alsamixer : demute sed --expression "s/^[#]*deb cdrom:/deb [trusted=yes] cdrom:/" /etc/apt/sources.list
aplay /usr/share/sounds/alsa/Noise.wav sed --expression="s/^[#]*deb cdrom:/deb [trusted=yes] cdrom:/" --in-place /etc/apt/sources.list
speaker-test -t sine -f 440 -c 2 echo "### Prepare for local-apt-repository usage"
speaker-test -t wav -c 2 local_apt_repository=/srv/local-apt-repository
source_directory=/media/cdrom0
original_list=/tmp/original_list.txt
cat > ${original_list} <<EOF
EOF EOF
mkdir -p "${local_apt_repository}"
cat > "${myfiles}"/local-apt-repository.sh <<"EOF" find ${source_directory} -name Packages.gz
#!/bin/bash while IFS= read -r -d '' gzlist
help() do
{ echo "### Scan ${gzlist}"
echo "rsync and local-apt-repository packages are mandatory" zgrep pool "${gzlist}" | cut --delimiter=' ' --fields=2 >> ${original_list}
} done < <(find ${source_directory} -name Packages.gz -print0)
if [[ -n $(find "$(pwd)" -name "rsync*deb") ]] pushd ${source_directory} || return 1
then while IFS= read -r -d '' packagepath
find "$(pwd)" -name "rsync*deb" -exec dpkg -i {} \; do
else if ! grep "^${packagepath}$" ${original_list}
help then
fi echo "### Package $(basename "${packagepath}") not in original cd. Copy in /local-apt-repository."
if [[ -n $(find "$(pwd)" -name "local-apt-repository*deb") ]] mkdir --parents --verbose ${local_apt_repository}/"$(dirname "${packagepath}")"
then cp --verbose "${packagepath}" ${local_apt_repository}"/$(dirname "${packagepath}")"/"$(basename "${packagepath}")"
find "$(pwd)" -name "local-apt-repository*deb" -exec dpkg -i {} \; fi
else done < <(find pool -name "*.deb" -print0)
help popd || return 1
fi apt --yes install "$(find ${local_apt_repository} -name "local-apt-repository*.deb")"
mkdir /srv/local-apt-repository apt clean
mkdir /srv/zips
rsync --recursive "$(pwd)"/pool /srv/local-apt-repository/
rsync --recursive "$(pwd)"/firmware /srv/local-apt-repository/
rsync --recursive "$(pwd)"/zips/ /srv/zips
apt update apt update
EOF apt upgrade
EOEF
fi
fi
cat > "${myfiles}"/README.custom <<"EOF" cat > "${myfiles}"/README.custom <<"EOF"
You can add package under <cdrom> or <disk> with dpkg e.g. ===
# find /mnt/cdrom0 -name "rsync*.deb" -exec dpkg -i {} \; In offline mode,
But you have to install dependencies one by one as the same method. Mount cdrom ( mount /dev/sr0 )
And execute local-apt-repository.sh
The most convenient is to execute : ===
# mount <installation_device>
# cd <installation_device>
# bash local-apt-repository.sh
It copy all packages into /srv/local-apt-repository and populate apt with all package
Check you have enough space on /srv before (size of the disk/iso).
Start the systemd service
# systemctl start local-apt-repository.service
Check after one or two minutes with
# apt list
And you can install them
# apt install tmux
EOF EOF
if ask "customize installer (add preseed and modify installation option) ?"
then
chmod -R +w "${temp_dir}" chmod -R +w "${temp_dir}"
cp -v /tmp/preseed.cfg "${temp_dir}"/preseed.cfg
# sed -e "s#quiet#priority=high locale=fr_FR.UTF-8 keymap=fr file=/cdrom/preseed.cfg#" ${temp_dir}/isolinux/txt.cfg
# sed -i -e "s#quiet#priority=high locale=fr_FR.UTF-8 keymap=fr file=/cdrom/preseed.cfg#" ${temp_dir}/isolinux/txt.cfg
sed -e "s#quiet#file=/cdrom/preseed.cfg#" "${temp_dir}"/isolinux/txt.cfg
sed -i -e "s#quiet#file=/cdrom/preseed.cfg#" "${temp_dir}"/isolinux/txt.cfg
fi
rsync --dry-run --verbose --recursive "${myfiles}"/ "${temp_dir}" echo "### customize initrd with preseed"
if ask "copy additionnal packages ?" if [ -e "${preseed}" ]
then then
# cpio on "out mode" don't allow to rename/basename file on the fly
# so we need to put the file somewhere with the target name
# and go (pushd) to the directoy considered as root (/) of the initrd
cp --verbose "${preseed}" /tmp/preseed.cfg
pushd /tmp || return 1
case $(uname -m) in
i686)
echo "### Detected install.386"
gunzip --verbose "${temp_dir}/install.386/initrd.gz"
echo preseed.cfg | cpio --format=newc --create --append --verbose --file="${temp_dir}"/install.386/initrd
gzip --verbose "${temp_dir}"/install.386/initrd
ls -l "${temp_dir}"/install.386/initrd.gz
;;
x86_64)
echo "### Detected install.amd"
gunzip --verbose "${temp_dir}/install.amd/initrd.gz"
echo preseed.cfg | cpio --format=newc --create --append --verbose --file="${temp_dir}"/install.amd/initrd
gzip --verbose "${temp_dir}"/install.amd/initrd
ls -l "${temp_dir}"/install.amd/initrd.gz
;;
*)
echo "Platform not implemented"
exit 1
;;
esac
popd || return 1
fi
echo "### Add content of myfiles"
rsync --verbose --recursive "${myfiles}"/ "${temp_dir}" rsync --verbose --recursive "${myfiles}"/ "${temp_dir}"
# echo "Generate Release file"
# apt-ftparchive \
# -o "APT::FTPArchive::Release::Origin=local-apt-repository" \
# -o "APT::FTPArchive::Release::Description=Local APT repository" \
# release ${custom_dir} > ${custom_dir}/Release
fi
# Final steps echo "### Calculate md5sum.txt"
# Calculate md5 and generate iso chmod +w "${temp_dir}"/md5sum.txt
pushd "${temp_dir}" || return 1
find . -follow -type f ! -name "md5sum.txt" -print0 | xargs -0 md5sum > md5sum.txt
popd || return 1
chmod -R -w "${temp_dir}"
echo "calculate md5sum.txt" echo "### Create iso"
chmod +w "${temp_dir}"/md5sum.txt xorriso -as mkisofs -o "${destination}" \
cd "${temp_dir}" && find . -follow -type f ! -name "md5sum.txt" -print0 | xargs -0 md5sum > md5sum.txt -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
chmod -R -w "${temp_dir}" -c isolinux/boot.cat -b isolinux/isolinux.bin \
-no-emul-boot -boot-load-size 4 \
-boot-info-table "${temp_dir}"
cd "${HOME}" || exit 1 }
if ask "generate final iso ?" if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
then main "$@"
xorriso -as mkisofs -o "${newrelease_iso}" \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot \
-boot-load-size 4 -boot-info-table "${temp_dir}"
fi fi
echo "=== End of script ==="
exit 0

67
firmware.sh

@ -0,0 +1,67 @@
#!/bin/bash
myfiles=$HOME/myfiles
myzipfiles=$HOME/myfiles/zips
if [ ! -d "${myzipfiles}" ]
then
mkdir -p "${myzipfiles}"
fi
# all the content of the directory "myfiles" will be added to iso
if [ ! -e "${myzipfiles}"/gnirehtet-java-v2.5.1.zip ]
then
pushd "${myzipfiles}" || return 1
wget https://github.com/Genymobile/gnirehtet/releases/download/v2.5.1/gnirehtet-java-v2.5.1.zip
popd || return 1
fi
if [ ! -e "${myzipfiles}"/dvb-firmware-osmc.zip ]
then
pushd "${myzipfiles}" || return 1
wget https://github.com/osmc/dvb-firmware-osmc/archive/refs/heads/master.zip --output-document=dvb-firmware-osmc.zip
popd || return 1
fi
if [ ! -e "${myzipfiles}"/alsa-firmware-1.2.4.tar.bz2 ]
then
pushd "${myzipfiles}" || return 1
wget https://www.alsa-project.org/files/files/pub/firmware/alsa-firmware-1.2.4.tar.bz2
popd || return 1
fi
if [ ! -e "${myzipfiles}"/libdvdcss-1.4.3.tar.bz2 ]
then
pushd "${myzipfiles}" || return 1
wget https://download.videolan.org/pub/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2
popd || return 1
fi
cat > "${myfiles}"/libdvdcss2.README <<"EOF"
libdvd-pkg: Downloading orig source...
I: libdvdcss_1.4.3
/usr/bin/wget --tries=3 --timeout=40 --read-timeout=40 --continue -O libdvdcss_1.4.3.orig.tar.bz2 \
https://download.videolan.org/pub/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2 \
|| /usr/bin/uscan --noconf --verbose --rename --destdir=/usr/src/libdvd-pkg --check-dirname-level=0 --force-download --download-current-version /usr/share/libdvd-pkg/debian
--2026-01-02 21:06:57-- https://download.videolan.org/pub/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2
Résolution de download.videolan.org (download.videolan.org)… 213.36.253.2, 2a01:e0d:1:3:58bf:fa02:c0de:5
Connexion à download.videolan.org (download.videolan.org)|213.36.253.2|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille: 388404 (379K) [application/octet-stream]
Sauvegarde en: «libdvdcss_1.4.3.orig.tar.bz2»
libdvdcss_1.4.3.orig.tar.bz2 100%[==============================================================>] 379,30K 725KB/s ds 0,5s
2026-01-02 21:06:58 (725 KB/s) — «libdvdcss_1.4.3.orig.tar.bz2» sauvegardé [388404/388404]
EOF
cat > "${myfiles}"/cs46xx.README <<"EOF"
# not included
apt install alsa-utils
tar xvf alsa-firmware-1.2.4.tar.bz2
cd alsa-firmware-1.2.4/cs46xx
mkdir /lib/firmware/cs46xx
cp ba1 cwc4630 cwcasync cwcbinhack cwcdma cwcsnoop /lib/firmware/cs46xx
modprobe -r snd-cs46xx
modprobe snd-cs46xx
adduser yourusername audio
alsamixer : demute
aplay /usr/share/sounds/alsa/Noise.wav
speaker-test -t sine -f 440 -c 2
speaker-test -t wav -c 2
EOF

58
lfs.sh

@ -0,0 +1,58 @@
#!/usr/bin/env bash
cp --verbose --recursive "${HOME}"/lfs_archives_13_0 "${HOME}"/myfiles/
cat > "${HOME}"/myfiles/lfs-postinstall.sh <<"EOPF"
#!/usr/bin/env bash
if ! dpkg -l |grep local-apt-repository
then
echo "ERROR: execute local-apt-repository.sh first"
fi
if ! mount |grep cdrom
then
mount /dev/sr0
fi
if ! mount |grep cdrom
then
echo "ERROR: insert cdrom"
exit 1
fi
cat > /etc/sudoers.d/lfs <<"EOF"
lfs ALL = NOPASSWD: /usr/bin/chown * /mnt/lfs*
lfs ALL = NOPASSWD: /usr/bin/mount * /mnt/lfs*
lfs ALL = NOPASSWD: /usr/bin/install * /mnt/lfs*
lfs ALL = NOPASSWD: /usr/sbin/chroot /mnt/lfs*
EOF
apt --yes install texinfo m4 bison gawk make patch python3 xz-utils gcc g++ build-essential
mv --verbose /etc/bash.bashrc /etc/bash.bashrc.NOUSE
cat > /home/lfs/.lfsbuild_config <<"EOCF"
# build directory
LFS=/mnt/lfs
# location of local package sources
LFS_PACKAGE_DIR=/media/cdrom0/lfs_archives_13_0
# Number of processors to use
LFS_NPROC=1
# Bypass step by step validation until a breakpoint
LFS_BREAKPOINT=110300
# strip binaries or not
LFS_STRIP_BINARIES=true
# bypass network config validation by taking network config from host
LFS_NETWORKSAMEASHOST=true
# bypass network configuration for full offline build
LFS_NETWORKOFFLINE=true
# bypass linux config validation by taking linux config from host
LFS_LINUXCONFIGPROVIDED=true
EOCF
chown lfs:lfs /home/lfs/.lfsbuild_config
find /home/lfs/lfs_archives_13_0/ -name "cclfs*.tar.gz" -exec tar --extract --gunzip --file={} --directory=/home/lfs/ \;
EOPF

9
lfs32.conf

@ -0,0 +1,9 @@
ISOFILE=$HOME/debian-12.14.0-i386-netinst.iso
PRESEED=$HOME/preseedvmlfs.cfg
NEWFLAVOR=vmlfs
MYFILES=$HOME/myfiles
WANTED=$HOME/wanted-lfs.txt
SUGGESTED=false
POPCON=false
EXTRA_SCRIPT=$HOME/lfs.sh
OFFLINE=1

9
lfs64.conf

@ -0,0 +1,9 @@
ISOFILE=$HOME/debian-13.5.0-amd64-netinst.iso
PRESEED=$HOME/preseedvmlfs.cfg
NEWFLAVOR=vmlfs
MYFILES=$HOME/myfiles
WANTED=$HOME/wanted-lfs.txt
SUGGESTED=false
POPCON=false
EXTRA_SCRIPT=$HOME/lfs.sh
OFFLINE=1

58
preseed.cfg

@ -0,0 +1,58 @@
#_preseed_V1
### Locale configuration
d-i debian-installer/locale string fr_FR.UTF-8
d-i debian-installer/language string fr
d-i debian-installer/country string FR
d-i keyboard-configuration/xkb-keymap select fr(latin9)
#d-i keyboard-configuration/toggle select No toggling
d-i keyboard-configuration/layoutcode string fr
d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/variantcode string latin9
### Network configuration
d-i netcfg/enable boolean false
### account configuration
d-i passwd/root-password password P@ssw0rd
d-i passwd/root-password-again password P@ssw0rd
d-i passwd/username string lfs
d-i passwd/user-uid string 1000
#d-i passwd/user-default-groups string audio cdrom video
### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
#d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
#d-i clock-setup/ntp-server string ntp.example.com
### Partitioning
### Base system installation
### Apt setup
d-i apt-setup/use_mirror boolean false
apt-cdrom-setup apt-setup/cdrom/set-next boolean false
# URL to the public key of the local repository; you must provide a key or
# apt will complain about the unauthenticated repository and so the
# sources.list line will be left commented out.
#d-i apt-setup/local0/key string http://local.server/key
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated boolean true
### Package selection
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
d-i pkgsel/include string openssh-server build-essential
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
#d-i pkgsel/upgrade select none
popularity-contest popularity-contest/participate boolean false
### Boot loader installation
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh

94
preseedvmlfs.cfg

@ -0,0 +1,94 @@
#_preseed_V1
### Locale configuration
d-i debian-installer/locale string fr_FR.UTF-8
#d-i debian-installer/language string fr
#d-i debian-installer/country string FR
d-i keyboard-configuration/xkb-keymap select fr(latin9)
#d-i keyboard-configuration/toggle select No toggling
d-i keyboard-configuration/layoutcode string fr
d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/variantcode string latin9
### Network configuration
d-i netcfg/enable boolean false
# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
#d-i netcfg/hostname string somehost
### account configuration
d-i passwd/root-password password shadow
d-i passwd/root-password-again password shadow
d-i passwd/user-fullname string lfs
d-i passwd/username string lfs
d-i passwd/user-uid string 1000
d-i passwd/user-password password shadow
d-i passwd/user-password-again password shadow
#d-i passwd/user-default-groups string audio cdrom video
### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
#d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
#d-i clock-setup/ntp-server string ntp.example.com
### Partitioning
d-i partman-auto/method string regular
d-i partman-auto/disk string /dev/vda
d-i partman-auto/expert_recipe string \
root-lfs :: \
3000 4000 5000 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
label{ debian } \
. \
10000 30000 100000 ext4 \
$primary{} \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /mnt/lfs } \
label{ lfs } \
. \
512 1000 1500 linux-swap \
method{ swap } format{ } \
.
#d-i partman-partitioning/confirm_write_new_label boolean true
#d-i partman/choose_partition select finish
#d-i partman/confirm boolean true
#d-i partman/confirm_nooverwrite boolean true
### Base system installation
### Apt setup
d-i apt-setup/use_mirror boolean false
d-i apt-setup/cdrom/set-first boolean false
d-i apt-cdrom-setup apt-setup/cdrom/set-next boolean false
d-i apt-cdrom-setup apt-setup/disable-cdrom-entries boolean false
# URL to the public key of the local repository; you must provide a key or
# apt will complain about the unauthenticated repository and so the
# sources.list line will be left commented out.
#d-i apt-setup/local0/key string http://local.server/key
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated boolean true
d-i base-installer/install-recommends boolean false
### Package selection
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
d-i pkgsel/include string sudo openssh-server
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select none
popularity-contest popularity-contest/participate boolean false
### Boot loader installation
# Grub is the boot loader (for x86).
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/vda
### Post install
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
# d-i preseed/late_command string apt-install sudo build-essential gawk texinfo

10
wanted-lfs.txt

@ -0,0 +1,10 @@
local-apt-repository
build-essential
bison
m4
gawk
texinfo
gcc
g++
qemu-guest-agent
gpm

283
wanted-station.txt

@ -0,0 +1,283 @@
abs-guide
acpi-fakekey
acpi-support
alsa-utils
anacron
apt-doc
autoconf
automake
bash-completion
bash-doc
beep
bettercap
binfmt-support
bison
bison-doc
bluemon
bluetooth
bluez-alsa-utils
bluez-firmware
bluez-hcidump
bluez-meshd
bluez-obexd
bluez-source
bluez-test-scripts
bluez-test-tools
bluez-tools
bmon
bpfmon
bsdextrautils
btop
btscanner
build-essential
busybox
busybox-static
bzip2-doc
bwm-ng
ca-certificates
care
cbm
cdrkit-doc
chrony
clang-tools-19
connman
connman-dev
connman-vpn
conserver-client
conserver-server
console-common
console-data
convlit
cpipe
cpp-12-doc
cpustat
debconf-utils
debian-faq
debian-handbook
debian-installer
debian-installer-12-netboot-amd64
debian-installer-12-netboot-armhf
debian-installer-12-netboot-i386
debian-kernel-handbook
debian-policy
debian-reference
debian-reference-fr
debtags
default-jdk-headless
detox
developers-reference
developers-reference-fr
direvent
dlocate
dmidecode
dnsmasq
dnsmasq-base
dns-root-data
doc-debian
dosfstools
dpkg
ed
emacs-common-non-dfsg
emacs-nox
ethstatus
ethtool
exfatprogs
fakeroot
fancontrol
farpd
fbcat
fbi
fdisk
firewalld
firmware-atheros
firmware-iwlwifi
firmware-misc-nonfree
firmware-realtek
firmware-realtek-rtl8723cs-bt
flashrom
flex
flex-doc
forkstat
fortran95-compiler
fspy
gawk
gcc-12-doc
gcc-doc
gdb
gdb-doc
gdbserver
genisoimage
gfortran
gfortran-12-doc
gfortran-12-multilib
git
git-doc
git-svn
glibc-doc
gnupg
gpm
groff-base
grub-common
grub-pc
grub-pc-bin
grub2-common
gsasl-common
horst
htop
hwinfo
i2c-tools
installation-guide-i386
ioping
iotop
iotop-c
ipband
iperf3
iproute2
iproute2-doc
ipset
iptotal
iptraf-ng
ir-keytable
iwd
kpcli
krb5-doc
linux-doc
linux-image-686-pae
linux-libc-dev
linux-source
lirc
llvm-13-dev
llvm-14-dev
llvm-15-dev
llvm-16-dev
llvm-19-dev
lm-sensors
local-apt-repository
locate
logrotate
low-memory-monitor
low-memory-monitor-doc
lshw
lsof
lynx
m4
m4-doc
mailcap
mailutils
manpages
manpages-fr
mc
memtest86+
modemmanager
modemmanager-dev
modemmanager-doc
mutt
ncdu
ncftp
ncurses-examples
ncurses-term
netcat-openbsd
netplug
netproc
nfs-common
nfstrace
nfstrace-doc
nftables
nload
ntfs-3g
nyx
obexfs
obexftp
obfs4proxy
onionprobe
oomd
openssh-server
openssl
openssl-provider-legacy
packit
pagemon
parted
pcapfix
pmount
polkitd-pkla
powermgmt-base
ppp
pulseaudio
pxelinux
python3.11-doc
python3-bleak
python3-bluez
python3-brotli
python3-cap-ng
python3-crccheck
python3-cryptography
python3-doc
python3-fastimport
python3-github
python3-gpg
python3-invoke
python3-json-pointer
python3-keyring
python3-launchpadlib
python3-openssl
python3-paramiko
python3-requests-oauthlib
python3-socks
python-bleak-doc
python-openssl-doc
python-requests-doc
python3-rfc3987
python3-uritemplate
python3-webcolors
qemu-guest-agent
read-edid
readline-doc
rfkill
rsync
runit-helper
s-tui
screen
sidedoor
slurm
sq
sqop
ssl-cert
ssldump
strace
sudo
supercat
syslinux-common
systemd-boot
systemd-container
systemd-resolved
tar-doc
tcpdump
testdisk
texinfo
tftpd-hpa
tmux
tor
tor-geoipdb
torsocks
traceroute
tshark
udisks2
unzip
usb.ids
usb-modeswitch
ussp-push-dbg
uvccapture
vim-doc
vim-nox
w3m
w3m-el
wajig
wget
wireless-regdb
wireless-tools
wodim
wpasupplicant
wvdial
xorriso
xz-utils
zip

282
wanted.txt

@ -1,283 +1 @@
abs-guide
acpi-fakekey
acpi-support
alsa-utils
anacron
apt-doc
autoconf
automake
bash-completion
bash-doc
beep
bettercap
binfmt-support
bison
bison-doc
bluemon
bluetooth
bluez-alsa-utils
bluez-firmware
bluez-hcidump
bluez-meshd
bluez-obexd
bluez-source
bluez-test-scripts
bluez-test-tools
bluez-tools
bmon
bpfmon
bsdextrautils
btop
btscanner
build-essential
busybox
busybox-static
bzip2-doc
bwm-ng
ca-certificates
care
cbm
cdrkit-doc
chrony
clang-tools-19
connman
connman-dev
connman-vpn
conserver-client
conserver-server
console-common
console-data
convlit
cpipe
cpp-12-doc
cpustat
debconf-utils
debian-faq
debian-handbook
debian-installer
debian-installer-12-netboot-amd64
debian-installer-12-netboot-armhf
debian-installer-12-netboot-i386
debian-kernel-handbook
debian-policy
debian-reference
debian-reference-fr
debtags
default-jdk-headless
detox
developers-reference
developers-reference-fr
direvent
dlocate
dmidecode
dnsmasq
dnsmasq-base
dns-root-data
doc-debian
dosfstools
dpkg
ed
emacs-common-non-dfsg
emacs-nox
ethstatus
ethtool
exfatprogs
fakeroot
fancontrol
farpd
fbcat
fbi
fdisk
firewalld
firmware-atheros
firmware-iwlwifi
firmware-misc-nonfree
firmware-realtek
firmware-realtek-rtl8723cs-bt
flashrom
flex
flex-doc
forkstat
fortran95-compiler
fspy
gawk
gcc-12-doc
gcc-doc
gdb
gdb-doc
gdbserver
genisoimage
gfortran
gfortran-12-doc
gfortran-12-multilib
git
git-doc
git-svn
glibc-doc
gnupg
gpm
groff-base
grub-common
grub-pc
grub-pc-bin
grub2-common
gsasl-common
horst
htop
hwinfo
i2c-tools
installation-guide-i386
ioping
iotop
iotop-c
ipband
iperf3
iproute2
iproute2-doc
ipset
iptotal
iptraf-ng
ir-keytable
iwd
kpcli
krb5-doc
linux-doc
linux-image-686-pae
linux-libc-dev
linux-source
lirc
llvm-13-dev
llvm-14-dev
llvm-15-dev
llvm-16-dev
llvm-19-dev
lm-sensors
local-apt-repository
locate
logrotate
low-memory-monitor
low-memory-monitor-doc
lshw
lsof
lynx
m4
m4-doc
mailcap
mailutils
manpages
manpages-fr
mc
memtest86+
modemmanager
modemmanager-dev
modemmanager-doc
mutt
ncdu
ncftp
ncurses-examples
ncurses-term
netcat-openbsd
netplug
netproc
nfs-common
nfstrace
nfstrace-doc
nftables
nload
ntfs-3g
nyx
obexfs
obexftp
obfs4proxy
onionprobe
oomd
openssh-server
openssl
openssl-provider-legacy
packit
pagemon
parted
pcapfix
pmount
polkitd-pkla
powermgmt-base
ppp
pulseaudio
pxelinux
python3.11-doc
python3-bleak
python3-bluez
python3-brotli
python3-cap-ng
python3-crccheck
python3-cryptography
python3-doc
python3-fastimport
python3-github
python3-gpg
python3-invoke
python3-json-pointer
python3-keyring
python3-launchpadlib
python3-openssl
python3-paramiko
python3-requests-oauthlib
python3-socks
python-bleak-doc
python-openssl-doc
python-requests-doc
python3-rfc3987
python3-uritemplate
python3-webcolors
qemu-guest-agent
read-edid
readline-doc
rfkill
rsync
runit-helper
s-tui
screen
sidedoor
slurm
sq
sqop
ssl-cert
ssldump
strace
sudo sudo
supercat
syslinux-common
systemd-boot
systemd-container
systemd-resolved
tar-doc
tcpdump
testdisk
texinfo
tftpd-hpa
tmux
tor
tor-geoipdb
torsocks
traceroute
tshark
udisks2
unzip
usb.ids
usb-modeswitch
ussp-push-dbg
uvccapture
vim-doc
vim-nox
w3m
w3m-el
wajig
wget
wireless-regdb
wireless-tools
wodim
wpasupplicant
wvdial
xorriso
xz-utils
zip
Loading…
Cancel
Save