Since ArchLinux does not have an installer, start the distribution ISO with VirtualBox and go to the place where it can be generally used [Installation Guide](https://wiki.archlinux.jp/index.php/%E3%82%A4%] E3% 83% B3% E3% 82% B9% E3% 83% 88% E3% 83% BC% E3% 83% AB% E3% 82% AC% E3% 82% A4% E3% 83% 89) Try to install it on.
Immediately after the distribution CD, Arch Linux is started as root with cdfs. Since about 30GB of virtual disk is allocated on VirtualBox, we will first partition it here. Below, X is not started yet, and the clipboard is not started, so it is a rough description.
# ls /dev/sda*
/dev/sda
#It can be confirmed that there is only sda yet.
# fdisk /dev/sda
You will be asked for the Partition Type, so in the primary.
You will be asked for the size+At 10G.
This is the end.
The rest/Allocate for home.
Finally, write with w to finish.
ls /dev/sda*
/dev/sda /dev/sda1 /dev/sda2
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
mount
# mount /dev/sda1 /mnt
# mkdir /mnt/home
# mount /dev/sda2 /mnt/home
swap
# dd if=/dev/zero of=/mnt/swap bs=1073741824 count=8
# mkswap /mnt/swap
# swapon /mnt/swap
network
# ping archlinux.jp
Confirm that it is connected with
If it doesn't work, [Network Settings](https://wiki.archlinux.jp/index.php/%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3% 83% BC% E3% 82% AF% E8% A8% AD% E5% AE% 9A # IP_.E3.82.A2.E3.83.89.E3.83.AC.E3.82.B9.E3.81. AE.E8.A8.AD.E5.AE.9A) Check around
It seems that various files are poured using pacman. So, set pacman's preferred mirrorsite. Write a Japanese mirror at the beginning of /etc/pacman.d/mirrorlist (apparently the first match seems to have priority).
# pacstrap /mnt base linux linux-firmware base-devel vim dhcpcd
Insert the base system with.
# genfstab -U /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
# ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
# hwclock --systohc --utc
# /etc/locale.Edit gen and uncomment only the required locales.
#Then generate
locale-gen
If you set it to ja_JP.UTF-8, it will be tofu because there is no font at this time.
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# echo arch > /etc/hostname
# systemctl start dhcpcd@enp0s3
# systemctl enable dhcpcd@enp0s3
ping www.google.com
# pacman -S grub
# grub-install --target=i386-pc /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
Recommended Posts