root@TS-WXL3B3:/usr/local/bin# ./hdd_wakeup.sh disk1 scsi 0:0:0:0: Direct-Access SAMSUNG HD501LJ CR10 PQ: 0 ANSI: 5 Linux IAL (ERROR) [0 0 0]: set device max sectors to 2048 /sbin/hotplug [scsi] /sbin/hotplug [scsi_disk] Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = 809e8060 sd 0:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) sd 0:0:0:0: [sdb] Write Protect is off sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) sd 0:0:0:0: [sdb] Write Protect is off sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] sd 0:0:0:0: [sdb] Attached SCSI disk /sbin/hotplug [scsi_device] sd 0:0:0:0: Attached scsi generic sg1 type 0 need re create_devlink!!! /sbin/hotplug [block] /sbin/hotplug [scsi_generic] *** /usr/local/bin/DirectCopy_wait.sh [stop] hdd_wakeup.sh : FLAG_FORMAT=0 mdadm: No md superblock detected on /dev/disk1_6. mdadm: No md superblock detected on /dev/disk2_6. /usr/local/bin/change_notify.sh:LCD display message setted to [HD 2 : SINGLE 1 : REMOVE] root@TS-WXL3B3:/usr/local/bin#
root@TS-WXL3B3:~# mkdir /tmp/root root@TS-WXL3B3:~# mount -t ext3 /dev/sdb2 /tmp/root kjournald starting. Commit interval 5 seconds EXT3-fs warning: maximal mount count reached, running e2fsck is recommended EXT3 FS on sdb2, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with ordered data mode. root@TS-WXL3B3:~#
root@TS-WXL3B3:~# cd /tmp/root/ root@TS-WXL3B3:/tmp/root# mkdir linuxrc root@TS-WXL3B3:/tmp/root#
root@TS-WXL3B3:/tmp/root# cd root@TS-WXL3B3:~# ls /tmp/root/dev/md* ls: /tmp/root/dev/md*: No such file or directory root@TS-WXL3B3:~# (cd /dev; tar cf - md[0-9]*)|(cd /tmp/root/dev/; tar xvf -) md0 md1 md10 md11 md12 md13 md14 md15 md2 md3 md4 md5 md6 md7 md8 md9 root@TS-WXL3B3:~# umount /tmp/root root@TS-WXL3B3:~#
root@TS-WXL3B3:~# ls /mnt/disk2/wk/ initrd.gz root@TS-WXL3B3:~#initrd.buffalo を作ったときの initrd が残っているので、 これを修正する。
root@TS-WXL3B3:~# cd !$ cd /mnt/disk2/wk/ root@TS-WXL3B3:/mnt/disk2/wk# gunzip initrd.gz root@TS-WXL3B3:/mnt/disk2/wk#
root@TS-WXL3B3:/mnt/disk2/wk# mount -o loop initrd /tmp/root root@TS-WXL3B3:/mnt/disk2/wk#
root@TS-WXL3B3:/tmp/root# cat linuxrc #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin echo "---- in hackkit linuxrc ---" mount proc /proc -t proc mount sysfs /sys -t sysfs . /usr/local/lib/libsys SetupNasFeature ldconfig depmod . /etc/nas_feature /etc/init.d/startSysMd.sh echo "0x901" > /proc/sys/kernel/real-root-dev /usr/local/sbin/miconapl -a serialmode_console umount /sys umount /proc umount -a exit 0 root@TS-WXL3B3:/tmp/root#umount は消すとして、miconapl は、なぜこれでは駄目?
ちょっと変えてみる
root@TS-WXL3B3:/tmp/root# mv linuxrc linuxrc.1 root@TS-WXL3B3:/tmp/root# cp linuxrc.1 linuxrc root@TS-WXL3B3:/tmp/root# vi linuxrc : : root@TS-WXL3B3:/tmp/root# cat linuxrc #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin echo "---- in hackkit linuxrc ---" mount proc /proc -t proc mount sysfs /sys -t sysfs . /usr/local/lib/libsys SetupNasFeature ldconfig depmod . /etc/nas_feature /usr/local/sbin/miconapl -a serialmode_console /etc/init.d/startSysMd.sh echo "0x901" > /proc/sys/kernel/real-root-dev umount -a exit 0 root@TS-WXL3B3:/tmp/root#
root@TS-WXL3B3:/tmp/root# ls -l linuxrc* -rwxr-xr-x 1 root root 387 Mar 7 23:30 linuxrc -rwxr-xr-x 1 root root 413 Mar 7 13:43 linuxrc.1 -rwxr-xr-x 1 root root 10133 Jan 8 21:30 linuxrc.orig root@TS-WXL3B3:/tmp/root#問題なし。
root@TS-WXL3B3:/tmp/root# cd / root@TS-WXL3B3:/# umount /tmp/root root@TS-WXL3B3:/#
root@TS-WXL3B3:/# cd /mnt/disk2/wk/ root@TS-WXL3B3:/mnt/disk2/wk# mkdir /tmp/boot root@TS-WXL3B3:/mnt/disk2/wk# mount -t ext3 /dev/sdb1 /tmp/boot kjournald starting. Commit interval 5 seconds EXT3 FS on sdb1, internal journal EXT3-fs: mounted filesystem with ordered data mode. root@TS-WXL3B3:/mnt/disk2/wk# gzip initrd root@TS-WXL3B3:/mnt/disk2/wk# mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd -d initrd.gz /tmp/boot/initrd.buffalo Image Name: initrd Created: Sun Mar 7 23:37:43 2010 Created(epoc):1267972663 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9237130 Bytes = 9020.63 kB = 8.81 MB Load Address: 0x00000000 Entry Point: 0x00000000 root@TS-WXL3B3:/mnt/disk2/wk# umount /tmp/boot/ root@TS-WXL3B3:/mnt/disk2/wk#
: : ---- in hackkit linuxrc --- err: RecvPacket: readlen=0.やっぱり miconapl は、ちゃんと動いていない?
: : Trying to move old root to /initrd ... /initrd does not exist. Ignored.あれ?ちゃんと作ったのに、、、
INIT: version 2.86 booting Setting the system clock. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Unable to set System Clock to: Wed Mar 17 07:48:57 JST 2010 (warning). Activating swap...Adding 999864k swap on /dev/md10. Priority:-1 extents:1 across:999864k done. Setting the system clock. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Unable to set System Clock to: Wed Mar 17 07:48:57 JST 2010 (warning). Cleaning up ifupdown.... Loading kernel modules...done. Checking file systems...fsck 1.41.3 (12-Oct-2008) done. Setting kernel variables (/etc/sysctl.conf)...Unknown HZ value! (81) Assume 100. done. Mounting local filesystems...kjournald starting. Commit interval 5 seconds EXT3 FS on md0, internal journal EXT3-fs: mounted filesystem with ordered data mode. done. Activating swapfile swap...done. Setting up networking.... Configuring network interfaces...eth0: link down eth0: started done. INIT: Entering runlevel: 2 Starting enhanced syslogd: rsyslogdeth0: link up, full duplex, speed 1 Gbps . Starting periodic command scheduler: crond. Debian GNU/Linux 5.0 tswxl ttyS0 tswxl login:うぅん。中から見られないと進まない。
|
← /boot の構成 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ telnet できるようにする |