Browse Source

correct bash for sh

master
Cyril CONSTANTIN 2 weeks ago
parent
commit
57f2f68982
  1. 41
      README.md
  2. 10
      lfs.sh

41
README.md

@ -2,10 +2,12 @@ @@ -2,10 +2,12 @@
Build an iso with all your deb favorite package and you personnal files in it. With dependencies.
## Concepts
Those scripts are intended to customise an existing debian installer iso.
The initial idea is to anticipate the end of i386 architecture ( bookworm is the last release to include this architecture ) and be able to reinstall i386 hosts in the future with the last existing release even in future (retroxxxx).
Those servers will no more have security fixes, so a local usage is recommanded.
Those servers will no more have security fixes, so a local/offline usage is recommanded.
The goals are :
@ -22,6 +24,8 @@ You may also include : @@ -22,6 +24,8 @@ You may also include :
- suggested packages of a package
- suggestions from popcon
## Requirements
It doesn't need admin rights but apt should be configured properly.
If you want to include a package in contrib, contrib must be available in sources.list.
@ -35,6 +39,8 @@ Adjust wanted.txt, excluded.txt and exclude_tags.txt to your needs. @@ -35,6 +39,8 @@ Adjust wanted.txt, excluded.txt and exclude_tags.txt to your needs.
Execute customize_iso.sh with the iso as argument.
## Internal
customize_iso.sh :
- mount iso as temp
@ -43,9 +49,11 @@ customize_iso.sh : @@ -43,9 +49,11 @@ customize_iso.sh :
- copy the downloaded packages
- generate the custom iso you can write on a disk or a usb key
You can adjust it tou your needs.
$ customize_iso.sh debian-12.12.0-i386-netinst.iso
In offline mode, the custom iso provide a script local-apt-repository.sh that automatically :
- allow install of packages from installation medium (apt-cdrom)
- install and configure local-apt-repository to install packages you added to the medium
download_myfiles.py :
@ -54,4 +62,29 @@ download_myfiles.py : @@ -54,4 +62,29 @@ download_myfiles.py :
- ask to include recommanded, suggested and popcon packages
- simulate an apt cache to integrate all dependencies
The custom iso include scripts to use local-apt-repository package after installation for a good apt experience.
The script download_myfiles.py may be used by itself if you provide the needed arguments.
You can add a preseed to automate the installation.
You can add a script to custom manually :
- add firmwares, add zips
- add scripts on the medium to automate post-installation ( add user, add files )
## Known bugs
The script **download_myfiles.py** use apt to search for dependencies. Dependencies is a complex subject, and some dependencies may give some problems : virtual packages and or_dependency.
To avoid them, don't ask for virtual packages.
And provide the or_dependency you want. But the script will continue to try to download **all** or_dependencies ...
You can refuse to install the recommanded/suggested packages you don't want or exclude them directly in the excluded file ... But yes it's a bug :( .
## Usage
You can give some arguments to the script (--help) but the most controlled usage is :
```bash
$ bash customize_iso.sh --configfile myconfigfile.conf
...
```

10
lfs.sh

@ -32,6 +32,13 @@ EOF @@ -32,6 +32,13 @@ 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
pushd /bin || return 1
if [[ $(readlink sh) =~ ^dash$ ]]
then
rm --verbose sh
ln --symbolic --verbose bash sh
fi
popd || return 1
cat > /home/lfs/.lfsbuild_config <<"EOCF"
# build directory
@ -52,7 +59,8 @@ LFS_NETWORKOFFLINE=true @@ -52,7 +59,8 @@ LFS_NETWORKOFFLINE=true
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/ \;
find /media/cdrom/lfs_archives_13_0/ -name "cclfs*.tar.gz" -exec tar --extract --gunzip --file={} --directory=/home/lfs/ \;
EOPF
Loading…
Cancel
Save