LS-XHL 1.04β と LS-CHL 1.21 との /linuxrc を見てみる
yasunari@ude:/mnt/tmp/lsxhl-104b$ ls initrd.buffalo yasunari@ude:/mnt/tmp/lsxhl-104b$ dd if=initrd.buffalo of=initrd.gz bs=64 skip=1 132990+1 records in 132990+1 records out 8511403 bytes (8.5 MB) copied, 141.851 s, 60.0 kB/s yasunari@ude:/mnt/tmp/lsxhl-104b$
yasunari@ude:/mnt/tmp/lsxhl-104b$ gunzip initrd.gz yasunari@ude:/mnt/tmp/lsxhl-104b$
yasunari@ude:/mnt/tmp/lsxhl-104b$ mkdir /tmp/root yasunari@ude:/mnt/tmp/lsxhl-104b$ ls -l /dev/loop* brw-rw---- 1 root disk 7, 0 Nov 21 2008 /dev/loop0 brw-rw---- 1 root disk 7, 1 Nov 21 2008 /dev/loop1 brw-rw---- 1 root disk 7, 2 Nov 21 2008 /dev/loop2 brw-rw---- 1 root disk 7, 3 Nov 21 2008 /dev/loop3 brw-rw---- 1 root disk 7, 4 Nov 21 2008 /dev/loop4 brw-rw---- 1 root disk 7, 5 Nov 21 2008 /dev/loop5 brw-rw---- 1 root disk 7, 6 Nov 21 2008 /dev/loop6 brw-rw---- 1 root disk 7, 7 Nov 21 2008 /dev/loop7 yasunari@ude:/mnt/tmp/lsxhl-104b$ su Password: ude:/mnt/tmp/lsxhl-104b# mount -o loop ./initrd /tmp/root ude:/mnt/tmp/lsxhl-104b# ls /tmp/root bin dev lib lost+found proc rootfs share tmp var debugtool etc linuxrc mnt root sbin sys usr www ude:/mnt/tmp/lsxhl-104b#
ude:/mnt/tmp/lsxhl-104b# cp /tmp/root/linuxrc . ude:/mnt/tmp/lsxhl-104b# chmod 664 linuxrc ude:/mnt/tmp/lsxhl-104b#
ude:/mnt/tmp/lsxhl-104b# umount /tmp/root/ ude:/mnt/tmp/lsxhl-104b# exit exit yasunari@ude:/mnt/tmp/lsxhl-104b$
yasunari@ude:/mnt/tmp/lsxhl-104b$ cd ../lschl-121/ yasunari@ude:/mnt/tmp/lschl-121$ !dd dd if=initrd.buffalo of=initrd.gz bs=64 skip=1 139728+1 records in 139728+1 records out 8942641 bytes (8.9 MB) copied, 4.92444 s, 1.8 MB/s yasunari@ude:/mnt/tmp/lschl-121$ !gun gunzip initrd.gz yasunari@ude:/mnt/tmp/lschl-121$ su Password: ude:/mnt/tmp/lschl-121# !mount mount -o loop ./initrd /tmp/root ude:/mnt/tmp/lschl-121# !cp cp /tmp/root/linuxrc . ude:/mnt/tmp/lschl-121# !chmod chmod 664 linuxrc ude:/mnt/tmp/lschl-121# !umount umount /tmp/root/ ude:/mnt/tmp/lschl-121# exit exit yasunari@ude:/mnt/tmp/lschl-121$
yasunari@ude:/mnt/tmp/lschl-121$ cd .. yasunari@ude:/mnt/tmp$ diff -c lsxhl-104b/linuxrc lschl-121/linuxrc |less *** lsxhl-104b/linuxrc Sun Oct 18 15:58:06 2009 --- lschl-121/linuxrc Sun Oct 18 16:02:00 2009 *************** *** 2,8 **** export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin ! echo "---- in linuxrc ---" echo "Version 1.00 2008/ 7/ 1" mount proc /proc -t proc --- 2,14 ---- export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin ! echo "---- in linuxrc ---" > /dev/ttyS0 ! if [ $? != 0 ]; then ! (cd /dev; rm console ttyS0; ln -s null console; ln -s null ttyS0) ! grep -v "getty.*ttyS0" /etc/inittab > /tmp/inittab ! mv /tmp/inittab /etc/inittab ! RESPAWN_GETTY="no" ! fi echo "Version 1.00 2008/ 7/ 1" mount proc /proc -t procconsole, ttyS0 をつぶして、
*************** *** 129,134 **** --- 135,153 ---- return 0 } + check_inittab() + { + if [ "$RESPAWN_GETTY" = "no" ]; then + grep -v "getty.*ttyS0" /mnt/etc/inittab > /tmp/inittab + mv /tmp/inittab /mnt/etc/inittab + else + grep "getty.*ttyS0" /etc/inittab > /dev/null 2>&1 + if [ $? != 0 ]; then + echo "::respawn:/sbin/getty -L ttyS0 115200 vt100" >> /mnt/etc/inittab + fi + fi + } + fsck_disks() { FSCK_RES=0RESPAWN_GETTY=no でなければ、getty を動かすようだが、、
*************** *** 298,303 **** --- 317,323 ---- else DelRootfsBootMarker CopyFromInitrdToHdd + check_inittab umount /mnt return 0 fi (END)
ん?
パーティションをチェックしている様子がない。
|
← 次期玄箱? |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ sudo のインストール |