4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EFIにArchLinuxインストール (LivaPC)

Last updated at Posted at 2014-05-11

電源投入後、F7キーでBootデバイス一覧を表示させ、USBメモリから
Ubuntu14.04ja 64bit版をインストール。

しかし結構もっさりしているのでArchLinuxをインストールすることにした。

参考:自作PCにArch linuxをインストール | Cocoa-tipsを見てちょ!
ArchLinux iso download

昔インストールした時の覚書

パーティショニング

# gdisk /dev/mmcblk0
# gdisk -l /dev/mmcblk0
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/mmcblk0: 61071360 sectors, 29.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 34830398-0F24-4608-A665-3F260E52A964
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  efi
   2          206846         4913151   2.0 GiB     8200  swap
   3         4913152        61071326   26.8 GiB    8300  /
mkfs.vfat -F32 /dev/mmcblk0p1
mkswap /dev/mmcblk0p2
mkfs.xfs /dev/mmcblk0p3

mount

mount /dev/mmcblk0p3 /mnt
mkdir -p /mnt/boot/efi
mount /dev/mmcblk0p1 /mnt/boot/efi

pacman

/etc/pacman.d/mirrorlist
Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch
pacstrap -i /mnt base base-devel vim openssh grub efibootmgr os-prober
# pacstrapは5分ほどかかる。
genfstab -U -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash

chroot環境

chroot環境
vim /etc/locale.gen
# en_US.UTF-8とja_JP.UTF-8のコメントアウトを外す
echo LANG=ja_JP.UTF-8 > /etc/locale.conf
locale-gen
echo KEYMAP=jp106 > /etc/vconsole.conf
ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
hwclock --systohc --utc
echo Arch >  /etc/hostname
sshdを最初から有効
systemctl enable sshd
mkinitcpio -p linux
passwd
EFIbootできるようにする
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
grub-mkconfig -o /boot/grub/grub.cfg

ネットワーク設定

pacman -S netctl ifenslave
echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/99-sysctl.conf

インストーラを終了する

exit
umount -a
reboot

OS起動後

一般ユーザ作成
useradd -m owner
passwd owner
visudo
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?