Last active
March 26, 2019 16:36
-
-
Save kennychufk/7cbc457bed61941aa9e108efaa5a5d49 to your computer and use it in GitHub Desktop.
Arch Linux installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
efivar -l | |
fdisk -l | |
# see new_partition_layout.sh | |
pacstrap -i /mnt base base-devel | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
arch-chroot /mnt | |
vi /etc/locale.gen | |
(uncomment en_US.UTF-8 UTF-8, ja_JP.UTF-8 UTF-8, zh_HK.UTF-8 UTF-8) | |
locale-gen | |
vi /etc/locale.conf | |
# | |
LANG=en_US.UTF-8 | |
# | |
export LANG=en_US.UTF-8 | |
vi /etc/hostname | |
# | |
kenny-arch | |
# | |
passwd | |
mount -t efivarfs efivarfs /sys/firmware/efi/efivars | |
# ignore if already mounted | |
# pacman -S systemd-boot | |
# already included in systemd, no need to install explicitly | |
bootctl install | |
vi /boot/loader/entries/arch.conf | |
## /dev/sdc1 is the root partition | |
# | |
title Arch Linux | |
linux /vmlinuz-linux | |
initrd /initramfs-linux.img | |
options root=/dev/sdc1 rw | |
# | |
# only if /usr is a separate partition | |
vi /etc/mkinitcpio.conf | |
HOOKS="... shutdown usr fsck" | |
vi /etc/fstab | |
# for the last integer of /usr, change it to 0 | |
mkinitcpio -p linux | |
exit | |
umount -R /mnt | |
reboot | |
# reboot to try if working | |
# use partition UUID for UEFI boot | |
ls -l /dev/disk/by-partuuid | |
vi /boot/loader/entries/arch.conf | |
# | |
options root=PARTUUID=???? rw | |
# | |
# enable legacy boot | |
sgdisk -A 5:set:2 /dev/sdX | |
pacman -S syslinux | |
dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sdX | |
extlinux --install /boot | |
cp -r /usr/lib/syslinux/bios/* /boot/syslinux/ | |
vi /boot/syslinux/syslinux.cfg | |
# use PARTUUID to specify root (the same format as UEFI) | |
useradd -m kennychufk | |
passwd kennychufk | |
visudo | |
# add kennychufk as su | |
# LAN | |
systemctl enable dhcpcd | |
# Graphics | |
# https://wiki.archlinux.org/index.php/NVIDIA | |
# NVIDIA Corporation GK107 (GeForce GTX 650) (rev a1) | |
# NVE7 | |
# nvidia-340xx-utils: around 2006-2010 | |
# nvidia-304xx-utils: around 2004-2006 | |
# libglvnd: the GL Vendor-Neutral Dispatch library | |
pacman -S nvidia | |
# choose libglvnd | |
reboot | |
pacman -S xterm xorg-xclock xorg-xinit xorg-server-utils | |
# the following command is not needed | |
# nvidia-xconfig | |
# may need mkinitcpio again | |
reboot | |
# test that nvidia driver is working | |
startx | |
pacman -S plasma | |
# select libx264 | |
reboot | |
systemctl start sddm | |
# test that login page appears | |
pacman -S dolphin konsole | |
vi ~/.bashrc | |
# | |
alias ls='ls --color=auto' | |
# | |
# For Macbook support | |
pacman -S xf86-video-intel | |
mv /etc/X11/xorg.conf | |
# https://wiki.archlinux.org/index.php/intel_graphics#Xorg_configuration | |
vi /etc/X11/xorg.conf.d/20-intel.conf | |
# | |
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
EndSection | |
# | |
# FAT32 | |
use Windows diskmgmt.msc to format FAT32 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacman -S xf86-video-intel | |
# japanese font: install adobe-source-han-sans-jp-fonts | |
sudo systemctl disable dhcpcd | |
sudo systemctl enable NetworkManager | |
# install aur/broadcom-wl | |
yaourt broadcom-wl | |
# enable click by tapping: | |
System Settings > Hardware > Input Devices > Touchpad > Taps > Mouse Click Emulation | |
# 3-finger-drag | |
sudo yaourt xf86-input-mtrack-git | |
vim /etc/X11/xorg.conf.d/10-mtrack-3-finger-drag.conf | |
# | |
Section "InputClass" | |
MatchIsTouchpad "on" | |
Identifier "Touchpads" | |
Driver "mtrack" | |
Option "SwipeDistance" "1" | |
Option "SwipeLeftButton" "1" | |
Option "SwipeRightButton" "1" | |
Option "SwipeUpButton" "1" | |
Option "SwipeDownButton" "1" | |
Option "SwipeClickTime" "0" | |
Option "SwipeSensitivity" "1000" | |
EndSection | |
# | |
# bluetooth | |
sudo pacman -S bluez-utils | |
modprobe btusb | |
sudo systemctl start bluetooth | |
bluetoothctl | |
# use kde bluetooth gui to connect to bluetooth mouse | |
# shortcuts for window-snapping (quick tile) | |
System Settings > Shortcuts > Global Shortcuts > KWin > Quick Tile Window to ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (shared FAT32 partition must be the first partition in order to be recognized by Windows) | |
# Total: 58.4G | |
# FAT32 | |
# 1 4G /exchange | |
# 2 2G (swap) | |
# 3 5G /var | |
# 4 18G /home | |
# 5 1G /boot | |
# 6 28.4G / | |
gdisk /dev/sdc | |
o | |
n | |
(return) | |
(return) | |
+4G | |
0700 | |
n | |
(return) | |
(return) | |
+2G | |
8200 | |
n | |
(return) | |
(return) | |
+5G | |
(return) | |
n | |
(return) | |
(return) | |
+18G | |
(return) | |
n | |
(return) | |
(return) | |
+1G | |
ef00 | |
n | |
(return) | |
(return) | |
(return) | |
(return) | |
w | |
Y | |
mkfs.fat -F32 /dev/sdc1 | |
mkfs.ext4 /dev/sdc3 | |
mkfs.ext4 /dev/sdc4 | |
mkfs.fat -F32 /dev/sdc5 | |
mkfs.ext4 /dev/sdc6 | |
mount /dev/sdc6 /mnt | |
mkdir /mnt/var | |
mount /dev/sdc3 /mnt/var | |
mkdir /mnt/home | |
mount /dev/sdc4 /mnt/home | |
mkdir /mnt/boot | |
mount /dev/sdc5 /mnt/boot | |
mkswap /dev/sdc2 | |
swapon /dev/sdc2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oracle VM VirtualBox | |
diskmgmt.msc | |
run cmd as administrator | |
"C:\Program Files\Oracle\VirtualBox\VBoxManage" internalcommands createrawvmdk -filename C:\Users\kennychu\arch-kenny.vmdk -rawdisk \\.\PhysicalDrive2 | |
Run "Oracle VM VirtualBox Manager" As administrator -> Create Virtual Machine -> | |
name: arch-kenny (arbitrary) | |
Type: Linux | |
Version: Arch Linux (64-bit) | |
# Must choose 64-bit to use an x86-64 CPU | |
RAM: 1500MB | |
User an existing virtual hard drive file -> C:\Users\kennychu\arch-kenny.vmdk | |
Setting: | |
Network -> Bridge Adaptor | |
System -> Motherboard -> Enable EFI | |
Storage -> arch-kenny.vmdk -> SSD | |
Storage -> Controller: SATA -> Use Host I/O Cache (to avoid crashes after the VM boots up a minute or so) | |
# Display -> Screen -> Video Memory -> 72 MB | |
# (16MB seems to be OK) | |
General -> Advanced -> Shared Clipboard -> bidirectional | |
General -> Advanced -> Drag and Drop -> bidirectional | |
sudo pacman -Syu virtualbox | |
(select virtualbox-host-modules-arch for linux kernal) | |
sudo pacman -Syu virtualbox-guest-utils | |
(for MacOS) | |
sudo /Applications/VirtualBox.app/Contents/MacOS/VBoxManage internalcommands createrawvmdk -filename ~/arch-kenny.vmdk -rawdisk /dev/disk1 | |
diskutil list | |
diskutil unmount /dev/disk1s1 | |
cd /Applications/VirtualBox.app/Contents/MacOS/ | |
sudo ./VirtualBox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment