benlan 发表于 2005-5-20 09:30:45

玩过user mode linux的朋友看过来

我使用kernel 2.6.10源码安装uml, 编译成功了linux可执行文件,下载了rh7.2full文件系统,执行以后的结果为:
引用:

我执行
# ./vmlinux mem=64M ubd0=root_fs.rh-7.2-full.cow,root_fs.rh-7.2-full.pristine.20020312 ubd1=swap




Checking for the skas3 patch in the host...not found
Checking for /proc/mm...not found
Checking PROT_EXEC mmap in /tmp...OK
Linux version 2.6.10 ([email protected]) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #2 Thu May 19 10:49:31 CST 2005
Built 1 zonelists
Kernel command line: mem=64M ubd0=root_fs.rh-7.2-full.cow,root_fs.rh-7.2-full.pristine.20020312 ubd1=swap root=98:0
PID hash table entries: 512 (order: 9, 8192 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 62080k available
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
NET: Registered protocol family 16
mconsole (version 2) initialized on /root/.uml/UvUwFO/mconsole
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 8
NET: Registered protocol family 20
Initializing stdio console driver
tracing thread pid = 10027

到这里就没有了,看example应该到***********************************

Initializing stdio console driver
Initializing software serial port version 0
serial line 0 assigned pty /dev/ptyp2
ssl receive thread is pid 2444
devfs: v0.96 (20000430) Richard Gooch ([email protected])
devfs: devfs_debug: 0x0
devfs: boot_options: 0x0
VFS: Mounted root (ext2 filesystem) readonly.
Mounted devfs on /dev
INIT: version 2.76 booting
/etc/rc.d/rc.S: Testing filesystem status: Read-only file system
Parallelizing fsck version 1.15 (18-Jul-1999)
/dev/ubd/0: clean, 29389/131072 files, 389992/524288 blocks
Remounting root device with read-write enabled.
/dev/ubd/0 on / type ext2 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /proc type proc (rw)
Updating module dependencies for Linux 2.3.99-pre8-1um:
can't locate module slip
can't locate module ppp
can't locate module bsd_comp
Starting PCMCIA services: module directory /lib/modules/2.3.99-pre8-1um/pcmcia \
not found.
INIT: Entering runlevel: 3
Going multiuser...
Configuring umn as 192.168.0.253...
Activating IPv4 packet forwarding...
Starting /sbin/rpc.portmap...
Mounting remote file systems...
Starting daemons: syslogd klogd inetd lpd mountd nfsd
Starting sendmail daemon (/usr/sbin/sendmail -bd -q15m)...
451 /etc/sendmail.cf: line 0: cannot open: No such file or directory
Loading the iBCS module...
insmod: iBCS: no module by that name found
/var/lib/apache/sbin/apachectl start: httpd started
Starting Samba...
Setting time zone...done


Welcome to Linux 2.3.99-pre8-1um.

darkstar login: root
Password:

我的下面的这段咋么没了??/
我从********************8后面的那段没出来,玩过的大大帮我分析看咋么回事

Kuye 发表于 2005-5-20 15:09:05

没搞过,看起来比较酷。

benlan 发表于 2005-5-22 02:52:34

经过我的辛勤劳动,终于搞定,并总结出一种最简单的安装user mode linux的方法,一般的user mode linux扫盲可以去他的网站看看,反正uml现在用的很多,已经用来做为开发内核的工具了。
我只说一种最简单的uml安装方法,我自己总结出来的:
编译内核是就是 make menuconfig=um ,这一步以后,会在当前目录下产生个配置文件,也就是.config文件,这一步可以不执行,直接用
http://www.linode.com/forums/viewtopic.php?p=2895#2895
这里的.config文件
然后make linux ARCH=um 编译出linux可执行文件
然后下个文件系统下来,如root_fs.rh6......bz2 root_fs_debian...bz2 等,在下载页的文件系统下载下来,然后bunzip2

最后一步的执行 ./linux ubd0=root_fs.................

linky_fan 发表于 2005-5-23 19:05:08

不知道非官方的内核对它的支持咋样 :arrow:

benlan 发表于 2005-5-24 11:12:22

经过我的测试 kernel 2.6.10 和2.6.11自带了uml的补丁,编译没问题
试过几个版本,2.4.20-8 ,2.4.0 , 2.6.0 ,手工打了uml的相应补丁,都没有编译成功,
推荐使用kernel 2.6.10,可能玩起来容易点

linky_fan 发表于 2005-5-24 14:19:09


经过我的测试 kernel 2.6.10 和2.6.11自带了uml的补丁,编译没问题
试过几个版本,2.4.20-8 ,2.4.0 , 2.6.0 ,手工打了uml的相应补丁,都没有编译成功,
推荐使用kernel 2.6.10,可能玩起来容易点

thx :P
页: [1]
查看完整版本: 玩过user mode linux的朋友看过来