Update gentoo.sh
This commit is contained in:
parent
a14a4a7b78
commit
194a859624
53
gentoo.sh
53
gentoo.sh
@ -110,7 +110,6 @@ os-backup() {
|
||||
}
|
||||
|
||||
os-restore() {
|
||||
partitions
|
||||
rm -rf $TARGET/usr $TARGET/sbin $TARGET/lib32 $TARGET/libx32 $TARGET/lib $TARGET/vmlinuz* $TARGET/initrd* $TARGET/bin $TARGET/var $TARGET/root $TARGET/opt $TARGET/etc $TARGET/run
|
||||
clear
|
||||
echo "[Restoring OS tarfile from $2]"
|
||||
@ -136,13 +135,11 @@ os-restore() {
|
||||
}
|
||||
|
||||
systemMounts() {
|
||||
mount -o rbind /dev $TARGET/dev
|
||||
mount -o rbind /dev/pts $TARGET/dev/pts
|
||||
mount -o rbind /proc $TARGET/proc
|
||||
mount -o rbind /sys $TARGET/sys
|
||||
mount -t efivarfs none $TARGET/sys/firmware/efi/efivars
|
||||
mount -t tmpfs -o size=$TMPFS_SIZE tmpfs $TARGET/var/tmp/portage
|
||||
echo
|
||||
echo "[Checking for BTRFS Partition]"
|
||||
|
||||
if [[ -e "$BTRFS" ]]; then
|
||||
echo "BTRFS device found"
|
||||
echo
|
||||
echo "Mounting Boot,EFI,HOME"
|
||||
echo
|
||||
@ -156,6 +153,25 @@ systemMounts() {
|
||||
mkdir $TARGET/home
|
||||
mount -o subvol=@home $BTRFS $TARGET/home
|
||||
mkdir $TARGET/home/$USER
|
||||
|
||||
mkdir $TARGET/dev
|
||||
mkdir $TARGET/proc
|
||||
mkdir $TARGET/sys
|
||||
mkdir -p $TARGET/var/tmp/portage
|
||||
|
||||
mount -o rbind /dev $TARGET/dev
|
||||
mount -o rbind /dev/pts $TARGET/dev/pts
|
||||
mount -o rbind /proc $TARGET/proc
|
||||
mount -o rbind /sys $TARGET/sys
|
||||
mount -t efivarfs none $TARGET/sys/firmware/efi/efivars
|
||||
mount -t tmpfs -o size=$TMPFS_SIZE tmpfs $TARGET/var/tmp/portage
|
||||
else
|
||||
echo
|
||||
echo "Aborting Install, $BTRFS not found!"
|
||||
echo
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
unmaskPackages() {
|
||||
@ -371,21 +387,6 @@ locale() {
|
||||
echo "locale-gen" >>$TARGET/setup.sh
|
||||
}
|
||||
|
||||
partitions() {
|
||||
echo
|
||||
echo "Setting Up Partitions....."
|
||||
|
||||
if [[ -e "$BTRFS" ]]; then
|
||||
echo "BTRFS device found"
|
||||
else
|
||||
echo
|
||||
echo "Aborting Install, $BTRFS not found!"
|
||||
echo
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
fstab() {
|
||||
mkdir $TARGET/etc
|
||||
echo "UUID=$(/sbin/blkid | grep ${BOOT} | cut -d '"' -f2) /boot ext4 defaults 0 1" >$TARGET/etc/fstab
|
||||
@ -486,7 +487,6 @@ tweaks() {
|
||||
bootloader $HARD_DISK $ROOT_NAME $BTRFS
|
||||
elif [[ $choice = 2 ]]; then
|
||||
set-devices
|
||||
partitions
|
||||
systemMounts
|
||||
/usr/bin/chroot $TARGET /bin/bash
|
||||
fi
|
||||
@ -497,7 +497,7 @@ menu() {
|
||||
echo
|
||||
echo "[Welcome to the Poster.place Gentoo Installer System]"
|
||||
echo
|
||||
echo "[1] Setup Chroot Mounts"
|
||||
echo "[1] Setup Disk"
|
||||
echo "[2] Download Gentoo Installation Files"
|
||||
echo "[3] Install Base System"
|
||||
echo "[4] Install OS Packages"
|
||||
@ -511,8 +511,6 @@ menu() {
|
||||
|
||||
if [[ $choice = 1 ]]; then
|
||||
set-devices
|
||||
partitions
|
||||
sleep 5
|
||||
read -p "Press enter key to Continue"
|
||||
menu
|
||||
elif [[ $choice = 2 ]]; then
|
||||
@ -592,7 +590,10 @@ menu() {
|
||||
elif [[ $choice = 4 ]]; then
|
||||
set-devices
|
||||
finishInstall "$HARD_DISK"
|
||||
read -p "Press enter key to Continue"
|
||||
menu
|
||||
elif [[ $choice = 5 ]]; then
|
||||
set-devices
|
||||
cp -f gentoo.sh $TARGET/usr/bin/gentoo.sh
|
||||
if [ ! -f "$TARGET/usr/bin/gentoo.sh" ]; then
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user