ハックキットのインストール

Debian LS-SL

いよいよハックキットをインストールする。

インストーラの修正

基本的に LS-QL と同じ
yasunari@ude:/home/linkstation/HackKit/unified/current$ cp hackkit_090917.sh hackkit_091103.sh
yasunari@ude:/home/linkstation/HackKit/unified/current$ vi !$
	:
	:
yasunari@ude:/home/linkstation/HackKit/unified/current$ diff -u hackkit_090917.s
h hackkit_091103.sh
--- hackkit_090917.sh   2009-09-17 21:50:16.372250179 +0900
+++ hackkit_091103.sh   2009-11-03 08:45:48.560568069 +0900
@@ -32,10 +32,10 @@
 ETH=eth0

 #======================================================================
-# 各パーティションのフォーマット(LS-WSGL,LS-QL 以外)
+# 各パーティションのフォーマット(LS-WSGL,LS-QL,LS-SL 以外)

 format_disk() {
-       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ]
+       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL -o $MACHINE = LSSL ]
        then
                return
        fi
@@ -66,7 +66,7 @@
 # / のマウント

 mount_root() {
-       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ]
+       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL -o $MACHINE = LSSL ]
        then
            echo building md...
            /etc/init.d/startSysMd.sh
@@ -79,7 +79,7 @@
        fi
        mount -t xfs $ROOTPARTITION $MOUNTPOINT || exit

-       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ]
+       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL -o $MACHINE = LSSL ]
        then

                mkdir $MOUNTPOINT/.buffalo
@@ -100,7 +100,7 @@
        cd $MOUNTPOINT
        tar zxvf $HACKKIT

-       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ]
+       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL -o $MACHINE = LSSL ]
        then
                mkdir $MOUNTPOINT/mnt/disk1
                mkdir $MOUNTPOINT/mnt/disk2
@@ -112,10 +112,10 @@
 }

 #---------------------------------------------------------
-# fstab の修正(LS-WSGL,LS-QL のみ)
+# fstab の修正(LS-WSGL,LS-QL,LS-SL のみ)

 create_fstab() {
-       if [ $MACHINE != LSWSGL -a $MACHINE != LSQL ]
+       if [ $MACHINE != LSWSGL -a $MACHINE != LSQL -o $MACHINE = LSSL ]
        then
                return
        fi
@@ -225,7 +225,7 @@


 #---------------------------------------------------------
-# Fan コントロールスクリプトの作成(LS-GL/HS-DHGLのみ)
+# Fan コントロールスクリプトの作成(LS-GL,HS-DHGLのみ)
 create_fancontrol() {
        if [ $MACHINE != LSGL -a $MACHINE != HSDHGL ]
        then
@@ -367,7 +367,7 @@
 # カーネルモジュールのコピー

 copy_modules() {
-       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ]
+       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL -o $MACHINE = LSSL ]
        then
                return
        fi
@@ -582,10 +582,10 @@
 }

 #---------------------------------------------------------
-# /boot のコピー(LS-WSGL,LS-QL 以外)
+# /boot のコピー(LS-WSGL,LS-QL,LS-SL 以外)

 copy_boot() {
-       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL ]
+       if [ $MACHINE = LSWSGL -o $MACHINE = LSQL -o $MACHINE = LSSL ]
        then
                return
        fi
@@ -730,6 +730,15 @@

        ETH=eth1
        ;;
+0x00000013)
+       MACHINE=LSSL
+
+       BOOTPARTITION=/dev/md0
+       BOOTPARTITIONTYPE=ext3
+       ROOTPARTITION=/dev/md1
+       SWAPPARTITION=/dev/md10
+       DATAPARTITION=""
+       ;;
 0x00003002)
        MACHINE=LSWSGL

@@ -753,6 +762,7 @@
        exit
        ;;
 esac
+echo MACHINE $MACHINE

 # 各パーティションのフォーマット
 format_disk
yasunari@ude:/home/linkstation/HackKit/unified/current$
以下、 準備(LS-QL の場合)の手順

