Difference between revisions of "User:MajorTom"

From ArchWiki
Jump to: navigation, search
m (Fix title level.)
m
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Getting and installing Arch]]
 
 
== Arch Linux 2012.07.15 Installation Template==
 
== Arch Linux 2012.07.15 Installation Template==
 
<pre>
 
<pre>
Line 8: Line 7:
  
  
Internet connection
+
Network connection - now configured automatically via DHCP
  
# dhcpcd
+
# systemctl start dhcpcd.service
 
or
 
or
 
# dhclient eth0
 
# dhclient eth0
or
+
or (for static address)
 
# ip link set dev eth0 up
 
# ip link set dev eth0 up
 
# ip addr add 192.168.1.2/24 dev eth0
 
# ip addr add 192.168.1.2/24 dev eth0
Line 20: Line 19:
  
  
Correct time setting
+
Current time setting
  
 
# ntpd -qg
 
# ntpd -qg
Line 37: Line 36:
 
or
 
or
 
# cfdisk /dev/sda
 
# cfdisk /dev/sda
OR
+
or (for GPT)
 
# gdisk /dev/sda
 
# gdisk /dev/sda
or
+
or (GPT)
 
# cgdisk /dev/sda
 
# cgdisk /dev/sda
  
Line 54: Line 53:
  
 
# vi /etc/pacman.d/mirrorlist
 
# vi /etc/pacman.d/mirrorlist
 +
# pacstrap /mnt base
 +
or
 
# pacstrap /mnt base base-devel
 
# pacstrap /mnt base base-devel
  
Line 75: Line 76:
 
or
 
or
 
# genfstab -p -L /mnt >> /mnt/etc/fstab
 
# genfstab -p -L /mnt >> /mnt/etc/fstab
 +
 
# echo "/dev/sda4  swap  swap  defaults  0  0" >> /mnt/etc/fstab
 
# echo "/dev/sda4  swap  swap  defaults  0  0" >> /mnt/etc/fstab
  
Line 80: Line 82:
 
# man archlinux
 
# man archlinux
 
# echo "archlinux" > /etc/hostname
 
# echo "archlinux" > /etc/hostname
# vi /etc/hosts
 
# vi /etc/rc.conf
 
 
# echo "KEYMAP=us" > /etc/vconsole.conf
 
# echo "KEYMAP=us" > /etc/vconsole.conf
 
# ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime
 
# ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime
Line 97: Line 97:
 
# vi /boot/syslinux/syslinux.cfg
 
# vi /boot/syslinux/syslinux.cfg
 
or (for GPT)
 
or (for GPT)
 +
# pacman -Sy gptfdisk
 
# sgdisk /dev/sda -A N:set:2  # N=partition_number_of_/boot (example '7:set:2' for /dev/sda7)
 
# sgdisk /dev/sda -A N:set:2  # N=partition_number_of_/boot (example '7:set:2' for /dev/sda7)
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sda
+
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda
 
# vi /boot/syslinux/syslinux.cfg
 
# vi /boot/syslinux/syslinux.cfg
 
or
 
or
Line 119: Line 120:
 
# umount /mnt/{boot,home,}
 
# umount /mnt/{boot,home,}
 
# reboot
 
# reboot
 +
</pre>
 +
 +
====POST INSTALL====
 +
<pre>
 +
Persistent network connection
 +
 +
# cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/
 +
# vi /etc/netctl/ethernet-dhcp
 +
# netctl start ethernet-dhcp
 +
# netctl enable ethernet-dhcp
 +
or (for static address)
 +
# cp /etc/netctl/examples/ethernet-static /etc/netctl/
 +
# vi /etc/netctl/ethernet-static
 +
# netctl start ethernet-static
 +
# netctl enable ethernet-static
 +
 +
 +
Install SSH and run on boot
 +
 +
# pacman -S openssh
 +
# systemctl enable sshd.service

Latest revision as of 01:24, 27 February 2014

Arch Linux 2012.07.15 Installation Template

Keyboard layout

# ls /usr/share/kbd/keymaps/i386/qwerty
# loadkeys us


Network connection - now configured automatically via DHCP

# systemctl start dhcpcd.service
or
# dhclient eth0
or (for static address)
# ip link set dev eth0 up
# ip addr add 192.168.1.2/24 dev eth0
# ip route add default via 192.168.1.1
# echo "nameserver 8.8.8.8" >> /etc/resolv.conf


Current time setting

# ntpd -qg
# hwclock -w
or
# date MMDDhhmmYYYY
# hwclock --systohc
or
# hwclock --set --date="YYYY-MM-DD hh:mm:ss"
# hwclock --hctosys


Disk preparation

# fdisk /dev/sda
or
# cfdisk /dev/sda
or (for GPT)
# gdisk /dev/sda
or (GPT)
# cgdisk /dev/sda

# mkfs.ext4 /dev/sda1
# mkswap /dev/sda4

# mount /dev/sda1 /mnt
# mount /dev/sda2 /mnt/boot
# mount /dev/sda3 /mnt/home
# swapon /dev/sda4


Base system install

# vi /etc/pacman.d/mirrorlist
# pacstrap /mnt base
or
# pacstrap /mnt base base-devel


Bootloader install

# pacstrap /mnt syslinux
or
# pacstrap /mnt grub-bios
or
# pacstrap /mnt grub-efi-i386
or
# pacstrap /mnt grub-efi-x86_64


System configuration

# genfstab -p /mnt >> /mnt/etc/fstab
or
# genfstab -p -U /mnt >> /mnt/etc/fstab
or
# genfstab -p -L /mnt >> /mnt/etc/fstab

# echo "/dev/sda4   swap   swap   defaults   0   0" >> /mnt/etc/fstab

# arch-chroot /mnt
# man archlinux
# echo "archlinux" > /etc/hostname
# echo "KEYMAP=us" > /etc/vconsole.conf
# ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime
# vi /etc/locale.gen
# locale-gen
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
# vi /etc/mkinitcpio.conf
# mkinitcpio -p linux
# passwd


Bootloader setup

# syslinux-install_update -iam
# vi /boot/syslinux/syslinux.cfg
or (for GPT)
# pacman -Sy gptfdisk
# sgdisk /dev/sda -A N:set:2   # N=partition_number_of_/boot (example '7:set:2' for /dev/sda7)
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda
# vi /boot/syslinux/syslinux.cfg
or
# grub-install --target=i386-pc --recheck --debug /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
or
# mkfs.vfat -F32 /dev/sda5
# mkdir -p /boot/efi
# mount -t vfat /dev/sda5 /boot/efi
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
# grub-mkconfig -o /boot/grub/grub.cfg


Finish up

# exit
# umount /mnt/{boot,home,}
# reboot

POST INSTALL

Persistent network connection

# cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/
# vi /etc/netctl/ethernet-dhcp
# netctl start ethernet-dhcp
# netctl enable ethernet-dhcp
or (for static address)
# cp /etc/netctl/examples/ethernet-static /etc/netctl/
# vi /etc/netctl/ethernet-static
# netctl start ethernet-static
# netctl enable ethernet-static


Install SSH and run on boot

# pacman -S openssh
# systemctl enable sshd.service