[root@LS410D06E ~]# dd if=/boot/initrd.buffalo of=/tmp/initrd.gz bs=64 skip=1 185731+1 records in 185731+1 records out [root@LS410D06E ~]# gunzip /tmp/initrd.gz [root@LS410D06E ~]#
[root@LS410D06E ~]# mkdir /tmp/root [root@LS410D06E ~]# mount -o loop /tmp/initrd /tmp/root mount: mounting on /tmp/root failed: Invalid argument [root@LS410D06E ~]#ふぎゃー。
新しいトラップを仕掛けられた??
[root@LS410D06E ~]# file /tmp/initrd /tmp/initrd: ASCII cpio archive (SVR4 with no CRC) [root@LS410D06E ~]#cpio archive ??
[root@LS410D06E ~]# cat /tmp/initrd | cpio -t . usr usr/lib usr/lib/libreadline.so.6.2 usr/lib/libstdc++.so.6.0.16-gdb.py usr/lib/libkmod.so.2 : :cpio でまとめられているだけ。
[root@LS410D06E ~]# cat /tmp/initrd | cpio -id 52829 blocks [root@LS410D06E ~]#
[root@LS410D06E ~]# ls -l total 84 drwxr-xr-x 2 root root 4096 Aug 7 23:30 bin/ drwxr-xr-x 2 root root 4096 Aug 7 23:30 debugtool/ drwxr-xr-x 4 root root 4096 Aug 7 23:30 dev/ drwxr-xr-x 19 root root 4096 Aug 7 23:30 etc/ drwxrwxrwx 3 root root 4096 Aug 7 23:30 home/ -rwxr-xr-x 1 root root 13454 Aug 7 23:30 init* drwxr-xr-x 7 root root 4096 Aug 7 23:30 lib/ lrwxrwxrwx 1 root root 11 Aug 7 23:30 linuxrc -> bin/busybox* drwxr-xr-x 2 root root 4096 Aug 7 23:30 mnt/ drwxr-xr-x 2 root root 4096 Aug 7 23:30 proc/ drwxr-xr-x 5 root root 4096 Aug 7 23:30 root/ drwxr-xr-x 2 root root 4096 Aug 7 23:30 rootfs/ drwxr-xr-x 3 root root 4096 Aug 7 23:30 run/ drwxr-xr-x 2 root root 4096 Aug 7 23:30 sbin/ drwxr-xr-x 2 root root 4096 Aug 7 23:30 sys/ drwxrwxrwt 2 root root 4096 Aug 7 23:30 tmp/ drwxr-xr-x 8 root root 4096 Aug 7 23:30 usr/ drwxr-xr-x 7 root root 4096 Aug 7 23:30 var/ drwxr-xr-x 3 root root 4096 Aug 7 23:30 www/ [root@LS410D06E ~]#スクリプトではなく、busybox
#!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin ROOTFS_MPT=/rootfs echo "---- in $0 $*---" mount -a #/etc/init.d/udev.sh start # mount proc /proc -t proc # mount sysfs /sys -t sysfs mount -t tmpfs -o "nosuid,nodev,noexec" shm /dev/shm mount -t devpts -o "nosuid,noexec,gid=5,mode=620" devpts /dev/pts ldconfig : :おー、これが以前の linuxrc だぁ、、、
|
← 散歩 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LinkStation 400シリーズファームウェア アップデーターVer.1.11 |
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市