玄箱ProをDebian化の初期状態に戻す…TT
カーネルコンパイルがうまくいかず元のバージョンに戻そうとしたがうまくゆかない。仕方なく初期状態に戻すことにした。
「玄箱Proをハックしよう」の通りにU-Bootの画面で元に戻す
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) $(bufflo_ver) Marvell>> save Marvell>> boot
これでうまくbootできた。次に内臓HDDを消去する。
# df -k Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtd2 65536 15968 49568 24% / /dev/ram1 8192 144 8048 2% /mnt/ram /dev/sda4 309304924 1200 309303724 0% /mnt/disk1 /dev/mtd3 192512 69108 123404 36% /mnt/mtd # umount /mnt/disk1
# dd if=/dev/zero of=/dev/sda1 bs=1 count=3 # dd if=/dev/zero of=/dev/sda2 bs=1 count=3 # dd if=/dev/zero of=/dev/sda3 bs=1 count=3 # dd if=/dev/zero of=/dev/sda4 bs=1 count=3
# 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): 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. 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.
次に/mnt/mtdにDebian化で用いたファイルが残っているかどうか確認する。
# cd /mnt/mtd # ls ChangeMeDevHDD ChangeMyUbootEnv hddrootfs.tar.gz uImage.buffalo
どうやら残っているようだ。
念のためreboot
# reboot
起動してきたら。背面にあるリセットボタンを長押しする。音がなってオレンジ色のランプが点滅を始める。
あとは数分まつ。もし10分近くまってもオレンジの点滅が消えない場合、/mnt/mtdの内容が壊れているか、HDDをうまく初期化できていない可能性がある。その場合には/mnt/mtdの内容をすべて消し、そのあとハックキットと玄人志向のCDからファイルをコピーしなおしてやり直す。