Update gentoo.sh

This commit is contained in:
verita84 2023-11-14 22:28:01 +00:00
parent 38846b2e5f
commit 37be002c45

View File

@ -31,10 +31,10 @@ echo
HARD_DISK=$2 HARD_DISK=$2
###################################### ######################################
USER="verita84" USER="verita84"
USER_PASSWORD="123456" USER_PASSWORD="REM&rap234"
ROOT_PASSWORD="123456" ROOT_PASSWORD="REM&rap234"
WIRELESS_PASSWORD='123456' WIRELESS_PASSWORD='815721984'
SSID='123456' SSID='Tribble'
WIRELESS_INTERFACE='wlan0' WIRELESS_INTERFACE='wlan0'
COMPRESSION='compress=zstd:10' COMPRESSION='compress=zstd:10'
FLATPAKS+=() FLATPAKS+=()
@ -155,7 +155,7 @@ systemMounts() {
#CONFIGURE DATA DIRS (HOME) #CONFIGURE DATA DIRS (HOME)
mkdir $TARGET/home mkdir $TARGET/home
mount -o subvol=@home $BTRFS $TARGET/home mount -o subvol=@home $BTRFS $TARGET/home
mkdir $TARGET/home/$USER mkdir $TARGET/home/$USER
} }
unmaskPackages() { unmaskPackages() {
@ -224,7 +224,7 @@ buildGentoo() {
echo echo
#chroot $TARGET /usr/bin/emerge =sys-kernel/$(ls $TARGET/var/db/repos/gentoo/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.* | cut -d '/' -f9 | sed 's/.ebuild//' | head -1) sys-kernel/linux-firmware #chroot $TARGET /usr/bin/emerge =sys-kernel/$(ls $TARGET/var/db/repos/gentoo/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.* | cut -d '/' -f9 | sed 's/.ebuild//' | head -1) sys-kernel/linux-firmware
chroot $TARGET /usr/bin/emerge gentoo-kernel-bin sys-kernel/linux-firmware chroot $TARGET /usr/bin/emerge gentoo-kernel-bin sys-kernel/linux-firmware
echo echo
echo echo
echo echo
@ -504,7 +504,7 @@ menu() {
STAGE3_URL=$(curl https://www.gentoo.org/downloads/ | grep -i stage3-amd64-systemd | head -1 | cut -d '"' -f2-3 | cut -d '"' -f1) STAGE3_URL=$(curl https://www.gentoo.org/downloads/ | grep -i stage3-amd64-systemd | head -1 | cut -d '"' -f2-3 | cut -d '"' -f1)
wget -O /tmp/stage3.tar.xz "$STAGE3_URL" wget -O /tmp/stage3.tar.xz "$STAGE3_URL"
STAGE3_FILE="/tmp/stage3.tar.xz" STAGE3_FILE="/tmp/stage3.tar.xz"
if [ -f "$STAGE3_FILE" ]; then if [ -f "$STAGE3_FILE" ]; then
echo echo
echo echo
@ -619,27 +619,34 @@ menu() {
} }
set-devices() { set-devices() {
i=0 if [ -f "/tmp/disk" ]; then
while [ $i != "n" ]; do HARD_DISK=$(cat /tmp/disk | head -1)
clear ROOT_NAME=$(cat /tmp/disk | tail -1)
echo else
echo "Disks and Partitions:" i=0
echo while [ $i != "n" ]; do
cat /proc/partitions clear
echo echo
echo "Erase the line and press enter to skip to the next detected disk" echo "Disks and Partitions:"
echo echo
i=$(expr $i + 1) cat /proc/partitions
read -p 'Disk Device to Use: ' -e -i $(lsblk | grep -i disk | grep -Evi 'zram|swap' | cut -d ' ' -f1 | head -$i | tail -1) device echo
if [[ ! -z $device ]]; then echo "Erase the line and press enter to skip to the next detected disk"
i="n" echo
fi i=$(expr $i + 1)
done read -p 'Disk Device to Use: ' -e -i $(lsblk | grep -i disk | grep -Evi 'zram|swap' | cut -d ' ' -f1 | head -$i | tail -1) device
if [[ ! -z $device ]]; then
i="n"
fi
done
read -p 'BTRFS Root Volume name: ' -e -i "gentoo" root_name read -p 'BTRFS Root Volume name: ' -e -i "gentoo" root_name
HARD_DISK=$device HARD_DISK=$device
ROOT_NAME=$root_name
echo $HARD_DISK > /tmp/disk
echo $ROOT_NAME >> /tmp/disk
fi
partitionDetection partitionDetection
ROOT_NAME=$root_name
} }
if [ "$1" = "desktop" ]; then if [ "$1" = "desktop" ]; then