VirtualboxでArch Linuxをインストール
4453 ワード
Archlinux installation guide https://wiki.archlinux.org/index.php/Installation_guide
boot
swap
/
/home
make/dev/sda1 bootable
make/dev/sda1 to swap type partition
write table to disk and exit fdisk
format partitions
make swap
mount swap
rankmirrors to make this faster (though it takes a while)
Generate an fstab file
Change root into the new system
Set the hostname
Set the time zone
uncomment the needed locales in
Set locale preferences in
Set the root password (root account ,not your account, we will create that later)
Create a new initial RAM disk
Until not, we finish installing archlinux, then we are going to setup the system.
再起動後、ipアドレスを手動で取得する必要があります
このコマンドは、システムが起動するたびに自動的にロードされます.
32ビットプログラムのインストールを許可
uncomment
update packages
install x environment
intall mesa for 3d
install virtualbox guest packages
create $ vi/etc/modules-load.d/virtualbox.conf
add
create user to login
allow user to run
find
and uncomment
Pre-installation
パーティション
$ fdisk /dev/sda
boot
> n
> return (default primary)
> return (default partition 1)
> return (default first sector)
> +250M
swap
> n
> return (default primary)
> return (default partition 2)
> return (default first sector)
> +2G
/
> n
> return (default primary)
> return (default partition 3)
> return (default first sector)
> +2G
> return
/home
> n
> p (make primary)
> return (default first sector)
> return (default last sector)
make/dev/sda1 bootable
> a
> 1
make/dev/sda1 to swap type partition
> t
> 2
> 82
write table to disk and exit fdisk
> w
パーティションのフォーマット
format partitions
$ mkfs.ext4 /dev/sda1
$ mkfs.ext4 /dev/sda3
$ mkfs.ext4 /dev/sda4
make swap
$ mkswap /dev/sda2
mount swap
$ swapon /dev/sda2
パーティションのロード
$ mount /dev/sda3 /mnt
$ cd /mnt
$ mkdir boot home
$ mount /dev/sda1 boot
$ mount /dev/sda4 home
$ cd /
インストール
最も高速なミラーアドレスの検出
rankmirrors to make this faster (though it takes a while)
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
rankmirrors -n 6 /etc/pacman.d/mirrorlist.orig \>/etc/pacman.d/mirrorlist
pacman -Syy
システムのインストール
# install base packages (take a coffee break if you have slow internet)
pacstrap /mnt base base-devel
システムの設定
Generate an fstab file
$ genfstab -p /mnt >> /mnt/etc/fstab
Change root into the new system
$ arch-chroot /mnt
Set the hostname
$ echo [archlinux] > /etc/hostname
Set the time zone
$ ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime
uncomment the needed locales in
/etc/locale.gen
, then generate them with $ locale-gen
Set locale preferences in
/etc/locale.conf
and possibly $HOME/.config/locale.conf
$ echo LANG=en_US.UTF-8 > /etc/locale.conf
Set the root password (root account ,not your account, we will create that later)
$ passwd
bootloaderのインストール
$ pacman -S grub-bios
$ grub-install /dev/sda
Create a new initial RAM disk
$ mkinitcpio -p linux
$ grub-mkconfig -o /boot/grub/grub.cfg
$ exit
パーティションのアンインストールと再起動
$ umount /mnt/home
$ umount /mnt/boot
$ umout /mnt
$ reboot
Until not, we finish installing archlinux, then we are going to setup the system.
Post-installation
再起動後、ipアドレスを手動で取得する必要があります
$ dhcpcd
このコマンドは、システムが起動するたびに自動的にロードされます.
$ systemctl enable dhcpcd
32ビットプログラムのインストールを許可
$ vi /etc/pacman.conf
uncomment
[multilib](#)
Include = /etc/pacman.d/mirrorlist
update packages
$ pacman -Syy
$ pacman -Su
install x environment
$ pacman -S xorg-server xorg-xinit xorg-server-utils
intall mesa for 3d
$ pacman -S mesa
install virtualbox guest packages
$ pacman -S virtualbox-guest-utils
$ modprobe -a vboxguest vboxsf vboxvideo
create $ vi/etc/modules-load.d/virtualbox.conf
add
vboxguest
vboxsf
vboxvideo
$ reboot
$ pacman -S xorg-twm xorg-xclock xterm
$ startx
create user to login
$ useradd -m -g users -G storage,power,wheel -s /bin/bash jma
$ passwd jma
$ visudo
allow user to run
sudo
command find
Uncomment to allow members of group wheel to execute any command
and uncomment
%wheel ALL=(ALL) ALL