2015年2月9日 星期一

[ArchLinux] How to install archlinux

Prepare :
1. Download image
Mirro 1: Arch Linux Downloads - ISO
Mirro 2: Arch Linux Downloads - ISO
Download archlinux-2015.02.01-dual.iso / archlinux-2015.02.01-dual.iso

2. dd into usb flash
dd bs=4M if=/path/to/archlinux-2015.02.01-dual.iso of=/dev/sdx && sync

3. Start sshd
Generate the key
ssh-keygen -A
/usr/sbin/sshd


GPT :
Design the partition of disk
Type: gdisk /dev/sda
Type: o //This will create a new empty GUID partition table and destroy all your data and overwrite existing partitions

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          104447   50.0 MiB    EF00  EFI System
   2          104448       125933567   60.0 GiB    8300  Linux filesystem
   3       125933568       142710783   8.0 GiB     8200  Linux swap
   4       142710784      1953525134   863.5 GiB   8300  Linux filesystem

MBR : (Old PC BIOS not support GPT)
[Archlinux] Using MBR method to boot archlinux os

Explain:
sda2 (/mnt/)
mkfs -t ext4 /dev/sda2

sda1 (/mnt/boot)
mkfs -t fat /dev/sda1

sda4 (/mnt/data)
mkfs -t ext4 /dev/sda4

mkswap /dev/sda3
swapon /dev/sda3

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
mount /dev/sda4 /mnt/data

sudo pacman-key --refresh-keys # reflash key before install, if arch disk image too old.

2. Install base package into /mnt

pacstrap -i /mnt base filesystem linux iwd dialog wpa_supplicant wireless_tools net-tools dhclient 

3. Create fstab into /mnt/
genfstab -U -p /mnt >> /mnt/etc/fstab

4. Switch shell to user shell
arch-chroot /mnt

start iwd
systemctl enable iwd

5. Install and configure a bootloader

New one
$ bootctl install

mkinitcpio -g /boot/initramfs-linux.img #if have initramfs-linux.img under /boot, then don't need to do this step.

nano /boot/loader/entries/arch.conf

wget https://pastebin.com/raw/pAF1QrUs

title Arch Linux  (Title name need the same)
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sdaX rw  (X = root filesystem)

6. reboot
7. unplug USB flash


1. Update the database
pacman -Syu

2. Install X Window System
Method 1:
sudo pacman -S xorg # Simple one, but install lot of package.
Method 2:
sudo pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils mesa xterm
{xorg-xinit = include startx}

sudo pacman -S xorg-xinit (install startx tools)

sudo pacman -S --noconfirm lxterminal # VTE-based terminal emulator

3. Install video driver for intel
a. pacman -Ss | grep intel
extra/intel-tbb 4.3_20141204-1
extra/intel-ucode 20140913-1
extra/libva-intel-driver 1.5.0-1
extra/xf86-video-intel 2.99.917-1 (xorg-drivers xorg) [installed]

b. pacman  -S  xf86-video-intel
4. Install audio driver for intel
a. pacman  -S pacman -S alsa-utils alsa-plugins alsa-lib
5. Test x window server
startx (This is a script)

  1. Install desktop environment of cinnamon
    sudo pacman -S cinnamon
  2. There are two method for greeter
    1. lightdm
      sudo pacman -S lightdm-gtk-greeter
      [Archlinux] How to install lightdm
    2. Display manager (a graphical login program)
      sudo pacman -S gdm
      sudo systemctl start gdm
  3. Install font
    sudo pacman -S wqy-zenhei
  4. Create a account (important otherwish can't log in cinnamon)
    groupadd happy
    useradd -m -g happy -G root -s /bin/bash happy
    passwd happy
  5. sudo pacman –S --noconfirm sudo
    Edit /etc/sudoers (put happy at sudo group)
    root ALL=(ALL) ALL
    happy ALL=(ALL) ALL
  6. Other work need to do
    1. [Gentoo][Wifi driver] Intel® Centrino® Advanced-N 6235
    2. [sshd][ArchLinux] Install sshd into Archlinux
    3. [Archlinux] Set locale-specific standards settings
    4. [Archlinux] Modify the name of network interface - enp0s25 to eth0
    5. [Archlinux][ibus] How to install cangjie 3 (倉頡) into ArchLinux
Extra Skill
  1. [Kernel][Archlinux] Replace new kernel method
  2. [Virtualbox][Archlinux] Upgrade vboxdrv.ko after upgrade Linux kernel
  3. [Archlinux] Modify the name of network interface - enp0s25 to eth0
  4. [Archlinux] How to install package not in remote repository
  5. [Archlinux] Use google drive as linux disk
  6. [Linux] sudo no need to type password
Reference:
  1. How to Install Arch Linux with UEFI
  2. Installing GUI (Cinnamon Desktop) and Basic Softwares in Arch Linux
  3. Arch Linux Downloads
  4. USB flash installation media
  5. [Linux 安裝篇 #5] 上路吧!展開雙手歡迎Arch Linux!
  6. gummiboot no longer available?
  7. Full Arch Linux - Install 2014
  8. Install XFCE, MATE, KDE, GNOME & CINNAMON Desktop environment on Arch Linux
  9. Arch Linux--定制自己的Linux操作系統(乙-國際化&桌面安裝篇)
  10. mkinitcpio
  11. How to install Arch Linux on your PC
  12. Create A List Of Installed Packages And Install Them Later From The List In Arch Linux
Other Note:
  1. How to compile pacman and use it
  2. [Redmine][bitnami] How to quick install redmine

Cat all quick install command from webpage
wget https://pastebin.com/raw/fGP1Lcak


Quick install archlinux
pacstrap -i /mnt \
base net-tools dhclient \
sudo lxterminal vim geany firefox git openssh systemd \
xorg xterm cinnamon lightdm-gtk-greeter wqy-zenhei ibus ibus-table-chinese \
cscope ctags ntfs-3g chromium eog file-roller \
iw dialog wpa_supplicant

Work need to install some package into archlinux
pacman -S xdotool tmux minicom \

Create fstab and boot option

Create a installed list
pacman -Qqe

Info

0 意見:

張貼留言