Debian 7.1 のインストール(1)ディレクトリツリーの作成

Debian LS-VL

ぼーっとしてたらポイントリリースが出て Debian 7.1 に なってしまった。
遅ればせながら、 D.3. Unix/Linux システムからの Debian GNU/Linux のインストール を参考にさせていただいて、Debian 7.1 をインストールする

D.3.2. debootstrap のインストール

wget と ar

まずは、標準ファームにログインして、wget と ar の確認。
root@LS-VL815:~# which wget
/usr/bin/wget
root@LS-VL815:~# which ar
root@LS-VL815:~#
wget はあるが、ar はない。
ar は busybox に入っているはず。
root@LS-VL815:~# busybox --help
BusyBox v1.7.0 (2009-04-29 19:12:57 JST) multi-call binary
Copyright (C) 1998-2006  妥rik Andersen, Rob Landley, and others.
Licensed under GPLv2.  帯ee source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: [function] [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as!

Currently defined functions:
        [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash,
        awk, basename, bunzip2, bzcat, cal, cat, catv, chattr,
        chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt,
        cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw,
        cut, date, dc, dd, deallocvt, delgroup, deluser, df, dhcprelay,
        diff, dirname, dmesg, dnsd, dos2unix, du, dumpkmap, dumpleases,
        echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
        expand, expr, fakeidentd, false, fbset, fdflush, fdformat,
        fdisk, fgrep, find, fold, free, freeramdisk, fsck, fsck.minix,
        ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip,
        halt, hdparm, head, hexdump, hostid, hostname, httpd,
        hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
        install, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute,
        iprule, iptunnel, kill, killall, killall5, klogd, last,
        length, less, linux32, linux64, linuxrc, ln, loadfont,
        loadkmap, logger, login, logname, logread, losetup, ls,
        lsattr, lsmod, lzmacat, makedevs, md5sum, mdev, mesg,
        mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe,
        more, mount, mountpoint, mt, mv, nameif, nc, netstat,
        nice, nmeter, nohup, nslookup, od, openvt, passwd, patch,
        pidof, ping, ping6, pipe_progress, pivot_root, poweroff,
        printenv, printf, ps, pscan, pwd, raidautorun, rdate,
        readahead, readlink, readprofile, realpath, reboot, renice,
        reset, resize, rm, rmdir, rmmod, route, rpm, rpm2cpio,
        run-parts, runlevel, runsv, runsvdir, rx, sed, seq, setarch,
        setconsole, setkeycodes, setlogcons, setsid, setuidgid,
        sh, sha1sum, slattach, sleep, softlimit, sort, split,
        start-stop-daemon, stat, strings, stty, su, sulogin, sum,
        sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
        syslogd, tail, tar, taskset, tcpsvd, tee, telnet, test,
        tftp, time, top, touch, tr, traceroute, true, tty, ttysize,
        udhcpc, udhcpd, udpsvd, umount, uname, uncompress, unexpand,
        uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode,
        uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget,
        which, who, whoami, xargs, yes, zcat, zcip

root@LS-VL815:~#
あるある。
/usr/local/bin/ar としてリンクを張る
root@LS-VL815:~# which busybox
/bin/busybox
root@LS-VL815:~# ln -s /bin/busybox /usr/local/bin/ar
root@LS-VL815:~# which ar
/usr/local/bin/ar
root@LS-VL815:~#

debootstrapの入手

pool から debootstrap_1.0.52_all.deb をいただく。
root@LS-VL815:~# wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.52_all.deb
--2013-06-20 22:12:25--  http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.52_all.deb
Resolving ftp.debian.org... 130.89.148.12, 2001:610:1908:b000::148:12
Connecting to ftp.debian.org|130.89.148.12|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 59346 (58K) [application/x-debian-package]
Saving to: `debootstrap_1.0.52_all.deb'

100%[==============================================================================================================================>] 59,346       109K/s   in 0.5s

2013-06-20 22:12:26 (109 KB/s) - `debootstrap_1.0.52_all.deb' saved [59346/59346]

root@LS-VL815:~#

debootstrap のインストール

root@LS-VL815:~# ar -x debootstrap_1.0.52_all.deb
root@LS-VL815:~# ls
control.tar.gz              data.tar.gz                 debian-binary               debootstrap_1.0.52_all.deb
root@LS-VL815:~# cd /
root@LS-VL815:/# tar zxvf ~/data.tar.gz
./
./usr/
./usr/share/
./usr/share/man/
./usr/share/man/man8/
./usr/share/man/man8/debootstrap.8.gz
./usr/share/doc/
./usr/share/doc/debootstrap/
./usr/share/doc/debootstrap/changelog.gz
./usr/share/doc/debootstrap/copyright
./usr/share/doc/debootstrap/README
./usr/share/debootstrap/
./usr/share/debootstrap/devices.tar.gz
./usr/share/debootstrap/functions
./usr/share/debootstrap/scripts/
./usr/share/debootstrap/scripts/hoary.buildd
./usr/share/debootstrap/scripts/sarge
./usr/share/debootstrap/scripts/hoary
./usr/share/debootstrap/scripts/warty
./usr/share/debootstrap/scripts/sarge.fakechroot
./usr/share/debootstrap/scripts/dapper
./usr/share/debootstrap/scripts/sarge.buildd
./usr/share/debootstrap/scripts/edgy
./usr/share/debootstrap/scripts/woody
./usr/share/debootstrap/scripts/breezy
./usr/share/debootstrap/scripts/gutsy
./usr/share/debootstrap/scripts/potato
./usr/share/debootstrap/scripts/feisty
./usr/share/debootstrap/scripts/woody.buildd
./usr/share/debootstrap/scripts/sid
./usr/share/debootstrap/scripts/warty.buildd
./usr/sbin/
./usr/sbin/debootstrap
./usr/share/debootstrap/scripts/jessie
./usr/share/debootstrap/scripts/etch-m68k
./usr/share/debootstrap/scripts/saucy
./usr/share/debootstrap/scripts/jaunty
./usr/share/debootstrap/scripts/lenny
./usr/share/debootstrap/scripts/testing
./usr/share/debootstrap/scripts/unstable
./usr/share/debootstrap/scripts/raring
./usr/share/debootstrap/scripts/oneiric
./usr/share/debootstrap/scripts/etch
./usr/share/debootstrap/scripts/precise
./usr/share/debootstrap/scripts/natty
./usr/share/debootstrap/scripts/wheezy
./usr/share/debootstrap/scripts/lucid
./usr/share/debootstrap/scripts/quantal
./usr/share/debootstrap/scripts/maverick
./usr/share/debootstrap/scripts/stable
./usr/share/debootstrap/scripts/hardy
./usr/share/debootstrap/scripts/oldstable
./usr/share/debootstrap/scripts/squeeze
./usr/share/debootstrap/scripts/intrepid
./usr/share/debootstrap/scripts/karmic
root@LS-VL815:/#

D.3.3. debootstrap の実行

ARCH には armel、 ミラーサイトとして ftp.jp.debian.org/debian を使わせていただく。
root@LS-VL815:/# mkdir /mnt/debinst
root@LS-VL815:/# /usr/sbin/debootstrap --arch armel wheezy !$ http://ftp.jp.debian.org/debian
/usr/sbin/debootstrap --arch armel wheezy /mnt/debinst http://ftp.jp.debian.org/debian
I: Retrieving Release
W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: insserv libbz2-1.0 libdb5.1 libsemanage-common libsemanage1 libslang2 libustr-1.0-1
I: Found additional base dependencies: libept1.4.12 libgcrypt11 libgnutls26 libgpg-error0 libidn11 libnfnetlink0 libp11-kit0 libsqlite3-0 libtasn1-3 libxapian22
I: Checking component main on http://ftp.jp.debian.org/debian...
I: Retrieving libacl1 2.2.51-8
I: Validating libacl1 2.2.51-8
I: Retrieving adduser 3.113+nmu3
I: Validating adduser 3.113+nmu3
	:
	:
I: Configuring udev...
I: Configuring iptables...
I: Configuring man-db...
I: Configuring apt...
I: Configuring wget...
I: Configuring libcwidget3...
I: Configuring aptitude...
I: Configuring tasksel...
I: Configuring tasksel-data...
I: Base system installed successfully.
root@LS-VL815:/#
時間を測るのを忘れてていたが、、、結構時間がかかった。
15分ぐらい??
root@LS-VL815:/# ls -ld /mnt
drwxrwxrwx    8 root     root         4096 Jun 20 22:17 /mnt
root@LS-VL815:/# date
Thu Jun 20 22:31:23 JST 2013
root@LS-VL815:/#
/mnt/debinst を mkdir してから 14 分。15分はかかっていなかった。

D.3.4. 基本システムの設定

root@LS-VL815:/# LANG=C.UTF-8 chroot /mnt/debinst /bin/bash
root@LS-VL815:/#
さて、どれを実行していくか、、、

D.3.4.1. デバイスファイルの作成

これは要りそうだ
root@LS-VL815:/# apt-get install makedev
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  makedev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 42.3 kB of archives.
After this operation, 129 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  makedev
Install these packages without verification [y/N]?
Install these packages without verification [y/N]? y
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main makedev all 2.3.1-92 [42.3 kB]
Fetched 42.3 kB in 0s (140 kB/s)
Can not write log, openpty() failed (/dev/pts not mounted?)
Selecting previously unselected package makedev.
(Reading database ... 9288 files and directories currently installed.)
Unpacking makedev (from .../makedev_2.3.1-92_all.deb) ...
update-rc.d: using dependency based boot sequencing
Processing triggers for man-db ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up makedev (2.3.1-92) ...
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
root@LS-VL815:/#
makedev をインストールするのに /dev/pts が必要とか、 缶切りは缶の中状態??

/proc も必要だとのことなので、/proc をマウントする

root@LS-VL815:/# mount /proc
warning: failed to read mtab
mount: can't find /proc in /etc/fstab or /etc/mtab
root@LS-VL815:/#
色々まっさらだと進めない(笑

手を抜いて標準ファームの /dev をコピーする

root@LS-VL815:/# exit
exit
root@LS-VL815:/# ls /dev
XOR            disk1_6        loop6          ptyp4          random         stdout         tty21          tty36          tty50          tty8           ttypa
aes            fd             loop7          ptyp5          rd             tty            tty22          tty37          tty51          tty9           ttypb
autofs         full           md             ptyp6          root           tty0           tty23          tty38          tty52          ttyS0          ttypc
bsg            fuse           md0            ptyp7          rtc            tty1           tty24          tty39          tty53          ttyS1          ttypd
btns           initctl        mem            ptyp8          rtc0           tty10          tty25          tty4           tty54          ttyS2          ttype
bus            kmem           mtd0           ptyp9          sda            tty11          tty26          tty40          tty55          ttyS3          ttypf
console        kmsg           mtd0ro         ptypa          sda1           tty12          tty27          tty41          tty56          ttyp0          urandom
crypto         log            mtdblock0      ptypb          sda2           tty13          tty28          tty42          tty57          ttyp1          vcs
device-mapper  loop           null           ptypc          sda3           tty14          tty29          tty43          tty58          ttyp2          vcs1
disk           loop-control   port           ptypd          sda4           tty15          tty3           tty44          tty59          ttyp3          vcsa
disk1          loop0          ptmx           ptype          sda5           tty16          tty30          tty45          tty6           ttyp4          vcsa1
disk1_1        loop1          pts            ptypf          sda6           tty17          tty31          tty46          tty60          ttyp5          vga_arbiter
disk1_2        loop2          ptyp0          ram            sg0            tty18          tty32          tty47          tty61          ttyp6          zero
disk1_3        loop3          ptyp1          ram0           shm            tty19          tty33          tty48          tty62          ttyp7
disk1_4        loop4          ptyp2          ram1           stderr         tty2           tty34          tty49          tty63          ttyp8
disk1_5        loop5          ptyp3          ramdisk        stdin          tty20          tty35          tty5           tty7           ttyp9
root@LS-VL815:/# tar cf - dev | (cd /mnt/debinst/ ; tar xvf -)
tar: dev/log: socket ignored
dev/
dev/bus/
dev/bus/usb/
dev/bus/usb/001/
dev/bus/usb/001/001
dev/disk1_1
dev/disk1_6
dev/disk1_5
dev/disk1_3
dev/disk1_2
dev/disk1_4
dev/disk1
dev/initctl
	:
	:
root@LS-VL815:/# LANG=C.UTF-8 chroot /mnt/debinst /bin/bash
root@LS-VL815:/#

D.3.4.2. パーティションのマウント

これは、ハックキットのインストーラで設定するので、パス

/proc はマウントしておく

root@LS-VL815:/# mount -t proc proc /proc
root@LS-VL815:/#

D.3.4.3. タイムゾーンの設定

これは実行しておく
root@LS-VL815:/# dpkg-reconfigure tzdata
Package configuration

  lqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring tzdata tqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x Please select the geographic area in which you live. Subsequent         x
  x configuration questions will narrow this down by presenting a list of   x
  x cities, representing the time zones in which they are located.          x
  x                                                                         x
  x Geographic area:                                                        x
  x                                                                         x
  x                          Asia                  ↑                        x
  x                          Atlantic Ocean        a                        x
  x                          Europe                a                        x
  x                          Indian Ocean          a                        x
  x                          Pacific Ocean         a                        x
  x                          System V timezones    a                        x
  x                          US                    `                        x
  x                          None of the above     ↓                        x
  x                                                                         x
  x                                                                         x
  x                   <Ok>                       <Cancel>                   x
  x                                                                         x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Asia → Tokyo を選ぶ。
Current default time zone: 'Asia/Tokyo'
Local time is now:      Thu Jun 20 22:49:06 JST 2013.
Universal Time is now:  Thu Jun 20 13:49:06 UTC 2013.

root@LS-VL815:/#

D.3.4.4. ネットワークの設定

これは、ハックキットのインストーラで設定するので、パス

D.3.4.5. apt の設定

これはやっておく
root@LS-VL815:/# cat /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian wheezy main
root@LS-VL815:/# cat >> !$
cat >> /etc/apt/sources.list
deb-src http://ftp.us.debian.org/debian wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
root@LS-VL815:/# cat !$
cat /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian wheezy main
deb-src http://ftp.us.debian.org/debian wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
root@LS-VL815:/#
aptitude update を実行とのことだが、、、

このドキュメント、makedev は apt-get install なのに、 ここ以降は aptitude なのは何か意図がある??

とりあえず apt-get で通す

root@LS-VL815:/# apt-get update
Get:1 http://ftp.jp.debian.org wheezy Release.gpg [1672 B]
Hit http://ftp.jp.debian.org wheezy Release
Hit http://ftp.jp.debian.org wheezy/main armel Packages
Get:2 http://ftp.jp.debian.org wheezy/main Translation-en [3852 kB]
Get:3 http://ftp.us.debian.org wheezy Release.gpg [1672 B]
Get:4 http://ftp.us.debian.org wheezy Release [167 kB]
Get:5 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get:6 http://security.debian.org wheezy/updates Release [102 kB]
Get:7 http://ftp.us.debian.org wheezy/main Sources [5951 kB]
Get:8 http://security.debian.org wheezy/updates/main Sources [36.6 kB]
Get:9 http://security.debian.org wheezy/updates/main armel Packages [57.5 kB]
Get:10 http://security.debian.org wheezy/updates/main Translation-en [38.4 kB]
Fetched 10.2 MB in 30s (338 kB/s)
Reading package lists... Done
root@LS-VL815:/#

D.3.4.6. ロケールとキーボードの設定

ロケールの設定だけを実行する
root@LS-VL815:/# apt-get install locales
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  locales
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 5712 kB of archives.
After this operation, 15.5 MB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main locales all 2.13-38 [5712 kB]
Fetched 5712 kB in 1s (2949 kB/s)
Preconfiguring packages ...
Selecting previously unselected package locales.
(Reading database ... 9294 files and directories currently installed.)
Unpacking locales (from .../locales_2.13-38_all.deb) ...
Processing triggers for man-db ...
Setting up locales (2.13-38) ...
Generating locales (this might take a while)...
Generation complete.
root@LS-VL815:/# dpkg-reconfigure locales
Package configuration

 lqqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring locales tqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x Locales are a framework to switch between multiple languages and allow    x
 x users to use their language, country, characters, collation order, etc.   x
 x                                                                           x
 x Please choose which locales to generate. UTF-8 locales should be chosen   x
 x by default, particularly for new installations. Other character sets may  x
 x be useful for backwards compatibility with older systems and software.    x
 x                                                                           x
 x Locales to be generated:                                                  x
 x                                                                           x
 x    [ ] iw_IL.UTF-8 UTF-8                                              ↑   x
 x    [*] ja_JP.EUC-JP EUC-JP                                            a   x
 x    [*] ja_JP.UTF-8 UTF-8                                              `   x
 x    [ ] ka_GE GEORGIAN-PS                                              a   x
 x    [ ] ka_GE.UTF-8 UTF-8                                              ↓   x
 x                                                                           x
 x                                                                           x
 x                    <Ok>                        <Cancel>                   x
 x                                                                           x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

ja_JP.EUC-JP EUC-JPとja_JP.UTF-8 UTF-8とをインストールしておく
Package configuration

 lqqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring locales tqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x Many packages in Debian use locales to display text in the correct        x
 x language for the user. You can choose a default locale for the system     x
 x from the generated locales.                                               x
 x                                                                           x
 x This will select the default language for the entire system. If this      x
 x system is a multi-user system where not all users are able to speak the   x
 x default language, they will experience difficulties.                      x
 x                                                                           x
 x Default locale for the system environment:                                x
 x                                                                           x
 x                               None                                        x
 x                               ja_JP.EUC-JP                                x
 x                               ja_JP.UTF-8                                 x
 x                                                                           x
 x                                                                           x
 x                    <Ok>                        <Cancel>                   x
 x                                                                           x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


デフォルトは、漢に None かな、、、やっぱり ja_JP.UTF-8 にしとこ
Generating locales (this might take a while)...
  ja_JP.EUC-JP... done
  ja_JP.UTF-8... done
Generation complete.
root@LS-VL815:/#

D.3.5. カーネルのインストール

標準ファームのカーネルを使うのでパス

D.3.6. ブートローダのセットアップ

これも、パス

D.3.7. リモートアクセス: SSH のインストールとパスワード設定

いつも telnet だけれど、そろそろ ssh かなぁ、、、
root@LS-VL815:/# apt-get install ssh
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  krb5-locales libbsd0 libedit2 libgssapi-krb5-2 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0 libwrap0 libx11-6 libx11-data libxau6 libxcb1
  libxdmcp6 libxext6 libxmuu1 ncurses-term openssh-blacklist
  openssh-blacklist-extra openssh-client openssh-server tcpd xauth
Suggested packages:
  krb5-doc krb5-user ssh-askpass libpam-ssh keychain monkeysphere rssh
  molly-guard ufw
The following NEW packages will be installed:
  krb5-locales libbsd0 libedit2 libgssapi-krb5-2 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0 libwrap0 libx11-6 libx11-data libxau6 libxcb1
  libxdmcp6 libxext6 libxmuu1 ncurses-term openssh-blacklist
  openssh-blacklist-extra openssh-client openssh-server ssh tcpd xauth
0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
Need to get 9123 kB of archives.
After this operation, 20.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
	:
	:
Setting up openssh-server (1:6.0p1-4) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
[ ok ] Restarting OpenBSD Secure Shell server: sshd.
Setting up tcpd (7.6.q-24) ...
Setting up xauth (1:1.0.7-1) ...
Setting up ssh (1:6.0p1-4) ...
root@LS-VL815:/#
RSA/DSA key を作ってるけど、、、ま、いいか

root にパスワードを付けておく

root@LS-VL815:/# passwd
Enter new UNIX password: hack(実際はエコーバックされない)
Retype new UNIX password: hack(実際はエコーバックされない)
passwd: password updated successfully
root@LS-VL815:/#

D.3.8. 仕上げに

パス

パッケージの追加

必要そうなパッケージを追加しておく

xfsprogs

root@LS-VL815:/# apt-get install xfsprogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libreadline5
Suggested packages:
  xfsdump acl attr quota
The following NEW packages will be installed:
  libreadline5 xfsprogs
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1581 kB of archives.
After this operation, 3386 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main libreadline5 armel 5.2+dfsg-2~deb7u1 [131 kB]
Get:2 http://ftp.jp.debian.org/debian/ wheezy/main xfsprogs armel 3.1.7+b1 [1450 kB]
Fetched 1581 kB in 0s (2065 kB/s)
Selecting previously unselected package libreadline5:armel.
(Reading database ... 12997 files and directories currently installed.)
Unpacking libreadline5:armel (from .../libreadline5_5.2+dfsg-2~deb7u1_armel.deb) ...
Selecting previously unselected package xfsprogs.
Unpacking xfsprogs (from .../xfsprogs_3.1.7+b1_armel.deb) ...
Processing triggers for man-db ...
Setting up libreadline5:armel (5.2+dfsg-2~deb7u1) ...
Setting up xfsprogs (3.1.7+b1) ...
root@LS-VL815:/#

psmisc

root@LS-VL815:/# apt-get install psmisc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  psmisc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 134 kB of archives.
After this operation, 680 kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main psmisc armel 22.19-1+deb7u1 [134 kB]
Fetched 134 kB in 0s (469 kB/s)
Selecting previously unselected package psmisc.
(Reading database ... 13066 files and directories currently installed.)
Unpacking psmisc (from .../psmisc_22.19-1+deb7u1_armel.deb) ...
Processing triggers for man-db ...
Setting up psmisc (22.19-1+deb7u1) ...
root@LS-VL815:/#

less,nkf,ftp

root@LS-VL815:/# apt-get install less nkf ftp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  ftp less nkf
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 310 kB of archives.
After this operation, 667 kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main ftp armel 0.17-27 [62.3 kB]
Get:2 http://ftp.jp.debian.org/debian/ wheezy/main less armel 444-4 [127 kB]
Get:3 http://ftp.jp.debian.org/debian/ wheezy/main nkf armel 2.12-1 [120 kB]
Fetched 310 kB in 0s (700 kB/s)
Selecting previously unselected package ftp.
(Reading database ... 13114 files and directories currently installed.)
Unpacking ftp (from .../archives/ftp_0.17-27_armel.deb) ...
Selecting previously unselected package less.
Unpacking less (from .../archives/less_444-4_armel.deb) ...
Selecting previously unselected package nkf.
Unpacking nkf (from .../archives/nkf_2.12-1_armel.deb) ...
Processing triggers for man-db ...
Setting up ftp (0.17-27) ...
update-alternatives: using /usr/bin/netkit-ftp to provide /usr/bin/ftp (ftp) in auto mode
Setting up less (444-4) ...
Setting up nkf (2.12-1) ...
root@LS-VL815:/#

その他ハックキット固有の設定

guest アカウントの作成

root@LS-VL815:/# adduser guest
Adding user `guest' ...
Adding new group `guest' (1000) ...
Adding new user `guest' (1000) with group `guest' ...
Creating home directory `/home/guest' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: hack(実際はエコーバックされない)
Retype new UNIX password: hack(実際はエコーバックされない)
passwd: password updated successfully
Changing the user information for guest
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y
root@LS-VL815:/#

/initrd を作る

root@LS-VL815:/# ls /
bin   dev  home  media  opt   root  sbin     srv  tmp  var
boot  etc  lib   mnt    proc  run   selinux  sys  usr
root@LS-VL815:/# mkdir /initrd
root@LS-VL815:/#

inittabの修正

シリアルコンソールからログインできるようにする
root@LS-VL815:/# cd /etc
root@LS-VL815:/etc# mv inittab{,.orig}
root@LS-VL815:/etc# cp inittab{.orig,}
root@LS-VL815:/etc# vi inittab
	:
	:
root@LS-VL815:/etc# diff -u inittab{.orig,}
--- inittab.orig        2013-02-08 10:04:44.000000000 +0900
+++ inittab     2013-06-20 23:20:44.000000000 +0900
@@ -51,16 +51,16 @@
 # Note that on most Debian systems tty7 is used by the X Window System,
 # so if you want to add more getty's go ahead but skip tty7 if you run X.
 #
-1:2345:respawn:/sbin/getty 38400 tty1
-2:23:respawn:/sbin/getty 38400 tty2
-3:23:respawn:/sbin/getty 38400 tty3
-4:23:respawn:/sbin/getty 38400 tty4
-5:23:respawn:/sbin/getty 38400 tty5
-6:23:respawn:/sbin/getty 38400 tty6
+#1:2345:respawn:/sbin/getty 38400 tty1
+#2:23:respawn:/sbin/getty 38400 tty2
+#3:23:respawn:/sbin/getty 38400 tty3
+#4:23:respawn:/sbin/getty 38400 tty4
+#5:23:respawn:/sbin/getty 38400 tty5
+#6:23:respawn:/sbin/getty 38400 tty6

 # Example how to put a getty on a serial line (for a terminal)
 #
-#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
+T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100
 #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

 # Example how to put a getty on a modem line.
root@LS-VL815:/etc#

掃除

root@LS-VL815:/etc# apt-get clean
root@LS-VL815:/etc#
今日はここまで
root@LS-VL815:/# exit
exit
root@LS-VL815:/# cd /mnt/debinst/
root@LS-VL815:/# tar zcvf /mnt/disk1/share/hackkit/hackkit_wheezy_130621.tar.gz .


LS-VL

楽天市場
Amazon
livedoor デパート
バッファローダイレクト
Yahoo!ショッピング


ファームウェア 1.65 のインストール
ハックの記録
LinkStation/玄箱 をハックしよう

Debian 7.1 のインストール(2)インストーラの修正

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市