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 -t efivarfs none $TARGET/sys/firmware/efi/efivars
|
||||
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() {
|
||||
@ -208,7 +222,8 @@ buildGentoo() {
|
||||
echo "[Installing Kernel]"
|
||||
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
|
||||
@ -321,21 +336,6 @@ installSteam() {
|
||||
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() {
|
||||
echo "ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime" >>$TARGET/setup.sh
|
||||
echo "hwclock --systohc" >>$TARGET/setup.sh
|
||||
@ -348,8 +348,7 @@ partitions() {
|
||||
echo "Setting Up Partitions....."
|
||||
|
||||
if [[ -e "$BTRFS" ]]; then
|
||||
mounts
|
||||
fstab
|
||||
echo "BTRFS device found"
|
||||
else
|
||||
echo
|
||||
echo "Aborting Install, $BTRFS not found!"
|
||||
@ -501,12 +500,20 @@ menu() {
|
||||
PACKAGES=$BASE_PACKAGES
|
||||
INSTALL_TYPE="server"
|
||||
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)
|
||||
wget -O /tmp/stage3.tar.xz "$STAGE3_URL"
|
||||
STAGE3_FILE="/tmp/stage3.tar.xz"
|
||||
|
||||
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
|
||||
echo "USE=\"$USE_FLAGS\"" >>$TARGET/etc/portage/make.conf
|
||||
if [ -z "$DISTCC_LISTEN" ]; then
|
||||
@ -523,7 +530,7 @@ menu() {
|
||||
echo "FEATURES=\"distcc\"" >>$TARGET/etc/portage/make.conf
|
||||
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
|
||||
cp -f /etc/resolv.conf $TARGET/etc/
|
||||
mkdir -p $TARGET/var/tmp/portage
|
||||
@ -546,7 +553,6 @@ menu() {
|
||||
INSTALL_TYPE="server"
|
||||
fi
|
||||
set-devices
|
||||
systemMounts
|
||||
buildGentoo
|
||||
#menu
|
||||
elif [[ $choice = 4 ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user