Arch Linux install to BIOS boot system

Install Arch Linux under the following conditions.

conditions

Creating and booting USB installation media

Download the ISO file ʻarchlinux-year.month.day-x86_64.iso` from the official Download ArchLinux page.

Write the ISO file to the USB memory using the dd command.

# dd bs=4M if=/path/to/archlinux.iso of=/dev/sdy status=progress && sync

When the USB installation media is complete, boot the live environment from the USB installation media.

Arch Linux installation

Create partition

root@archiso ~ # parted /dev/sdx
(parted)mklabel msdos
(parted)mkpart primary ext4 1MiB 100MiB //[/boot]For directories
(parted)mkpart primary ext4 100MiB 100% //[/]For directories
(parted)q

Initialize the created partition.

root@archiso ~ # mkfs.ext4 /dev/sdx1 
root@archiso ~ # mkfs.ext4 /dev/sdx2

Mount the created partition.

root@archiso ~ # mount /dev/sdx2 /mnt
root@archiso ~ # mkdir /mnt/boot
root@archiso ~ # mount /dev/sdx1 /mnt/boot

Time setting

root@archiso ~ # timedatectl set-ntp true
root@archiso ~ # timedatectl set-timezone Asia/Tokyo

Select a mirror list to install the ArchLinux package (select a Japanese server)

root@archiso ~ # vim /etc/pacman.d/mirrorlist
root@archiso ~ # cat /etc/pacman.d/mirrorlist
##
## Arch Linux repository mirrorlist
## Filtered by mirror score from mirror status page
## Generated on 20xx-xx-xx
##

## Japan
Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
## Japan
Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch
## Japan
Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
## other country
...

Installation of base system and required packages

root@archiso ~ # pacstrap /mnt base linux vim dhcpcd

Create an fstab to determine the disk using the UUID.

root@archiso ~ # genfstab -U /mnt >> /mnt/etc/fstab
root@archiso ~ # cat /mnt/etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdx2
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx       /               ext4            rw,relatime     0 1

# /dev/sdx1
UUID=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy       /boot           ext4            rw,relatime     0 2

Chroot to the installed environment

root@archiso ~ # arch-chroot /mnt

Time zone and time settings

[root@archiso /]# ln -sf /usr/share/zoneinfo/Asia/Tokyo > /etc/localtime
[root@archiso /]# hwclock --systohc

Setting the character code to use

[root@archiso /]# vim /etc/locale.gen
[root@archiso /]# cat /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
[root@archiso /]# locale-gen
[root@archiso /]# vim /etc/locale.conf
[root@archiso /]# cat /etc/locale.conf
LANG=en_US.UTF-8

Hostname settings

[root@archiso /]# vim /etc/hostname
[root@archiso /]# cat /etc/hostname
myhostname

Network settings

[root@archiso /]# vim /etc/hosts
[root@archiso /]# cat /etc/hosts
127.0.0.1 localhost
::1    localhost
127.0.1.1 myhostname.localdomain	myhostname

root password setting

[root@archiso /]# passwd

Bootloader installation and configuration

[root@archiso /]# pacman -S grub os-prober intel-ucode
[root@archiso /]# grub-install --target=i386-pc --recheck /dev/sdx
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg

Set to connect to the network at boot time

[root@archiso /]# systemctl enable dhcpcd

Log out of chroot and reboot

[root@archiso /]# exit
root@archiso ~ # umount -R /mnt
root@archiso ~ # reboot

Initial settings after installing Arch Linux

Log in as root

myhostname login : root
passwd

Create a local user

[root@myhostname ~]# useradd -m -G wheel -s /bin/bash myusername
[root@myhostname ~]# passwd myusername

Install sudo so that users in the wheel group can use sudo.

[root@myhostname ~]# pacman -S sudo
[root@myhostname ~]# vim /etc/sudoers
[root@myhostname ~]# cat /etc/sudoers
...
##
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
 %wheel ALL=(ALL) ALL
...

Login as a local user

[root@myhostname ~]# exit
myhostname login : myusername
passwd

Install and enable openssh

[myusername@myhostname ~]# sudo pacman -S openssh
[myusername@myhostname ~]# sudo systemctl enable sshd

Finally

I installed Arch Linux in the environment booted by BIOS boot and set it up to the point where it can be operated from the outside with ssh. Detailed explanation is [Installation Guide-ArchWiki](https://wiki.archlinux.jp/index.php/%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3 See% 83% BC% E3% 83% AB% E3% 82% AC% E3% 82% A4% E3% 83% 89).

Recommended Posts

Arch Linux install to BIOS boot system
Arch Linux install to RAID1 storage (BIOS boot)
Install Minecraft on Arch Linux
Steps to change partition including Linux system area and boot area
Install Arch Linux on DeskMini A300
How to install VMware-Tools on Linux
How to install MBDyn (Linux Ubuntu)
How to install aws-session-manager-plugin on Manajro Linux
How to install packages on Alpine Linux
5 reasons to install Linux on your laptop.
How to install Anisble on Amazon Linux 2
How to install Windows Subsystem For Linux
Introducing Japanese input system to Serene Linux
How to install php7.4 on Linux (Ubuntu)
Until you install Arch Linux on VMware
Add Windows to the Linux OS boot menu
[Linux] Introduction to Linux
Deliver OBS footage to Zoom on Arch Linux
How to install Camunda Modeler on Manjaro Linux
Arch Linux Recommendation
Install Grub on USB memory (UEFI) ~ Boot Linux from grub on USB memory ~
How to use C216 Audio Controller on Arch Linux
I tried adding system calls and scheduler to Linux
I will install Arch Linux for the time being.
Install Docker on Arch Linux and run it remotely
Introducing a desktop environment to Arch Linux (LightDM + Xfce4)
[Linux] [Initial Settings] System Settings
How to install Python
jblas on Arch Linux
How to install pip
How to install archlinux
Introduce serverspec to Linux
How to install python
How to install BayesOpt
Linux system architecture [runlevel]
How to install Nbextensions
FriendlyDesktop (Linux) can't boot
How to install Prover9
Arch Linux installation notes
Boot Arch Linux from your Mac or Android using WOL
Game distribution to YouTube Live on Arch Linux (Nintendo Switch)