mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-16 02:01:32 +01:00
Big FIX
This commit is contained in:
@@ -643,8 +643,99 @@ programasguiuser
|
||||
fi
|
||||
}
|
||||
|
||||
function otrasconfig {
|
||||
mostrardialog "$(T "Other configs")" "Aquí puedes seleccionar otras configuraciones que puedes hacer a Arch antes de terminar la instalacion, como su nombre"
|
||||
# Loop infinito en otras configuraciones hasta que se pulse la de terminar
|
||||
for (( ; ; ))
|
||||
do
|
||||
othopt=`dialog --stdout --nocancel --menu "$(T "Other configs")" 0 0 8 e "Nada mas / Finalizar instalacion" 1 "Cambiar hostname (Nombre pc)" 2 "Usar otra distribucion de teclado como principal" 3 "Cambiar contraseña de root" 4 "Habilitar AUR (con yaourt)"`
|
||||
if [[ $othopt = "e" ]];then
|
||||
break
|
||||
else
|
||||
case $othopt in
|
||||
1)
|
||||
echo ""
|
||||
nam=`dialog --stdout --inputbox "Nombre para el ordenador" 9 50`
|
||||
echo $nam > /mnt/etc/hostname
|
||||
;;
|
||||
2)
|
||||
echo "Escoja su idioma para la distribucion del teclado"
|
||||
options=($(cat /mnt/etc/locale.gen | grep '^#[a-zA-Z]' | cut -c2-30 | cut -f1 -d"_" | sort | uniq))
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
*) langabr=$opt;break;;
|
||||
esac
|
||||
done
|
||||
#Cambiar el layout del teclado por el nuevo
|
||||
keyboardlayout
|
||||
;;
|
||||
3)
|
||||
until [[ $pass1 = $pass2 && $pass1 != "" ]]
|
||||
do
|
||||
pass1=`dialog --stdout --insecure --passwordbox "$(T "Password for ") . root" 9 50`
|
||||
pass2=`dialog --stdout --insecure --passwordbox "$(T "Repeat password")" 9 50`
|
||||
if ! [[ $pass1 = $pass2 && $pass1 != "" ]];then
|
||||
mostrardialog "$(T "Password")" "$(T "Passwords do not match")"
|
||||
fi
|
||||
done
|
||||
echo "root:${pass1}" | inchroot chpasswd
|
||||
pass1="" #Reiniciar pass1, por si hace falta de nuevo que el until funcione
|
||||
;;
|
||||
4) inchroot pacman -S yaourt base-devel --noconfirm --needed;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function bootinstall {
|
||||
|
||||
if [[ -z $partefi ]];then
|
||||
#Si no usa EFI, preguntar por instalar GRUB
|
||||
optboot=`dialog --stdout --nocancel --menu "¿Instalar bootloader/gestor de arranque?" 0 0 4 1 "Si (GRUB)" 2 "No, no instalar gestor de arranque"`
|
||||
case $optboot in
|
||||
1)
|
||||
inchroot pacman -S grub os-prober --noconfirm
|
||||
#Arranque silencioso
|
||||
sed -i 's/\GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current"/g' /mnt/etc/default/grub
|
||||
echo "Instalando GRUB para BIOS/MBR"
|
||||
inchroot grub-install --target=i386-pc /dev/$argpart
|
||||
inchroot grub-mkconfig -o /boot/grub/grub.cfg
|
||||
;;
|
||||
2)
|
||||
#No hará nada
|
||||
echo "$(T "No new bootloader installed")"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
#Si usa EFI, preguntar por instalar rEFInd
|
||||
optboot=`dialog --stdout --nocancel --menu "¿Instalar bootloader/gestor de arranque?" 0 0 4 1 "Si (rEFInd) (Recomendado)" 2 "Si (GRUB) (Suele fallar)" 3 "No, no instalar gestor de arranque"`
|
||||
case $optboot in
|
||||
1)
|
||||
echo "Instalando rEFInd para UEFI"
|
||||
inchroot pacman -S efibootmgr dosfstools refind-efi --noconfirm
|
||||
inchroot refind-install
|
||||
rootuuid=$(blkid -o value -s UUID /dev/$(echo $particionraiz))
|
||||
echo '"Boot with standard options" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet loglevel=3 vga=current"' > /mnt/boot/refind_linux.conf
|
||||
echo "Boot in nomodeset mode" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet loglevel=3 vga=current nomodeset" >> /mnt/boot/refind_linux.conf
|
||||
echo "Boot to single-user mode" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet single" >> /mnt/boot/refind_linux.conf
|
||||
echo "Boot with minimal options" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap" >> /mnt/boot/refind_linux.conf
|
||||
;;
|
||||
2)
|
||||
echo "Instalando GRUB en modo UEFI, puede fallar"
|
||||
inchroot pacman -S grub os-prober efibootmgr dosfstools --noconfirm
|
||||
sed -i 's/\GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current"/g' /mnt/etc/default/grub
|
||||
inchroot grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck
|
||||
inchroot grub-mkconfig -o /boot/grub/grub.cfg
|
||||
mostrardialog "GRUB" "GRUB fue instalado. Si no funciona, verificar en la bios que este seleccionado grub_uefi o grub como arranque, y no Windows u otro"
|
||||
;;
|
||||
3)
|
||||
#No hará nada
|
||||
echo "$(T "No new bootloader installed")"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
clear
|
||||
@@ -703,7 +794,7 @@ echo "JKArch" > /mnt/etc/hostname
|
||||
|
||||
#Configuraciones varias, en entorno se instala el entorno y programas del usuario
|
||||
entorno
|
||||
mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos
|
||||
inchroot mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos
|
||||
#Ahora, se crea el usuario y se añaden los ficheros de configuracion de skel
|
||||
userpass
|
||||
bootinstall
|
||||
|
||||
Reference in New Issue
Block a user