Last active
March 11, 2023 22:45
-
-
Save tegila/9e016c5516a11b7f92503526951632cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p /mnt/linux | |
mount /dev/local/linux /mnt/linux | |
mount /dev/sda1 /mnt/linux/boot | |
mount -t proc none /mnt/linux/proc | |
mount -o bind /dev /mnt/linux/dev | |
mount -o bind /sys /mnt/linux/sys | |
mount -t devpts devpts /mnt/linux/dev/pts | |
mount --bind /sys/firmware/efi/efivars /mnt/gentoo/sys/firmware/efi/efivars | |
chroot /mnt/linux /bin/bash | |
source /etc/profile | |
export PS1="(chroot) ${PS1}" | |
passwd | |
useradd -m -G users tegila | |
usermod -a -G wheel tegila | |
passwd tegila | |
grub-install --target=x86_64-efi --efi-directory=/boot | |
grub-mkconfig -o /boot/grub/grub.cfg | |
emerge --ask sys-boot/efibootmgr | |
mkdir -p /boot/efi/boot | |
cp /boot/vmlinuz-* /boot/efi/boot/bootx64.efi | |
efibootmgr --create --disk /dev/sda --part 2 --label "Gentoo" --loader "\efi\boot\bootx64.efi" | |
dbus-uuidgen > /etc/machine-id | |
rlpkg -a -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment