add scripts

Signed-off-by: Martin Matous <m@matous.dev>
This commit is contained in:
Martin Matous 2022-03-28 00:46:25 +02:00
parent c6c66648ea
commit 5a4419bb4e
Signed by: mmatous
GPG key ID: 8BED4CD352953224
12 changed files with 802 additions and 1 deletions

18
gentoo-chroot.sh Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
MOUNTPOINT=/mnt/gentoo
mkdir -p "${MOUNTPOINT}" &&
mount --types proc /proc "${MOUNTPOINT}"/proc &&
mount --rbind /sys "${MOUNTPOINT}"/sys &&
mount --make-rslave "${MOUNTPOINT}"/sys &&
mount --rbind /dev "${MOUNTPOINT}"/dev &&
mount --make-rslave "${MOUNTPOINT}"/dev &&
mount --bind /run "${MOUNTPOINT}"/run &&
mount --make-slave "${MOUNTPOINT}"/run &&
mount LABEL=BOOT "${MOUNTPOINT}"/boot &&
mount --rbind /tmp "${MOUNTPOINT}"/tmp &&
chroot "${MOUNTPOINT}" /bin/bash
# gentoo install media not running systemd
# systemd-nspawn -D /mnt/mychroot --bind=/tmp --resolv-conf=/etc/resolv.conf