mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-16 10:11:32 +01:00
changes
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
function pause {
|
||||
echo "Pulse enter para continuar..."
|
||||
read
|
||||
}
|
||||
|
||||
function particiones {
|
||||
echo "Preguntas acerca de las unidades donde instalar el sistema:"
|
||||
echo "Esta parte es la mas importante, antes de seguir se mostrarán los discos duros. Si esta vacío o es nuevo, recomendamos formatear en DOS/MBR. Si sabe lo que hace, o ya usaba GPT/UEFI, tendrá que seleccionar partición EFI, recuerdelo"
|
||||
@@ -20,7 +25,7 @@ do
|
||||
done
|
||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||
|
||||
echo "Elige la particion a usar como sistema raíz o '/' "
|
||||
echo "Elige la particion a usar como sistema raíz ('/')"
|
||||
options=($(lsblk --output KNAME | sed '1d'| grep 'sd\|hd'))
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
@@ -29,7 +34,7 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Escoje el formato para la particion"
|
||||
echo "Escoje el formato para la particion. EXT4 recomendado"
|
||||
|
||||
options=("EXT4" "BTRFS" "No formatear")
|
||||
select opt in "${options[@]}"
|
||||
@@ -45,7 +50,57 @@ do
|
||||
;;
|
||||
"No formatear")
|
||||
#Asi no formateará
|
||||
formatoraiz="echo unidad "
|
||||
formatoraiz="No formatear"
|
||||
break
|
||||
;;
|
||||
*) echo invalid option;;
|
||||
esac
|
||||
done
|
||||
|
||||
clear
|
||||
echo "¿Quieres/tienes una partición home separada?"
|
||||
options=("Si" "No")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"Si")
|
||||
#Selección de home
|
||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||
echo "Elige la particion a usar como home ('/home')"
|
||||
options=($(lsblk --output KNAME | sed '1d'| grep 'sd\|hd'))
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
*) particionhome=$opt;break;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Escoje el formato para la particion. EXT4 recomendado"
|
||||
|
||||
options=("EXT4" "BTRFS" "No formatear")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"EXT4")
|
||||
formatohome="mkfs.ext4"
|
||||
break
|
||||
;;
|
||||
"BTRFS")
|
||||
formatohome="mkfs.btrfs"
|
||||
break
|
||||
;;
|
||||
"No formatear")
|
||||
#Asi no formateará
|
||||
formatohome="No formatear"
|
||||
break
|
||||
;;
|
||||
*) echo invalid option;;
|
||||
esac
|
||||
done
|
||||
|
||||
break
|
||||
;;
|
||||
"No")
|
||||
break
|
||||
;;
|
||||
*) echo invalid option;;
|
||||
@@ -57,8 +112,12 @@ done
|
||||
function install {
|
||||
echo "Instalando el sistema, espere.."
|
||||
$formatoraiz /dev/$particionraiz
|
||||
wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O /tmp/pacman.conf
|
||||
mount /dev/$particionraiz /mnt/
|
||||
if [[ $particionhome ]];then
|
||||
$formatohome /dev/$particionhome
|
||||
mount /dev/$particionhome /mnt/home/
|
||||
fi
|
||||
wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O /tmp/pacman.conf
|
||||
pacstrap -C /tmp/pacman.conf /mnt/ base jka-toolkit git wget netctl iw wpa_supplicant dialog
|
||||
wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/chrootinstall.sh -O /mnt/root/chrootinstall.sh
|
||||
chmod +x /mnt/root/chrootinstall.sh
|
||||
@@ -67,21 +126,23 @@ cp /etc/netctl/* /mnt/etc/netctl/
|
||||
argpart=$(echo $particionraiz | cut -c1-3)
|
||||
arch-chroot /mnt /bin/bash -c "./root/chrootinstall.sh $argpart"
|
||||
}
|
||||
|
||||
clear
|
||||
echo "Script de instalación simple de Arch (BETA)"
|
||||
echo "Mediante unas preguntas y avanzando, instalaremos arch"
|
||||
echo "Antes de continuar, asegurese que tiene un wifi enchufado, o una conexion por cable"
|
||||
echo "Pulse enter para continuar"
|
||||
read
|
||||
pause
|
||||
echo "Desmontando posibles particiones"
|
||||
umount /mnt/*
|
||||
umount /mnt/
|
||||
particiones
|
||||
|
||||
clear
|
||||
echo "Ok, vamos a comenzar la instalacion, pero antes, un resumen de donde lo va a instalar."
|
||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||
echo "Partición raiz (/): $particionraiz , con formato $formatoraiz"
|
||||
if [[ $particionhome ]];then
|
||||
echo "Partición home (/home): $particionhome , con formato $formatohome"
|
||||
fi
|
||||
echo "Si estas de acuerdo, presione enter, en caso contrario, apague el ordenador a la fuerza"
|
||||
read
|
||||
pause
|
||||
install
|
||||
#Falta mucho
|
||||
|
||||
Reference in New Issue
Block a user