60 lines
1.5 KiB
Bash
60 lines
1.5 KiB
Bash
#!/bin/sh
|
|
################ THE FIRST SCRIPT STARTS HERE ###############
|
|
#once in arch-chroot, you must run this !
|
|
|
|
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
|
|
hwclock --systohc --utc
|
|
mkinitcpio -P
|
|
date
|
|
|
|
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
|
|
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
|
|
|
|
echo 'LANG=en_US.UTF-8' >/etc/locale.conf
|
|
echo 'LANGUAGE= en_US.UTF-8' >> /etc/locale.conf
|
|
echo 'LC_MESSAGES= en_US.UTF-8'>> /etc/locale.conf
|
|
|
|
locale-gen
|
|
echo 'KEYMAP=fr' > /etc/vconsole.conf
|
|
|
|
echo 'nowhere' > /etc/hostname
|
|
|
|
echo "127.0.0.1 localhost" > /etc/hosts
|
|
echo "127.0.1.1 localhost" >> /etc/hosts
|
|
echo "::1 localhost" >> /etc/hosts
|
|
|
|
pacman -S networkmanager dhcpcd refind
|
|
systemctl enable NetworkManager
|
|
systemctl enable dhcpcd
|
|
|
|
echo
|
|
echo '[+] ENTER ROOT PASSWORD!'
|
|
passwd
|
|
|
|
echo '[+] what is the name of the user ?'
|
|
read username
|
|
|
|
useradd $username
|
|
mkdir /home/$username
|
|
cp /etc/skel/.* /home/$username/
|
|
chown -R $username: /home/$username
|
|
#set nothing's password
|
|
echo
|
|
echo '[+] ENTER USERS PASSWORD!'
|
|
passwd $username
|
|
pacman -S sudo
|
|
echo '%wheel ALL=(ALL) ALL' >> /etc/sudoers
|
|
usermod -aG wheel $username
|
|
|
|
#pacman -S grub os-prober
|
|
#grub-install /dev/sda
|
|
|
|
#grub-mkconfig -o /boot/grub/grub.cfg
|
|
|
|
refind-install
|
|
echo \"Boot with minimal options\" \"rw root=$(blkid /dev/sda2 | awk '{print $2}' | tr -d '"') initrd=initramfs-linux.img\" > /boot/refind_linux.conf
|
|
|
|
echo 'now type "exit" to go out of arch-chroot'
|
|
echo 'type umount /mnt/boot /mnt'
|
|
echo 'and type "reboot" to reboot into your arch install.'
|