arch linux - Gakgu/Gakgu.github.io GitHub Wiki
0. ์ค์นํ๊ธฐ ์ ์
์ฌ๊ธฐ์ ์๋ ๋ฌธ์๋ ๊ฐ์ธ์ ์ผ๋ก ์ฑ๊ณตํ ์์น๋ฆฌ๋
์ค์ ์ค์น ๋ฐฉ๋ฒ์ด๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก UEFI
๋ชจ๋๋ฅผ ์ฌ์ฉํ๋ค๋ ๊ฐ์ ํ์ ์์ฑ๋์ด์์ผ๋ฏ๋ก BIOS๋ฅผ ์ฌ์ฉํ๋ ํ๋ ํผ๊ณผ๋ ๋ง์ง ์
๋ค.
์์ธํ ์ค๋ช
์ [์์น๋ฆฌ๋
์ค ์ํค ์ธ์คํจ ๊ฐ์ด๋](https://wiki.archlinux.org/index.p
hp/Installation_guide_(%ED%95%9C%EA%B5%AD%EC%96%B4))๋ฅผ ์ฐธ๊ณ ํ๊ธธ ๋ฐ๋๋ค.
๋ง์ฝ VirtualBox๋ฅผ ์ฌ์ฉํ๋ค๋ฉด efi ๋ชจ๋๋ก ์ค์นํ ๊ฒฝ์ฐ ๋ถํ
์ ueif ๋ชจ๋๋ก ์ง์
ํ๋ค.
1. ํํฐ์ ์์ฑ
fdisk๋ฅผ ์ฌ์ฉํด gpt ํํฐ์ ํ ์ด๋ธ์ ์ค์ ํ 3๊ฐ์ ํํฐ์ ์ ์์ฑํ๋ค. ์ฌ๊ธฐ์์ sdx์ x๋ ๋์คํฌ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋ค.
$ fdisk /dev/sdx
partition type | directory | size | describe |
---|---|---|---|
EFI System | /boot | 51bMiB | ๋ถํธ ํํฐ์ |
Linux swap | none | 512MiB | ์ค์ ํํฐ์ |
Linux root | / | Remainder | ๋ฃจํธ ํํฐ์ |
2. ํํฐ์ ํฌ๋งท
mkfs(Make File System) ๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํ๋ค.
$ mkfs.fat -F32 /dev/sdx1
$ mkfs.ext4 /dev/sdx3
3. ํํฐ์ ๋ง์ดํธ
๋ฐ๋์ ๋ฃจํธ ํํฐ์ ์ ๋จผ์ ๋ง์ดํธ ํด์ผํ๋ค.
$ mount /dev/sdx3 /mnt/
$ mkdir /mnt/boot/
$ mount /dev/sdx1 /mnt/boot/
4. ์ค์ ํํฐ์ ์์ฑ ๋ฐ ํ์ฑํ
$ mkswap /dev/sdx2
$ swapon /dev/sdx2
5. Pacman ๋ฏธ๋ฌ ์๋ฒ ์ ํ
mirrorlistํ์ผ์ ์ด๊ณ Korea์๋ฒ๋ฅผ ๋งจ ์๋ก ์ฎ๊ธด ๋ค ์ ์ฅํ๋ค.
$ vim /etc/pacman.d/mirrorlist
6. ๊ธฐ๋ณธ ํจํค์ง ์ค์น
ํ์ํ ํจํค์ง๋ฅผ ์ค์นํ๋ค. ๊ทธ ์ค์์ intel-ucode๋ ์ธํ cpu๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ง ์ค์นํ๋ค.
$ pacstrap /mnt base base-devel intel-ucode grub efibootmgr
7. ์๋ ๋ง์ดํธ
ํ์ฌ ๋์คํฌ๋ค์ ๋ง์ดํธ ์ํ๋ฅผ ์ ์ฅํ๋ค.
$ genfstab -U /mnt >> /mnt/etc/fstab
8. ๋ถํธ๋ก๋ ์ค์น
$ arch-chroot /mnt
$ grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
$ grub-mkconfig -o /boot/grub/grub.cfg
9. ์ฌ๋ถํ
$ exit
$ reboot
10. ์ธํฐ๋ท ์ฐ๊ฒฐ
$ systemctl start dhcpcd.service
$ systemctl enable dhcpcd.service
11. ์๊ฐ ์ค์
$ timedatectl set-ntp true
$ ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
$ hwclock --systohc
12. ์ง์ญ ์ค์
$ vim /etc/locale.gen
๋ค์ ๋ถ๋ถ์ ์ฃผ์(#)์ ์ง์ด ํ ์ ์ฅํ๋ค.
#ko_KR.UTF-8 UTF-8
๋ก์ผ์ผ์ ์์ฑํ๊ณ ๋ช ์ํ๋ค.
$ locale-gen
$ echo LANG=ko_KR.UTF-8 >> /etc/locale.conf
13. HostName ์ค์
$ echo gak_arch >> /etc/hostname
14. root ํจ์ค์๋ ์ค์
$ passwd
15. ์ฌ์ฉ์ ๊ณ์
์ฌ์ฉ์ ๊ณ์ ์ถ๊ฐ
$ useradd -m ๊ณ์ ๋ช
sudo ๊ถํ ์ถ๊ฐ
/etc/sudoers
์ ๋ค์ ๋ด์ฉ์ ์ถ๊ฐํ๋ค.
๊ณ์ ๋ช ALL=(ALL) NOPASSWD: ALL
ํจ์ค์๋ ์ ๊ฑฐ
/etc/passwd
์์ ์์ ์ ๊ณ์ ์ค๋ฅธ์ชฝ์ ์๋ x๋ฅผ ์ ๊ฑฐํ๋ค.
16. alsamixer ๋ํดํธ ์นด๋&๋๋ฐ์ด์ค ์ ํ (ํ์คํ์ง ์์)
/usr/share/alsa/alsa.conf
์์ ๋ค์์ ์๋ ์ซ์๋ฅผ ๊ณ ์น๋ค.
defaults.ctl.card 0
defaults.pcm.card 0
๋น๋์ค๋ฅผ ์ฐธ๊ณ ํด์ ์งํํ Step by Step
VirtualBox์์ efi๋ชจ๋๋ฅผ ํ์ฑํ ํ์ ๋ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ
-
pacman -Syyy
-
edit /etc/pacman.d/mirrorlists
-
create parition from fdisk
-
fdisk /dev/sda
-
g
-
n
-
enter
-
enter
-
+300M
-
t
-
1
-
n
-
enter
-
enter
-
+30G
-
n
-
enter
-
enter
-
enter
-
w
-
-
mkfs.fat -F32 /dev/sda1
-
mkfs.ext4 /dev/sda2
-
mkfs.ext4 /dev/sda3
-
mount /dev/sda2 /mnt
-
mkdir /mnt/home
-
pacstrap -i /mnt base
-
mount /dev/sda3 /mnt/home
-
arch-chroot /mnt
-
pacman -S grub efibootmgr dosfstools openssh os-prober mtools linux-headers linux-lts linux-lts-headers
-
vi /etc/locale.gen (en_US UTF-8 UTF-8)
-
locale-gen
-
vi /etc/ssh/sshd_config (PermitRootLogin prohi... -> PermitRootLogin yes)
-
systemctl enable sshd
-
passwd
-
mkdir /boot/EFI
-
mount /dev/sda1 /boot/EFI
-
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
-
cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
-
grub-mkconfig -o /boot/grub/grub.cfg
-
Swap
- fallocate -l 2G /swapfile
- chmod 600 /swapfile
- mkswap /swapfile
- echo 'swapfile none swap sw 0 0' | tee -a /etc/fstab
-
exit
-
umount -a
-
reboot
๋ฒ์ถ์ผ๋ฐ์ค ์ตํ์ ๋ฐฉ๋ฒ
- archlinux vdiํ์ผ์ ๋ค์ด๋ฐ๋๋ค
- pacman -Sy archlinux-keyring
- pacman -Syu