さくらのVPSにFedoraをインスコ

話題のさくらVPS、早速申し込んでOSを入れ替えてみた。

私の好みにより、Fedora Linuxとする。

ただ、実際のところ、非常に簡単にインストールが終わり、
ちょっと拍子抜けしたくらい。

まず、標準のCentOS5.4環境にログインし、Fedoraのインストールイメージで
ブートするように grub の設定を書き換える。

[root@www5066u ~]# mount -o ro,loop Fedora-13-x86_64-netinst.iso /mnt/
[root@www5066u ~]# cp /mnt/images/pxeboot/vmlinuz \
                      /mnt/images/pxeboot/initrd.img /boot

ネットワークブート用の vmlinuz と initrd.img を /boot にコピー。
続いて、/boot/grun/grub.conf を以下のように書き換える。

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/vda2
#          initrd /initrd-version.img
#boot=/dev/vda
default=0
timeout=5
#splashimage=(hd0,0)/grub/splash.xpm.gz
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console
hiddenmenu
title Fedora 13 installation
        kernel /vmlinuz ro console=tty0 console=ttyS0,115200n8r
        initrd /initrd.img
title CentOS (2.6.18-194.8.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=LABEL=/ console=tty0 console=ttyS0,115200n8r
        initrd /initrd-2.6.18-194.8.1.el5.img

そして再起動。ああ、その前にネットワーク設定を書き留めておこう。


ネットワークブート用のカーネルで起動すると、まずKeyBoardとNICの
設定を聞かれる。ここはIPv4で先ほど書きとめておいたネットワーク
設定を記入する。

続いて、インストール元を聞かれるので『URL』を選択し、適当な
Fedoraのミラーを指定する。今回は理研FTPサーバを使った。

Welcome to Fedora for x86_64                                                    

┌───────────┤ URL Setup  ├────────────┐
│                                                              │
│          Please enter the URL containing the Fedora          │
│          installation image on your server.                  │
│                                                              │
│ http://ftp.riken.jp/Linux/fedora/releases/13/Fedora/x86_64/os│
│                                                              │
│ [ ] Enable HTTP proxy                                        │
│                                                              │
│ Proxy URL        ___________________________________         │
│ Username         _______________                             │
│                                                              │
│ Password         _______________                             │
│                                                              │
│            ┌──┐                   ┌───┐             │
│            │ OK │                   │ Back │             │
│            └──┘                   └───┘             │
│                                                              │
│                                                              │
└───────────────────────────────┘

その後、install.img をロードして anaconda が起動するが、以降の作業は
VNCサーバ経由で行った方が吉。
テキストモードだと指定できないオプションもあるので。
(パーティション構成のCustom Layoutなど)

VNCで繋いでからの作業は特に特筆する事は無し。
普段のインストール時と同じようにして、最後に "reboot" ボタンを
クリックして完了。

あまりに簡単すぎて拍子抜けした。

[root@www5066u ~]# uname -r
2.6.33.3-85.fc13.x86_64
[root@www5066u ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             19894140   3315412  15568144  18% /
tmpfs                   252784         0    252784   0% /dev/shm
/dev/sda1               101086     62494     33373  66% /boot
[root@www5066u ~]# free
             total       used       free     shared    buffers     cached
Mem:        505568     159116     346452          0      10944      65856
-/+ buffers/cache:      82316     423252
Swap:       655352          0     655352
[root@www5066u ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

swap 2GBはちょっと多すぎる気がしたので640MBに減らした。

もちろん、SELinuxは有効にしている。