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

[email protected] ~ # 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.

[email protected] ~ # mkfs.ext4 /dev/sdx1 
[email protected] ~ # mkfs.ext4 /dev/sdx2

Mount the created partition.

[email protected] ~ # mount /dev/sdx2 /mnt
[email protected] ~ # mkdir /mnt/boot
[email protected] ~ # mount /dev/sdx1 /mnt/boot

Time setting

[email protected] ~ # timedatectl set-ntp true
[email protected] ~ # timedatectl set-timezone Asia/Tokyo

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

[email protected] ~ # vim /etc/pacman.d/mirrorlist
[email protected] ~ # 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

[email protected] ~ # pacstrap /mnt base linux vim dhcpcd

Create an fstab to determine the disk using the UUID.

[email protected] ~ # genfstab -U /mnt >> /mnt/etc/fstab
[email protected] ~ # 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

[email protected] ~ # arch-chroot /mnt

Time zone and time settings

[[email protected] /]# ln -sf /usr/share/zoneinfo/Asia/Tokyo > /etc/localtime
[[email protected] /]# hwclock --systohc

Setting the character code to use

[[email protected] /]# vim /etc/locale.gen
[[email protected] /]# cat /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
[[email protected] /]# locale-gen
[[email protected] /]# vim /etc/locale.conf
[[email protected] /]# cat /etc/locale.conf
LANG=en_US.UTF-8

Hostname settings

[[email protected] /]# vim /etc/hostname
[[email protected] /]# cat /etc/hostname
myhostname

Network settings

[[email protected] /]# vim /etc/hosts
[[email protected] /]# cat /etc/hosts
127.0.0.1 localhost
::1    localhost
127.0.1.1 myhostname.localdomain	myhostname

root password setting

[[email protected] /]# passwd

Bootloader installation and configuration

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

Set to connect to the network at boot time

[[email protected] /]# systemctl enable dhcpcd

Log out of chroot and reboot

[[email protected] /]# exit
[email protected] ~ # umount -R /mnt
[email protected] ~ # reboot

Initial settings after installing Arch Linux

Log in as root

myhostname login : root
passwd

Create a local user

[[email protected] ~]# useradd -m -G wheel -s /bin/bash myusername
[[email protected] ~]# passwd myusername

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

[[email protected] ~]# pacman -S sudo
[[email protected] ~]# vim /etc/sudoers
[[email protected] ~]# 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

[[email protected] ~]# exit
myhostname login : myusername
passwd

Install and enable openssh

[[email protected] ~]# sudo pacman -S openssh
[[email protected] ~]# 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)