root@LS-HGL487:~# cd /mnt/disk1/share/debian/ root@LS-HGL487:/mnt/disk1/share/debian# ls -al drwxrwxrwx 2 nobody nogroup 68 Nov 2 18:52 . drwxrwxrwx 5 root root 44 Nov 2 18:52 .. -rwxrw-rw- 1 nobody nogroup 70511788 Mar 17 2008 LS-HGL_hackkit_1.00.tar.gz -rwxrw-rw- 1 nobody nogroup 7292 Apr 5 2008 LS-HGL_hackkit_1.01.sh root@LS-HGL487:/mnt/disk1/share/debian#
root@LS-HGL487:/mnt/disk1/share/debian# date 112910002008 Sat Nov 29 10:00:00 JST 2008 root@LS-HGL487:/mnt/disk1/share/debian#
root@LS-HGL487:/mnt/disk1/share/debian# head LS-HGL_hackkit_1.01.sh #! /bin/sh -x ADDRESS=192.168.2.44 NETWORK=192.168.2.0 NETMASK=255.255.255.0 BROADCAST=192.168.2.255 GATEWAY=192.168.2.1 NAMESERVER=192.168.1.2 HOSTNAME=hackkit root@LS-HGL487:/mnt/disk1/share/debian#
root@LS-HGL487:/mnt/disk1/share/debian# dmesg : : usb 1-1: new high speed USB device using ehci_platform and address 2 usb 1-1: configuration #1 chosen from 1 choice scsi2 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning Vendor: ST325082 Model: 3ND06QAZ Rev: Type: Direct-Access ANSI SCSI revision: 02 SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB) sdb: Write Protect is off sdb: Mode Sense: 00 38 00 00 sdb: assuming drive cache: write through SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB) sdb: Write Protect is off sdb: Mode Sense: 00 38 00 00 sdb: assuming drive cache: write through sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 > sd 2:0:0:0: Attached scsi disk sdb sd 2:0:0:0: Attached scsi generic sg1 type 0 usb-storage: device scan complete : :無事 sdb と認識。
root@LS-HGL487:/mnt/disk1/share/debian# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 15351 14671 680 96% /initrd /dev/sda2 4994004 243944 4750060 5% / /dev/ram1 15360 104 15256 1% /mnt/ram /dev/sda1 988212 24464 963748 2% /boot /dev/sda6 237067816 9207580 227860236 4% /mnt/disk1 /dev/usbdisk1_1 988064 142500 845564 14% /mnt/usbdisk1 root@LS-HGL487:/mnt/disk1/share/debian#/mnt/usbdisk1 にマウントされたので、アンマウント
root@LS-HGL487:/mnt/disk1/share/debian# umount /mnt/usbdisk1/ root@LS-HGL487:/mnt/disk1/share/debian#
root@LS-HGL487:/mnt/disk1/share/debian# fdisk /dev/sdb The number of cylinders for this disk is set to 30401. 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: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 125 1004031 83 Linux /dev/sdb2 126 748 5004247+ 83 Linux /dev/sdb4 749 30401 238187722+ 5 Extended /dev/sdb5 749 873 1004031 82 Linux swap /dev/sdb6 874 30401 237183628+ 83 Linux Command (m for help):LS-WSGL で使った HDD なので、パーティションが残っている。
Command (m for help): d Partition number (1-6): 6 Command (m for help): d Partition number (1-5): 5 Command (m for help): d Partition number (1-5): 4 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Selected partition 1 Command (m for help): p Disk /dev/sdb: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help):続いてパーティションの設定
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-30401, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-30401, default 30401): +200M Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (26-30401, default 26): Using default value 26 Last cylinder or +size or +sizeM or +sizeK (26-30401, default 30401): +2048M Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (276-30401, default 276): Using default value 276 Last cylinder or +size or +sizeM or +sizeK (276-30401, default 30401): +256M Command (m for help): n Command action e extended p primary partition (1-4) p Selected partition 4 First cylinder (308-30401, default 308): Using default value 308 Last cylinder or +size or +sizeM or +sizeK (308-30401, default 30401): Using default value 30401 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: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 25 200781 83 Linux /dev/sdb2 26 275 2008125 83 Linux /dev/sdb3 276 307 257040 82 Linux swap /dev/sdb4 308 30401 241730055 83 Linux Command (m for help):パーティション情報を書いて終了。
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@LS-HGL487:/mnt/disk1/share/debian#
root@LS-HGL487:/mnt/disk1/share/debian# sh LS-HGL_hackkit_1.01.sh : : Image Name: initrd Created: Sat Nov 29 10:18:39 2008 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5953671 Bytes = 5814.13 kB = 5.68 MB Load Address: 0x00000000 Entry Point: 0x00000000 : : root@LS-HGL487:/mnt/disk1/share/debian#chroot しての mkimage の実行も問題なく終わったようだ。
念のため、/boot をマウントして確認。
root@LS-HGL487:/mnt/disk1/share/debian# mkdir /tmp/boot root@LS-HGL487:/mnt/disk1/share/debian# mount /dev/sdb1 /tmp/boot root@LS-HGL487:/mnt/disk1/share/debian# ls -l /tmp/boot -rw-r--r-- 1 root root 5953735 Nov 29 10:18 initrd.buffalo drwx------ 2 root root 12288 Nov 29 10:08 lost+found -rw-r--r-- 1 root root 1715896 Nov 2 2007 uImage.buffalo root@LS-HGL487:/mnt/disk1/share/debian# umount /tmp/boot root@LS-HGL487:/mnt/disk1/share/debian#問題なさそう。
Debian GNU/Linux 4.0 hackkit ttyS0 hackkit login: root Password: Linux hackkit 2.6.16.16-arm1 #137 Tue Oct 21 17:20:10 JST 2008 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. hackkit:~# uname -a Linux hackkit 2.6.16.16-arm1 #137 Tue Oct 21 17:20:10 JST 2008 armv5tejl GNU/Linux hackkit:~# cat /proc/buffalo/firmware SERIES=LinkStation PRODUCTNAME=LS-HGL(SUININ) VERSION=0.16 SUBVERSION=FLASH 0.00 PRODUCTID=0x0000000E BUILDDATE=2008/10/21 17:19:03 BOOTVER=1.17 hackkit:~#特に問題なし。
「試練」は与えられなかったようだ(笑)
|
← PRODUCTID, Linux Version 更新 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ ファームウェア Ver.1.06 でハックキット |