ติดตั้ง Archlinux USBStick คู่ Windows 10 EFI
On Oracle VM VirtualBox 6.1.6
Archlinux host Windows guest
https://youtu.be/sXgmggkaPi8
Archlinux install bios-boot & efi-boot
1.#wifi-menu
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้1.1.กด Enter เพื่อรันคำสั่ง คอมพิวเตอร์บางเครื่องไม่ขึ้น wifi-menu มาให้ ก็ต้องพยายามออกเน็ตให้ได้โดยสายเคเบิล เช่น ปล่อยสัญญาณผ่าน USB แล้วพยายาม (2.#ping 8.8.8.8) ต่อไป ถ้ายังออกเน็ตไม่ได้ให้ รัน (run) คำสั่ง #dhcpcd ก่อนด้วยแล้วพยายามทดสอบ ping จนกระทั่งสามารถออกเน็ตได้
2.#ping 8.8.8.8
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้64 bytes...
64 bytes...
64 bytes...
^C
กด Ctrl+c เพื่อหยุด ping
3.#timedatectl set-ntp true
4.#fdisk -l
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้4.1.ตรวจเช็ค Device และ Partitions ที่มีอยู่แล้วจดจำไว้
5.#cfdisk /dev/sdX
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้5.1.ใช้โปรแกรม cfdisk เพื่อสร้างพาทิชั่นสำหรับลีนุกซ์ ในพื้นที่ที่ว่างอยู่ สร้าง 2 พาทิชั่น /dev/sdX1 500M สำหรับ /boot/efi และ /dev/sdX2 สำหรับ /mnt
6.#fdisk -l
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้6.1.เพื่อจะสร้างไฟล์ mkfs.ext4 และ mount ให้ถูกพาทิชั่น จดจำ sdX เป้าหมายไว้ให้ดี
7.#mkfs.ext4 /dev/sdX2
8.#mount /dev/sdX2 /mnt
9.#mkfs.fat -F32 /dev/sdX1
9.1#
9.2#
10.#nano /etc/pacman.d/mirrorlist
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้10.1.ใช้โปรแกรม nano เพื่อเข้าไปแก้ไขไฟล์ pacman.d ตั้งค่าให้ใช้ mirrorlist ของไทยก่อนโดย:
10.2.กด Ctrl+w แล้วพิมพ์ thai เพื่อค้นหา:
## Thailand
Server = http://mirror2.totbb.net/archlinux/$repo/os/$arch
10.3.เมื่อเจอแล้วให้ลากคลุมโดยกด Shift ค้างไว้แล้วเลื่อนเคอร์เซอร์ลากคลุมให้หมด
10.4.กด Ctrl+k เพื่อคัด
10.5.กด ลูกศรขึ้นบนเพื่อจะเลื่อนตำแหน่ง Mirrorlist ไทยนี้ขึ้นไปวางไว้ข้างบนสุด อย่างนี้:
##
## Arch Linux repository mirrorlist
## Filtered by mirror score from mirror status page
## Generated on 2019-12-01
##
## Thailand
Server = http://mirror2.totbb.net/archlinux/$repo/os/$arch
## Ecuador
Server = http://mirror.cedia.org.ec/archlinux/$repo/os/$arch
10.6.ได้ที่แล้วกด Ctrl+u วางที่คัดมา
10.7.กด Ctrl+x แล้วตอบ y แล้ว Enter เพื่อบันทึกแล้วออก
10.8.คนใหม่ถ้าสับสน ก็กด Ctrl+x ตอบ n ออกไปตั้งสติก่อน^^
11.#pacstrap /mnt linux linux-firmware base base-devel nano
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้11.1.โหลด pacstrap นี้ 300 กว่า MB ลงติดตั้งใน sdX นั้น
12.#genfstab -U /mnt >> /mnt/etc/fstab
13.#arch-chroot /mnt
14.#ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
15.#hwclock --systohc --utc
16.#nano /etc/locale.gen
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้16.1.แก้ไขไฟล์ locale.gen เพื่อเลือก Keyboard
16.2.กด ลูกศรลงมาเรื่อยๆ จนเจอภาษา #en_US.UTF-8 ลบคอมเม้น (#) เพื่อเลือก gen ค่าเป็น Keyboard ของระบบ โดยเลื่อนเคอร์เซอร์ไปไว้ข้างหลัง # แล้ว กด Backspace เพื่อลบอย่างนี้:
en_US.UTF-8 UTF-8
16.4.กด Ctrl+x แล้วตอบ y แล้ว Enter เพื่อบันทึกแล้วออก
17.#locale-gen
18.#nano /etc/locale.conf
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้20.1.ตั้งค่าภาษา en โดยพิมพ์ลงไปอย่างนี้:
LANG=en_US.UTF-8
19.#nano /etc/hostname
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้21.1.ตั้งชื่อเครื่อง เช่น ตั้งว่า kidtoong พิมพ์ลงไป:
kidtoong
20.#nano /etc/hosts
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้20.1.ตั้งค่าตามนี้:
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
::1 localhost
20.2.วิธีการพิมพ์ เริ่มพิมพ์ 127.0.0.1 แล้วกด Tap 1 ครั้งเพื่อเว้นวรรคแล้วพิมพ์ localhost แล้วกดลูกศรลงเพื่อขึ้นบรรทัดใหม่แล้วพิมพ์ ::1 แล้วกด Tab 2 ครั้งเพื่อเว้นวรรคแล้วพิมพ์ localhost ให้แนวตั้งตรงกัน
21.#passwd
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้21.1.ตั้ง password ให้ root อย่างน้อย 6 ตัว Enter แล้ว retype อีกครั้ง
22.#useradd -m -g users -G wheel,storage,power -s /bin/bash kid
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้22.1.add user เช่น ตั้งชื่อ user ว่า kid
23.#passwd kid
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้23.1.ตั้ง passwd ให้ kid
24.#chage -d 0 kid
25.#nano /etc/sudoers
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้25.1.แก้ไขไฟล์เพื่อให้สิทธิ์ kid โดย uncomment ตามอย่าง root นี้:
##
root %wheel ALL=(ALL) ALL
kid %wheel ALL=(ALL) ALL
26.#
27.#
28.#mkdir /boot/efi
29.#mount /dev/sdX2 /boot/efi
30.#pacman-S grub efibootmgr dosfstools os-prober mtools
31.#grub-install /dev/sdX
31.1 #grub-install --target=x86_64-efi --bootloader-id=grub --recheck --removable
32.#grub-mkconfig -o /boot/grub/grub.cfg
33.#pacman -S ifplugd
34.#pacman -S wireless_tools
35.#pacman -S iw wpa_supplicant dialog
36.#pacman -S xf86-video-amdgpu xf86-video-ati xf86-video-intel xf86-video-nouveau xf86-video-vesa
37.#pacman -S xf86-input-synaptics
38.#pacman -S acpi
39.#pacman -S polkit
40.#pacman -S dhcpcd
41.#systemctl enable dhcpcd
42.#pacman -S virtualbox-guest-utils
43.#systemctl enable vboxservice
44.#mkinitcpio -p linux
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้44.1.Rerun ใช้ค่า default ก็ดีอยู่
45.#exit
45.1 #genfstab -U /mnt >> /mnt/etc/fstab
45.2 #nano /mnt/etc/fstab
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้gen อีกครั้งเพื่อให้ Auto mount พาทิชั่น /dev/sdX1 /boot/efi ลบที่ gen ซ้ำกันออกด้วย nano
46.#umount /mnt/usb/boot/EFI
47.#umount /mnt/usb
48.#poweroff
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้เมื่อ poweroff เรียบร้อยแล้วก็ถอด USB bootable (ตัวติดตั้ง) ออกได้เพื่อจะบูทระบบ New Archlinux ของเราที่เพิ่งแต่งตั้งนั้น ที่เหลือหลังจากนี้เป็นการเสริมแต่งระบบได้ตามใจชอบ
Power up > root login
49.#dhcpcd
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้49.1.ต่อสายออกเน็ต ทดลอง ping 8.8.8.8
50.#timedatectl set-ntp true
51.#passwd kid
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้51.1.เปลี่ยน passwd ให้ kid
52.#pacman -Syu
53.#pacman-S xorg
54.#pacman -S ttf-freefont
55.#pacman -S lxde
56.#pacman -S pulseaudio pulseaudio-alsa alsa-utils pavucontrol
57.#systemctl enable lxdm.service
58.#nano /etc/lxdm/lxdm.conf
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้58.1.แก้ไขไฟล์เพื่อตั้งค่าล็อกอินโดย uncomment ตามนี้:
autologin=dgod
session=/usr/bin/startlxde
61.#poweroff
Power up > kid login > LXTerminal
62.$sudo pacman -S networkmanager network-manager-applet
63.$sudo systemctl enable NetworkManager.service
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้63.1.จะ Reboot ก่อนแล้วลองออกเน็ตไวไฟ ก็ย่อมได้
64.$sudo pacman -S udisks2
65.$sudo pacman -S udiskie
66.$udiskie -2 -s &
67.$sudo pacman -S gvfs
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้คำสั่งที่ 64-67 เพื่อ Auto mount USB flash drive
68.$sudo pacman -S --needed base-devel
69.$sudo nano /etc/makepkg.conf
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้69.1.แก้ไขไฟล์ uncomment , 2 คือจำนวน core ใส่ไปตามจำนวนที่เครื่องเรามีอย่างนี้:
MAKEFLAGS="-j2"
70.$sudo pacman -S git
71.$git clone
https://aur.archlinux.org/yay.git
72.$cd yay/
73.$makepkg -si
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้คำสั่งที่ 68-73 เพื่อติดตั้ง yay เมื่อสำเร็จแล้วสามารถไว้ใช้ติดตั้งแพ็กเก็จใน AUR ได้โดยตรง
74.$yay fonts-tlwg
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้74.1.จะเปลี่ยนเป็น fonts-tlwg นี้ก็สวยดี
75.$yay brave-bin
76.$yay ksnip
77.$sudo pacman -S xdm-archlinux
78.$sudo pacman -S archlinux-wallpaper
79.$sudo pacman -S gnome-screenshot
80.$sudo pacman -S leafpad
81.$sudo pacman -S simplescreenrecorder
82.$sudo pacman -S vlc
83.$sudo pacman -S clipgrab
84.$sudo pacman -S libreoffice-still-th
85.$sudo pacman -Ss archlinux
-Ss ค้นหาแล้วติดตั้งแพ็กเก็จตามชอบ^^
Shared Folder Oracle Virtualbox
#sudo usermod -a -G vboxsf kidtoong
Install pipewire แทน Pulseaudio
Check the Installed Audio Server:
#pactl info
#sudo pacman -S pipewire pipewire-alsa
#sudo pacman -S pipewire-media-session
#sudo pacman -S pipewire-pulse
Removing PulseAudio:
#sudo pacman -Rns pulseaudio
Disable the PulseAudio Services
#systemctl --user --now disable pulseaudio.service pulseaudio.socket
Now masks the PulseAudio service for the current user:
#systemctl --user mask pulseaudio
Enable PipeWire and PipeWire Session Managers
#systemctl --user --now enable pipewire pipewire-pulse wireplumber
#systemctl --user --now enable pipewire pipewire-pulse pipewire-media-session
###
https://linuxgenie.net/install-pipewire-on-arch-linux/
Install Openvpn
#sudo pacman -S openvpn networkmanager-openvpn
Install QEMU/KVM - Virt-Manager
$sudo -pacman -Syy
$sudo pacman -S archlinux-keyring
$sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat
$sudo pacman -S ebtables iptables
$sudo pacman -S libguestfs
$sudo systemctl enable libvirtd.service
$sudo systemctl start libvirtd.service
$systemctl status libvirtd.service
$sudo usermod -a -G libvirt $(whoami)
$sudo systemctl restart libvirtd.service
$exit
Done ::
https://www.youtube.com/watch?v=D6_95M7_8Rg&t=141s
$ sudo nano /etc/libvirt/libvirtd.conf
uncomment::
unix_sock_ro_perms = "0770"
$ sudo gpasswd -a $USER libvirt
$ sudo systemctl enable libvirtd.service
$ sudo systemctl start libvirtd.service
$ sudo systemctl status libvirtd.service
>>
https://www.youtube.com/watch?v=bgywPoGRlt4
อัพเดต-Keys_อัพเดต-Archlinux
ใช้ตอนอัพเดตเกิดเออเรอร์
pacman -Sy archlinux-keyring && pacman -Syyu
https://bbs.archlinux.org/viewtopic.php?id=221435
sudo pacman -Syyu --overwrite "*"
https://forum.manjaro.org/t/pacman-upgrade-error-files-exist-in-filesystem/67290/2
ขอได้รับความขอบคุณ
Archlinux Alongsize Windows 10 EFI
On Oracle VM VirtualBox 6.1.6
Archlinux host Windows guest
https://youtu.be/sXgmggkaPi8
Archlinux install bios-boot & efi-boot
1.#wifi-menu
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
2.#ping 8.8.8.8
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
3.#timedatectl set-ntp true
4.#fdisk -l
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
5.#cfdisk /dev/sdX
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
6.#fdisk -l
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
7.#mkfs.ext4 /dev/sdX2
8.#mount /dev/sdX2 /mnt
9.#mkfs.fat -F32 /dev/sdX1
9.1#
9.2#
10.#nano /etc/pacman.d/mirrorlist
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
11.#pacstrap /mnt linux linux-firmware base base-devel nano
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
12.#genfstab -U /mnt >> /mnt/etc/fstab
13.#arch-chroot /mnt
14.#ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
15.#hwclock --systohc --utc
16.#nano /etc/locale.gen
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
17.#locale-gen
18.#nano /etc/locale.conf
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
19.#nano /etc/hostname
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
20.#nano /etc/hosts
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
21.#passwd
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
22.#useradd -m -g users -G wheel,storage,power -s /bin/bash kid
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
23.#passwd kid
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
24.#chage -d 0 kid
25.#nano /etc/sudoers
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
26.#
27.#
28.#mkdir /boot/efi
29.#mount /dev/sdX2 /boot/efi
30.#pacman-S grub efibootmgr dosfstools os-prober mtools
31.#grub-install /dev/sdX
31.1 #grub-install --target=x86_64-efi --bootloader-id=grub --recheck --removable
32.#grub-mkconfig -o /boot/grub/grub.cfg
33.#pacman -S ifplugd
34.#pacman -S wireless_tools
35.#pacman -S iw wpa_supplicant dialog
36.#pacman -S xf86-video-amdgpu xf86-video-ati xf86-video-intel xf86-video-nouveau xf86-video-vesa
37.#pacman -S xf86-input-synaptics
38.#pacman -S acpi
39.#pacman -S polkit
40.#pacman -S dhcpcd
41.#systemctl enable dhcpcd
42.#pacman -S virtualbox-guest-utils
43.#systemctl enable vboxservice
44.#mkinitcpio -p linux
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
45.#exit
45.1 #genfstab -U /mnt >> /mnt/etc/fstab
45.2 #nano /mnt/etc/fstab
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
46.#umount /mnt/usb/boot/EFI
47.#umount /mnt/usb
48.#poweroff
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
Power up > root login
49.#dhcpcd
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
50.#timedatectl set-ntp true
51.#passwd kid
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
52.#pacman -Syu
53.#pacman-S xorg
54.#pacman -S ttf-freefont
55.#pacman -S lxde
56.#pacman -S pulseaudio pulseaudio-alsa alsa-utils pavucontrol
57.#systemctl enable lxdm.service
58.#nano /etc/lxdm/lxdm.conf
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
61.#poweroff
Power up > kid login > LXTerminal
62.$sudo pacman -S networkmanager network-manager-applet
63.$sudo systemctl enable NetworkManager.service
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
64.$sudo pacman -S udisks2
65.$sudo pacman -S udiskie
66.$udiskie -2 -s &
67.$sudo pacman -S gvfs
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
68.$sudo pacman -S --needed base-devel
69.$sudo nano /etc/makepkg.conf
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
70.$sudo pacman -S git
71.$git clone https://aur.archlinux.org/yay.git
72.$cd yay/
73.$makepkg -si
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
74.$yay fonts-tlwg
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
75.$yay brave-bin
76.$yay ksnip
77.$sudo pacman -S xdm-archlinux
78.$sudo pacman -S archlinux-wallpaper
79.$sudo pacman -S gnome-screenshot
80.$sudo pacman -S leafpad
81.$sudo pacman -S simplescreenrecorder
82.$sudo pacman -S vlc
83.$sudo pacman -S clipgrab
84.$sudo pacman -S libreoffice-still-th
85.$sudo pacman -Ss archlinux
-Ss ค้นหาแล้วติดตั้งแพ็กเก็จตามชอบ^^
Shared Folder Oracle Virtualbox
#sudo usermod -a -G vboxsf kidtoong
Install pipewire แทน Pulseaudio
Check the Installed Audio Server:
#pactl info
#sudo pacman -S pipewire pipewire-alsa
#sudo pacman -S pipewire-media-session
#sudo pacman -S pipewire-pulse
Removing PulseAudio:
#sudo pacman -Rns pulseaudio
Disable the PulseAudio Services
#systemctl --user --now disable pulseaudio.service pulseaudio.socket
Now masks the PulseAudio service for the current user:
#systemctl --user mask pulseaudio
Enable PipeWire and PipeWire Session Managers
#systemctl --user --now enable pipewire pipewire-pulse wireplumber
#systemctl --user --now enable pipewire pipewire-pulse pipewire-media-session
### https://linuxgenie.net/install-pipewire-on-arch-linux/
Install Openvpn
#sudo pacman -S openvpn networkmanager-openvpn
Install QEMU/KVM - Virt-Manager
$sudo -pacman -Syy
$sudo pacman -S archlinux-keyring
$sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat
$sudo pacman -S ebtables iptables
$sudo pacman -S libguestfs
$sudo systemctl enable libvirtd.service
$sudo systemctl start libvirtd.service
$systemctl status libvirtd.service
$sudo usermod -a -G libvirt $(whoami)
$sudo systemctl restart libvirtd.service
$exit
Done :: https://www.youtube.com/watch?v=D6_95M7_8Rg&t=141s
$ sudo nano /etc/libvirt/libvirtd.conf
uncomment::
unix_sock_ro_perms = "0770"
$ sudo gpasswd -a $USER libvirt
$ sudo systemctl enable libvirtd.service
$ sudo systemctl start libvirtd.service
$ sudo systemctl status libvirtd.service
>> https://www.youtube.com/watch?v=bgywPoGRlt4
อัพเดต-Keys_อัพเดต-Archlinux
ใช้ตอนอัพเดตเกิดเออเรอร์
pacman -Sy archlinux-keyring && pacman -Syyu
https://bbs.archlinux.org/viewtopic.php?id=221435
sudo pacman -Syyu --overwrite "*"
https://forum.manjaro.org/t/pacman-upgrade-error-files-exist-in-filesystem/67290/2
ขอได้รับความขอบคุณ