Update gentoo.sh
This commit is contained in:
parent
7548862f6a
commit
4de38795b1
27
gentoo.sh
27
gentoo.sh
@ -39,6 +39,7 @@ COMPRESSION='compress=zstd:10'
|
|||||||
FLATPAKS+=(io.exodus.Exodus us.zoom.Zoom app/net.lutris.Lutris)
|
FLATPAKS+=(io.exodus.Exodus us.zoom.Zoom app/net.lutris.Lutris)
|
||||||
SERVICES+=(smartd cronie avahi-daemon cups grub-btrfsd sddm NetworkManager dev-zram0.swap)
|
SERVICES+=(smartd cronie avahi-daemon cups grub-btrfsd sddm NetworkManager dev-zram0.swap)
|
||||||
DESKTOP="KDE"
|
DESKTOP="KDE"
|
||||||
|
KERNEL="gentoo-kernel-bin"
|
||||||
MAKEOPTS="-j$(cat /proc/cpuinfo | grep -i processor | grep -vi 'model' | wc -l)"
|
MAKEOPTS="-j$(cat /proc/cpuinfo | grep -i processor | grep -vi 'model' | wc -l)"
|
||||||
USE_FLAGS=" -gpm proprietary-codecs screencast systemd x264 pulseaudio firmware nfsv4 caps zeroconf dbus sound-server X -browser-integration desktop-portal minimal -gnome qt5 kde dvd alsa gui -wayland device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot browser keeshare network opengl"
|
USE_FLAGS=" -gpm proprietary-codecs screencast systemd x264 pulseaudio firmware nfsv4 caps zeroconf dbus sound-server X -browser-integration desktop-portal minimal -gnome qt5 kde dvd alsa gui -wayland device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot browser keeshare network opengl"
|
||||||
TMPFS_SIZE="32G"
|
TMPFS_SIZE="32G"
|
||||||
@ -104,9 +105,9 @@ os-restore() {
|
|||||||
partitions
|
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 $4/$2.tgz]"
|
echo "[Restoring OS tarfile from $2]"
|
||||||
echo
|
echo
|
||||||
tar xfvp $4/$2.tgz -C $TARGET/
|
tar xfvp $2 -C $TARGET/
|
||||||
|
|
||||||
if [ "$3" = "home" ]; then
|
if [ "$3" = "home" ]; then
|
||||||
echo "[Restoring /home]"
|
echo "[Restoring /home]"
|
||||||
@ -192,9 +193,13 @@ buildGentoo() {
|
|||||||
chroot $TARGET etc-update -q --automode -5
|
chroot $TARGET etc-update -q --automode -5
|
||||||
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse @world
|
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse @world
|
||||||
locale
|
locale
|
||||||
chroot $TARGET /usr/bin/emerge =sys-kernel/gentoo-sources-$(ls $TARGET/var/db/repos/gentoo/sys-kernel/gentoo-sources/gentoo-sources-6.* | cut -d '-' -f5-6 | grep -vi r | head -1 | sed 's/.ebuild//') sys-kernel/genkernel sys-kernel/linux-firmware
|
if [ "$KERNEL" = "gentoo-kernel-bin" ]; then
|
||||||
chroot $TARGET eselect kernel set 1
|
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 genkernel --cachedir=/var/tmp/portage --tmpdir=/var/tmp/portage --install all
|
else
|
||||||
|
chroot $TARGET /usr/bin/emerge =sys-kernel/gentoo-sources-$(ls $TARGET/var/db/repos/gentoo/sys-kernel/gentoo-sources/gentoo-sources-6.* | cut -d '-' -f5-6 | grep -vi r | head -1 | sed 's/.ebuild//') sys-kernel/genkernel sys-kernel/linux-firmware
|
||||||
|
chroot $TARGET eselect kernel set 1
|
||||||
|
chroot $TARGET genkernel --cachedir=/var/tmp/portage --tmpdir=/var/tmp/portage --install all
|
||||||
|
fi
|
||||||
chroot $TARGET /usr/bin/emerge $BASE_PACKAGES --autounmask-write
|
chroot $TARGET /usr/bin/emerge $BASE_PACKAGES --autounmask-write
|
||||||
chroot $TARGET etc-update -q --automode -5
|
chroot $TARGET etc-update -q --automode -5
|
||||||
chroot $TARGET /usr/bin/emerge $BASE_PACKAGES
|
chroot $TARGET /usr/bin/emerge $BASE_PACKAGES
|
||||||
@ -311,12 +316,6 @@ installSteam() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
installBrowser() {
|
|
||||||
if [ "$BROWSER" = "brave" ]; then
|
|
||||||
installBrave
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
mounts() {
|
mounts() {
|
||||||
echo
|
echo
|
||||||
echo "Mounting......."
|
echo "Mounting......."
|
||||||
@ -329,6 +328,7 @@ mounts() {
|
|||||||
#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
|
||||||
}
|
}
|
||||||
|
|
||||||
unmount() {
|
unmount() {
|
||||||
@ -418,8 +418,8 @@ initialize-disk() {
|
|||||||
parted -a optimal /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB
|
parted -a optimal /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB
|
||||||
parted -a optimal /dev/$HARD_DISK mkpart primary ext3 200MiB 700MiB
|
parted -a optimal /dev/$HARD_DISK mkpart primary ext3 200MiB 700MiB
|
||||||
parted -a optimal /dev/$HARD_DISK set 1 esp on
|
parted -a optimal /dev/$HARD_DISK set 1 esp on
|
||||||
parted -a optimal /dev/$HARD_DISK mkpart P2 ext3 700MiB 98%
|
parted -a optimal /dev/$HARD_DISK mkpart P2 ext3 700MiB 100%
|
||||||
parted -a optimal /dev/$HARD_DISK mkpart P2 ext3 98% 100%
|
#parted -a optimal /dev/$HARD_DISK mkpart P2 ext3 98% 100%
|
||||||
partitionDetection
|
partitionDetection
|
||||||
echo
|
echo
|
||||||
echo "Formatting....."
|
echo "Formatting....."
|
||||||
@ -509,6 +509,7 @@ menu() {
|
|||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
set-devices
|
set-devices
|
||||||
|
read -p 'Hostname for Restore: ' -e -i "gentoo" HOSTNAME
|
||||||
read -p 'Restore Directory Image Source: ' -e -i "/mnt" restore_directory
|
read -p 'Restore Directory Image Source: ' -e -i "/mnt" restore_directory
|
||||||
FILE_SCAN=$(ls $restore_directory/gentoo-$HOSTNAME-* | tail -1)
|
FILE_SCAN=$(ls $restore_directory/gentoo-$HOSTNAME-* | tail -1)
|
||||||
read -p 'Restore Home Directory? : ' -e -i 'n' home_restore
|
read -p 'Restore Home Directory? : ' -e -i 'n' home_restore
|
||||||
|
Loading…
Reference in New Issue
Block a user