ハックキットのファイルを置く

標準ファームの共有フォルダ機能を用いて、 エクスプローラから \\LinkStation 名\share に hackkit フォルダを作成し、 そこに ・hackkit_YYMMDD.tar.gz ・hackkit_YYMMDD.sh ・mkimage ・ramroot_YYMMDD.sh を置く。

RamBoot モードへの変更

(1) 標準ファームに root でログインします。

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

(2) initrd.buffalo の変更

ramroot_YYMMDD.sh を実行
root@LS-SL807:~# cd /mnt/disk1/share/hackkit/
root@LS-SL807:/mnt/disk1/share/hackkit# ls
hackkit_090226.tar.gz  hackkit_config.sample  ramroot_090225.sh
hackkit_091103.sh      mkimage                setup_090717.sh
root@LS-SL807:/mnt/disk1/share/hackkit# sh ramroot_090225.sh
Extracting initrd...
139650+1 records in
139650+1 records out
mounting initrd...
editing linuxrc...
clearing root's password...
rebuilding initrd.buffalo...
gziping initrd ... wait 5 minutes
Image Name:   initrd
Created:      Tue Nov  3 09:29:33 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    8897906 Bytes = 8689.36 kB = 8.49 MB
Load Address: 0x00000000
Entry Point:  0x00000000
root@LS-SL807:/mnt/disk1/share/hackkit#
エラーなく終了

(3) 電源 OFF。コンセントも抜きます。

(4) コンセントを刺し、電源 ON。RamRoot モードで起動してきます。


BUFFALO INC. LinkStation series
LS-SL-EM807 login:

ログイン

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

時計を合わせる

root@LS-SL-EM807:~# date
Tue Nov  3 09:34:26 JST 2009
root@LS-SL-EM807:~#
あってる

ディスクのマウント

root@LS-SL-EM807:~# mkdir /mnt/disk1
mkdir: cannot create directory '/mnt/disk1': File exists
root@LS-SL-EM807:~# mount /dev/sda6 /mnt/disk1
XFS mounting filesystem sda6
XFS resetting qflags for filesystem sda6
root@LS-SL-EM807:~# ls /mnt/disk1/
share  spool
root@LS-SL-EM807:~# ls /mnt/disk1/share/
hackkit
root@LS-SL-EM807:~#

続いて、 インストールの手順

カスタマイズ

hackkit_config を使う方法を取る
root@LS-SL-EM807:/mnt/disk1/share/hackkit# mv hackkit_config.sample hackkit_config
root@LS-SL-EM807:/mnt/disk1/share/hackkit# vi !$
	:
	:
root@LS-SL-EM807:/mnt/disk1/share/hackkit# cat !$
cat hackkit_config
ADDRESS=192.168.2.53
HOSTNAME=sl
root@LS-SL-EM807:/mnt/disk1/share/hackkit#

インストーラの実行

root@LS-SL-EM807:/mnt/disk1/share/hackkit# sh hackkit_091103.sh
PRODUCTID = 0x00000013
MACHINE LSSL
building md...
-- rebuild mdadm.conf for BOOT, ROOTFS --
md: md10 stopped.
mdadm: cannot open device /dev/disk1_1: Device or resource busy
mdadm: /dev/disk1_1 has wrong uuid.
mdadm: /demd: bind<sda5>
v/disk1_2 has wrong uuid.
raid1: raid set md10 active with 1 out of 2 mirrors
mdadm: /dev/md10md: md1 stopped.
 has been started with 1 drive (out of 2).
md: bind<sda2>
raid1: raid set md1 active with 1 out of 2 mirrors
mdadm: /dev/md1 has been started with 1 drive (out of 2).
-- setup max error counts --
/sys/block/md0/md/maxerr_cnt is setted to -1
/sys/block/md1/md/maxerr_cnt is setted to -1
/sys/block/md10/md/maxerr_cnt is setted to -1
mounting root file system ...
Filesystem "md1": Disabling barriers, not supported by the underlying device
XFS mounting filesystem md1
extracting hackkit archive ...
./
./var/
./var/lib/
./var/lib/apt/
./var/lib/apt/lists/
	:
	:
./media/
./initrd/
creating miconapl ...
creating kernelmon ...
creating usb ...
checking /dev/md0
fsck 1.40.5 (27-Jan-2008)
e2fsck 1.40.5 (27-Jan-2008)
/dev/md0 is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)?
ん? とりあえず n
Do you really want to continue (y/n)? no

check aborted.
mounting /boot ...
editing initrd ...
139029+1 records in
139029+1 records out
gunziping /mnt/debinst/boot/initrd.gz ...
gziping /mnt/debinst/boot/initrd ... wait 5 minutes
Image Name:   initrd
Created:      Tue Nov  3 09:47:13 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    8898594 Bytes = 8690.03 kB = 8.49 MB
Load Address: 0x00000000
Entry Point:  0x00000000
unmount /boot ...
root@LS-SL-EM807:/mnt/disk1/share/hackkit#
終わったけど、あちらこちら気になる。

電源 OFF

以下、 ハックキットで起動の手順

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

LS-SL も対象外

起動

Orion1   CPU =  Low

Checking DATA BUS
Checking ADDRESS BUS

> Checking hardware info ...
=== CPU-ID       : 0x00005182 ===
=== Strap status : 0x00802030 ===
=== H/W boardId  :       0x33 ===
=== boardId      :       0x1a ===
=== micon_support:        off ===
> OK.
=== BUFFALO LS-SL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_SL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (May 28 2009 - 11:06:21) Marvell version: 1.12.1 - TINY
U-Boot code: 00600000 -> 00639A58  BSS: -> 00641B24
Buffalo Version: 1.23-1.00

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

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
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 0x5c
buffalo_IsStopAtUbootStatus > MagicKey=0x5c
buffalo_change_power_status > Read 0x5c
buffalo_change_power_status > Read 0x5c
buffalo_change_power_status > Writing 0x5c

Please Press HDD power button to continue ...
buffalo_change_power_status > Read 0x5c
buffalo_change_power_status > Writing 0x3a

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: Maxtor 6L200M0                           Firm: BANC1G10 Ser#: L40PVARG   
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 194481.0 MB = 189.9 GB (398297088 x 512)


2120012 bytes read
   Image Name:   Linux-2.6.22.7
   Created:      2009-06-14  13:44:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2119948 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000

8898658 bytes read
   Image Name:   initrd
   Created:      2009-11-03   0:47:13 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8898594 Bytes =  8.5 MB
   Load Address: 00000000
   Entry Point:  00000000
** Bad partition 1 **
serch_boot_drv (194)>No kernel_file 1
** Bad partition 1 **
serch_boot_drv (249)>No init_file 1
Booting from Device 0
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
Hit any key to stop autoboot:  0

2120012 bytes read
** Bad partition 1 **
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.22.7
   Created:      2009-06-14  13:44:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2119948 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   initrd
   Created:      2009-11-03   0:47:13 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8898594 Bytes =  8.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 func=0 BOOTVER=1.23
CONFIG_BUFFALO_PLATFORM ---
Uncompressing Linux..................................................................................................................................... done, booting the kernel.
Linux version 2.6.22.7 (root@build2.dd-hot24.nas.buffalo.local) (gcc version 4.2.0 20070413 (prerelease)) #436 Sun Jun 14 22:44:37 JST 2009
CPU: ARM926EJ-S [41069260] revision 0 (ARMv5TEJ), cr=a0053177
Machine: Feroceon
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists.  Total pages: 32512
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 func=0 BOOTVER=1.23
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 110136KB available (3832K code, 294K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
env_format_version = 0x00000006
product_id = 0x00000013
Sys Clk = 200000000, Tclk = 166664740

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 128MB
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
PCI0_MEM ....base e8000000, size 128MB
PCI0_IO ....base f2100000, size   1MB
INTER_REGS ....base f1000000, size   1MB
DEVICE_CS0 ....no such
DEVICE_CS1 ....base f4000000, size  32MB
DEVICE_CS2 ....no such
DEV_BOOCS ....base ff800000, size   8MB
CRYPT_ENG ....base f0000000, size  64KB

  Marvell Development Board (LSP Version 3.0.5_NAS_GDP_p8)-- BUFFALO_BOARD  Soc: 88F5182 A2

 Detected Tclk 166664740 and SysClk 200000000
Marvell USB EHCI Host controller #0: c055b600
Marvell USB EHCI Host controller #1: c055b400
IO Request resource failed - Pci If 0
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
Time: orion_clocksource clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 15360K
RTC registered
mvCesaInit: sessions=640, queue=64, pSram=f0000000
Use the XOR engines (acceleration) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
  o copy user to/from kernel buffers
Number of XOR engines to use: 2
Use IDMA channels 2 and 3 for enhancing the following function:
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SGI XFS with ACLs, large block numbers, no debug enabled
SGI XFS Quota Management subsystem
io scheduler noop registered (default)
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
serial8250.0: ttyS2 at MMIO 0xf1012100 (irq = 4) is a 16550A
RAMDISK driver initialized: 3 RAM disks of 32768K size 1024 blocksize
loop: module loaded
Marvell Ethernet Driver 'mv_ethernet':
  o Uncached descriptors in DRAM
  o DRAM SW cache-coherency
  o TCP segmentation offload enabled
  o Checksum offload enabled
  o Rx desc: 128
  o Tx desc: 256
  o Loading network interface ** eth_init_module (0)
'eth0'
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
scsi 0:0:0:0: Direct-Access     Maxtor   6L200M0          BANC PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 398297088 512-byte hardware sectors (203928 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 0:0:0:0: [sda] 398297088 512-byte hardware sectors (203928 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
 sda: sda1 sda2 sda3 sda4 sda5 sda6
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
physmap platform flash device: 01000000 at f0000000
physmap-flash physmap-flash.0: map_probe failed
Found: SST 39LF020
cfi_flash_0: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
mice: PS/2 mouse device common for all mice
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
raid6: int32x1     20 MB/s
raid6: int32x2     28 MB/s
raid6: int32x4     35 MB/s
raid6: int32x8     31 MB/s
raid6: using algorithm int32x4 (35 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
   arm4regs  :   309.200 MB/sec
   8regs     :   252.800 MB/sec
   32regs    :   274.400 MB/sec
raid5: using function: arm4regs (309.200 MB/sec)
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
Buffalo CPU Inerupts Driver (C) BUFFALO INC. Ver.0.01 alpha1 installed.
Buffalo Gpio Control Driver (C) BUFFALO INC. Ver.0.02 installed.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
---- 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.86 booting
Setting the system clock.
Activating swap...Unable to find swap-space signature
failed.
Setting the system clock.
Cleaning up ifupdown....
Loading kernel modules...done.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
/dev/sda1: clean, 17/62720 files, 44717/249968 blocks (check in 3 mounts)
/sbin/fsck.xfs: XFS file system.
done.
Setting kernel variables (/etc/sysctl.conf)...done.
Mounting local filesystems...kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
attempt to access beyond end of device
sda4: rw=0, want=8, limit=1
XFS: SB read failed
mount: /dev/sda4: can't read superblock
failed.
Activating swapfile swap...Unable to find swap-space signature
done.
Setting up networking....
Configuring network interfaces...eth reg(9) val=0x0300
eth0: link down
done.
INIT: Entering runlevel: 2
Starting enhanced syslogd: rsyslogd.
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
eth0: link up, full duplex, speed 1 Gbps
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
Starting internet superserver: inetd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 sl ttyS0

sl login:
立ち上がってきた。
でも、いろいろエラーが出ている。。。

LS-SL
楽天市場




複製した HDD から起動
ハックの記録
LinkStation/玄箱 をハックしよう

エラーつぶし

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