hackkit:~# cd /mnt hackkit:/mnt# mkdir hddrootfs hackkit:/mnt# cd hddrootfs hackkit:/mnt/hddrootfs# ftp giga (LS-GL_hackkit_1.00.tar.gz を取得) hackkit:/mnt/hddrootfs# tar zxvf LS-GL_hackkit_1.00.tar.gz : hackkit:/mnt/hddrootfs# rm LS-GL_hackkit_1.00.tar.gz hackkit:/mnt/hddrootfs# rmdir lost+found/ hackkit:/mnt/hddrootfs#
hackkit:/mnt/hddrootfs# ls -ld tmp drwxrwxrwt 2 root root 6 Jan 8 13:56 tmp hackkit:/mnt/hddrootfs# ls -ld var/tmp drwxrwxrwt 3 root root 23 Jan 8 13:41 var/tmp hackkit:/mnt/hddrootfs# ls -ld var/tmp/vi.recover drwxrwxrwt 2 root root 6 Sep 26 20:50 var/tmp/vi.recover hackkit:/mnt/hddrootfs# ls -l /bin/su -rwsr-xr-x 1 root root 22840 Aug 14 2006 /bin/su hackkit:/mnt/hddrootfs#大丈夫のよう。いつパーミッションが落ちたんだろう???
hackkit:/mnt/hddrootfs# cp /etc/fstab etc/ hackkit:/mnt/hddrootfs#
hackkit:/mnt/hddrootfs# tar zxvf ../hddrootfs.tar.gz . :
hackkit:/mnt/hddrootfs# mknod /dev/mtd3 b 31 3 hackkit:/mnt/hddrootfs# ls -l /dev/mtd* brw-r--r-- 1 root root 31, 2 Mar 5 01:53 /dev/mtd2 brw-r--r-- 1 root root 31, 3 Mar 7 22:29 /dev/mtd3 hackkit:/mnt/hddrootfs#
hackkit:/mnt/hddrootfs# mount /dev/mtd3 /tmp/mtd3 hackkit:/mnt/hddrootfs# ls /tmp/mtd3/ ChangeMeDevHDD ChangeMyUbootEnv hddrootfs.tar.gz uImage.buffalo hackkit:/mnt/hddrootfs#以前置いたのがそのまま残っていた。
hackkit:/mnt/hddrootfs# cp ../hddrootfs.tar.gz /tmp/mtd3 hackkit:/mnt/hddrootfs#
hackkit:/mnt/hddrootfs# umount /tmp/mtd3 hackkit:/mnt/hddrootfs#
玄人志向製 hdd ブート環境を作成してあるが、 実験に使える S-ATA HDD はこれしかないので仕方がない。
: : Hit any key to stop autoboot: 0 Marvell>> setenv bootargs_root root=/dev/mtdblock2 rw panic=5 Marvell>> setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) Marvell>> setenv bootcmd 'nboot $(default_kernel_addr) 0 $(nand_uImage_offset) ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver); bootm $(default_kernel_addr)' Marvell>> setenv nand_boot yes Marvell>> boot : :
~ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15912 49624 24% / /dev/ram1 8192 144 8048 2% /mnt/ram /dev/sda4 114029892 340204 113689688 0% /mnt/disk1 /dev/mtd3 192512 53532 138980 28% /mnt/mtd ~ # umount /dev/sda4 ~ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15912 49624 24% / /dev/ram1 8192 144 8048 2% /mnt/ram /dev/mtd3 192512 53508 139004 28% /mnt/mtd ~ #
~ # fdisk /dev/sda The number of cylinders for this disk is set to 14593. 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: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 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 14593 114085597+ 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: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 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: 234441648 512-byte hdwr sectors (120034 MB) SCSI device sda: drive cache: write back sda: ~ #
~ # SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB) SCSI device sda: drive cache: write back sda: sda1 sda2 sda3 sda4この状態で止まってしまった。
その前に再度パーティションの削除。
~ # fdisk /dev/sda The number of cylinders for this disk is set to 14593. 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): 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: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 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 ~ # sh -x /usr/local/bin/InitDisk1.sh : : : /usr/local/bin/InitDisk1.sh: .: 53: Can't open /etc/melco/info ~ #あれ?この間、なかったやん。
~ # mkdir /etc/melco ~ # touch /etc/melco/info ~ # fdisk /dev/sda The number of cylinders for this disk is set to 14593. 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): d Partition number (1-4): 4 Command (m for help): d Partition number (1-4): 3 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Selected partition 1 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table ~ # sh -x /usr/local/bin/InitDisk1.sh : : ./var/cache/ ./var/cache/apt/ ./var/cache/apt/archives/ ./var/cache/apt/archives/lock ./var/cache/apt/archives/partial/ ./var/cache/apt/srcpkgcache.bin ./var/cache/apt/pkgcache.bin tar: write error: No space left on device >nvram_set:default_kernel_addr = 0x00100000 >nvram_set:bootargs_base = console=ttyS0,115200 >nvram_set:bootargs_root = root=/dev/sda2 rw panic=5 >nvram_set:bootargs = console=ttyS0,115200 root=/dev/sda2 rw panic=5 BOOTVER=1.09 >nvram_set:bootcmd = ide reset; ext2load ide 0:1 $(default_kernel_addr) /$(kernel); bootm $(default_kernel_addr) >nvram_set:nand_boot = no + miconapl -a led_set_code_information clear ~ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15916 49620 24% / /dev/ram1 8192 8192 0 100% /mnt/ram /dev/mtd3 192512 53508 139004 28% /mnt/mtd /dev/sda1 54416 5831 45776 11% /mnt/boot /dev/sda2 2929652 307092 2622560 10% /mnt/rootfs ~ #なんで、/mnt/ram なんかに書いているの?
~ # ls -l /mnt/rootfs drwxr-xr-x 2 root root 4096 Mar 7 23:02 bin drwxr-xr-x 2 root root 6 Dec 16 2004 boot drwxr-xr-x 8 root root 28672 Mar 7 23:02 dev drwxr-xr-x 42 root root 4096 Mar 7 23:02 etc drwxr-xr-x 2 root ftp 6 Dec 16 2004 home drwxr-xr-x 2 root root 6 Sep 26 20:46 initrd drwxr-xr-x 5 root root 4096 Mar 7 23:02 lib drwxr-xr-x 2 root root 6 Sep 26 20:46 media drwxr-xr-x 3 root root 16 Dec 16 2004 mnt drwxr-xr-x 2 root root 6 Sep 26 20:46 opt drwxr-xr-x 2 root root 6 Dec 16 2004 proc drwx------ 2 root root 54 Mar 7 23:02 root drwxr-xr-x 2 root root 4096 Mar 7 23:02 sbin drwxr-xr-x 2 root root 20 Mar 6 06:14 share drwxr-xr-x 2 root root 6 Sep 26 20:46 srv drwxr-xr-x 2 root root 6 Jun 11 2006 sys lrwxrwxrwx 1 root root 12 Mar 7 07:36 tmp -> /mnt/ram/tmp drwxr-xr-x 13 root root 142 Mar 7 23:03 usr lrwxrwxrwx 1 root root 12 Mar 7 07:36 var -> /mnt/ram/var ~ #いつシンボリックリンクなんか張った??
しばしいろいろ調べる。
納得できないが、、、
以前のファイルシステムが残っていたとしか考えられない。
Buffalo もこの問題にぶつかったか、
Format_XFS()で mkfs.xfs 前に 512 bytes のゼロを書いている。
でも、512 bytes では足りなかったみたい。
~ # cd /mnt/rootfs /mnt/rootfs # rm -fr *もう一回ブートからやり直し。
~ # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15928 49608 24% / /dev/ram1 8192 144 8048 2% /mnt/ram /dev/sda4 114029892 340204 113689688 0% /mnt/disk1 /dev/mtd3 192512 53508 139004 28% /mnt/mtd ~ # ls /mnt/disk1/ kernel ~ # cd /mnt/disk1/kernel/ /mnt/disk1/kernel # ls linux-2.6.12_lsp.1.10.3 linux-2.6.12_lsp.1.10.3.src.tar.gz /mnt/disk1/kernel #mkfs したなのに残っている。やっぱり
/mnt/disk1/kernel # cd .. /mnt/disk1 # rm -fr kernel /mnt/disk1 # cd / / # umount /mnt/disk1/ / # fdisk /dev/sda The number of cylinders for this disk is set to 14593. 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: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 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 14593 114085597+ 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): w The partition table has been altered! Calling ioctl() to re-read partition table / #RESET SW を長押し。
Debian GNU/Linux 3.1 hackkit ttyS0 hackkit login: root Password: Linux hackkit 2.6.12.6-arm1 #2 Thu Feb 8 15:00:20 JST 2007 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. hackkit:~#手間取らせやがってぇ、、、
|
玄人志向
楽天市場 TSUKUMO ネットショップ Yahoo!ショッピング Sofmap クレバリー TwoTop |
← 開発環境 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ debian 簡単インストール(2)アップデート |