Created
April 16, 2013 02:21
-
-
Save dinigo/5392855 to your computer and use it in GitHub Desktop.
Script de instalación de Arch en VirtualBox
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 | |
#################### | |
#### VIRTUALBOX #### | |
#################### | |
# configura el idioma y terminal | |
loadkeys es | |
setfont Lat2-Terminus16 | |
vi /etc/locale.gen | |
locale-gen | |
export LANG=es_ES.UTF-8 | |
# particiona, formatea | |
cfdisk /dev/sda/ | |
mkfs.ext4 /dev/sda1 | |
mkfs.ext4 /dev/sda2 | |
mkswap /dev/sda3 | |
swapon /dev/sda3 | |
# monta las particiones | |
mkdir -p /mnt/home | |
mount /dev/sda1 /mnt | |
mount /dev/sda2 /mnt/home | |
# descarga y edita los mirrors | |
wget -O /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/ | |
vi /etc/pacman.d/mirrorlist | |
# instala el sistema base | |
pacstrap -i /mnt base | |
# genera el fstab | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
vi /mnt/etc/fstab | |
#------------------------# | |
# POSTINSTALACION # | |
#------------------------# | |
# actualiza todo e instala algunas cosas | |
pacman -Syy | |
pacman -Syu git tmux ifplugd wireless_tools wpa_supplicant wpa_actiond dialog | |
# configura el sistema ya instalado | |
arch-chroot /mnt | |
# idiomas y demas | |
vi /etc/locale.gen | |
locale-gen | |
echo LANG=es_ES.UTF-8 > /etc/locale.conf | |
export LANG=es_ES.UTF-8 | |
loadkeys es | |
setfont Lat2-Terminus16 | |
echo KEYMAP=es > /etc/vconsole.conf | |
echo FONT=Lat2-Terminus16 >> /etc/vconsole.conf | |
# configura la zona horaria | |
ln -s /usr/share/zoneinfo/Europe/Madrid /etc/localtime | |
hwclock --systohc --utc | |
# configuracion adicional | |
echo blancote > /etc/hostname | |
# activa internet | |
iwconfig | |
read -p "recuerda las interfaces y escribelas a continuacion" | |
vi /etc/conf.d/netcfg | |
#while true; do | |
# read -p "QUE TIPO DE CONEXION QUIERES [eth, wifi]" tipo | |
# case $tipo in | |
# eth ) make install; break;; | |
# wifi ) systemctl enable net-auto-wireless; break;; | |
# * ) echo "Please answer yes or no.";; | |
# esac | |
#done | |
read -p "ELIJE UNA INTERFAZ DE RED: " interfaz | |
ip link set $interfaz up | |
systemctl start dhcpcd@$interfaz | |
# crea un RAM DISK | |
mkinitcpio -p linux | |
# instala el grub | |
pacman -S grub-bios | |
grub-install --recheck /dev/sda | |
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo | |
pacman -S os-prober | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# password de root | |
passwd | |
# exit | |
echo "saliendo" | |
exit | |
umount /mnt/{home,} | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment