Squeeze のインストール(10)作り直したハックキットのインストール

Debian LS-CL

皆さん、あけましておめでとうございます。
今年もボチボチマイペースでサボりながらもハックしていきますので、 どうぞよろしくお願いします。
次期 Debian である Squeeze ベースのハックキットを作り直したので、 インストールして確認していく。
まず最初は、シリアルコンソールの使える LS-CL にインストールする。

準備(それ以外 の場合)

標準ファームに root でログインできるようにします

済み

標準ファームで起動

ハックキットのファイルを置きます

エクスプローラで share/hackkit に hackkit_101225.tar.gz と hackkit_101225.sh とを置く。
mkimage は以前に置いたものがある。

ログイン

シリアルコンソールからログイン
BUFFALO INC. LinkStation series
LS-CL701 login: root
No mail.
root@LS-CL701:~#

時計を合わせる

root@LS-CL701:~# date
Sat Dec 25 18:39:48 JST 2010
root@LS-CL701:~#
あってる

インストールする HDD の準備

先日インストールに使った HDD を使うので、パーティションは設定済

(1) ハックキットをインストールする HDD を USB で接続します。

usb 1-1: new high speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
/sbin/hotplug [usb]
scsi2 : SCSI emulation for USB Mass Storage devices
/sbin/hotplug [usb_endpoint]
/sbin/hotplug [scsi_host]
/sbin/hotplug [usb_endpoint]
/sbin/hotplug [usb_endpoint]
Dec 25 18:41:29 LS-CL701 kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2
Dec 25 18:41:29 LS-CL701 kernel: usb 1-1: configuration #1 chosen from 1 choice
Dec 25 18:41:29 LS-CL701 kernel: scsi2 : SCSI emulation for USB Mass Storage devices
/sbin/hotplug [usb]
/sbin/hotplug [usb_device]
[/etc/hotplug.d/usb_device/buffalo.hotplug] usb_device
*** /usr/local/bin/DirectCopy_wait.sh [usb_device]
1 USB_DEVICE=none
2 USB_DEVICE=none
scsi 2:0:0:0: Direct-Access     ViPowER  VP-89118(SD1)    2.10 PQ: 0 ANSI: 4
sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb:/sbin/hotplug [scsi_disk]
 sdb1 sdb2 sdb3 sdb4
/sbin/hotplug [block]
/sbin/hotplug [scsi]
/sbin/hotplug [block]
Dec 25 18:41:34 LS-CL701 kernel: scsi 2:0:0:0: Direct-Access     ViPowER  VP-89118(SD1)    2.10 PQ: 0 ANSI: 4
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: [sdb] Write Protect is off
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Dec 25 18:41:34 sd 2:0:0:0: [sdb] Attached SCSI disk
LS-CL701 kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: [sdb] Write Protect is off
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [scsi_device]
/sbin/hotplug [block]
sd 2:0:0:0: Attached scsi generic sg1 type 0
/sbin/hotplug [scsi_generic]
3 USB_DEVICE=none
Dec 25 18:41:34 LS-CL701 kernel:  sdb: sdb1 sdb2 sdb3 sdb4
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Dec 25 18:41:34 LS-CL701 kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
*** /usr/local/bin/DirectCopy_wait.sh [stop]
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sdb1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
NET: Registered protocol family 5
BASENAME=usbdisk1
MPT=/mnt/usbdisk1/
try vfat(usbdisk)
/sbin/hotplug [module]
/sbin/hotplug [module]
## STATE_CHANGED ##
*** [/etc/hotplug.d/scsi_device/usb-buffalo.hotplug 5757] Restarting Daemons...
Dec 25 18:41:39 LS-CL701 kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Dec 25 18:41:39 LS-CL701 kernel: kjournald starting.  Commit interval 5 seconds
Dec 25 18:41:39 LS-CL701 kernel: EXT3 FS on sdb1, internal journal
Dec 25 18:41:39 LS-CL701 kernel: EXT3-fs: mounted filesystem with ordered data mode.
*** /usr/local/bin/DirectCopy_wait.sh []
1 USB_DEVICE=/mnt/usbdisk1
direct copy mode : ready
/sbin/hotplug [module]
/sbin/hotplug [module]
/sbin/hotplug [module]
Dec 25 18:41:45 LS-CL701 kernel: NET: Registered protocol family 5
Dec 25 18:41:49 LS-CL701 nmbd[1268]: [2010/12/25 18:41:49, 0] nmbd/nmbd.c:terminate(58)
Dec 25 18:41:49 LS-CL701 nmbd[1268]:   Got SIGTERM: going down...

