VirtualBoxにDebian lennyをインストール

tksmashiw2009-01-21

Ubuntu Intrepidの上でHardy用のdebパッケージを作れるようになったのでVirtualBoxHardyを退役させ、代わりにKDEを載せたディストリビューションを入れることにした。KDEというとopenSUSEが思い浮かぶが、VirtualBoxの中の少ないリソースの上で走らせるので、Debian lenny(testing)をインストールすることにした。

  1. jigdoでISOイメージを落とす


$ []sudo yum install jigdo[]
[]...省略...[]
$ []wget 'http://cdimage.debian.org/cdimage/weekly-builds/i386/jigdo-cd/debian-testing-i386-kde-CD-1.jigdo' \[]
[]'http://cdimage.debian.org/cdimage/weekly-builds/i386/jigdo-cd/debian-testing-i386-kde-CD-1.template'[]
[]...省略...[]
$ []jigdo-lite debian-testing-i386-kde-CD-1.jigdo[]
[]...省略...[]
[]Images offered by `debian-testing-i386-kde-CD-1.jigdo':[]
[] 1: 'Debian GNU/Linux testing "Lenny" - Official Snapshot i386 kde-CD Binary-1[]
[]20090119-05:00 (20090119)' (debian-testing-i386-kde-CD-1.iso)[]
[]...省略...[]
[]If you already have a previous version of the CD you are[]
[]downloading, jigdo can re-use files on the old CD that are also[]
[]present in the new image, and you do not need to download them[]
[]again. Mount the old CD ROM and enter the path it is mounted under[]
[](e.g. `/mnt/cdrom').[]
[]Alternatively, just press enter if you want to start downloading[]
[]the remaining files.[]
[]Files to scan: [][] ← Enterを押す[]

[]-----------------------------------------------------------------[]
[]The jigdo file refers to files stored on Debian mirrors. Please[]
[]choose a Debian mirror as follows: Either enter a complete URL[]
[]pointing to a mirror (in the form[]
[]`ftp://ftp.debian.org/debian/'), or enter any regular expression[]
[]for searching through the list of mirrors: Try a two-letter[]
[]country code such as `de', or a country name like `United[]
[]States', or a server name like `sunsite'.[]
[]Debian mirror: [][]ftp://ftp2.jp.debian.org/debian/[]
[]ちなみにミラーのリストは「ftp://ftp.debian.org/debian/README.mirrors.txt」にある[]
[]...省略...[]

  1. VirtualBoxへインストール

ユーザー名はここでは「tks」にする。特につまった点は無かった。

  1. 再起動からGuest Additionalのインストールまで

まず「tks」がsudoでroot権限を持てるように、ログイン画面で「Menu」→「Console Login」を選び仮想コンソールにrootでログインする。
visudoで最後の行のコメントアウトを消して「sudo」グループがsudoできるようにする。

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=NOPASSWD: ALL

「tks」を「sudo」グループに加える。ついでに「tks」グループは不要なので削除。


[]debian~# groups tks[]
[]tks dialout cdrom floppy audio video plugdev netdev powerdev[]
[]debian~# usermod -g users -G dialout,cdrom,floppy,audio,video,plugdev,netdev,powerdev,sudo tks[]
[]debian~# groups tks[]
[]users dialout cdrom floppy sudo audio video plugdev netdev powerdev[]
[]debian~# groupdel tks[]
Alt+F7でkdmに戻りユーザー「tks」でログインする。
ここでネットワークが有効になっていなかったので右下のトレイからKNetworkManagerを操作し有線ネットワークを有効にした。
Konsoleを開き

$ []sudo -s[]
# []apt-get update[]
[]...省略...[]
# []apt-get dist-upgrade[]
[]...省略...[]
# []apt-get install build-essential linux-headers-2.6.26-1-686[]
[]...省略...[]
# []mount /dev/cdrom /mnt[]
# []/mnt/VBoxLinuxAdditionals-x86.run[]
[]...省略...[]
# []reboot[]
再起動でGuestAdditionalが有効になる。


参考:
Debian GNU/Linux スレッドテンプレ
Debian jigdo mini-howto