ハックキットの etch 化(2)

debian 玄箱/Pro

再起動

念のため、再起動

Debian GNU/Linux 4.0 hackkit ttyS0

hackkit login:
と、Debian 4.0 となっている

エラー

シリアルコンソールを見たら、
	:
	:
INIT: version 2.86 booting
Activating swap:swapon on /dev/sda3
Adding 136544k swap on /dev/sda3.  Priority:-1 extents:1
.
Setting the system clock..
System Clock set. Local time: Thu May 24 03:37:22 JST 2007.
Cleaning up ifupdown....
Loading device-mapper supportNote: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
.
Will now check all file systems.
fsck 1.40-WIP (14-Nov-2006)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a -C0 /dev/sda1
/dev/sda1: clean, 12/14056 files, 7611/56196 blocks
[/sbin/fsck.xfs (1) -- /mnt] fsck.xfs -a /dev/sda4
/sbin/fsck.xfs: XFS file system.
Done checking file systems.
A log is being saved in /var/log/fsck/checkfs if that location is writable.
Setting kernel variables...done.
Will now mount local filesystems:mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda4
INIT: version 2.86 booting
Activating swap:swapon on /dev/sda3
Adding 136544k swap on /dev/sda3.  Priority:-1 extents:1
.
Setting the system clock..
System Clock set. Local time: Thu May 24 03:37:22 JST 2007.
Cleaning up ifupdown....
Loading device-mapper supportNote: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
.
Will now check all file systems.
fsck 1.40-WIP (14-Nov-2006)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /boot] fsck.ext3 -a -C0 /dev/sda1
/dev/sda1: clean, 12/14056 files, 7611/56196 blocks
[/sbin/fsck.xfs (1) -- /mnt] fsck.xfs -a /dev/sda4
/sbin/fsck.xfs: XFS file system.
Done checking file systems.
A log is being saved in /var/log/fsck/checkfs if that location is writable.
Setting kernel variables...done.
Will now mount local filesystems:mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda4
 failed!
Will now activate swapfile swap:done.
Cleaning /tmp...done.
Cleaning /var/run...done.
Cleaning /var/lock...done.
Setting up networking....
* /etc/network/options is deprecated (see README.Debian of netbase).
Setting up IP spoofing protection...done (rp_filter).
Configuring network interfaces...eth0: link down
done.
Setting console screen modes and fonts.
Initializing random number generator...done.
Recovering nvi editor sessions...none found.
rm: /var/lock/perfmon: is a directory
rm: /var/lock/printing: is a directory
rm: /var/lock/subsys: is a directory
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting MTA:eth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
 exim4.
Starting internet superserver: inetd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: crond.
Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 4.0 hackkit ttyS0

hackkit login:

と、えらいにぎやか。

/etc/modules.conf

Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
Note: /etc/modules.conf is more recent than /lib/modules/2.6.12.6-arm1/modules.dep
/etc/modules.conf は debian 由来、
/lib/modules はファームウェア由来。
危険な臭いが、、、

/etc/modules.conf のタイムスタンプを戻しておく

hackkit:~# ls -l /lib/modules/2.6.12.6-arm1/modules.dep
-rw-r--r-- 1 root root 0 May 20 23:38 /lib/modules/2.6.12.6-arm1/modules.dep
hackkit:~# ls -l /etc/modules.conf
-rw-r--r-- 1 root root 5703 May 24 03:25 /etc/modules.conf
hackkit:~# touch -t 05202330 /etc/modules.conf
hackkit:~# ls -l /etc/modules.conf
-rw-r--r-- 1 root root 5703 May 20 23:30 /etc/modules.conf
hackkit:~#

mtab

mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
むむむ

sda4 のマウント失敗?

sda4 のマウントに失敗したかとログインして見てみたが、
hackkit:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              2929652    249652   2680000   9% /
tmpfs                    63164         0     63164   0% /lib/init/rw
tmpfs                    63164         0     63164   0% /dev/shm
/dev/sda1                54416      5831     45776  12% /boot
/dev/sda4            309304924      1200 309303724   1% /mnt
hackkit:~#
ちゃんとマウントできているし、、、
再マウントしても、
hackkit:~# umount /dev/sda4
hackkit:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              2929652    249672   2679980   9% /
tmpfs                    63164         0     63164   0% /lib/init/rw
tmpfs                    63164         0     63164   0% /dev/shm
/dev/sda1                54416      5831     45776  12% /boot
hackkit:~# mount -a
mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
XFS mounting filesystem sda4
hackkit:~#
特に問題なし。
???

/etc/network/options is deprecated

推奨されないそうで、ファイルがあれば、このメッセージが表示される。
hackkit:~# cat /etc/network/options
ip_forward=no
spoofprotect=yes
syncookies=no
hackkit:~# cat /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com
#net/ipv4/icmp_echo_ignore_broadcasts=1

# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next line to enable Spoof protection (reverse-path filter)
#net.ipv4.conf.default.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.conf.default.forwarding=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.default.forwarding=1
hackkit:~#
/etc/network/options を消す。(えーの?)
hackkit:~# rm /etc/network/options
hackkit:~#

残り、、、

failed!は、 sda4 のマウントに失敗しているのではなく、
mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
が出るために、mountall.sh がエラー終了していて、 /lib/lsb/init-functions で出しているよう。

ということは、

mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
を消せば良いのだが、/etc/mtab を消してもダメ、、、、

結局 /etc/fstab から /dev/pts の記述をコメントアウトとして、 ようやくエラーは出なくなった。

誰がマウントしているの?
ごそごそ探したら、/etc/init.d/mountdevsubfs.sh だった。
まだまだ不勉強

でも、、、
fstab に書いてないのに勝手にマウントされるのは違和感あるなぁ、、、




KURO-BOX/PRO
玄人志向
楽天市場
TSUKUMO ネットショップ
Yahoo!ショッピング
Sofmap
クレバリー
TwoTop

SCON-KIT/PRO
玄人志向
TSUKUMO ネットショップ
Yahoo! ショッピング
パソQ
ValuMore
uWorks

玄箱PROをハックしよう
ASCII
楽天ブックス
Amazon
cbook24
e-hon
JBook
BK1
livedoorブックス
紀伊國屋書店BookWeb


ハックキットの etch 化
ハックの記録
LinkStation/玄箱 をハックしよう

ハックキットの etch 化(3)

Copyright (C) 2003-2007 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市