先日ハックキットをインストールしたときの手順を再実行するが、 途中で telnet でログインできる initrd を退避しておく。
root@LS-QL-EM233:~# mkdir /boot mkdir: cannot create directory '/boot': File exists root@LS-QL-EM233:~# mount /dev/sda1 /boot root@LS-QL-EM233:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 31729 16882 14847 53% / /dev/ram1 15360 472 14888 3% /mnt/ram /dev/sda6 148376092 65552 148310540 0% /mnt/disk1 /dev/sda1 995928 192136 803792 19% /boot root@LS-QL-EM233:~#
root@LS-QL-EM233:~# cd /boot root@LS-QL-EM233:/boot# ls conf_save.tgz initrd.gz hddrootfs.buffalo.updated.done log.tgz initrd.buffalo u-boot.buffalo initrd.buffalo.orig uImage.buffalo root@LS-QL-EM233:/boot# cp initrd.buffalo initrd.buffalo.em root@LS-QL-EM233:/boot#
root@LS-QL-EM233:/boot# cd / root@LS-QL-EM233:/# umount /boot root@LS-QL-EM233:/#
ude:~# mkdir /tmp/boot ude:~# mount /dev/sdb1 /tmp/boot mount: unknown filesystem type 'mdraid' ude:~#あかんか。
kup:~# mkdir /tmp/boot kup:~# mount /dev/sdb1 /tmp/boot/ kup:~# cd /tmp/boot kup:/tmp/boot# ls conf_save.tgz initrd.buffalo.em lost+found hddrootfs.buffalo.updated.done initrd.buffalo.orig u-boot.buffalo initrd.buffalo log.tgz uImage.buffalo kup:/tmp/boot#
kup:/tmp/boot# mv initrd.buffalo initrd.buffalo.hackkit kup:/tmp/boot# cp initrd.buffalo.em initrd.buffalo kup:/tmp/boot#
kup:/tmp/boot# ftp ude.yamasita.jp Connected to ude.yamasita.jp. 220 ude FTP server (GNU inetutils 1.5) ready. Name (ude.yamasita.jp:yasunari): 331 Password required for yasunari. Password: 230- Linux ude 2.6.16.16-arm1 #37 Tue May 20 10:01:57 JST 2008 armv5tejl 230- 230- The programs included with the Debian GNU/Linux system are free software; 230- the exact distribution terms for each program are described in the 230- individual files in /usr/share/doc/*/copyright. 230- 230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 230- permitted by applicable law. 230 User yasunari logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> bin 200 Type set to I. ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> put uImage.buffalo local: uImage.buffalo remote: uImage.buffalo 200 PORT command sucessful. 150 Opening BINARY mode data connection for 'uImage.buffalo'. #############################################################(略) 226 Transfer complete. 2115612 bytes sent in 0.20 secs (10299.9 kB/s) ftp> put initrd.buffalo local: initrd.buffalo remote: initrd.buffalo 200 PORT command sucessful. 150 Opening BINARY mode data connection for 'initrd.buffalo'. #############################################################(略) 226 Transfer complete. 7018025 bytes sent in 0.69 secs (9903.3 kB/s) ftp> bye 221 Goodbye. kup:/tmp/boot#もちろん ude.yamasita.jp は家庭内 LAN からしか アクセスできないところにある。
ude:/srv/tftp# mkdir LS-QL_1.05+telnet ude:/srv/tftp# mv ~yasunari/* LS-QL_1.05+telnet ude:/srv/tftp#
無事 RamRoot で起動してきた。
BUFFALO INC. LinkStation series LS-QL-EM233 login: root No mail. root@LS-QL-EM233:~#
root@LS-QL-EM233:~# mount proc /proc -t proc mount: mounting proc on /proc failed: Device or resource busy root@LS-QL-EM233:~# mount sysfs /sys -t sysfs mount: mounting sysfs on /sys failed: Device or resource busy root@LS-QL-EM233:~# ldconfig root@LS-QL-EM233:~# depmod root@LS-QL-EM233:~# /etc/init.d/startSysMd.sh -- rebuild mdadm.conf for BOOT, ROOTFS -- mdadm: /dev/disk1_1 has wrong uuid. mdadm: /dev/disk1_2 has wrong uuid. mdadm: /dev/md10 has been started with 1 drive (out of 4). mdadm: /dev/disk1_1 has wrong uuid. mdadm: /dev/md1 has been started with 1 drive (out of 4). mdadm: /dev/md0 has been started with 1 drive (out of 4). -- setup max error counts -- /sys/block/md0/md/maxerr_cnt is setted to -1 /sys/block/md1/md/maxerr_cnt is setted to -1 /sys/block/md10/md/maxerr_cnt is setted to -1 root@LS-QL-EM233:~# echo "0x901" > /proc/sys/kernel/real-root-dev root@LS-QL-EM233:~#startSysMd.sh でエラーが出ると思っていたのに、 特に問題なし。
root@LS-QL-EM233:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md1 : active raid1 sda2[1] 5004160 blocks [4/1] [_U__] md0 : active raid1 sda1[1] 1003904 blocks [4/1] [_U__] unused devices:普通にマウントできる。root@LS-QL-EM233:~# mkdir /tmp/root root@LS-QL-EM233:~# mount /dev/md1 /tmp/root root@LS-QL-EM233:~# ls /tmp/root bin etc lib opt sbin sys var boot home media proc selinux tmp dev initrd mnt root srv usr root@LS-QL-EM233:~# mount /dev/md0 /tmp/root/boot root@LS-QL-EM233:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/root.old 31729 16882 14847 53% / /dev/ram1 15360 472 14888 3% /mnt/ram /dev/md1 4993920 185844 4808076 4% /mnt/ram/root /dev/md0 995928 199008 796920 20% /mnt/ram/root/boot root@LS-QL-EM233:~# swapon -a root@LS-QL-EM233:~# swapon /dev/md10 root@LS-QL-EM233:~# free total used free shared buffers Mem: 125780 46996 78784 0 32788 Swap: 1003896 0 1003896 Total: 1129676 46996 1082680 root@LS-QL-EM233:~#
多分、シリアルコンソールでブートの様子を見ればすぐ分かる。
シリアルコンソール、ほしー
|
← /var/log を見る |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 悪戦苦闘 |