HS-DHGL: ハックキット HDD の作成


HS-DHGL 1.30 β1 を使ってハックキットの HDD を作成してみる

HDD の接続

USB でハックキットをインストールする HDD を接続
最初のパーティションがマウントされたので、umount しておく

パーティションを切る

いつも通り
root@HS-DHGL276:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 9768.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): 
(略)
Command (m for help): p

Disk /dev/sdb: 10.2 GB, 10242892800 bytes
64 heads, 32 sectors/track, 9768 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         192      196592   83  Linux
/dev/sdb2             193        2146     2000896   83  Linux
/dev/sdb3            2147        2391      250880   82  Linux swap
/dev/sdb4            2392        9768     7554048   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@HS-DHGL276:~#

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

Windows PC を使って、 ハックキットのファイルを HS-DGL の share フォルダに置く
root@HS-DHGL276:~# cd /mnt/disk1/share/
root@HS-DHGL276:/mnt/disk1/share# ls -l
-rwxrw-rw-    1 nobody   nogroup      6338 Dec 20 03:20 LS-GL_hackkit_1.00.sh
-rwxrw-rw-    1 nobody   nogroup  47459534 Dec  9 04:16 LS-GL_hackkit_1.00.tar.gz
drwxrwxrwx    2 nobody   nogroup         6 Dec 30 15:54 pictures
root@HS-DHGL276:/mnt/disk1/share#

インストーラの実行

root@HS-DHGL276:/mnt/disk1/share# sh ./LS-GL_hackkit_1.00.sh 
formating hard drive 	..
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
49152 inodes, 196592 blocks
9829 blocks (5.00%) reserved for the super user
First data block=1
24 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729

Writing inode tables:  done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
250368 inodes, 500224 blocks
25011 blocks (5.00%) reserved for the super user
First data block=0
16 block groups
32768 blocks per group, 32768 fragments per group
15648 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Writing inode tables:  done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Setting up swapspace version 1, size = 256897024 bytes
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
944704 inodes, 1888512 blocks
94425 blocks (5.00%) reserved for the super user
First data block=0
58 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables:  done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
mounting hard drive 	..
extracting hackkit archive ...
.
./lost+found
./bin
./bin/bash
./bin/rbash
	:
	:
./var/mail
creating /boot ...
uImage.buffalo
68652+1 records in
68652+1 records out
gunziping /boot/initrd.gz ...
loop7
loop6
loop5
loop4
loop3
loop2
loop1
loop0
gziping /boot/initrd ...
Image Name:   initrd
Created:      Sat Dec 30 16:09:41 2006
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4381761 Bytes = 4279.06 kB = 4.18 MB
Load Address: 0x00000000
Entry Point:  0x00000000
creating jail ...
lib/libc.so.6
lib/libc-2.3.6.so
lib/ld-linux.so.3
lib/ld-2.3.6.so
usr/local/sbin/miconapl
usr/local/lib/libbuffalo_bin.so
usr/local/lib/libbuffalo_bin.a
sbin/ldconfig
dev/null
dev/ttyS1
copying miconapl ...
copying kernelmon ...
usr/local/sbin/kernelmon
copying kernel modules ...
lib/modules
lib/modules/2.6.12.6-arm1
	:
	:
lib/modules/2.6.12.6-arm1/modules.symbols
lib/modules/mv7dxu2_0.ko
lib/modules/mv7dxu2_1.ko
lib/modules/mv7dxu2_2.ko
lib/modules/mv7dxu2_3.ko
lib/modules/mv7dxu2_d.ko
lib/modules/averusb.ko
lib/modules/v4l1-compat.ko
lib/modules/v4l2-common.ko
lib/modules/videodev.ko
creating network_interfaces ...
creating resolv.conf ...
creating hosts ...
creating hostname ...
root@HS-DHGL276:/mnt/disk1/share# 

再起動

ログアウト、電源断、USB で接続していたハックキット HDD を S-ATA で接続、 再起動し、192.168.1.38 に telnet した。
Debian GNU/Linux 3.1 hackkit
hackkit login: guest
Password:
Linux hackkit 2.6.12.6-arm1 #79 Wed Oct 4 13:37:40 JST 2006 armv5tejl GNU/Linux

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@hackkit:/$

まとめ

HS-DHGL ファームウェア 1.03 β1 を使っても ハックキット化は可能。
おそらく LinkStation LS-GL で debian を動かそう もそのまま適用可能
一年間、アクセスいただきありがとうございました。
来年もどうぞよろしくお願いします。


HS-DHGL:ファームウェア 1.03 β1 に telnet
ハックの記録
LinkStation/玄箱 をハックしよう

HD-HGLAN: ファームウェア 1.63 へアップデート

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