Update gentoo.sh
This commit is contained in:
parent
a14a4a7b78
commit
194a859624
79
gentoo.sh
79
gentoo.sh
@ -110,7 +110,6 @@ os-backup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
os-restore() {
|
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
|
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
|
clear
|
||||||
echo "[Restoring OS tarfile from $2]"
|
echo "[Restoring OS tarfile from $2]"
|
||||||
@ -136,26 +135,43 @@ os-restore() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
systemMounts() {
|
systemMounts() {
|
||||||
mount -o rbind /dev $TARGET/dev
|
echo
|
||||||
mount -o rbind /dev/pts $TARGET/dev/pts
|
echo "[Checking for BTRFS Partition]"
|
||||||
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
|
if [[ -e "$BTRFS" ]]; then
|
||||||
echo "Mounting Boot,EFI,HOME"
|
echo "BTRFS device found"
|
||||||
echo
|
echo
|
||||||
mount $BTRFS $TARGET
|
echo "Mounting Boot,EFI,HOME"
|
||||||
btrfs_filesytem
|
echo
|
||||||
mkdir -p $TARGET/boot
|
mount $BTRFS $TARGET
|
||||||
mount -t ext4 $BOOT $TARGET/boot
|
btrfs_filesytem
|
||||||
mkdir -p $TARGET/boot/efi
|
mkdir -p $TARGET/boot
|
||||||
mount $EFI $TARGET/boot/efi
|
mount -t ext4 $BOOT $TARGET/boot
|
||||||
#CONFIGURE DATA DIRS (HOME)
|
mkdir -p $TARGET/boot/efi
|
||||||
mkdir $TARGET/home
|
mount $EFI $TARGET/boot/efi
|
||||||
mount -o subvol=@home $BTRFS $TARGET/home
|
#CONFIGURE DATA DIRS (HOME)
|
||||||
mkdir $TARGET/home/$USER
|
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() {
|
unmaskPackages() {
|
||||||
@ -371,21 +387,6 @@ locale() {
|
|||||||
echo "locale-gen" >>$TARGET/setup.sh
|
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() {
|
fstab() {
|
||||||
mkdir $TARGET/etc
|
mkdir $TARGET/etc
|
||||||
echo "UUID=$(/sbin/blkid | grep ${BOOT} | cut -d '"' -f2) /boot ext4 defaults 0 1" >$TARGET/etc/fstab
|
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
|
bootloader $HARD_DISK $ROOT_NAME $BTRFS
|
||||||
elif [[ $choice = 2 ]]; then
|
elif [[ $choice = 2 ]]; then
|
||||||
set-devices
|
set-devices
|
||||||
partitions
|
|
||||||
systemMounts
|
systemMounts
|
||||||
/usr/bin/chroot $TARGET /bin/bash
|
/usr/bin/chroot $TARGET /bin/bash
|
||||||
fi
|
fi
|
||||||
@ -497,7 +497,7 @@ menu() {
|
|||||||
echo
|
echo
|
||||||
echo "[Welcome to the Poster.place Gentoo Installer System]"
|
echo "[Welcome to the Poster.place Gentoo Installer System]"
|
||||||
echo
|
echo
|
||||||
echo "[1] Setup Chroot Mounts"
|
echo "[1] Setup Disk"
|
||||||
echo "[2] Download Gentoo Installation Files"
|
echo "[2] Download Gentoo Installation Files"
|
||||||
echo "[3] Install Base System"
|
echo "[3] Install Base System"
|
||||||
echo "[4] Install OS Packages"
|
echo "[4] Install OS Packages"
|
||||||
@ -511,8 +511,6 @@ menu() {
|
|||||||
|
|
||||||
if [[ $choice = 1 ]]; then
|
if [[ $choice = 1 ]]; then
|
||||||
set-devices
|
set-devices
|
||||||
partitions
|
|
||||||
sleep 5
|
|
||||||
read -p "Press enter key to Continue"
|
read -p "Press enter key to Continue"
|
||||||
menu
|
menu
|
||||||
elif [[ $choice = 2 ]]; then
|
elif [[ $choice = 2 ]]; then
|
||||||
@ -592,7 +590,10 @@ menu() {
|
|||||||
elif [[ $choice = 4 ]]; then
|
elif [[ $choice = 4 ]]; then
|
||||||
set-devices
|
set-devices
|
||||||
finishInstall "$HARD_DISK"
|
finishInstall "$HARD_DISK"
|
||||||
|
read -p "Press enter key to Continue"
|
||||||
|
menu
|
||||||
elif [[ $choice = 5 ]]; then
|
elif [[ $choice = 5 ]]; then
|
||||||
|
set-devices
|
||||||
cp -f gentoo.sh $TARGET/usr/bin/gentoo.sh
|
cp -f gentoo.sh $TARGET/usr/bin/gentoo.sh
|
||||||
if [ ! -f "$TARGET/usr/bin/gentoo.sh" ]; then
|
if [ ! -f "$TARGET/usr/bin/gentoo.sh" ]; then
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user