2016年5月27日 星期五

arch linux installation for hp envy 13 2016 (efi mode)

I got a new laptop , hp envy 13 2016 with efi mode , here is how to install arch linux

01. hold f10 , and press power button to boot into bios , and disable secure boot , save and reboot
02. download arch linux system iso from https://www.archlinux.org/download/
03. create bootable usb disk with rufus (for windows) or dd (for linux)
04. boot with usb disk
05. connect to wifi with wifi-menu
06. delete everything on disk with gdisk /dev/sda (x,z,y,y)
07. create disk partition with cgdisk /dev/sda
08. what I need is sda1 for boot (1024mb) , sda2 for swap (8GB) , sda3 for /
09. create boot and change hex code to EF00 , name it boot
10. create swap and change hex code to 8200 , name it swap
11. create / and name it root , write to disk , save and quit
12. mkfs.fat -F32 /dev/sda1
13. mkswap /dev/sda2 , swapon /dev/sda2
14. mkfs.ext4 /dev/sda3
15. mount /dev/sda3 /mnt
16. mkdir /mnt/boot/
17. mount /dev/sda1 /mnt/boot
18. edit mirrorlist and keep taiwan mirror site only with nano /etc/pacman.d/mirrorlist
19. install base system with pacstrap -i /mnt base base-devel
20. generate fstab for new system with genfstab -U -p /mnt >> /mnt/etc/fstab
21. edit fstab and add options for swap , /dev/sda2 none swap defaults,discard 0 0
22. arch-chroot /mnt
23. nano /etc/locale.gen and uncommented en_US.UTF-8
24. generate locale with locale-gen
25. setup language setting with echo LANG=en_US.UTF-8 > /etc/locale.conf
26. setup timezone with tzselect
27. link time zone file with ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
28. sync time with hwclock --systohc --utc
29. setup hostname with echo arch > /etc/hostname
30. regenerate initramfs image with mkinitcpio -p linux
31. install bootloader with bootctl install
32. find disk uuid for / with blkid -s PARTUUID -o value /dev/sda3
33. install intel ucode , libnl , wpa_supplicant with pacman -S intel-ucode libnl wpa_supplicant dialog
34. create bootloader entry with nano /boot/loader/entries/arch.conf
35. add these configuration to /boot/loader/entries/arch.conf
      title Arch Linux
      linux /vmlinuz-linux
      initrd /intel-ucode.img
      initrd /initramfs-linux.img
      options root=PARTUUID=result from setp 32 rw
36. exit arch chroot with exit
37. umount all with umount /mnt/boot , umount /mnt
38. reboot and it's done

沒有留言:

張貼留言