OS 4 adaptations
This commit is contained in:
parent
12323eb509
commit
1fbe13d566
@ -1,22 +1,28 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Mount host partitions to chroot
|
||||||
mkdir -pv "$1"/media/cdrom
|
mkdir -pv "$1"/media/cdrom
|
||||||
mount --bind /cdrom "$1"/media/cdrom
|
mount --bind /cdrom "$1"/media/cdrom
|
||||||
mount --rbind /dev "$1"/dev
|
mount --bind /dev "$1/dev"
|
||||||
mount --rbind /dev/pts "$1"/dev/pts
|
mount -t tmpfs run "$1/run" -o mode=0755,nosuid,nodev
|
||||||
mount --rbind /proc "$1"/proc
|
mount -t proc proc "$1/proc" -o nosuid,nodev,noexec
|
||||||
mount --rbind /sys "$1"/sys
|
mount -t sysfs sys "$1/sys" -o nosuid,nodev,noexec,ro
|
||||||
mount --rbind /run "$1"/run
|
# Delete unwanted kernels
|
||||||
rm -rfv "$1"/boot/*arch*
|
rm -rfv "$1"/boot/*arch*
|
||||||
|
# Copy cdrom pool to apt cache
|
||||||
mkdir -p "$1"/var/cache/apt/archives
|
mkdir -p "$1"/var/cache/apt/archives
|
||||||
cp -rvf /cdrom/pool/main/* "$1"/var/cache/apt/archives/
|
cp -rvf /cdrom/pool/main/* "$1"/var/cache/apt/archives/
|
||||||
|
# Run Chroot Commands
|
||||||
mkdir -pv "$1"/usr/lib/pika/pikainstall/
|
mkdir -pv "$1"/usr/lib/pika/pikainstall/
|
||||||
cp -rvf /usr/lib/pika/pikainstall/pika-install-chroot.sh "$1"/usr/lib/pika/pikainstall/
|
cp -rvf /usr/lib/pika/pikainstall/pika-install-chroot.sh "$1"/usr/lib/pika/pikainstall/
|
||||||
chroot "$1" /bin/bash -c "/usr/lib/pika/pikainstall/pika-install-chroot.sh"
|
chroot "$1" /bin/bash -c "/usr/lib/pika/pikainstall/pika-install-chroot.sh"
|
||||||
|
# Setup Disk Encryption
|
||||||
if [ -f /var/albius-crypttab-manual.sh ]
|
if [ -f /var/albius-crypttab-manual.sh ]
|
||||||
then
|
then
|
||||||
chmod +x /var/albius-crypttab-manual.sh
|
chmod +x /var/albius-crypttab-manual.sh
|
||||||
/var/albius-crypttab-manual.sh
|
/var/albius-crypttab-manual.sh
|
||||||
fi
|
fi
|
||||||
|
# Setup Swaps
|
||||||
if [ -f /tmp/pika-installer-gtk4-swaplist ]
|
if [ -f /tmp/pika-installer-gtk4-swaplist ]
|
||||||
then
|
then
|
||||||
for i in $(cat /tmp/pika-installer-gtk4-swaplist)
|
for i in $(cat /tmp/pika-installer-gtk4-swaplist)
|
||||||
@ -24,3 +30,9 @@ then
|
|||||||
echo "UUID="$(blkid -s UUID -o value $i)" none swap sw 0 0" >> "$1"/etc/fstab
|
echo "UUID="$(blkid -s UUID -o value $i)" none swap sw 0 0" >> "$1"/etc/fstab
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
# Unmount host partitions from chroot
|
||||||
|
umount "$1/media/cdrom" || umount -lf "$1/media/cdrom" || true
|
||||||
|
umount "$1/dev" || umount -lf "$1/dev" || true
|
||||||
|
umount "$1/run" || umount -lf "$1/run" || true
|
||||||
|
umount "$1/proc" || umount -lf "$1/proc" || true
|
||||||
|
umount "$1/sys" || umount -lf "$1/sys" || true
|
||||||
|
Loading…
Reference in New Issue
Block a user