その他、
別途作成した mkimage を (/mnt/debinst)/usr/local/sbin に置いた。
telentd をインストールした
・/dev/sdb の各パーティションのフォーマット
・/dev/sdb2 を /mnt/debinst にマウントする
・ LS-GL_hackkit_1.00.tar.gz を /mnt/debinst に展開する
・/dev/sdb1 を /mnt/debinst/boot にマウントする
・/boot/uImage.buffalo を /mnt/debinst/boot にコピーする
・余計なことをしない initrd.buffalo を
LS-GL 標準ファーム上で作成し /mnt/debinst/boot に置く
・ジェイルを構成する
・miconapl をコピーする
・kernelmon をコピーする
・カーネルモジュールをコピーする
・/mnt/debinst/etc/inittab を設定する
・/mnt/debinst/etc/fstab を設定する
・IP アドレス、ネットマスク、デフォルトゲートウェイなどを、
/mnt/debinst/etc/network/interfaces に書く
・/mnt/debinst/etc/resolv.conf を設定する
・/mnt/debinst/etc/hosts を設定する
・/mnt/debinst/etc/hostname を設定する
・/mnt/sdb1 (/mnt/debinst/boot) を umount する
・/mnt/sdb2 (/mnt/debinst) を umount する
1)必要なものをそろえ、
2)LS-GL を標準ファームで起動し、
3)debian をインストールする HDD を USB で接続し、
4)パーティションを切り、
5)標準ファームのファイルシステム上にアーカイブとシェルスクリプトを置き、
6)必要に応じてシェルスクリプトを編集し、
7)シェルスクリプトを実行する
Dec 9 03:14:28 UDE kernel: usb 2-1: new high speed USB device using ehci_platform and address 2 Dec 9 03:14:29 UDE kernel: scsi2 : SCSI emulation for USB Mass Storage devices Dec 9 03:14:34 UDE kernel: Vendor: ST310212 Model: A Rev: 0811 Dec 9 03:14:34 UDE kernel: Type: Direct-Access ANSI SCSI revision: 00 Dec 9 03:14:34 UDE kernel: SCSI device sdb: 20005650 512-byte hdwr sectors (10243 MB) Dec 9 03:14:34 UDE kernel: sdb: assuming drive cache: write through Dec 9 03:14:34 UDE kernel: SCSI device sdb: 20005650 512-byte hdwr sectors (10243 MB) Dec 9 03:14:34 UDE kernel: sdb: assuming drive cache: write through Dec 9 03:14:34 UDE kernel: sdb: sdb1 sdb2 sdb3 Dec 9 03:14:34 UDE kernel: Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0 Dec 9 03:14:34 UDE kernel: Attached scsi generic sg1 at scsi2, channel 0, id 0, lun 0, type 0
root@UDE:~# 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): 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 2049 2098160 83 Linux /dev/sdb2 2050 2562 525312 82 Linux swap /dev/sdb3 2563 9768 7378944 83 Linux Command (m for help):白 LinkStation で使っていた HDD なので、パーティションが切ってある。 削除する。
Command (m for help): d Partition number (1-4): 1 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Selected partition 3 Command (m for help):新しくパーティションを切り、
パーティション | 容量 | フォーマット | 用途 |
/dev/sdb1 | 200MB | ext3 | /boot |
/dev/sdb2 | 2GB | ext3 | / |
/dev/sdb3 | 256MB | swap | swap |
/dev/sdb4 | 残り全部 | ext3 | データ |
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-9768, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-9768, default 9768): +200M Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (193-9768, default 193): Using default value 193 Last cylinder or +size or +sizeM or +sizeK (193-9768, default 9768): +2048MB Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (2147-9768, default 2147): Using default value 2147 Last cylinder or +size or +sizeM or +sizeK (2147-9768, default 9768): +256M Command (m for help): n Command action e extended p primary partition (1-4) p Selected partition 4 First cylinder (2392-9768, default 2392): Using default value 2392 Last cylinder or +size or +sizeM or +sizeK (2392-9768, default 9768): Using default value 9768 Command (m for help): t Partition number (1-4): 3 Hex code (type L to list codes): 82 Changed system type of partition 3 to 82 (Linux swap) 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@UDE:~#
root@UDE:/mnt/disk1/share/debian# head LS-GL_hackkit_1.00.sh #! /bin/sh -x ADDRESS=192.168.1.38 NETWORK=192.168.1.0 NETMASK=255.255.255.0 BROADCAST=192.168.1.255 GATEWAY=192.168.1.1 NAMESERVER=192.168.1.2 HOSTNAME=hackkit root@UDE:/mnt/disk1/share/debian#自分の環境用に作ってあるので特に編集の必要はなし。
root@UDE:/mnt/disk1/share/debian# 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 21 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 23 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 39 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 : : ./var/opt ./var/mail creating /boot ... uImage.buffalo 68598+1 records in 68598+1 records out gunziping /boot/initrd.gz ... loop7 loop6 loop5 loop4 loop3 loop2 loop1 loop0 gziping /boot/initrd ... Image Name: initrd Created: Sat Dec 9 03:28:28 2006 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 4376803 Bytes = 4274.22 kB = 4.17 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/kernel : : lib/modules/2.6.12.6-arm1/modules.symbols creating network_interfaces ... creating resolv.conf ... creating hosts ... creating hostname ... root@UDE:/mnt/disk1/share/debian#HDD の速度にもよるが、10分ぐらい。
Debian GNU/Linux 3.1 hackkit hackkit login: guest Password: hack Linux hackkit 2.6.12.6-arm1 #33 Tue Aug 8 17:16:04 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:/$ su - root Password: hack hackkit:~#OK.
例によって CD-R による実費配布になりますが。
もしいらっしゃれば、配布ができるようにドキュメント整理など
もうちょっと体裁を整えます。
← LS-GL:LED 全点灯/全消灯 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ HS-DH320GL 発注 |