Debian 12 how to bootstrap an image

From openQRM
Revision as of 16:03, 13 November 2023 by Stvsyf (talk | contribs) (added debian 12 how to bootstrap an image)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Starting from a fresh Debian 12 installation do the following


apt-get install debootstrap

export MY_CHROOT=/exports/mve8.0_4

mkdir -p $MY_CHROOT/dev/pts $MY_CHROOT/proc $MY_CHROOT/var/run

mount --bind /dev/ $MY_CHROOT/dev/

mount --bind /dev/pts $MY_CHROOT/dev/pts

mount --bind /proc $MY_CHROOT/proc

debootstrap --arch amd64 bookworm $MY_CHROOT/ https://deb.debian.org/debian/

cp /etc/passwd $MY_CHROOT/etc/

cp /etc/shadow $MY_CHROOT/etc/

cp /etc/group $MY_CHROOT/etc/

cp /etc/apt/sources.list $MY_CHROOT/etc/apt/

cp /usr/share/keyrings/*gpg $MY_CHROOT/etc/apt/trusted.gpg.d/

chroot $MY_CHROOT

apt-get update

apt-get install wget net-tools screen locales tzdata collectd telnet whois traceroute nfs-kernel-server jq bash dialog iptables

dpkg-reconfigure locales

dpkg-reconfigure tzdata

exit

umount $MY_CHROOT/dev/pts

umount $MY_CHROOT/dev

umount $MY_CHROOT/proc