SoftwareDesign 2010/1
(
Amazon
)
の
P154 の「/boot の構成」からを実行する。ちょっと手順は違うが。
root@TS-WXL3B3:/# mkdir /tmp/boot root@TS-WXL3B3:/# 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:/#
root@TS-WXL3B3:/boot# dd if=initrd.buffalo of=/tmp/initrd.gz bs=64 skip=1 145251+1 records in 145251+1 records out root@TS-WXL3B3:/boot#
root@TS-WXL3B3:/boot# cd /tmp root@TS-WXL3B3:/tmp# gunzip initrd.gz gunzip: write: No space left on device gunzip: error inflating root@TS-WXL3B3:/tmp#だは。別のところで。
root@TS-WXL3B3:/tmp# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/md1 4921404 522964 4148444 11% / /dev/ram1 15360 9280 6080 60% /mnt/ram /dev/md0 991928 167888 824040 17% /boot /dev/disk2_6 473337664 592 473337072 0% /mnt/disk2 /dev/sdb1 991928 168208 823720 17% /mnt/ram/boot root@TS-WXL3B3:/tmp# mkdir /mnt/disk2/wk root@TS-WXL3B3:/tmp# mv initrd.gz !$ mv initrd.gz /mnt/disk2/wk root@TS-WXL3B3:/tmp# 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# mkdir /tmp/root mkdir: cannot create directory '/tmp/root': File exists root@TS-WXL3B3:/mnt/disk2/wk# mount -o loop initrd /tmp/root mount: cannot setup loop device: No such file or directory root@TS-WXL3B3:/mnt/disk2/wk#がー。
root@TS-WXL3B3:/mnt/disk2/wk# mknod /dev/loop0 b 7 0 root@TS-WXL3B3:/mnt/disk2/wk# !mount mount -o loop initrd /tmp/root root@TS-WXL3B3:/mnt/disk2/wk# ls !$ ls /tmp/root bin etc lost+found root share usr debugtool lib mnt rootfs sys var dev linuxrc proc sbin tmp www root@TS-WXL3B3:/mnt/disk2/wk#やれやれ
root@TS-WXL3B3:/mnt/disk2/wk# cd /tmp/root root@TS-WXL3B3:/tmp/root# mv linuxrc linuxrc.orig root@TS-WXL3B3:/tmp/root# vi linuxrc : : root@TS-WXL3B3:/tmp/root# cat !$ 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#モードも合わせる
root@TS-WXL3B3:/tmp/root# ls -l linuxrc* -rw-r--r-- 1 root root 413 Mar 7 13:43 linuxrc -rwxr-xr-x 1 root root 10133 Jan 8 21:30 linuxrc.orig root@TS-WXL3B3:/tmp/root#あれ? 755 でいいの?
root@TS-WXL3B3:/tmp/root# chmod 755 linuxrc root@TS-WXL3B3:/tmp/root# !ls ls -l linuxrc* -rwxr-xr-x 1 root root 413 Mar 7 13:43 linuxrc -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# ls initrd root@TS-WXL3B3:/mnt/disk2/wk# gzip initrd root@TS-WXL3B3:/mnt/disk2/wk#
root@TS-WXL3B3:/mnt/disk2/wk# mv /tmp/boot/initrd.buffalo /tmp/boot/initrd.buffalo.orig 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 13:57:07 2010 Created(epoc):1267937827 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9237387 Bytes = 9020.89 kB = 8.81 MB Load Address: 0x00000000 Entry Point: 0x00000000 root@TS-WXL3B3:/mnt/disk2/wk#
root@TS-WXL3B3:/# umount /tmp/boot root@TS-WXL3B3:/#
: : 2555068 bytes read Image Name: Linux-2.6.22.18-mv78100 Created: 2010-02-04 2:14:52 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2555004 Bytes = 2.4 MB Load Address: 00008000 Entry Point: 00008000 9237451 bytes read Image Name: initrd Created: 2010-03-07 4:57:07 UTC Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9237387 Bytes = 8.8 MB Load Address: 00000000 Entry Point: 00000000 : :ちゃんと今回作った initrd が読まれている
: : ---- in hackkit linuxrc --- -- rebuild mdadm.conf for BOOT, ROOTFS with Intelligent routine -- kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. mount: mounting /dev/disk2_1 on /tmp/boot_test failed: No such device or address GetMdBaseDisk : Selected 1 md: md10 stopped. md: bind/linuxrc の中。raid1: raid set md10 active with 1 out of 2 mirrors mdadm: /dev/md10 has been started with 1 drive (out of 2). md: md1 stopped. md: bind raid1: raid set md1 active with 1 out of 2 mirrors mdadm: /dev/md1 has been started with 1 drive (out of 2). md: md0 stopped. md: bind raid1: raid set md0 active with 1 out of 2 mirrors mdadm: /dev/md0 has been started with 1 drive (out of 2). -- setup max error counts -- /sys/block/md0/md/maxerr_cnt is setted to 20 /sys/block/md1/md/maxerr_cnt is setted to 20 /sys/block/md10/md/maxerr_cnt is setted to 20 err: RecvPacket: readlen=0. umount: cannot open /proc/mounts
続き
kjournald starting. Commit interval 5 seconds EXT3-fs warning: maximal mount count reached, running e2fsck is recommended EXT3 FS on md1, internal journal EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem). Trying to move old root to /initrd ... /initrd does not exist. Ignored./initrd がない?
Unmounting old root Trying to free ramdisk memory ... okay Freeing init memory: 136K 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: Sun Mar 7 23:27:07 JST 2010 (warning). Activating swap...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: Sun Mar 7 23:27:07 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...mount: special device /dev/md0 does not exist failed.デバイス無いのか、、、
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:とりあえず、TeraStation TS-WXL でdebian が、うーごいた!
けど、、、
ログインしようとしたらキーが効かない。なんで?
|
← / の構成 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ debian 化の課題 |