Update gentoo.sh
This commit is contained in:
parent
ae8ad442a3
commit
38846b2e5f
48
gentoo.sh
48
gentoo.sh
@ -142,6 +142,20 @@ systemMounts() {
|
|||||||
mount -o rbind /sys $TARGET/sys
|
mount -o rbind /sys $TARGET/sys
|
||||||
mount -t efivarfs none $TARGET/sys/firmware/efi/efivars
|
mount -t efivarfs none $TARGET/sys/firmware/efi/efivars
|
||||||
mount -t tmpfs -o size=$TMPFS_SIZE tmpfs $TARGET/var/tmp/portage
|
mount -t tmpfs -o size=$TMPFS_SIZE tmpfs $TARGET/var/tmp/portage
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Mounting Boot,EFI,HOME"
|
||||||
|
echo
|
||||||
|
mount $BTRFS $TARGET
|
||||||
|
btrfs_filesytem
|
||||||
|
mkdir -p $TARGET/boot
|
||||||
|
mount -t ext4 $BOOT $TARGET/boot
|
||||||
|
mkdir -p $TARGET/boot/efi
|
||||||
|
mount $EFI $TARGET/boot/efi
|
||||||
|
#CONFIGURE DATA DIRS (HOME)
|
||||||
|
mkdir $TARGET/home
|
||||||
|
mount -o subvol=@home $BTRFS $TARGET/home
|
||||||
|
mkdir $TARGET/home/$USER
|
||||||
}
|
}
|
||||||
|
|
||||||
unmaskPackages() {
|
unmaskPackages() {
|
||||||
@ -208,7 +222,8 @@ buildGentoo() {
|
|||||||
echo "[Installing Kernel]"
|
echo "[Installing Kernel]"
|
||||||
echo
|
echo
|
||||||
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
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
@ -321,21 +336,6 @@ installSteam() {
|
|||||||
emerge games-util/steam-launcher app-emulation/wine-vanilla games-util/lutris
|
emerge games-util/steam-launcher app-emulation/wine-vanilla games-util/lutris
|
||||||
}
|
}
|
||||||
|
|
||||||
mounts() {
|
|
||||||
echo
|
|
||||||
echo "Mounting......."
|
|
||||||
mount $BTRFS $TARGET
|
|
||||||
btrfs_filesytem
|
|
||||||
mkdir -p $TARGET/boot
|
|
||||||
mount -t ext4 $BOOT $TARGET/boot
|
|
||||||
mkdir -p $TARGET/boot/efi
|
|
||||||
mount $EFI $TARGET/boot/efi
|
|
||||||
#CONFIGURE DATA DIRS (HOME)
|
|
||||||
mkdir $TARGET/home
|
|
||||||
mount -o subvol=@home $BTRFS $TARGET/home
|
|
||||||
mkdir $TARGET/home/$USER
|
|
||||||
}
|
|
||||||
|
|
||||||
locale() {
|
locale() {
|
||||||
echo "ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime" >>$TARGET/setup.sh
|
echo "ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime" >>$TARGET/setup.sh
|
||||||
echo "hwclock --systohc" >>$TARGET/setup.sh
|
echo "hwclock --systohc" >>$TARGET/setup.sh
|
||||||
@ -348,8 +348,7 @@ partitions() {
|
|||||||
echo "Setting Up Partitions....."
|
echo "Setting Up Partitions....."
|
||||||
|
|
||||||
if [[ -e "$BTRFS" ]]; then
|
if [[ -e "$BTRFS" ]]; then
|
||||||
mounts
|
echo "BTRFS device found"
|
||||||
fstab
|
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "Aborting Install, $BTRFS not found!"
|
echo "Aborting Install, $BTRFS not found!"
|
||||||
@ -501,12 +500,20 @@ menu() {
|
|||||||
PACKAGES=$BASE_PACKAGES
|
PACKAGES=$BASE_PACKAGES
|
||||||
INSTALL_TYPE="server"
|
INSTALL_TYPE="server"
|
||||||
fi
|
fi
|
||||||
|
set-devices
|
||||||
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
|
||||||
tar xfv $STAGE3_FILE -C $TARGET/
|
echo
|
||||||
|
echo
|
||||||
|
echo "Extracting Tar File.........."
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
tar xf $STAGE3_FILE -C $TARGET/
|
||||||
|
systemMounts
|
||||||
|
fstab
|
||||||
sed -i "s/-O2/-march=$CPU_TYPE -O2/i" $TARGET/etc/portage/make.conf
|
sed -i "s/-O2/-march=$CPU_TYPE -O2/i" $TARGET/etc/portage/make.conf
|
||||||
echo "USE=\"$USE_FLAGS\"" >>$TARGET/etc/portage/make.conf
|
echo "USE=\"$USE_FLAGS\"" >>$TARGET/etc/portage/make.conf
|
||||||
if [ -z "$DISTCC_LISTEN" ]; then
|
if [ -z "$DISTCC_LISTEN" ]; then
|
||||||
@ -523,7 +530,7 @@ menu() {
|
|||||||
echo "FEATURES=\"distcc\"" >>$TARGET/etc/portage/make.conf
|
echo "FEATURES=\"distcc\"" >>$TARGET/etc/portage/make.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'EMERGE_DEFAULT_OPTS="--jobs 3"' >>$TARGET/etc/portage/make.conf
|
echo 'EMERGE_DEFAULT_OPTS="--jobs 10"' >>$TARGET/etc/portage/make.conf
|
||||||
echo 'ACCEPT_KEYWORDS="amd64"' >>$TARGET/etc/portage/make.conf
|
echo 'ACCEPT_KEYWORDS="amd64"' >>$TARGET/etc/portage/make.conf
|
||||||
cp -f /etc/resolv.conf $TARGET/etc/
|
cp -f /etc/resolv.conf $TARGET/etc/
|
||||||
mkdir -p $TARGET/var/tmp/portage
|
mkdir -p $TARGET/var/tmp/portage
|
||||||
@ -546,7 +553,6 @@ menu() {
|
|||||||
INSTALL_TYPE="server"
|
INSTALL_TYPE="server"
|
||||||
fi
|
fi
|
||||||
set-devices
|
set-devices
|
||||||
systemMounts
|
|
||||||
buildGentoo
|
buildGentoo
|
||||||
#menu
|
#menu
|
||||||
elif [[ $choice = 4 ]]; then
|
elif [[ $choice = 4 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user