Continue working with arch-chroot

This commit is contained in:
Santiago Lo Coco 2021-12-22 17:01:35 -03:00
parent 036ea20867
commit bdf8cc6ebd
1 changed files with 13 additions and 13 deletions

View File

@ -78,12 +78,12 @@ generateFstab() {
setTimeZone() { setTimeZone() {
ln -sf /usr/share/zoneinfo/America/Buenos_Aires /etc/localtime ln -sf /usr/share/zoneinfo/America/Buenos_Aires /etc/localtime
hwclock --systohc runInChroot "hwclock --systohc"
} }
setLocale() { setLocale() {
sed 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' -i /etc/locale.gen sed 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' -i /etc/locale.gen
locale-gen runInChroot "locale-gen"
echo "LANG=en_US.UTF-8" > /etc/locale.conf echo "LANG=en_US.UTF-8" > /etc/locale.conf
} }
@ -97,16 +97,16 @@ setPassword() {
} }
installMorePackages() { installMorePackages() {
pacman -Sy grub efibootmgr networkmanager network-manager-applet dialog reflector base-devel linux-headers xdg-user-dirs xdg-utils alsa-utils pipewire pipewire-alsa pipewire-pulse openssh reflector qemu qemu-arch-extra ttf-fira-code runInChroot "pacman -Sy grub efibootmgr networkmanager network-manager-applet dialog reflector base-devel linux-headers xdg-user-dirs xdg-utils alsa-utils pipewire pipewire-alsa pipewire-pulse openssh reflector qemu qemu-arch-extra ttf-fira-code"
pacman -Sy --noconfirm nvidia nvidia-utils nvidia-settings runInChroot "pacman -S --noconfirm nvidia nvidia-utils nvidia-settings"
systemctl enable NetworkManager runInChroot "systemctl enable NetworkManager"
systemctl enable fstrim.timer runInChroot "systemctl enable fstrim.timer"
} }
grubSetUp() { grubSetUp() {
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB runInChroot "grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB"
grub-mkconfig -o /boot/grub/grub.cfg runInChroot "grub-mkconfig -o /boot/grub/grub.cfg"
} }
userSetUp() { userSetUp() {
@ -122,7 +122,7 @@ userSetUp() {
runInChroot() { runInChroot() {
chroot /mnt /bin/bash << END chroot /mnt /bin/bash << END
"${1}" ${1}
END END
} }
@ -137,14 +137,14 @@ runScript() {
setTimeZone setTimeZone
setLocale setLocale
networkConf networkConf
setPassword # setPassword
installMorePackages installMorePackages
grubSetUp grubSetUp
userSetUp # userSetUp
# exit # exit
# umount -R /mnt # umount -R /mnt
# reboot # reboot
} }
# runScript runScript
runInChroot "ls -al" # runInChroot "ls -al"