Skip to content

Instantly share code, notes, and snippets.

@ysmood
Last active December 23, 2015 15:29
Show Gist options
  • Select an option

  • Save ysmood/6655977 to your computer and use it in GitHub Desktop.

Select an option

Save ysmood/6655977 to your computer and use it in GitHub Desktop.
archlinux_installation_guide

Archlinux Installation Guide

  1. Select kernel version "Other Linux 3.x kernel".
  2. Set the vm's hardware resource limitation.
  3. Boot Arch.
  4. Partition.
  • Show disk list: fdisk -l

  • Create partition: cfdisk /dev/sda 0. /dev/sda1 for boot. Primary, Bootable 0. /dev/sda2 for swap. Primary, Type 82 0. /dev/sda3 for root. Primary 0. /dev/sda4 for home. Primary 0. write

  • Format partition. 0. mkfs.ext4 /dev/sda1 0. mkswap /dev/sda2 0. mkfs.ext4 /dev/sda3 0. mkfs.ext4 /dev/sda4

  • Mount partitions 0. mount /dev/sda3 /mnt 0. mkdir /mnt/boot 0. mount /dev/sda1 /mnt/boot 0. swapon /dev/sda2 0. mkdir /mnt/home 0. mount /dev/sda4 /mnt/home

  1. Change the repo mirror list: nano /etc/pacman.d/mirrorlist The Server = http://mirrors.163.com/archlinux/$repo/os/$arch is enough.
  2. Install pacstrap /mnt base
  3. Generate the file system table: genfstab -U -p /mnt >> /mnt/etc/fstab
  4. Check the fstab file: nano /mnt/etc/fstab
  5. Configure the system: arch-chroot /mnt
  6. Set time zone: hwclock --systohc --utc
  7. Set root password: passwd root
  8. Install and configure bootloader Grub:
  • pacman -S grub-bios
  • grub-install --target=i386-pc --recheck /dev/sda
  • grub-mkconfig -o /boot/grub/grub.cfg
  1. Network: systemctl enable dhcpcd.service
  2. exit
  3. Umount the partitions and shutdown, eject the DVD:
  • umount -R /mnt
  • shutdown -P 0
  1. Start dhcpcd service manully: dhcpcd
  2. Install ssh: pacman -S openssh, configure /etc/ssh/sshd_config, add AllowGourps to it.
  3. Create a new user: useradd -m -g users -G wheel -s /bin/bash saya
@acgtyrant
Copy link

原来有玩 Arch Linux 啊...

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