hackkit:~# mkdir /mnt/mtd hackkit:~# mount /dev/mtd3 /mnt/mtd mount: special device /dev/mtd3 does not exist hackkit:~#がー。/dev/mtd3 がない。作る。
hackkit:~# ls -l /dev/mtd* brw-r--r-- 1 root root 31, 2 May 27 17:30 /dev/mtd2 hackkit:~# mknod /dev/mtd3 b 31 3 hackkit:~# !mount mount /dev/mtd3 /mnt/mtd hackkit:~# ls /mnt/mtd ChangeMeDevHDD ChangeMyUbootEnv hddrootfs.tar.gz uImage.buffalo hackkit:~#
hackkit:~# mkdir -p /mnt/share/HackKit-2.00 hackkit:~# cd !$ cd /mnt/share/HackKit-2.00 hackkit:/mnt/share/HackKit-2.00# tar zxvf /mnt/mtd/hddrootfs.tar.gz :
hackkit:/mnt/share/HackKit-2.00# rm etc/network/options hackkit:/mnt/share/HackKit-2.00#
hackkit:/mnt/share/HackKit-2.00# rm var/log/exim4/paniclog hackkit:/mnt/share/HackKit-2.00#
hackkit:/mnt/share/HackKit-2.00# mknod dev/mtd3 b 31 3 hackkit:/mnt/share/HackKit-2.00# ls -l dev/mtd* brw-r--r-- 1 root root 31, 3 May 27 18:01 dev/mtd3 hackkit:/mnt/share/HackKit-2.00#ついでに mtd1, mtd2 も作っておく
hackkit:/mnt/share/HackKit-2.00# mknod dev/mtd1 b 31 1 hackkit:/mnt/share/HackKit-2.00# mknod dev/mtd2 b 31 2 hackkit:/mnt/share/HackKit-2.00# ls -l dev/mtd* brw-r--r-- 1 root root 31, 1 May 27 18:02 dev/mtd1 brw-r--r-- 1 root root 31, 2 May 27 18:03 dev/mtd2 brw-r--r-- 1 root root 31, 3 May 27 18:01 dev/mtd3 hackkit:/mnt/share/HackKit-2.00#
hackkit:/mnt/share/HackKit-2.00# cd usr/local/sbin/ hackkit:/mnt/share/HackKit-2.00/usr/local/sbin# vi KURO-BOX-Pro_setup.sh : hackkit:/mnt/share/HackKit-2.00# diff -c /usr/local/sbin/KURO-BOX-Pro_setup.sh usr/local/sbin/KURO-BOX-Pro_setup.sh *** /usr/local/sbin/KURO-BOX-Pro_setup.sh Sun Mar 18 15:00:11 2007 --- usr/local/sbin/KURO-BOX-Pro_setup.sh Sun May 27 18:47:11 2007 *************** *** 74,79 **** --- 74,87 ---- chmod 1777 /var/tmp/ chmod 1777 /var/tmp/vi.recover/ + chmod 666 /dev/null + chmod 666 /dev/zero + chmod 666 /dev/full + chmod 666 /dev/random + chmod 666 /dev/tty + chmod 666 /dev/ptmx + chmod 666 /dev/usb/scanner* + } #-------------------------------------------------- update () { hackkit:/mnt/share/HackKit-2.00#
hackkit:/mnt/share/HackKit-2.00# vi etc/apt/sources.list :
hackkit:/mnt/share/HackKit-2.00# chroot . hackkit:/# apt-get update : : hackkit:/# apt-get upgrade Reading package lists... Done Building dependency tree... Done The following packages will be upgraded: libc6 locales nano 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 8362kB of archives. After unpacking 109kB disk space will be freed. Do you want to continue [Y/n]? y Get:1 http://ftp2.jp.debian.org proposed-updates/main libc6 2.3.6.ds1-13etch2 [3847kB] Get:2 http://ftp2.jp.debian.org proposed-updates/main nano 2.0.2-1etch1 [549kB] Get:3 http://ftp2.jp.debian.org proposed-updates/main locales 2.3.6.ds1-13etch2 [3967kB] 97% [3 locales 3740052/3967kB 94%] 699kB/s 0sPreconfiguring packages ... (Reading database ... 8732 files and directories currently installed.) Preparing to replace libc6 2.3.6.ds1-13 (using .../libc6_2.3.6.ds1-13etch2_arm.deb) ... Unpacking replacement libc6 ... Setting up libc6 (2.3.6.ds1-13etch2) ... (Reading database ... 8732 files and directories currently installed.) Preparing to replace nano 2.0.2-1 (using .../nano_2.0.2-1etch1_arm.deb) ... Unpacking replacement nano ... Preparing to replace locales 2.3.6.ds1-13 (using .../locales_2.3.6.ds1-13etch2_all.deb) ... Unpacking replacement locales ... Setting up nano (2.0.2-1etch1) ... Setting up locales (2.3.6.ds1-13etch2) ... Generating locales (this might take a while)... ja_JP.EUC-JP... done ja_JP.UTF-8... done Generation complete.
hackkit:/# apt-get clean hackkit:/# exit exit hackkit:/mnt/share/HackKit-2.00#
hackkit:/mnt/share/HackKit-2.00# rm root/.bash_history hackkit:/mnt/share/HackKit-2.00#
hackkit:/mnt/share/HackKit-2.00# tar zcvf ../hddrootfs.tar.gz . : :
Hit any key to stop autoboot: 0 Marvell>> setenv bootargs_root root=/dev/mtdblock2 rw panic=5 Marvell>> setenv bootcmd 'nboot $(default_kernel_addr) 0 $(nand_uImage_offset);bootm $(default_kernel_addr)' Marvell>> setenv nand_boot yes Marvell>> setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) Marvell>> boot
KUROUTOSHIKOU KUROBOX Series KUROBOX/PRO(KOSHO) KUROBOX-PRO login: root Password: login[759]: root login on `ttyS0' BusyBox v1.1.1 (2007.04.06-12:02+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. ~ #
~ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15996 49540 24% / /dev/ram1 8192 152 8040 2% /mnt/ram /dev/sda4 309304924 287168 309017756 0% /mnt/disk1 /dev/mtd3 192512 68816 123696 36% /mnt/mtd ~ # umount /mnt/disk1 ~ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15996 49540 24% / /dev/ram1 8192 152 8040 2% /mnt/ram /dev/mtd3 192512 68816 123696 36% /mnt/mtd ~ #
~ # dd if=/dev/zero of=/dev/sda1 bs=1 count=3 3+0 records in 3+0 records out ~ # dd if=/dev/zero of=/dev/sda2 bs=1 count=3 3+0 records in 3+0 records out ~ # dd if=/dev/zero of=/dev/sda3 bs=1 count=3 3+0 records in 3+0 records out ~ # dd if=/dev/zero of=/dev/sda4 bs=1 count=3 3+0 records in 3+0 records out ~ #
~ # fdisk /dev/sda The number of cylinders for this disk is set to 38913. 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/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 7 56196 83 Linux /dev/sda2 8 373 2939895 83 Linux /dev/sda3 374 390 136552+ 82 Linux swap /dev/sda4 391 38913 309435997+ 83 Linux 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 Partition number (1-4): 3 Command (m for help): d Selected partition 4 Command (m for help): p Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB) SCSI device sda: drive cache: write back sda: SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB) SCSI device sda: drive cache: write back sda: Syncing disks. ~ #
Debian GNU/Linux 4.0 hackkit ttyS0 hackkit login:正常起動。OK
hackkit login: root Password: Last login: Sun May 27 17:23:45 2007 on ttyS0 Linux hackkit 2.6.12.6-arm1 #27 Tue Apr 10 22:47:16 JST 2007 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:~#
hackkit:~# cd /usr/local/sbin/ hackkit:/usr/local/sbin# ls KURO-BOX-Pro_setup.sh mkimage hackkit:/usr/local/sbin# sh ./KURO-BOX-Pro_setup.sh : :
完了
|
玄人志向
楽天市場 TSUKUMO ネットショップ Yahoo!ショッピング Sofmap クレバリー TwoTop |
|
玄人志向
TSUKUMO ネットショップ Yahoo! ショッピング パソQ ValuMore uWorks |
玄箱PROをハックしよう |
ASCII
楽天ブックス Amazon cbook24 e-hon JBook BK1 livedoorブックス 紀伊國屋書店BookWeb |
← etch 版玄箱/Pro ハックキットの確認 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ HS-DHGLシリーズ ファームウェア アップデータ Ver.1.10 |