summaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2020-02-01 21:17:53 -0600
committerKyle K <kylek389@gmail.com>2020-02-01 21:17:53 -0600
commit5bceea4e8382e4848041e64ec540f3add29f8338 (patch)
tree1c8d45e0c195897f74c4d309f68644ef5812e5d8 /install.sh
parentbf3ebefc2989c75ba2325af72ddbcfc7a73416b9 (diff)
downloadgentoox-5bceea4e8382e4848041e64ec540f3add29f8338.tar.gz
gentoox-5bceea4e8382e4848041e64ec540f3add29f8338.tar.bz2
gentoox-5bceea4e8382e4848041e64ec540f3add29f8338.zip
add dobtrfs to the kernel boot line
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/install.sh b/install.sh
index 3f5c23c..e84eb63 100755
--- a/install.sh
+++ b/install.sh
@@ -12,11 +12,13 @@ echo -e 'Welcome to the GentooX setup, the installation script mainly consists o
\tGentooX uses openSUSE-style BTRFS root partition & subvolumes for snapshotting with snapper
\tGentooX requires minimum of 16GB of space, and use of BTRFS is hardcoded
-mounting target partition to /mnt/install
-unsquashfs -f -i -d /mnt/install/ /mnt/cdrom/image.squashfs
-/usr/local/sbin/genfstab -U >> /mnt/install/etc/fstab
-/usr/local/sbin/arch-chroot /mnt/install/
-grub-install --target=x86_64-efi for UEFI mode or grub-install --target=i386-pc (BIOS only)'
+Manual installation can be done via:
+ mounting target partition to /mnt/install
+ unsquashfs -f -i -d /mnt/install/ /mnt/cdrom/image.squashfs
+ /usr/local/sbin/genfstab -U >> /mnt/install/etc/fstab
+ /usr/local/sbin/arch-chroot /mnt/install/
+ grub-install --target=x86_64-efi for UEFI mode or grub-install --target=i386-pc (BIOS only)
+ grub-mkconfig -o /boot/grub/grub.cfg'
declare -A PART_SCHEME
@@ -88,6 +90,7 @@ setup_btrfs () {
}
+echo -e "\nDetected drives:\n$(lsblk | grep disk)"
while :; do
echo
read -erp "Automatic partitioning (a) or manual partitioning (will launch gparted)? [a/m] " -n 1 partitioning_mode
@@ -141,6 +144,8 @@ mount --rbind /sys /mnt/install/sys
cd /mnt/install/
cat <<HEREDOC | chroot .
source /etc/profile && export PS1="(chroot) \$PS1"
+if [[ -d /sys/firmware/efi/ ]]; then UEFI_MODE=y; fi
+if [[ -z $drive ]]; then drive=$(echo $partition | sed 's/[0-9]\+\$//'); fi
sensors-detect --auto
rc-update add lm_sensors default
NCORES=\$(getconf _NPROCESSORS_ONLN)
@@ -151,9 +156,9 @@ sed -i -r "s/^NTHREADS=\"([^\"]*)\"$/NTHREADS=\"\$NCORES\"/g" /etc/portage/make.
if [[ ! -z $UEFI_MODE ]]; then
grub-install --target=x86_64-efi
else
- if [[ -z \$drive ]]; then drive=\$(echo \$partition | sed 's/[0-9]\+$//'); fi
grub-install --target=i386-pc $drive
fi
+grub-mkconfig -o /boot/grub/grub.cfg
HEREDOC
umount -l /mnt/install/boot/efi /mnt/install/var /mnt/install/usr/local /mnt/install/tmp /mnt/install/srv /mnt/install/root /mnt/install/opt /mnt/install/home /mnt/install/boot/grub/x86_64-efi /mnt/install/boot/grub/i386-pc /mnt/install/.snapshots /mnt/install