基本的には9/13の手順をセルフで実行する
ude:~# cd /boot ude:/boot# dd if=initrd.buffalo of=initrd.gz bs=64 skip=1 68981+1 records in 68981+1 records out 4414847 bytes transferred in 3.343434 seconds (1320453 bytes/sec) ude:/boot# gunzip initrd.gz ude:/boot#
ude:/boot# mkdir /tmp/root ude:/boot# mount -o loop initrd /tmp/root ude:/boot# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 1976524 264124 1611996 15% / tmpfs 63100 0 63100 0% /dev/shm /dev/sda1 194443 83036 101368 46% /boot /dev/sda4 14176032 32828 13423092 1% /mnt /boot/initrd 13303 10722 2581 81% /tmp/root ude:/boot#
ude:/boot# cd /tmp/root ude:/tmp/root# ls bin etc linuxrc lost+found proc rootfs tmp var dev lib linuxrc.orig mnt root sbin usr ude:/tmp/root# rm linuxrc.orig ude:/tmp/root# mv linuxrc linuxrc.orig ude:/tmp/root# cp linuxrc.orig linuxrc ude:/tmp/root# vi linuxrc : : ude:/tmp/root# diff -c linuxrc.orig linuxrc *** linuxrc.orig Thu Sep 14 18:32:36 2006 --- linuxrc Tue Sep 26 01:01:17 2006 *************** *** 2,16 **** export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin ! echo "---- in midified linuxrc ---" - mount proc /proc -t proc - - # set the system time from the hardware clock - hwclock -s - date - - umount /proc umount -a exit 0 --- 2,9 ---- export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin ! echo "---- in modified linuxrc ---" umount -a exit 0 ude:/tmp/root#
ude:/tmp/root# cd / ude:/# umount /tmp/root ude:/#
ude:/# cd /boot ude:/boot# gzip initrd ude:/boot# mv initrd.buffalo initrd.buffalo.orig ude:/boot# /usr/local/src/u-boot/u-boot-1.1.4/tools/mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd -d initrd.gz initrd.buffalo Created: Tue Sep 26 01:05:21 2006 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 4414820 Bytes = 4311.35 kB = 4.21 MB Load Address: 0x00000000 Entry Point: 0x00000000 ude:/boot#
: : ## Booting image at 00100000 ... Image Name: Linux-2.6.12.6-arm1 Created: 2006-08-08 8:16:10 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1790696 Bytes = 1.7 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK ## Loading Ramdisk Image at 00800000 ... Image Name: initrd Created: 2006-09-25 16:05:21 UTC Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 4414820 Bytes = 4.2 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Starting kernel ... : : RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem). ---- in modified linuxrc --- kjournald starting. Commit interval 5 seconds EXT3 FS on sda2, internal journal : : Debian GNU/Linux 3.1 ude ttyS0 ude login:OK。
← LS-GL:debian:mkimage の make |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GL:アンマウントできない?loop デバイス |