Skip to content

Instantly share code, notes, and snippets.

@harmo
Last active December 18, 2016 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harmo/6ef119ad244b2e03ed4f to your computer and use it in GitHub Desktop.
Save harmo/6ef119ad244b2e03ed4f to your computer and use it in GitHub Desktop.
loadkeys fr

parted -s /dev/sd<n> mklabel gpt
parted -s /dev/sd<n> mkpart "primary" "fat16" "50MB" "150MB"
parted -s /dev/sd<n> mkpart "primary" "linux-swap" "151MB" "9367MB"
parted -s /dev/sd<n> mkpart "primary" "ext4" "<start>" "<end>"
parted -s /dev/sd<n> set 1 bios_grub on
mkfs.ext4 /dev/sd<n>3
mount /dev/sd<n>3 /mnt

Archlinux install sources from netinstall, so we need a connection here Do this only if needed, test with a ping www.google.com

Add DNS servers in /etc/resolv.conf

Get Ethernet module with lspci -k and ip link

Edit /etc/conf.d/network@ and put static IP, gateway and netmask in

Create the file /etc/systemd/system/network@.service with the following content:

[Unit]
Description=Network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network@%i
ExecStart=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/usr/bin/ip route add default via ${gateway}

ExecStop=/usr/bin/ip addr flush dev %i
ExecStop=/usr/bin/ip link set dev %i down

[Install]
WantedBy=multi-user.target

Add proxy if any with export http_proxy=http://proxy.url.tld:8080

Enable network service with systemctl start network

If you encounter any problem with your network, try to add the kernel ethernet module :

systemctl stop dhcpcd
modprobe <kernel module>
# The module brand below depends of your network card
# For example, for module r8169, name the file realtek.conf
sudo echo <kernel module> > /etc/modules-load.d/<module brand>.conf
sudo systemctl start dhcpcd

End of network configuration

Install source packages

pacstrap /mnt base base-devel

Mount disks on start

echo "/dev/sd<n>3 / ext4 defaults 0 1" > /mnt/etc/fstab
echo "/dev/sd<n>2 none swap sw 0 0" >> /mnt/etc/fstab

Start to configure OS, as root

arch-chroot /mnt
 
echo -e "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo LANG=fr_FR.UTF-8 > /etc/locale.conf
echo KEYMAP=fr-pc > /etc/vconsole.conf
export LANG=fr_FR.UTF-8
ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime
 
echo <hostname> > /etc/hostname

Construct initial OS image

mkinitcpio -p linux

Install grub & configure

pacman --noconfirm -S grub-bios
grub-install --no-floppy --recheck /dev/sda
cp /usr/share/locale/fr/LC_MESSAGES/grub.mo /boot/grub/locale/fr.mo
grub-mkconfig -o /boot/grub/grub.cfg

The code below is needed only if you want to get your Arch line into other UNIX OS grub

menuentry 'Arch Linux, avec Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-572afed8-ab8d-4b7a-9a59-0ebff1095331' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  572afed8-ab8d-4b7a-9a59-0ebff1095331
	else
	  search --no-floppy --fs-uuid --set=root 572afed8-ab8d-4b7a-9a59-0ebff1095331
	fi
	echo	'Chargement de Linux core repo kernel…'
	linux	/boot/vmlinuz-linux root=UUID=572afed8-ab8d-4b7a-9a59-0ebff1095331 rw  quiet
	echo	'Chargement du disque mémoire initial…'
	initrd	/boot/initramfs-linux.img
}

Add your user, and reboot

useradd -g users -m -s /bin/bash <user>
usermod -aG wheel <user>
passwd <user>

passwd root
sudo visudo

exit
umount /mnt
reboot

After reboot, do the previous network configuration on your operating system For this, just repeat previous configuration

Install the X11 server

pacman -Syu xorg-server xorg-xinit xorg-server-utils

Install your GPU driver

# For nVidia :
pacman -S nvidia

# For Ati :
# Open /etc/pacman.conf and add :
[catalyst]
Server = http://catalyst.wirephire.com/repo/catalyst/$arch
# Update and install :
pacman -Syu catalyst catalyst-utils

# For Intel : 
pacman -S xf86-video-intel
# Open /etc/mkinitcpio.conf, and add in MODULES :
intel_agp i915
# Reconstruct image :
mkinitcpio -p linux

Install GNOME =)

pacman -S gnome gnome-extra gdm
# Autostart on boot :
systemctl enable gdm

Do initial update, then reboot

pacman -Syu
reboot
@harmo
Copy link
Author

harmo commented Aug 22, 2014

conf de base oh-my-zsh :

ZSH=/usr/share/oh-my-zsh

plugins=(fabric ant compleat archlinux debian django extract hub git git-flow github gnu-utils history-substring-search lol mercurial pear phing pip python svn symfony terminitor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment