raotanの備忘録

個人的備忘録

archlinhuxインストール(新規前提MBR使用)

*キーボードレイアウト設定

# loadkeys jp106

 

*インターネット接続の確立

# ping -c 3 www.google.com

(# systemctl restart dhcpcd.service)

 

*時計を合わせる

# timedatectl set-ntp true

 

*ドライブの準備

ディレクトリ構成

230GB

/dev/sda1:/boot(1GB)

/dev/sda2:/(60GB)

/dev/sda3:/home(残り全部)

 

# fdisk /dev/sda

Command(m for help):o

Command(m for help):n

Command(m for help):ENTER

Command(m for help):1

Command(m for help):ENTER

Command(m for help):+1G

Command(m for help):n

Command(m for help):ENTER

Command(m for help):2

Command(m for help):ENTER

Command(m for help):+60G

Command(m for help):n

Command(m for help):3

Command(m for help):ENTER

Command(m for help):ENTER

Command(m for help):a

Command(m for help):1

Command(m for help):w

*パーティションのフォーマットとマウント

/dev/sda1:ext2(boot)

/dev/sda2:ext4(root)

/dev/sda3.ext4(home)

# mkfs.ext2 /dev/sda1

# mkfs.ext4 /dev/sda2

# mkfs.ext4 /dev/sda4

 

# mount /dev/sda2 /mnt

# mkdir /mnt/boot

# mount /dev/sda1 /mnt/boot

# mkdir /mnt/home

# mount /dev/sda4 /mnt/home

*インストール

/etc/pacman.d/mirrorlist

jaistを一番上に

# vi /etc/pacman.d/mirrorlist

# / jaist

# カーソルを合わせて 2d

# 1G

# カーソルを合わせて p

# Esc & ZZ

# pacstrap /mnt base base-devel

# genfstab -U -p /mnt >> /mnt/etc/fstab

# arch-chroot /mnt /bin/bash

# vi /etc/locale.gen

以下をコメントイン

#en_US.UTF-8 UTF-8

#ja_JP.UTF-8 UTF-8

# locale-gen

# echo LNAG=en_US.UTF-8 > /etc/locale.conf

# export LNAG=en_US.UTF-8

# loadkeys jp106

# ls /etc/vconsole.conf

# echo KEYMAP=jp106 > /etc/vconsole.conf

# ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

# hwclock --systohc --utc

# echo archhome > /etc/hostname

# systemctl enable dhcpcd.service

# pacman -Sy

# passwd

# pacman -S intel-ucode

# pacman -S grub

# grub-install --target=i386-pc --recheck /dev/sda

# grub-mkconfig -o /boot/grub/grub.cfg

# exit 

# umount -R /mnt

# reboot

 

参考URL

Arch Linux インストール (OSインストール編) | BIOS, MBR, GRUB, 2014.02.01でインストール | 普段使いのArch Linux