(2) /mnt/usbdisk1 に自動的にマウントされた場合はアンマウントします。

root@LS-CL701:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2              4993984    381756   4612228   8% /
/dev/ram1                15360       112     15248   1% /mnt/ram
/dev/sda1               996052    172568    823484  17% /boot
/dev/disk1_6         304565696    257492 304308204   0% /mnt/disk1
/dev/usbdisk1_1         241116     15147    213521   7% /mnt/usbdisk1
root@LS-CL701:~# umount /mnt/usbdisk1/
root@LS-CL701:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2              4993984    381756   4612228   8% /
/dev/ram1                15360       112     15248   1% /mnt/ram
/dev/sda1               996052    172568    823484  17% /boot
/dev/disk1_6         304565696    257492 304308204   0% /mnt/disk1
root@LS-CL701:~#

(3) sdb にパーティションを切ります。

root@LS-CL701:~# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               1          31      248976  83 Linux
/dev/sdb2              32         281     2008125  83 Linux
/dev/sdb3             282         313      257040  82 Linux swap
/dev/sdb4             314       60801   485869860  83 Linux
root@LS-CL701:~#

インストール

カスタマイズ

hackkit_config が置いてある。
root@LS-CL701:~# cd /mnt/disk1/share/hackkit/
root@LS-CL701:/mnt/disk1/share/hackkit# cat hackkit_config
ADDRESS=192.168.2.47
HOSTNAME=tate
root@LS-CL701:/mnt/disk1/share/hackkit#

インストーラの実行

