
Ubuntu日本語フォーラム

ログインしていません。
weyk による投稿:
/etc/sysctl.confと/etc/default/consolesetupはどのように変更したのでしょうか?
念のため。
編集するのはUMLを起動するときに使用する(Guest環境の)ディスクイメージの中です。/mnt にmountしていれば、それぞれ、/mnt/etc/sysctl.confと/mnt/etc/default/consolesetupになります。本物の(Host側の)ファイルではないので注意してください。
# もしくは、UML環境の中で操作するなら、そのまま、/etc/sysctl.confと/etc/default/consolesetupです。
具体的なコマンドなどがない為、発言からは、正しく操作しているかのうせも、誤って操作している可能性も、両方とも考えられるため、念のため書いておきます。
※Guest環境を起動したまま(Guest側でmountしたまま)、Host側からディスクイメージをmountして書き換えたりしないよう注意してください。1つの実体を複数のOSでmountしてそれぞれから更新すると、おそらく、内容が壊れます(常に操作に同期して更新されるわけではないので、基本的に、「同時にmountしてはいけない」と考えた方が安全です)
SoftDog等の問題は、
・エラーの出ないオプションで作成されたカーネルを使う(UMLのオフィシャルサイトのものとか)
・自分でエラーが出ないようにmakeする(ついでにいろいろ調整も可能)
のいずれかではないかと・・・
わざわざありがとうございます。
勘違いしておりました。
私の場合は/mntにmountしているので、/mnt/etc/sysctl.confと/mnt/etc/default/consolesetupを
変更すれば飯井ということですよね?
SoftDog等の問題に関してもオフィシャルサイトからカーネルを取得してみます。
オフライン
オフィシャルサイトから「linux-2.6.31.4.tar.bz2」
をダウンロードし、展開しました。
ただカーネル本体というのはどれなのでしょうか?
聞いたところによると
カーネルとルートファイルシステムは
同一のディレクトリに置いておくべきたと聞いたので
その作業をしようとしたのですが。。。
どなたかわかりますか?
それともそんな作業必要ありませんか?
オフライン
未確認ですが、ざっと見た限りでは、UMLのオフィシャルサイトの、トップページ中ほどにある「Getting started」のところの、「this kernel」がカーネル本体で、それに対応したファイルイメージが「this filesystem」のようです(32bitsの場合)
downloadのリンクの方の先にあるの、カーネルのソースと、Host側のカーネルに適用するUML用のパッチや、UMLのユーティリティのようす。
おそらく、Getting startedのとこにある手順どおりに行うと、簡単に動く・・・とよいなぁ と思います(試してないので希望が混ざってます・・・)
オフライン
santamasashiさん による投稿:
オフィシャルサイトから「linux-2.6.31.4.tar.bz2」
をダウンロードし、展開しました。
ただカーネル本体というのはどれなのでしょうか?
展開で出来たファイルがカーネルです。
このカーネルは最近公開された物で私が試した物とは異なり、前の物とは違う起動時のメッセージがでます。
santamasashiさん による投稿:
カーネルとルートファイルシステムは
同一のディレクトリに置いておくべきたと聞いたので
実行時にファイルへのパスを指定すればいいので必要ありません。
16カーネルの移動
カーネルとルートファイルシステムを同一のディレクトリ内に置くためにカーネル「linux.uml」をディレクトリに移動した。コマンドは以下の通り。
$ mv /usr/bin/linux.uml ./UML
これは無駄な作業です。
今の目的は起動時の気になるメッセージを無くする事ですか?
それとも他に何かあるのですか?
オフライン
※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。
オフライン
下記の要領で作った環境では起動時の気になるメッセージはなくなります。
ご希望のUML環境でないかもしれません。
思い違い、typoが有るかもしれません。
エラーが出たときはエスパー能力を発揮して下さい。
UML用ルートファイルを作ります。
起動テスト用ですので小さいファイルにしています。
cd ~
dd if=/dev/zero of=ubuntu-root_fs bs=512 seek=1M count=1
mke2fs -j ubuntu-root_fs
sudo -i
mount -o loop ubuntu-root_fs /mnt
debootstrap --arch i386 hardy /mnt http://jp.archive.ubuntu.com/ubuntu
cd /mnt/etc
vi sysctl.conf
kernel.maps_protect = 1
vm.mmap_min_addr = 65536
2行コメントアウト
cd /mnt/etc/default
vi console-setup
ACTIVE_CONSOLES="/dev/tty1"に変更
cd /mnt/etc/rcS.d
rm S06keyboard-setup
rm S08hwclockfirst.sh
rm S11hwclock.sh
cd /mnt/etc/rc6.d
rm K25hwclock.sh
cd /mnt/etc/event.d
rm tty2
rm tty3
rm tty4
rm tty5
rm tty6
umount /mnt
exit
UML用のカーネルを作ります。
カーネルをコンパイルする環境を整えてから
cd ~
wget http://jp.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_2.6.28.orig.tar.gz
wget http://jp.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_2.6.28-15.52.diff.gz
wget http://jp.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_2.6.28-15.52.dsc
dpkg-source -x linux_2.6.28-15.52.dsc
cd linux-2.6.28/arch/um/driver
vi line.c
307-310行の
if (i==ARRAY_SIZE(tty_ioctls)) {
printk(KERN_ERR "%s: %s: unknown ioctl: 0x%x\n",
__func__,tty->name, cmd);
}
をコメントアウト
cd ~/linux-2.6.28
make defconfig ARCH=um
make ARCH=um
コンパイルが終われば、(Athlon 3500+の環境でで5分程度で終わります)
cp linux ~/linux-ubuntu
cd ~
./linux-ubuntu ubda=ubuntu-root_fs umid=uml1
すっきりした起動メッセージになるはず。
オフライン
kiyoshi による投稿:
今更で恐縮ですが、主に回答者の方のために情報を提供しておきます。
jackalopeさんの#23 による投稿:
#1を書いてから#22までの間に何か変更したのではないですか?
ホームフォルダが暗号化されていて、ddで大きなファイルを作成するのに膨大な時間がかかっておられたようなので、作業しているUbuntu本体そのものを暗号化せずに再インストールされています。
詳細は
https://forums.ubuntulinux.jp/viewtopic.php?pid=41747#p41747
以下に書いてあります。
本来私が説明すべきことですね。
すみません。
オフライン
jackalopeさん
そんなに詳しくありがとうございます。
参考にさせていただき、自分で一から作業してみます。
本当にありがとうございます。
また結果を書かさせていただきます。
オフライン
今までご返事をくださったみなさん
インフルエンザのため取りかかるのが遅くなりましたが
みなさんのおかげで解決することができました。
ログイン画面も1つにすることができました。
ありがとうございます。
実行画面は以下のとおりです。
yamada@ubuntu:~/UML$ linux.uml ubd0=uml-root-hardy umid=uml1
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
- /proc/mm...not found: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 10104832 bytes to physical memory to account for exec-shield gap
[42949372.960000] Linux version 2.6.22-rc5 (root@vernadsky) (gcc version 4.1.3 20070629 (prerelease) (Ubuntu 4.1.2-13ubuntu2)) #2 Mon Jul 2 10:14:22 GMT 2007
[42949372.960000] Built 1 zonelists. Total pages: 10576
[42949372.960000] Kernel command line: ubd0=uml-root-hardy root=98:0
[42949372.960000] PID hash table entries: 256 (order: 8, 1024 bytes)
[42949372.960000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[42949372.960000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[42949372.960000] Memory: 29228k available
[42949373.310000] Mount-cache hash table entries: 512
[42949373.310000] Checking for host processor cmov support...Yes
[42949373.310000] Checking for host processor xmm support...No
[42949373.310000] Checking that host ptys support output SIGIO...Yes
[42949373.310000] Checking that host ptys support SIGIO on close...No, enabling workaround
[42949373.310000] Using 2.6 host AIO
[42949373.310000] NET: Registered protocol family 16
[42949373.310000] NET: Registered protocol family 2
[42949373.400000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[42949373.400000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[42949373.400000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[42949373.400000] TCP: Hash tables configured (established 2048 bind 2048)
[42949373.400000] TCP reno registered
[42949373.430000] Checking host MADV_REMOVE support...OK
[42949373.430000] mconsole (version 2) initialized on /home/yamada/.uml/uml1/mconsole
[42949373.430000] Mapper v0.1
[42949373.430000] mmapper_init - find_iomem failed
[42949373.430000] UML Watchdog Timer
[42949373.430000] Host TLS support detected
[42949373.430000] Detected host type: i386
[42949373.430000] VFS: Disk quotas dquot_6.5.1
[42949373.430000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[42949373.430000] JFS: nTxBlock = 228, nTxLock = 1828
[42949373.430000] SGI XFS with ACLs, security attributes, realtime, large block numbers, no debug enabled
[42949373.430000] SGI XFS Quota Management subsystem
[42949373.430000] io scheduler noop registered
[42949373.430000] io scheduler anticipatory registered (default)
[42949373.430000] io scheduler deadline registered
[42949373.430000] io scheduler cfq registered
[42949373.470000] SoftDog: cannot register miscdev on minor=130 (err=-16)
[42949373.470000] TCP cubic registered
[42949373.470000] NET: Registered protocol family 1
[42949373.470000] NET: Registered protocol family 17
[42949373.470000] Initialized stdio console driver
[42949373.470000] Console initialized on /dev/tty0
[42949373.470000] Initializing software serial port version 1
[42949373.490000] ubda: unknown partition table
[42949373.520000] Filesystem "ubda": Disabling barriers, not supported by the underlying device
[42949373.520000] XFS mounting filesystem ubda
[42949373.520000] Starting XFS recovery on filesystem: ubda (logdev: internal)
[42949373.520000] Ending XFS recovery on filesystem: ubda (logdev: internal)
[42949373.520000] VFS: Mounted root (xfs filesystem) readonly.
[42949373.520000] line_ioctl: tty0: ioctl KDSIGACCEPT called
* Setting preliminary keymap... [42949374.090000] line_ioctl: tty1: ioctl KDGKBTYPE called
[42949374.090000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.090000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.090000] line_ioctl: tty1: ioctl KDGKBTYPE called
[42949374.090000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.090000] line_ioctl: tty0: ioctl KDGKBTYPE called
Couldnt get a file descriptor referring to the console
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[fail]
* Setting the system clock
hwclock is unable to get I/O port access: the iopl(3) call failed.
* Unable to set System Clock to: Tue Oct 20 07:37:21 UTC 2009
* Starting basic networking... [ OK ]
* Starting kernel event manager... [ OK ]
* Loading hardware drivers... [ OK ]
* Setting the system clock
hwclock is unable to get I/O port access: the iopl(3) call failed.
* Unable to set System Clock to: Tue Oct 20 07:37:25 UTC 2009
* Loading kernel modules... * Loading manual drivers... [ OK ]
* Setting kernel variables... [ OK ]
* Activating swap... [ OK ]
* Checking root file system... fsck 1.40.8 (13-Mar-2008)
fsck: fsck.xfs: not found
fsck: Error 2 while executing fsck.xfs for /dev/shm/root
[ OK ]
* Checking file systems... fsck 1.40.8 (13-Mar-2008)
fsck: cannot check /dev/ubd0: fsck.xfs not found
[ OK ]
* Mounting local filesystems... [ OK ]
* Activating swapfile swap... [ OK ]
* Checking minimum space in /tmp... [ OK ]
* Configuring network interfaces... modprobe: FATAL: Could not load /lib/modules/2.6.22-rc5/modules.dep: No such file or directory
modprobe: FATAL: Could not load /lib/modules/2.6.22-rc5/modules.dep: No such file or directory
modprobe: FATAL: Could not load /lib/modules/2.6.22-rc5/modules.dep: No such file or directory
modprobe: FATAL: Could not load /lib/modules/2.6.22-rc5/modules.dep: No such file or directory
modprobe: FATAL: Could not load /lib/modules/2.6.22-rc5/modules.dep: No such file or directory
「Couldnt get a file descriptor referring to the console
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[fail]」
のところ以外は完成だと思います。
ここはどおにかしてみます。
たいして支障はないのかなぁと勝手に考えていますが。。。
とにかく本当にありがとうございました。
オフライン
すみません。やはり
Couldnt get a file descriptor referring to the console
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[42949374.150000] line_ioctl: tty0: ioctl KDGKBTYPE called
[fail]
この部分のエラーが解決できません。
教えてくださったように「コンソールに接続するためのファイル識別子が取得できない」
というエラーなのですが、どこかのファイルを操作する必要があるんですよね?
できればアドバイスいただきたいです。
オフライン