debian/fixes

This commit is contained in:
Marc Beninca 2021-12-04 18:57:21 +01:00
parent cf86741fde
commit 9fe4785194

View file

@ -25,16 +25,16 @@ critical base packages
decide the desired type of system decide the desired type of system
--------------------------------- ---------------------------------
* will the system run * will the system run
* 64 bits? * 64 bits?
* 32 bits? * 32 bits?
* both? * both?
* will the system be run by * will the system be run by
* a physical machine? * a physical machine?
* a virtual machine? * a virtual machine?
* a container? * a container?
* a container inside a virtual machine? * a container inside a virtual machine?
* will the system be stored * will the system be stored
* read-write, as a file system on a dedicated partition? * read-write, as a file system on a dedicated partition?
* read-only, as a single file loaded in RAM at boot time? * read-only, as a single file loaded in RAM at boot time?
@ -57,7 +57,7 @@ prepare the system's directory
------------------------------ ------------------------------
* become root * become root
* make a directory and step into it * make root directory
.. code:: shell .. code:: shell
@ -65,8 +65,7 @@ prepare the system's directory
.. code:: shell .. code:: shell
mkdir -p "path" mkdir '/squashfs-root'
cd "path"
generate the minimal base generate the minimal base
------------------------- -------------------------
@ -74,16 +73,55 @@ generate the minimal base
.. code:: shell .. code:: shell
debootstrap \ debootstrap \
--arch="amd64" \ --arch 'amd64' \
--include="locales,apt-utils,dialog" \ --variant 'minbase' \
--variant="minbase" \ --include 'locales,apt-utils,dialog' \
"stretch" \ 'bullseye' \
. \ '/squashfs-root' \
"miroir" 'https://deb.debian.org/debian'
Configure preinstalled packages Configure preinstalled packages
=============================== ===============================
define default locale
---------------------
* etc/default/locale
::
LANG='en_US.UTF-8'
LANGUAGE='en_US:en'
LC_CTYPE='fr_FR.UTF-8'
LC_NUMERIC='fr_FR.UTF-8'
LC_TIME='fr_FR.UTF-8'
LC_COLLATE='fr_FR.UTF-8'
LC_MONETARY='fr_FR.UTF-8'
LC_MESSAGES='en_US.UTF-8'
LC_PAPER='fr_FR.UTF-8'
LC_NAME='fr_FR.UTF-8'
LC_ADDRESS='fr_FR.UTF-8'
LC_TELEPHONE='fr_FR.UTF-8'
LC_MEASUREMENT='fr_FR.UTF-8'
LC_IDENTIFICATION='fr_FR.UTF-8'
define locales to generate
--------------------------
* etc/locale.gen
::
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
generate locales
----------------
.. code:: shell
locale-gen
define default keyboard layouts define default keyboard layouts
------------------------------- -------------------------------
@ -97,35 +135,6 @@ define default keyboard layouts
XKBOPTIONS="" XKBOPTIONS=""
BACKSPACE="guess" BACKSPACE="guess"
define default locales to generate
----------------------------------
* etc/default/locale
::
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
* etc/locale.gen
::
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
[configure command shell](../bash/index.md) [configure command shell](../bash/index.md)
------------------------------------------- -------------------------------------------
@ -158,19 +167,13 @@ switch into context
.. code:: shell .. code:: shell
mount --bind /proc proc for f in 'dev' 'dev/pts' 'proc' 'sys' ; do
mount --bind /sys sys mount --bind "/${f}" "/squashfs-root/${f}"
chroot . done
chroot '/squashfs-root'
.. todo:: /dev .. todo:: /dev
generate locales
----------------
.. code:: shell
locale-gen
define root password define root password
-------------------- --------------------
@ -225,8 +228,8 @@ systemd-sysv sans quoi le système ne démarrera pas complètement
.. code:: shell .. code:: shell
apt-get install -t stretch-backports "linux-image-amd64" apt-get install -t stretch-backports 'linux-image-amd64'
apt-get install "live-boot" apt-get install 'live-boot'
---- ----
@ -265,12 +268,13 @@ install useful packages
less nano vim \ less nano vim \
pciutils usbutils \ pciutils usbutils \
python3 \ python3 \
squashfs-tools \ squashfs-tools
.. code:: shell .. code:: shell
apt-get install -t "stretch-backports" \ apt-get install \
debootstrap \ --target-release 'bullseye-backports' \
debootstrap
install other packages install other packages
---------------------- ----------------------
@ -285,24 +289,25 @@ install other packages
properly switch back from context properly switch back from context
--------------------------------- ---------------------------------
* vider le cache d’APT * empty APT's cache
.. code:: shell .. code:: shell
apt-get clean apt-get clean
* s’extraire de l’environnement * exit the environment
.. code:: shell .. code:: shell
exit exit
* démonter les liens au système hôte * untie links to host system
.. code:: shell .. code:: shell
umount sys for f in 'sys' 'proc' 'dev/pts' 'dev' ; do
umount proc umount --lazy "/squashfs-root/${f}"
done
clean up commands history clean up commands history
------------------------- -------------------------
@ -319,4 +324,9 @@ Archive prepared file system
.. code:: shell .. code:: shell
mksquashfs . "../name.squashfs" -comp "xz" mksquashfs \
'/squashfs-root' \
'filesystem.squashfs' \
-b '1m' \
-comp 'zstd' \
-Xcompression-level 22