root@LS-CL701:/mnt/disk1/share/hackkit# sh hackkit_101225.sh
PRODUCTID = 0x0000000F
MACHINE LSCL
formating hard drive ...
mke2fs 1.40.5 (27-Jan-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
62248 inodes, 248976 blocks
12448 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
31 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
	:
	:
lib/modules/2.6.22.7/modules.symbols.bin
lib/modules/2.6.22.7/modules.pcimap
lib/modules/2.6.22.7/modules.isapnpmap
creating usb ...
checking /dev/sdb1
fsck 1.40.5 (27-Jan-2008)
e2fsck 1.40.5 (27-Jan-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 11/62248 files (9.1% non-contiguous), 14036/248976 blocks
mounting /boot ...
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sdb1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
copying /boot ...
initrd.buffalo
uImage.buffalo
editing initrd ...
110523+1 records in
110523+1 records out
gunziping /mnt/debinst/boot/initrd.gz ...
EXT2-fs warning: checktime reached, running e2fsck is recommended
gziping /mnt/debinst/boot/initrd ... wait 5 minutes
Image Name:   initrd
Created:      Sat Dec 25 18:56:13 2010
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    7038082 Bytes = 6873.13 kB = 6.71 MB
Load Address: 0x00000000
Entry Point:  0x00000000
unmount /boot ...
root@LS-CL701:/mnt/disk1/share/hackkit#

電源 OFF

ハックキットで起動

HDD の交換(LS-WSGL, LS-QL 以外)

起動

---- in hackkit linuxrc ---
XFS mounting filesystem sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 120K
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
udev requires a kernel >= 2.6.26, not started. ... failed!
 failed!
Activating swap...Adding 257032k swap on /dev/sda3.  Priority:-1 extents:1 across:257032k
done.
Cleaning up ifupdown....
Setting up networking....
Loading kernel modules...done.
Activating lvm and md swap...done.
Checking file systems...fsck from util-linux-ng 2.17.2
/dev/sda1: clean, 13/62248 files, 23019/248976 blocks
/sbin/fsck.xfs: XFS file system.
done.
Mounting local filesystems...kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda4
done.
Activating swapfile swap...done.
Cleaning up temporary files....
Configuring network interfaces...eth reg(9) val=0x0300
eth0: link down
done.
Cleaning up temporary files....
Setting kernel variables ...done.
startpar: service(s) returned failure: udev ... failed!
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting enhanced syslogd: rsyslogd.
Starting internet superserver: inetd.
Starting periodic command scheduler: cron.
eth0: link up, full duplex, speed 1 Gbps

Debian GNU/Linux squeeze/sid tate ttyS0

tate login:
今度はちゃんと login が出たが、、、

動作確認

LED の確認

LED が青点滅のまま(滅

ログイン

Debian GNU/Linux squeeze/sid tate ttyS0

tate login: guest
Password:
Linux tate 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No directory, logging in with HOME=/
guest@tate:/$

root になる

guest@tate:/$ su - root
Password:
root@tate:~#

トラブルシューティング

何故 LED が点滅なのか、、、rc が動いていないのだろう。
root@tate:~# lsmod
Module                  Size  Used by
root@tate:~# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:09 init [2]
    2 ?        S<     0:00 [kthreadd]
    3 ?        SN     0:00 [ksoftirqd/0]
    4 ?        S<     0:00 [events/0]
    5 ?        S<     0:00 [khelper]
   32 ?        S<     0:00 [kblockd/0]
   45 ?        S      0:00 [crypto]
   46 ?        S      0:00 [crypto_ret]
   49 ?        S      0:00 [pdflush]
   50 ?        S      0:00 [pdflush]
   51 ?        S<     0:00 [kswapd0]
   52 ?        S<     0:00 [aio/0]
   53 ?        S<     0:00 [xfslogd/0]
   54 ?        S<     0:00 [xfsdatad/0]
  242 ?        S<     0:00 [scsi_eh_0]
  243 ?        S<     0:00 [scsi_eh_1]
  257 ?        S<     0:00 [mtdblockd]
  272 ?        S<     0:00 [xfsbufd]
  273 ?        S<     0:00 [xfssyncd]
  425 ?        S<     0:00 [kjournald]
  426 ?        S<     0:00 [xfsbufd]
  427 ?        S<     0:00 [xfssyncd]
  547 ?        Sl     0:00 /usr/sbin/rsyslogd -c4
  582 ?        S      0:00 /usr/sbin/inetutils-inetd
  596 ?        Ss     0:00 /usr/sbin/cron
  613 ttyS0    Ss     0:00 /bin/login --
  615 ttyS0    S      0:00 -bash
  618 ttyS0    S      0:00 su - root
  619 ttyS0    S      0:00 -su
  624 ttyS0    R+     0:00 ps ax
root@tate:~#
モジュールもロードされていなければ、 kernelmon も動いていない。
usb を手動で起動してみる。
root@tate:/etc# /etc/init.d/usb start
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_marvell ehci_marvell.4523: Marvell Orion EHCI
ehci_marvell ehci_marvell.4523: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.4523: irq 17, io base 0xf1050100
ehci_marvell ehci_marvell.4523: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_marvell ehci_marvell.167817: Marvell Orion EHCI
ehci_marvell ehci_marvell.167817: new USB bus registered, assigned bus number 2
ehci_marvell ehci_marvell.167817: irq 12, io base 0xf10a0100
ehci_marvell ehci_marvell.167817: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
root@tate:/etc# lsmod
Module                  Size  Used by
vfat                   13472  0
fat                    55516  1 vfat
usblp                  14880  0
usb_storage            62631  0
uhci_hcd               24108  0
ohci_hcd               18628  0
ehci_hcd               37164  0
usbcore               129500  6 usblp,usb_storage,uhci_hcd,ohci_hcd,ehci_hcd
root@tate:/etc#
うごいた。何で boot 時に動かない?

miconapl も動かしてみる。

root@tate:/etc# /etc/init.d/miconapl start
root@tate:/etc#
LED が点灯に変った。

kernelmon も動かしてみる

root@tate:/etc# /etc/init.d/kernelmon start
root@tate:/etc# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:09 init [2]
    2 ?        S<     0:00 [kthreadd]
    3 ?        SN     0:00 [ksoftirqd/0]
    4 ?        S<     0:00 [events/0]
    5 ?        S<     0:00 [khelper]
   32 ?        S<     0:00 [kblockd/0]
   45 ?        S      0:00 [crypto]
   46 ?        S      0:00 [crypto_ret]
   49 ?        S      0:00 [pdflush]
   50 ?        S      0:00 [pdflush]
   51 ?        S<     0:00 [kswapd0]
   52 ?        S<     0:00 [aio/0]
   53 ?        S<     0:00 [xfslogd/0]
   54 ?        S<     0:00 [xfsdatad/0]
  242 ?        S<     0:00 [scsi_eh_0]
  243 ?        S<     0:00 [scsi_eh_1]
  257 ?        S<     0:00 [mtdblockd]
  272 ?        S<     0:00 [xfsbufd]
  273 ?        S<     0:00 [xfssyncd]
  425 ?        S<     0:00 [kjournald]
  426 ?        S<     0:00 [xfsbufd]
  427 ?        S<     0:00 [xfssyncd]
  547 ?        Sl     0:00 /usr/sbin/rsyslogd -c4
  582 ?        S      0:00 /usr/sbin/inetutils-inetd
  596 ?        Ss     0:00 /usr/sbin/cron
  613 ttyS0    Ss     0:00 /bin/login --
  615 ttyS0    S      0:00 -bash
  618 ttyS0    S      0:00 su - root
  619 ttyS0    S      0:00 -su
  636 ?        S<     0:00 [khubd]
  673 ttyS0    S      0:00 /bin/sh /usr/local/sbin/kernelmon
  676 ttyS0    S      0:00 cat /proc/buffalo/kernevnt
  677 ttyS0    R+     0:00 ps ax
root@tate:/etc#
手動では動く

ここ、長い長い試行錯誤
あーでもなーい、こーでもなーい
3回ぐらい再インストールした。

update-rc.d を実行すると、うまく行くことに気が付いた。

root@tate:~# update-rc.d usb defaults
update-rc.d: using dependency based boot sequencing
root@tate:~# shutdown -r now
	:
	:
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_marvell ehci_marvell.4523: Marvell Orion EHCI
ehci_marvell ehci_marvell.4523: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.4523: irq 17, io base 0xf1050100
ehci_marvell ehci_marvell.4523: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_marvell ehci_marvell.167817: Marvell Orion EHCI
ehci_marvell ehci_marvell.167817: new USB bus registered, assigned bus number 2
ehci_marvell ehci_marvell.167817: irq 12, io base 0xf10a0100
ehci_marvell ehci_marvell.167817: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Starting enhanced syslogd: rsyslogd.
USB Universal Host Controller Interface driver v3.0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Starting periodic command scheduler: cron.
Starting internet superserver: inetd.
eth0: link up, full duplex, speed 1 Gbps

Debian GNU/Linux squeeze/sid tate ttyS0

tate login: root
Password:
Last login: Thu Jan  1 09:02:25 JST 1970 on ttyS0
Linux tate 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@tate:~# lsmod
Module                  Size  Used by
vfat                   13472  0
fat                    55516  1 vfat
usblp                  14880  0
usb_storage            62631  0
uhci_hcd               24108  0
ohci_hcd               18628  0
ehci_hcd               37164  0
usbcore               129500  6 usblp,usb_storage,uhci_hcd,ohci_hcd,ehci_hcd
root@tate:~# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:09 init [2]
    2 ?        S<     0:00 [kthreadd]
    3 ?        SN     0:00 [ksoftirqd/0]
    4 ?        S<     0:00 [events/0]
    5 ?        S<     0:00 [khelper]
   32 ?        S<     0:00 [kblockd/0]
   45 ?        S      0:00 [crypto]
   46 ?        S      0:00 [crypto_ret]
   49 ?        S      0:00 [pdflush]
   50 ?        S      0:00 [pdflush]
   51 ?        S<     0:00 [kswapd0]
   52 ?        S<     0:00 [aio/0]
   53 ?        S<     0:00 [xfslogd/0]
   54 ?        S<     0:00 [xfsdatad/0]
  242 ?        S<     0:00 [scsi_eh_0]
  243 ?        S<     0:00 [scsi_eh_1]
  257 ?        S<     0:00 [mtdblockd]
  272 ?        S<     0:00 [xfsbufd]
  273 ?        S<     0:00 [xfssyncd]
  314 ?        S      0:00 /bin/sh /usr/local/sbin/kernelmon
  429 ?        S<     0:00 [kjournald]
  430 ?        S<     0:00 [xfsbufd]
  431 ?        S<     0:00 [xfssyncd]
  552 ?        S<     0:00 [khubd]
  567 ?        Sl     0:00 /usr/sbin/rsyslogd -c4
  632 ?        Ss     0:00 /usr/sbin/cron
  643 ?        S      0:00 /usr/sbin/inetutils-inetd
  662 ttyS0    Ss     0:00 /bin/login --
  664 ?        S      0:00 cat /proc/buffalo/kernevnt
  666 ttyS0    S      0:00 -bash
  671 ttyS0    R+     0:00 ps ax
root@tate:~#
update-rc.d usb defaults を実行すれば、 miconapl も kernelmon も動くようになる。謎。

インストーラの修正

rc のシンボリックリンクを手動で張らず、 update-rc.d を使う方法に変更する。
yasunari@qube:/mnt/disk1/share/hackkit/current$ mv hackkit_101225.sh hackkit_101225.sh.old
yasunari@qube:/mnt/disk1/share/hackkit/current$ cp hackkit_101225.sh.old hackkit_101225.sh
yasunari@qube:/mnt/disk1/share/hackkit/current$ vi hackkit_101225.sh
	:
	:
yasunari@qube:/mnt/disk1/share/hackkit/current$ diff -u hackkit_101225.sh.old ha
ckkit_101225.sh
--- hackkit_101225.sh.old       2010-12-25 21:34:14.930185476 +0900
+++ hackkit_101225.sh   2010-12-25 22:31:46.986815421 +0900
@@ -244,9 +244,7 @@
 EOF
        fi
        chmod +x etc/init.d/miconapl
-       ln -s ../init.d/miconapl etc/rc0.d/K10miconapl
-       ln -s ../init.d/miconapl etc/rc6.d/K10miconapl
-       ln -s ../init.d/miconapl etc/rcS.d/S80miconapl
+       chroot $MOUNTPOINT update-rc.d miconapl defaults
 }


@@ -358,7 +356,7 @@
 exit 0
 EOF
        chmod +x  $MOUNTPOINT/etc/init.d/kernelmon
-       ln -s ../init.d/kernelmon $MOUNTPOINT/etc/rcS.d/S81kernelmon
+       chroot $MOUNTPOINT update-rc.d kernelmon defaults

        if [ $MACHINE = LSGL -o $MACHINE = HSDHGL ]
        then
@@ -540,13 +538,7 @@
 EOF

        chmod +x etc/init.d/usb
-       ln -s ../init.d/usb etc/rc0.d/K85usb
-       ln -s ../init.d/usb etc/rc1.d/K85usb
-       ln -s ../init.d/usb etc/rc2.d/S15usb
-       ln -s ../init.d/usb etc/rc3.d/S15usb
-       ln -s ../init.d/usb etc/rc4.d/S15usb
-       ln -s ../init.d/usb etc/rc5.d/S15usb
-       ln -s ../init.d/usb etc/rc6.d/K85usb
+       chroot $MOUNTPOINT update-rc.d usb defaults
 }

 #======================================================================
yasunari@qube:/mnt/disk1/share/hackkit/current$
これで再インストールしてみる

準備(それ以外 の場合)

ちゃんと手順を書いておくと、こうやって何度も何度も実行しても 同じクォリティで実行できる。

標準ファームに root でログインできるようにします

済み

標準ファームで起動

ハックキットのファイルを置きます

作り直した hackkit_101225.sh を置く

ログイン

BUFFALO INC. LinkStation series
LS-CL701 login: root
No mail.
root@LS-CL701:~#

時計を合わせる

root@LS-CL701:~# date
Sat Dec 25 22:45:54 JST 2010
root@LS-CL701:~#
あってる

インストールする HDD の準備

(1) ハックキットをインストールする HDD を USB で接続します。

同じ HDD を接続する。

(2) /mnt/usbdisk1 に自動的にマウントされた場合はアンマウントします。

root@LS-CL701:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2              4993984    381564   4612420   8% /
/dev/ram1                15360       116     15244   1% /mnt/ram
/dev/sda1               996052    172568    823484  17% /boot
/dev/disk1_6         304565696    257492 304308204   0% /mnt/disk1
/dev/usbdisk1_1         241116     15147    213521   7% /mnt/usbdisk1
root@LS-CL701:~# umount /mnt/usbdisk1/
root@LS-CL701:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2              4993984    381996   4611988   8% /
/dev/ram1                15360       116     15244   1% /mnt/ram
/dev/sda1               996052    172568    823484  17% /boot
/dev/disk1_6         304565696    257492 304308204   0% /mnt/disk1
root@LS-CL701:~#

(3) sdb にパーティションを切ります。

済み
root@LS-CL701:~# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               1          31      248976  83 Linux
/dev/sdb2              32         281     2008125  83 Linux
/dev/sdb3             282         313      257040  82 Linux swap
/dev/sdb4             314       60801   485869860  83 Linux
root@LS-CL701:~#

インストール

カスタマイズ

hackkit_config は作成済
root@LS-CL701:~# cd /mnt/disk1/share/hackkit/
root@LS-CL701:/mnt/disk1/share/hackkit# cat hackkit_config
ADDRESS=192.168.2.47
HOSTNAME=tate
root@LS-CL701:/mnt/disk1/share/hackkit#

インストーラの実行

root@LS-CL701:/mnt/disk1/share/hackkit# sh hackkit_101225.sh
PRODUCTID = 0x0000000F
MACHINE LSCL
formating hard drive ...
mke2fs 1.40.5 (27-Jan-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
62248 inodes, 248976 blocks
12448 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
31 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
	:
	:
./media/
./initrd/
creating /etc/fstab ...
creating miconapl ...
update-rc.d: using dependency based boot sequencing
creating kernelmon ...
update-rc.d: using dependency based boot sequencing
copying /lib/modules ...
lib/modules/2.6.22.7/
	:
	:
lib/modules/2.6.22.7/modules.isapnpmap
creating usb ...
update-rc.d: using dependency based boot sequencing
checking /dev/sdb1
fsck 1.40.5 (27-Jan-2008)
e2fsck 1.40.5 (27-Jan-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 11/62248 files (9.1% non-contiguous), 14036/248976 blocks
mounting /boot ...
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sdb1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
copying /boot ...
initrd.buffalo
uImage.buffalo
editing initrd ...
110523+1 records in
110523+1 records out
gunziping /mnt/debinst/boot/initrd.gz ...
EXT2-fs warning: checktime reached, running e2fsck is recommended
gziping /mnt/debinst/boot/initrd ... wait 5 minutes
Image Name:   initrd
Created:      Sat Dec 25 22:56:08 2010
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    7038062 Bytes = 6873.11 kB = 6.71 MB
Load Address: 0x00000000
Entry Point:  0x00000000
unmount /boot ...
root@LS-CL701:/mnt/disk1/share/hackkit#

電源 OFF

ハックキットで起動

HDD の交換(LS-WSGL, LS-QL 以外)

起動

動作確認

LED の確認

ようやく青点灯

ログイン

Debian GNU/Linux squeeze/sid tate ttyS0

tate login: guest
Password:
Linux tate 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No directory, logging in with HOME=/
guest@tate:/$

root になる

guest@tate:/$ su - root
Password:
root@tate:~#

USB メモリの認識

Dec 25 23:25:07 tate kernel: usb 1-1: new full speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
Dec 25 23:25:07 tate kernel: usbscsi2 : SCSI emulation for USB Mass Storage devices
 1-1: configuration #1 chosen from 1 choice
Dec 25 23:25:07 tate kernel: scsi2 : SCSI emulation for USB Mass Storage devices
scsi 2:0:0:0: Direct-Access     eUSB     Memory Stick     5.06 PQ: 0 ANSI: 2
Dec 25 23:25:14 tate kernel: scsi 2:0:0:0: Direct-Access     eUSB     Memory Stick     5.06 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdb] 126912 512-byte hardware sectors (65 MB)
Dec 25 23:25:14 tate kernel: sd 2:0:0:0: [sdb] 1sd 2:0:0:0: [sdb] Write Protect is off
26912 512-byte hsd 2:0:0:0: [sdb] Assuming drive cache: write through
ardware sectors (65 MB)
Dec 25 23:25:14 tate kernel: sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] 126912 512-byte hardware sectors (65 MB)
Dec 25 23:25:14 tate kernel: sd 2:0:0:0: [sdb] 1sd 2:0:0:0: [sdb] Write Protect is off
26912 512-byte hsd 2:0:0:0: [sdb] Assuming drive cache: write through
ardware sectors  sdb:(65 MB)
Dec 25 23:25:14 tate kernel: sd 2:0:0:0: [sdb] Write Protect is off
 sdb1
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg1 type 0
Dec 25 23:25:14 tate kernel: sdb: sdb1
Dec 25 23:25:14 tate kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk
Dec 25 23:25:14 tate kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
OK

プリンタの認識(LS-GL 以外)

usb 1-1: new high speed USB device using ehci_marvell and address 3
Dec 25 23:26:26 tate kernel: usb 1-1: new high speed USB device using ehci_marvell and address 3
usb 1-1: configuration #1 chosen from 1 choice
Dec 25 23:26:26 drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007
tate kernel: usb 1-1: configuration #1 chosen from 1 choice
Dec 25 23:26:26 tate kernel: drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007

リブートの確認

root@tate:~# shutdown -r now

Broadcast message from root@tate (ttyS0) (Sat Dec 25 23:27:11 2010):

The system is going down for reboot NOW!
	:
	:
eth0: link up, full duplex, speed 1 Gbps

Debian GNU/Linux squeeze/sid tate ttyS0

tate login:

シャットダウンの確認

Debian GNU/Linux squeeze/sid tate ttyS0

INIT: Sending processeUsing makefile-style concurrent boot in runlevel 0.
Stopping internet superserver: inetd.
Asking all remaining processes to terminate...done.
All processes ended within 1 seconds....done.
Stopping enhanced syslogd: rsyslogd.
Saving the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Deconfiguring network interfaces...done.
Cleaning up ifupdown....
Deactivating swap...done.
Unmounting local filesystems...done.
Will now halt.
md: stopping all md devices.
sd 0:0:0:0: [sda] Synchronizing SCSI cache
System halted.
BuffaloChangePowerStatusBeforeHalt > Check power status. MagicKey = 0x3a
Orion1   CPU =  Low

Checking DATA BUS
Checking ADDRESS BUS

> Checking hardware info ...
=== CPU-ID       : 0x00005182 ===
=== Strap status : 0x01000030 ===
=== H/W boardId  :       0x43 ===
=== boardId      :       0x1e ===
=== micon_support:        off ===
> OK.
=== BUFFALO LS-CL/CHL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_CL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Sep 16 2008 - 14:54:32) Marvell version: 1.12.1 - TINY
Buffalo Version: 1.22-1.00

DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB
[256kB@fffc0000] Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
--------------------------- init_board_info(0)
Orion 1 streaming disabled
SysClock = 200Mhz , TClock = 166Mhz


USB 0: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy
buffalo_change_power_status > Read 0x3a
buffalo_IsStopAtUbootStatus > MagicKey=0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Writing 0x5c

Please Press HDD power button to continue ...

ようやく完了。おつかれさま

LS-CL
バッファローダイレクト
楽天市場
amazon


Squeeze のインストール(9)ハックキットの作り直し
ハックの記録
LinkStation/玄箱 をハックしよう

Squeeze のインストール(11)LS-VL で確認

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