2
3

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.

Arch LinuxAdvent Calendar 2015

Day 3

Arch Linux インストールCDリマスター

Last updated at Posted at 2015-12-07

この記事はArch Linux Advent Calender 2015の3日目です。

  • 今回はVirtualboxインストール済みのISO(i686)を作成します。
  • 作業はArch Linux上で行う必要があります。

参考

cdの中身をコピー

mkdir /mnt/archiso
mount /dev/cdrom /mnt/archiso
cp -a /mnt/archiso ~
umount /mnt/archiso && rmdir /mnt/archiso
cd

必要なツールをインストール

pacman -Sy squashfs-tools arch-install-scripts cdrkit

airootfs.sfsを展開

export ROOTDIR=~/squashfs-root
unsquashfs -d $ROOTDIR archiso/arch/i686/airootfs.sfs
rm -f archiso/arch/i686/airootfs.sfs

pacman-key --init用にバックでプログラムを動かしておく

haveged -w 1024
arch-chroot $ROOTDIR pacman-key --init
pkill haveged
# keyの更新
arch-chroot $ROOTDIR pacman-key --populate archlinux
# システムの更新
arch-chroot $ROOTDIR pacman -Syu
# パッケージ追加
arch-chroot $ROOTDIR pacman -Sy \
  grub-bios openssh btrfs-progs
# パッケージ追加(virtualbox用)
arch-chroot $ROOTDIR pacman -Sy \
  mesa qt4 xorg-xauth sudo otf-ipafont \
  virtualbox virtualbox-guest-utils \
  virtualbox-ext-vnc virtualbox-guest-iso
# キャッシュのクリア
arch-chroot $ROOTDIR pacman -Scc
arch-chroot $ROOTDIR /bin/bash

# ユーザの作成
useradd -m vagrant
passwd vagrant
usermod -aG wheel vagrant 
usermod -aG vboxusers vagrant

# locale
sed -i -e 's/#ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo 'LANG="ja_JP.UTF-8"' > /etc/locale.conf

# X転送許可
sed -i -e 's/#X11Forwarding no/X11Forwarding yes/' /etc/ssh/sshd_config

# サービス起動設定
systemctl enable sshd
systemctl enable vboxservice

exit
mksquashfs $ROOTDIR archiso/arch/i686/airootfs.sfs -comp xz
cd archiso
iso作成
genisoimage -l -r -J -V "ARCH_201512" \
 -b isolinux/isolinux.bin \
 -no-emul-boot \
 -boot-load-size 4 \
 -boot-info-table \
 -c isolinux/boot.cat \
 -o ../arch-custom.iso .

起動確認

  • arch-custom.iso からブートし、i686を選択し起動するとvirtualboxが起動できることを確認。

まとめ

  • archLinuxのISOリマスターは簡単で良いですね。
2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?