mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-16 02:01:32 +01:00
First big recode of archinstall(dev), not functional yet
This commit is contained in:
@@ -305,24 +305,25 @@ fi
|
|||||||
#fin del if de pedir los datos si no esta en automatico
|
#fin del if de pedir los datos si no esta en automatico
|
||||||
}
|
}
|
||||||
|
|
||||||
### Base install of the system ###
|
### Install and configure all of the system ###
|
||||||
function baseinstall {
|
function installconf {
|
||||||
clear
|
clear
|
||||||
tput setaf 2 ; echo "$(T "Installing system, this can take about 10 minutes, wait")" ; tput setaf 9
|
tput setaf 2 ; echo "$(T "Installing system, this can take about 20 minutes, wait")" ; tput setaf 9
|
||||||
sleep 2
|
sleep 2
|
||||||
tput setaf 2 ; echo "$(T "Formatting and mounting partitions")" ; tput setaf 9
|
tput setaf 2 ; echo "$(T "Formatting and mounting partitions")" ; tput setaf 9
|
||||||
execl $formatoraiz /dev/$particionraiz
|
execl $formatoraiz /dev/$particionraiz
|
||||||
e2label /dev/$particionraiz "JKArch"
|
e2label /dev/$particionraiz "JKArch"
|
||||||
execl mount /dev/$particionraiz /mnt/
|
execl mount /dev/$particionraiz /mnt/
|
||||||
if [[ $particionhome ]];then
|
if [[ $particionhome ]];then
|
||||||
execl $formatohome /dev/$particionhome
|
execl $formatohome /dev/$particionhome
|
||||||
mkdir -p /mnt/home/
|
mkdir -p /mnt/home/
|
||||||
execl mount /dev/$particionhome /mnt/home/
|
execl mount /dev/$particionhome /mnt/home/
|
||||||
fi
|
fi
|
||||||
if [[ $partefi ]];then
|
if [[ $partefi ]];then
|
||||||
mkdir -p /mnt/boot/efi
|
mkdir -p /mnt/boot/efi
|
||||||
execl mount /dev/$partefi /mnt/boot/efi/
|
execl mount /dev/$partefi /mnt/boot/efi/
|
||||||
fi
|
fi
|
||||||
|
## Download or install base system.
|
||||||
if [[ $isoffline = "0" ]];then
|
if [[ $isoffline = "0" ]];then
|
||||||
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O pacman.conf
|
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O pacman.conf
|
||||||
isanetworkerror #Comprueba si hubo un error de descarga
|
isanetworkerror #Comprueba si hubo un error de descarga
|
||||||
@@ -354,6 +355,7 @@ if [[ $swaptype ]];then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create bind mountpoints for the rest of the install
|
||||||
if [[ $isoffline = 0 ]];then
|
if [[ $isoffline = 0 ]];then
|
||||||
cp -r /etc/netctl/* /mnt/etc/netctl/
|
cp -r /etc/netctl/* /mnt/etc/netctl/
|
||||||
cp -f /etc/resolv.conf /mnt/etc/resolv.conf
|
cp -f /etc/resolv.conf /mnt/etc/resolv.conf
|
||||||
@@ -365,10 +367,166 @@ mount --bind /run /mnt/run
|
|||||||
if [[ $isoffline = 1 ]];then
|
if [[ $isoffline = 1 ]];then
|
||||||
mount --bind /run/archiso/bootmnt/ /mnt/run/archiso/bootmnt/ # CD bind
|
mount --bind /run/archiso/bootmnt/ /mnt/run/archiso/bootmnt/ # CD bind
|
||||||
fi
|
fi
|
||||||
|
#
|
||||||
|
|
||||||
|
#Do allpackages var contain base packages, and install all.
|
||||||
|
$pak="jka-toolkit git wget netctl iw wpa_supplicant reflector dialog sudo alsa-utils dosfstools ntfs-3g bash-completion"
|
||||||
|
allpackages=$allpackages" "$pak
|
||||||
|
#For sync
|
||||||
|
$pak="ntpd"
|
||||||
|
allpackages=$allpackages" "$pak
|
||||||
|
|
||||||
|
##GUI and apps
|
||||||
|
#Xbase
|
||||||
|
#tput setaf 2 ;echo "$(T "Installing desktop and basic programs, please wait")" ; tput setaf 9
|
||||||
|
|
||||||
|
# Basic programs and audio support
|
||||||
|
if [[ $optentorno != 7 ]];then
|
||||||
|
pak="xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager"
|
||||||
|
#Gestor de energia xfce4-power-manager
|
||||||
|
fi
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
|
||||||
|
execl chroot pacman -Syu $allpackages --noconfirm --needed #Install packages , reflector is for updating mirrorlist
|
||||||
|
|
||||||
|
#language
|
||||||
|
sed -i "s/\#$langinst/$langinst/g" /mnt/etc/locale.gen
|
||||||
|
echo "LANG=$opclang" > /mnt/etc/locale.conf
|
||||||
|
echo "LANGUAGE=$opclang" >> /mnt/etc/locale.conf
|
||||||
|
echo "LC_COLLATE=$opclang" >> /mnt/etc/locale.conf
|
||||||
|
echo "KEYMAP=$langabr" > /mnt/etc/vconsole.conf
|
||||||
|
execl chroot locale-gen
|
||||||
|
clear
|
||||||
|
|
||||||
|
#timezone
|
||||||
|
test -n "$NEW_TIMEZONE" && cp -fp /mnt/usr/share/zoneinfo/"$NEW_TIMEZONE" /mnt/etc/localtime
|
||||||
|
execl chroot hwclock --systohc --utc
|
||||||
|
execl chroot systemctl enable ntpd
|
||||||
|
if [[ $isoffline = 0 ]];then #Only sync if its online
|
||||||
|
echo "$(T "Syncing hour to internet")";
|
||||||
|
execl chroot ntpd -qg
|
||||||
|
execl chroot hwclock -w
|
||||||
|
else
|
||||||
|
echo "Clock will not be okay until restart and configure manually because you dont have net"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#usuarios
|
||||||
|
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
||||||
|
tar xJf mods/skel.tar.xz -C /mnt/
|
||||||
|
else #online
|
||||||
|
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/skel.tar.xz -O- | tar xJf - -C /mnt/
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Themes skel before creating user and remove some progs
|
||||||
|
if [[ $optentorno = 1 ]];then #LXDE
|
||||||
|
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
||||||
|
tar xJf mods/LXDE.tar.xz -C /mnt/
|
||||||
|
else #online
|
||||||
|
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/LXDE.tar.xz -O- | tar xJf - -C /mnt/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $optentorno = 2 ]];then #XFCE4
|
||||||
|
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
||||||
|
tar xJf mods/XFCE4.tar.xz -C /mnt/
|
||||||
|
else #online
|
||||||
|
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/XFCE4.tar.xz -O- | tar xJf - -C /mnt/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $optentorno = 4 ]];then #GDM remove in gnome
|
||||||
|
execl chroot pacman -R gdm --noconfirm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $optentorno = 6 ]];then #Plasma, remove 2 apps
|
||||||
|
execl chroot pacman -R plasma-mediacenter ksshaskpass --noconfirm
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#user
|
||||||
|
execl chroot useradd -m -G wheel -s /bin/bash $nameuser
|
||||||
|
echo "${nameuser}:${passuser}" | execl chroot chpasswd
|
||||||
|
|
||||||
|
#root
|
||||||
|
echo "root:${passroot}" | execl chroot chpasswd
|
||||||
|
#For some strange login bugs
|
||||||
|
echo "Cambio de permisos por si se quedaron mal en algún momento"
|
||||||
|
execl chroot chmod 755 /
|
||||||
|
execl chroot chmod 755 /bin
|
||||||
|
|
||||||
|
#Añadir soporte sudo para este nuevo usuario (por ser del grupo wheel)
|
||||||
|
sed -i "s/\# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" /mnt/etc/sudoers
|
||||||
|
|
||||||
|
#Directorios para usuarios
|
||||||
|
execl chroot xdg-user-dirs-update
|
||||||
|
#Habilitamos ciertos servicios
|
||||||
|
execl chroot systemctl enable lightdm
|
||||||
|
execl chroot systemctl enable NetworkManager
|
||||||
|
|
||||||
|
|
||||||
|
#Configure wine if neccesary
|
||||||
|
if [[ $inswine = 1 ]];then
|
||||||
|
echo "$(T "Configuring wine for better experience") (32 bit winearch)"
|
||||||
|
execl chuser WINEARCH=win32 wineboot -u
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Install and configure bootloader
|
||||||
|
if [[ -z $partefi ]];then #If it dont have EFI
|
||||||
|
case $optboot in
|
||||||
|
1)
|
||||||
|
execl chroot 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"
|
||||||
|
#Se usa la variable ${hd} que se escogió al principio
|
||||||
|
execl chroot grub-install --target=i386-pc /dev/${hd}
|
||||||
|
execl chroot grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else #With EFI
|
||||||
|
case $optboot in
|
||||||
|
1)
|
||||||
|
echo "Instalando rEFInd para UEFI"
|
||||||
|
execl chroot pacman -S efibootmgr dosfstools refind-efi --noconfirm
|
||||||
|
execl chroot 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"
|
||||||
|
execl chroot 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
|
||||||
|
execl chroot grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck
|
||||||
|
execl chroot 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"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Hostname
|
||||||
|
echo "JKArch" > /mnt/etc/hostname
|
||||||
|
|
||||||
|
#Linux
|
||||||
|
execl chroot mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos
|
||||||
|
|
||||||
|
#GRUB/rEFInd
|
||||||
|
bootinstall
|
||||||
|
|
||||||
|
#Tweaks
|
||||||
|
echo "$(T "Last tweaks and cleaning")"
|
||||||
|
execl chroot systemctl enable dhcpcd
|
||||||
|
execl chroot pacman -Sc --noconfirm
|
||||||
|
|
||||||
execl chroot pacman -Syu jka-toolkit git wget netctl iw wpa_supplicant reflector dialog sudo alsa-utils dosfstools ntfs-3g bash-completion --noconfirm --needed #Install base packages , reflector is for updating mirrorlist
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Date and language ###
|
### Date and language ###
|
||||||
function horaidioma {
|
function horaidioma {
|
||||||
while [[ $opclang == "" ]];do
|
while [[ $opclang == "" ]];do
|
||||||
@@ -391,13 +549,6 @@ esac
|
|||||||
|
|
||||||
done #End of selecting lang
|
done #End of selecting lang
|
||||||
|
|
||||||
sed -i "s/\#$langinst/$langinst/g" /mnt/etc/locale.gen
|
|
||||||
echo "LANG=$opclang" > /mnt/etc/locale.conf
|
|
||||||
echo "LANGUAGE=$opclang" >> /mnt/etc/locale.conf
|
|
||||||
echo "LC_COLLATE=$opclang" >> /mnt/etc/locale.conf
|
|
||||||
echo "KEYMAP=$langabr" > /mnt/etc/vconsole.conf
|
|
||||||
execl chroot locale-gen
|
|
||||||
clear
|
|
||||||
echo "$(T "Now select your timezone for adjusting the clock")"
|
echo "$(T "Now select your timezone for adjusting the clock")"
|
||||||
while [[ $NEW_TIMEZONE == "" ]];do
|
while [[ $NEW_TIMEZONE == "" ]];do
|
||||||
NEW_TIMEZONE=$(execl chroot tzselect)
|
NEW_TIMEZONE=$(execl chroot tzselect)
|
||||||
@@ -406,32 +557,14 @@ case $opt in
|
|||||||
2) NEW_TIMEZONE="";;
|
2) NEW_TIMEZONE="";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
test -n "$NEW_TIMEZONE" && cp -fp /mnt/usr/share/zoneinfo/"$NEW_TIMEZONE" /mnt/etc/localtime
|
|
||||||
execl chroot hwclock --systohc --utc
|
|
||||||
execl chroot pacman -S ntp --noconfirm
|
|
||||||
execl chroot systemctl enable ntpd
|
|
||||||
if [[ $isoffline = 0 ]];then #Only sync if its online
|
|
||||||
echo "$(T "Syncing hour to internet")";
|
|
||||||
execl chroot ntpd -qg
|
|
||||||
execl chroot hwclock -w
|
|
||||||
else
|
|
||||||
echo "Clock will not be okay until restart and configure manually because you dont have net"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function userpass {
|
function userpass {
|
||||||
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
|
||||||
tar xJf mods/skel.tar.xz -C /mnt/
|
|
||||||
else #online
|
|
||||||
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/skel.tar.xz -O- | tar xJf - -C /mnt/
|
|
||||||
fi
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
#Aqui hay que añadir los comandos para crear un usuario, aunque esto correrá dentro del chroot y no aqui
|
#Aqui hay que añadir los comandos para crear un usuario, aunque esto correrá dentro del chroot y no aqui
|
||||||
nameuser=`dialog --stdout --inputbox "Ahora crearemos tu usuario \nNombre para tu usuario:" 10 50`
|
nameuser=`dialog --stdout --inputbox "Ahora crearemos tu usuario \nNombre para tu usuario:" 10 50`
|
||||||
execl chroot useradd -m -G wheel -s /bin/bash $nameuser
|
|
||||||
until [[ $pass1 = $pass2 && $pass1 != "" ]]
|
until [[ $pass1 = $pass2 && $pass1 != "" ]]
|
||||||
do
|
do
|
||||||
pass1=`dialog --stdout --insecure --passwordbox "$(T "Password for ") $nameuser" 9 50`
|
pass1=`dialog --stdout --insecure --passwordbox "$(T "Password for ") $nameuser" 9 50`
|
||||||
@@ -440,19 +573,14 @@ do
|
|||||||
mostrardialog "$(T "Password")" "$(T "Passwords do not match")"
|
mostrardialog "$(T "Password")" "$(T "Passwords do not match")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "${nameuser}:${pass1}" | execl chroot chpasswd
|
passuser=${pass1}
|
||||||
pass1="" #Reiniciar pass1, por si hace falta de nuevo que el until funcione
|
pass1="" #Reiniciar pass1, por si hace falta de nuevo que el until funcione
|
||||||
|
|
||||||
#For some strange login bugs
|
|
||||||
echo "Cambio de permisos por si se quedaron mal en algún momento"
|
|
||||||
execl chroot chmod 755 /
|
|
||||||
execl chroot chmod 755 /bin
|
|
||||||
#
|
|
||||||
|
|
||||||
#See if user wants to edit root password or not.
|
#See if user wants to edit root password or not.
|
||||||
opt=`dialog --stdout --nocancel --menu "$(T "You want to edit root (admin) password or set same as user?")" 0 0 4 1 "$(T "Same as user")" 2 "$(T "Edit")"`
|
opt=`dialog --stdout --nocancel --menu "$(T "You want to edit root (admin) password or set same as user?")" 0 0 4 1 "$(T "Same as user")" 2 "$(T "Edit")"`
|
||||||
case $opt in
|
case $opt in
|
||||||
1) echo "root:${pass2}" | execl chroot chpasswd;;
|
1) passroot=${pass2};;
|
||||||
2) until [[ $pass1 = $pass2 && $pass1 != "" ]]
|
2) until [[ $pass1 = $pass2 && $pass1 != "" ]]
|
||||||
do
|
do
|
||||||
pass1=`dialog --stdout --insecure --passwordbox "$(T "Password for ") . root" 9 50`
|
pass1=`dialog --stdout --insecure --passwordbox "$(T "Password for ") . root" 9 50`
|
||||||
@@ -461,30 +589,29 @@ case $opt in
|
|||||||
mostrardialog "$(T "Password")" "$(T "Passwords do not match")"
|
mostrardialog "$(T "Password")" "$(T "Passwords do not match")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "root:${pass1}" | execl chroot chpasswd
|
passroot=${pass2}
|
||||||
pass1="" #Reiniciar pass1, por si hace falta de nuevo que el until funcione
|
pass1="" #Reiniciar pass1, por si hace falta de nuevo que el until funcione
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#Añadir soporte sudo para este nuevo usuario
|
|
||||||
sed -i "s/\# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" /mnt/etc/sudoers
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function graficos {
|
function graficos {
|
||||||
optgrafica=`dialog --stdout --nocancel --scrollbar --menu "$(T "What is your graphics card brand?")" 0 0 6 1 "Nvidia" 2 "AMD/ATI" 3 "Intel" 4 "VIA" 5 "Estoy usando VirtualBox" 6 "Estoy usando VMWare" 7 "No se la marca/Otra (Se instalaran todos los drivers graficos estandar)"`
|
optgrafica=`dialog --stdout --nocancel --scrollbar --menu "$(T "What is your graphics card brand?")" 0 0 6 1 "Nvidia" 2 "AMD/ATI" 3 "Intel" 4 "VIA" 5 "Estoy usando VirtualBox" 6 "Estoy usando VMWare" 7 "No se la marca/Otra (Se instalaran todos los drivers graficos estandar)"`
|
||||||
|
|
||||||
case $optgrafica in
|
case $optgrafica in
|
||||||
1) execl chroot pacman -S xf86-video-nouveau xf86-video-nv libva-vdpau-driver mesa-vdpau --noconfirm;;
|
1) pak="xf86-video-nouveau xf86-video-nv libva-vdpau-driver mesa-vdpau";;
|
||||||
2) execl chroot pacman -S xf86-video-ati xf86-video-amdgpu libva-mesa-driver libva-vdpau-driver mesa-vdpau --noconfirm;;
|
2) pak="xf86-video-ati xf86-video-amdgpu libva-mesa-driver libva-vdpau-driver mesa-vdpau";;
|
||||||
3) execl chroot pacman -S xf86-video-intel libva-intel-driver libvdpau-va-gl --noconfirm;;
|
3) pak="xf86-video-intel libva-intel-driver libvdpau-va-gl";;
|
||||||
4) execl chroot pacman -S xf86-video-openchrome --noconfirm;;
|
4) pak="xf86-video-openchrome";;
|
||||||
5) execl chroot pacman -S virtualbox-guest-utils virtualbox-guest-modules-arch --noconfirm;;
|
5) pak="virtualbox-guest-utils virtualbox-guest-modules-arch";;
|
||||||
6) execl chroot pacman -S xf86-video-vmware xf86-input-vmmouse open-vm-tools --noconfirm;;
|
6) pak="xf86-video-vmware xf86-input-vmmouse open-vm-tools";;
|
||||||
7) execl chroot pacman -S $(execl chroot pacman -Ssq xf86-video-*) --noconfirm;;
|
7) pak=$(execl chroot pacman -Ssq xf86-video-*);;
|
||||||
esac
|
esac
|
||||||
|
allpackages=$allpackages" "$pak
|
||||||
|
|
||||||
#Instalar siempre la estandar, por se acaso
|
#Instalar siempre la estandar, por se acaso
|
||||||
execl chroot pacman -S xf86-video-vesa mesa-libgl --noconfirm
|
pak="xf86-video-vesa mesa-libgl"
|
||||||
|
allpackages=$allpackages" "$pak
|
||||||
}
|
}
|
||||||
|
|
||||||
function programasguiuser {
|
function programasguiuser {
|
||||||
@@ -565,8 +692,8 @@ if [[ $nooptprogs != "1" ]];then
|
|||||||
*2*) packages="$packages ttf-ms-fonts";;&
|
*2*) packages="$packages ttf-ms-fonts";;&
|
||||||
*3*) packages="$packages ttf-google-fonts-git"
|
*3*) packages="$packages ttf-google-fonts-git"
|
||||||
#Delete (Package per line) possible packages that conficts with ttf-google-fonts-git
|
#Delete (Package per line) possible packages that conficts with ttf-google-fonts-git
|
||||||
execl chroot pacman -Rdd noto-fonts --noconfirm
|
#execl chroot pacman -Rdd noto-fonts --noconfirm
|
||||||
execl chroot pacman -Rdd ttf-inconsolata --noconfirm #This is because ttf-google-fonts provides noto-fonts (But not noto-fonts-cjk neither noto-fonts-emoji
|
#execl chroot pacman -Rdd ttf-inconsolata --noconfirm #This is because ttf-google-fonts provides noto-fonts (But not noto-fonts-cjk neither noto-fonts-emoji
|
||||||
;;&
|
;;&
|
||||||
esac
|
esac
|
||||||
case $opt6 in
|
case $opt6 in
|
||||||
@@ -609,32 +736,11 @@ if [[ $nooptprogs != "1" ]];then
|
|||||||
*1*) packages="$packages base-devel";;&
|
*1*) packages="$packages base-devel";;&
|
||||||
*2*) packages="$packages jdk8-openjdk";;&
|
*2*) packages="$packages jdk8-openjdk";;&
|
||||||
esac
|
esac
|
||||||
execl chroot pacman -S $packages --noconfirm --needed
|
allpackages=$allpackages" "$packages
|
||||||
if [[ $inswine = 1 ]];then
|
|
||||||
echo "$(T "Configuring wine for better experience") (32 bit winearch)"
|
|
||||||
execl chuser WINEARCH=win32 wineboot -u
|
|
||||||
fi
|
|
||||||
packages=""
|
packages=""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
### Install base graphic programs ###
|
|
||||||
function baseconX {
|
|
||||||
tput setaf 2 ;echo "$(T "Installing desktop and basic programs, please wait")" ; tput setaf 9
|
|
||||||
sleep 2
|
|
||||||
execl chroot pacman -S xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog --noconfirm
|
|
||||||
execl chroot pacman -S lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs --noconfirm # Basic programs and audio support
|
|
||||||
#Instalar pulseaudio si tiene entorno grafico, sino es tonteria
|
|
||||||
execl chroot xdg-user-dirs-update
|
|
||||||
#Gestor de energia
|
|
||||||
execl chroot pacman -S xfce4-power-manager --noconfirm
|
|
||||||
#Habilitamos ciertos servicios
|
|
||||||
execl chroot systemctl enable lightdm
|
|
||||||
execl chroot systemctl enable NetworkManager
|
|
||||||
#Parte visual
|
|
||||||
execl chroot pacman -S jkarch-appearance --noconfirm
|
|
||||||
clear
|
|
||||||
}
|
|
||||||
|
|
||||||
### Simply put keyboard layout configs ###
|
### Simply put keyboard layout configs ###
|
||||||
function keyboardlayout {
|
function keyboardlayout {
|
||||||
@@ -655,53 +761,35 @@ optentorno=`dialog --stdout --nocancel --menu "$(T "Select your desktop envirome
|
|||||||
|
|
||||||
case $optentorno in
|
case $optentorno in
|
||||||
1)
|
1)
|
||||||
baseconX
|
pak="lxappearance lxappearance-obconf lxde-common lxinput lxpanel lxrandr lxsession lxtask lxterminal openbox pcmanfm xfce4-notifyd gtk-engine-aurora faenza-icon-theme"
|
||||||
execl chroot pacman -S lxappearance lxappearance-obconf lxde-common lxinput lxpanel lxrandr lxsession lxtask lxterminal openbox pcmanfm xfce4-notifyd --noconfirm
|
#Themes: gtk-engine-aurora faenza-icon-theme
|
||||||
execl chroot pacman -S gtk-engine-aurora faenza-icon-theme --noconfirm
|
|
||||||
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
|
||||||
tar xJf mods/LXDE.tar.xz -C /mnt/
|
|
||||||
else #online
|
|
||||||
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/LXDE.tar.xz -O- | tar xJf - -C /mnt/
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
baseconX
|
pak="xfce4 faenza-icon-theme"
|
||||||
execl chroot pacman -S xfce4 --noconfirm
|
|
||||||
execl chroot pacman -S faenza-icon-theme --noconfirm
|
|
||||||
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
|
||||||
tar xJf mods/XFCE4.tar.xz -C /mnt/
|
|
||||||
else #online
|
|
||||||
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/XFCE4.tar.xz -O- | tar xJf - -C /mnt/
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
baseconX
|
|
||||||
execl chroot pacman -S cinnamon --noconfirm
|
|
||||||
;;
|
;;
|
||||||
|
3) pak="cinnamon";;
|
||||||
4)
|
4)
|
||||||
optgnome=`dialog --stdout --nocancel --menu "¿Gnome base o gnome con sus extras?" 0 0 5 1 "Gnome base" 2 "Gnome+extras"`
|
optgnome=`dialog --stdout --nocancel --menu "¿Gnome base o gnome con sus extras?" 0 0 5 1 "Gnome base" 2 "Gnome+extras"`
|
||||||
baseconX
|
|
||||||
case $optgnome in
|
case $optgnome in
|
||||||
1) execl chroot pacman -S gnome --noconfirm;;
|
1) pak="gnome";;
|
||||||
2) execl chroot pacman -S gnome gnome-extra --noconfirm;;
|
2) pak="gnome gnome-extra";;
|
||||||
esac
|
esac
|
||||||
execl chroot pacman -R gdm --noconfirm
|
#In installconf, it has to remove gdm
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
optmate=`dialog --stdout --nocancel --menu "¿MATE base o MATE con sus extras?" 0 0 5 1 "MATE base" 2 "MATE+extras"`
|
optmate=`dialog --stdout --nocancel --menu "¿MATE base o MATE con sus extras?" 0 0 5 1 "MATE base" 2 "MATE+extras"`
|
||||||
baseconX
|
|
||||||
case $optmate in
|
case $optmate in
|
||||||
1) execl chroot pacman -S mate --noconfirm;;
|
1) pak="mate";;
|
||||||
2) execl chroot pacman -S mate mate-extra --noconfirm;;
|
2) pak="mate mate-extra";;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
6)
|
6)
|
||||||
baseconX
|
pak="plasma"
|
||||||
execl chroot pacman -S plasma --noconfirm
|
#Remove plasma-mediacenter ksshaskpass after, in installconf
|
||||||
execl chroot pacman -R plasma-mediacenter ksshaskpass --noconfirm
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
#Pass pak to allpackages
|
||||||
|
allpackages=$allpackages" "$pak
|
||||||
}
|
}
|
||||||
|
|
||||||
### More optional configs ###
|
### More optional configs ###
|
||||||
@@ -744,17 +832,9 @@ if [[ -z $partefi ]];then
|
|||||||
#Si no usa EFI, preguntar por instalar GRUB
|
#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"`
|
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
|
case $optboot in
|
||||||
1)
|
|
||||||
execl chroot 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"
|
|
||||||
#Se usa la variable ${hd} que se escogió al principio
|
|
||||||
execl chroot grub-install --target=i386-pc /dev/${hd}
|
|
||||||
execl chroot grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
;;
|
|
||||||
2)
|
2)
|
||||||
#No hará nada
|
#No hará nada
|
||||||
|
##TODO DIALOG##
|
||||||
echo "$(T "No new bootloader installed")"
|
echo "$(T "No new bootloader installed")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -762,26 +842,9 @@ else
|
|||||||
#Si usa EFI, preguntar por instalar rEFInd
|
#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"`
|
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
|
case $optboot in
|
||||||
1)
|
|
||||||
echo "Instalando rEFInd para UEFI"
|
|
||||||
execl chroot pacman -S efibootmgr dosfstools refind-efi --noconfirm
|
|
||||||
execl chroot 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"
|
|
||||||
execl chroot 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
|
|
||||||
execl chroot grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck
|
|
||||||
execl chroot 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)
|
3)
|
||||||
#No hará nada
|
#No hará nada
|
||||||
|
##TODO DIALOG##
|
||||||
echo "$(T "No new bootloader installed")"
|
echo "$(T "No new bootloader installed")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -801,10 +864,35 @@ echo "Desmontando posibles particiones"
|
|||||||
umount /mnt/boot/efi/
|
umount /mnt/boot/efi/
|
||||||
umount /mnt/*
|
umount /mnt/*
|
||||||
umount /mnt/
|
umount /mnt/
|
||||||
|
|
||||||
|
# Start questions
|
||||||
|
#Partitions
|
||||||
particiones
|
particiones
|
||||||
|
|
||||||
|
#Configure hour/timezone
|
||||||
|
horaidioma
|
||||||
|
|
||||||
|
#Configuraciones varias, en entorno se instala el entorno
|
||||||
|
entorno
|
||||||
|
|
||||||
|
#Se crea el usuario despues del entorno pero antes de instalar más (para una correcta configuración) y se añaden los ficheros de configuracion de skel
|
||||||
|
userpass
|
||||||
|
|
||||||
|
#Programas de usuario si hay entorno escogido
|
||||||
|
if [[ $optentorno != "7" ]];then
|
||||||
|
graficos
|
||||||
|
#Poner el teclado bien en x11
|
||||||
|
keyboardlayout
|
||||||
|
#Aqui va la personalizacion de programas, ya que son graficos.
|
||||||
|
programasguiuser
|
||||||
|
|
||||||
|
#Modificar gksu para preguntar por contraseña del usuario
|
||||||
|
execl chuser gconftool-2 --set /apps/gksu/sudo-mode --type=bool true --owner=$(echo $nameuser)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
#Resumen de los cambios
|
# Resumen de los cambios
|
||||||
tput setaf 6
|
tput setaf 6
|
||||||
echo "$(T "Ok, last thing before start installing, summary of changes")"
|
echo "$(T "Ok, last thing before start installing, summary of changes")"
|
||||||
echo "$(T "Partition scheme before your changes")"
|
echo "$(T "Partition scheme before your changes")"
|
||||||
@@ -880,37 +968,15 @@ tput setaf 9
|
|||||||
|
|
||||||
#Instalación
|
#Instalación
|
||||||
pause
|
pause
|
||||||
baseinstall
|
|
||||||
horaidioma #Configure hour/timezone
|
|
||||||
|
|
||||||
echo "JKArch" > /mnt/etc/hostname
|
|
||||||
|
|
||||||
#Configuraciones varias, en entorno se instala el entorno
|
|
||||||
entorno
|
|
||||||
|
|
||||||
#Se crea el usuario despues del entorno pero antes de instalar más (para una correcta configuración) y se añaden los ficheros de configuracion de skel
|
|
||||||
userpass
|
|
||||||
|
|
||||||
#Programas de usuario si hay entorno escogido
|
|
||||||
if [[ $optentorno != "7" ]];then
|
|
||||||
graficos
|
|
||||||
#Poner el teclado bien en x11
|
|
||||||
keyboardlayout
|
|
||||||
#Aqui va la personalizacion de programas, ya que son graficos.
|
|
||||||
programasguiuser
|
|
||||||
|
|
||||||
#Modificar gksu para preguntar por contraseña del usuario
|
|
||||||
execl chuser gconftool-2 --set /apps/gksu/sudo-mode --type=bool true --owner=$(echo $nameuser)
|
|
||||||
fi
|
|
||||||
|
|
||||||
execl chroot mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos
|
|
||||||
|
|
||||||
|
|
||||||
bootinstall
|
|
||||||
|
##CAMBIAR ESTO##
|
||||||
|
installconf
|
||||||
|
|
||||||
|
|
||||||
otrasconfig
|
otrasconfig
|
||||||
echo "$(T "Last tweaks and cleaning")"
|
|
||||||
execl chroot systemctl enable dhcpcd
|
|
||||||
execl chroot pacman -Sc --noconfirm
|
|
||||||
|
|
||||||
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
if [[ $isoffline = 1 ]];then # Is an offline installation?
|
||||||
echo "Configurando pacman para usar servidores web en los siguientes arranques..."
|
echo "Configurando pacman para usar servidores web en los siguientes arranques..."
|
||||||
|
|||||||
Reference in New Issue
Block a user