Skip to content

Commit

Permalink
docs: update instructions for basefile creation to include capabilities
Browse files Browse the repository at this point in the history
When creating the basefile via tar without `--xattrs --xattrs-include='*.*'`,
the resulting basefile doesn't provide capabilities as used and needed
for example by ping(8), also see https://bugs.debian.org/881829

While at it, also exclude /var/lib/apt/lists/ files, to further reduce
the resulting basefile.

Closes: #143
  • Loading branch information
mika committed Feb 21, 2024
1 parent 2ba0597 commit 642ff89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/grml-live.txt
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,9 @@ How do I create a base tar.gz (I386.tar.gz or AMD64.tar.gz or ARM64.tar.gz)
First of all create the chroot using debootstrap (requires root):

BASECHROOT='/tmp/basefile' # path where the chroot gets generated
SUITE='bookworm' # using the current stable release should always work
debootstrap --exclude=info,tasksel,tasksel-data,isc-dhcp-client,isc-dhcp-common "$SUITE" "$BASECHROOT" http://deb.debian.org/debian
tar -C "$BASECHROOT" --exclude='var/cache/apt/archives/*.deb' -zcf "${SUITE}".tar.gz ./
SUITE='bookworm' # using the current stable release should always work
debootstrap --exclude=info,tasksel,tasksel-data,isc-dhcp-client,isc-dhcp-common "${SUITE}" "${BASECHROOT}" http://deb.debian.org/debian
tar -C "$BASECHROOT" --exclude='var/cache/apt/archives/*.deb' --exclude 'var/lib/apt/lists/*_*' --xattrs --xattrs-include='*.*' --acls -zcf "${SUITE}".tar.gz ./

[TIP]
By default debootstrap builds a chroot matching the architecture of the running
Expand Down

0 comments on commit 642ff89

Please sign in to comment.