Skip to contentSkip to conversation

I met a question in building the root_fs of UML

uml-devel Qin An 2 participants 2 messages Jan 17, 2007 1 message not in the archive User-mode Linux (UML)

lore
Share & tools
lore

Qin An

author
#1 lore raw
In reply to a message not in the archive

Hi wstearns,

I now use the UML to do my jobs. However, it is my first time to use the system, and met a problem in building my own root_fs.

I downloaded the scripts in http://www.stearns.org/mkrootfs/ and run the commands

# ./mkrootfs

It run not very well but finially finished and got a file 'root_fs'. I booted the UML using the file.

# linux ubd0=root_fs

It was so pity that it didn't work and said:

Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

How to do next? Could you give me some advices?

Thanks a lot~

-------------
Qin An
2007-01-17

Research Center for Grid and Service Computing Institute of Computing Technology, Chinese Academy of Sciences P.O.Box 2704, 100080, Beijing, China
Tel: 86-10-62600974
Email: [email protected]

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
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Linux version 2.6.17 (root@RH9) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Thu Jan 11 21:48:37 CST 2007 Built 1 zonelists
Kernel command line: ubd0=root_fs root=98:0
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29876k available
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround /usr/include/linux/aio_abi.h not present during build
2.6 host AIO support not used - falling back to I/O thread
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 256 (order: -2, 1024 bytes)
TCP established hash table entries: 1024 (order: 2, 16384 bytes)
TCP bind hash table entries: 512 (order: 1, 10240 bytes)
TCP: Hash tables configured (established 1024 bind 512)
TCP reno registered
Checking host MADV_REMOVE support...OK
mconsole (version 2) initialized on /root/.uml/0eodH3/mconsole
Host TLS support detected
Detected host type: i386
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
Initializing software serial port version 1
ubda: unknown partition table
VFS: Mounted root (ext2 filesystem) readonly.
Warning: unable to open an initial console.

Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

EIP: 0073:[<ffffe410>] CPU: 0 Not tainted ESP: 007b:b7f6ffc0 EFLAGS: 00200246
Not tainted
EAX: 00000000 EBX: 000018b5 ECX: 00000013 EDX: 000018b5
ESI: 000018b1 EDI: 00000000 EBP: b7f6ffdc DS: 007b ES: 007b

0824bb70:  [<0806d9f7>] show_regs+0x9f/0xbb
0824bb9c:  [<0805b022>] panic_exit+0x25/0x3f
0824bbac:  [<0808095b>] notifier_call_chain+0x1c/0x3c
0824bbcc:  [<080809fb>] atomic_notifier_call_chain+0x15/0x1a
0824bbe0:  [<08072ffa>] panic+0x4b/0xd6
0824bbf8:  [<080564ac>] init+0x124/0x134
0824bc20:  [<08067540>] run_kernel_thread+0x4b/0x4f
0824bcdc:  [<0805b45f>] new_thread_handler+0xaa/0xf7
0824bd1c:  [<420275c8>] 0x420275c8

<3>Trying to free free IRQ2
Trying to free free IRQ3
Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...OK Checking advanced syscall emulation patch for ptrace...OK

Adding missing bash to the list.
Adding missing glibc to the list.
RPMS before deldups: glibc- bash- bdflush- dev- mount- SysVinit- net-tools- quota- findutils- tcp_wrappers- bind-utils- devfsd- iptables- sysklogd- vixie-cron- binutils- util-linux- gzip- iputils- passwd- sh-utils- fileutils- lynx- mc- tcpdump- strace- traceroute- less- man- info- passwd- diffutils- console-tools- rpm- vim-minimal- vim- vim-enhanced- telnet- netkit-ftp- ftp- openssh-clients- ssh- ircii- RPMS after deldups: glibc- bash- bdflush- dev- mount- SysVinit- net-tools- quota- findutils- tcp_wrappers- bind-utils- devfsd- iptables- sysklogd- vixie-cron- binutils- util-linux- gzip- iputils- passwd- sh-utils- fileutils- lynx- mc- tcpdump- strace- traceroute- less- man- info- diffutils- console-tools- rpm- vim-minimal- vim- vim-enhanced- telnet- netkit-ftp- ftp- openssh-clients- ssh- ircii- Add rpm dependencies.
Finished adding dependencies
There are 0 bytes (0 M) of space used by 0 rpms.
FS needs to be at least 1000.
FS needs to have at least 35 percent free additional free space= 0 M.
Using 1000 for the root filesystem.
Moving old root filesystem out of the way...
Creating "root_fs" as an empty file...
Making a file system in it...
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
128000 inodes, 256000 blocks
12800 blocks (5.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
16000 inodes per group
Superblock backups stored on blocks:

	32768, 98304, 163840, 229376

Writing inode tables: 0/81/82/83/84/85/86/87/8done Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. Mounting it on mnt
Install the rpms...
Done!
Copying bin/true over sbin/hwclock...
Making one line changes to configuration files..

+  etc/fstab                               /dev/ubd/0	/		ext2	defaults 1 1                   
+  etc/fstab                               /proc		/proc		proc	defaults                       
+  etc/fstab                               devpts		/dev/pts	devpts	mode=0622 0 0             
+  etc/fstab                               /dev/ubd/1	none		swap	sw                          
+  etc/hosts                               127.0.0.1		localhost                              
+  etc/issue                               Unauthorized access to this system is strictly prohibited.
+  etc/issue.net                           Unauthorized access to this system is strictly prohibited.
+  etc/pam.d/ftp                           #%PAM-1.0                                         
+  etc/pam.d/ftp                           auth		required	pam_unix_auth.so                   
+  etc/pam.d/ftp                           account	required	pam_unix_acct.so                 
+  etc/pam.d/ftp                           password	required	pam_unix_passwd.so              
+  etc/pam.d/ftp                           session	required	pam_unix_session.so              
+  etc/pam.d/other                         #%PAM-1.0                                         
+  etc/pam.d/other                         auth		required	pam_unix_auth.so                   
+  etc/pam.d/other                         account	required	pam_unix_acct.so                 
+  etc/pam.d/other                         password	required	pam_unix_passwd.so              
+  etc/pam.d/other                         session	required	pam_unix_session.so              
+  etc/securetty                           cua0                                              
+  etc/securetty                           tty0                                              
+  etc/securetty                           ttys/0                                            
+  etc/securetty                           ttys/1                                            
+  etc/securetty                           ttys/2                                            
+  etc/sysconfig/keyboard                  KEYTABLE=                                         
+  etc/sysconfig/network                   NETWORKING=yes                                    
+  etc/sysconfig/network                   FORWARD_IPV4=false                                
+  etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0                                       
+  etc/sysconfig/network-scripts/ifcfg-eth0ONBOOT=YES                                        
Making /dev/ubd/0...1...2...3...4...5...6...7...Done!
Adding accounts and passwords.
+  root/.Xclients                          #!/bin/bash                                       
+  root/.Xclients                          xterm &                                           
+  home/user/.Xclients                     #!/bin/bash                                       
+  home/user/.Xclients                     xterm &                                           
+  home/guest/.Xclients                    #!/bin/bash                                       
+  home/guest/.Xclients                    xterm &                                           
Set some basic networking information. The SysV init script will replace these values if called with a "reload" parameter.
+  etc/hosts                               192.168.0.101	caldera24	caldera24.goober.org      
+  etc/hosts                               192.168.0.102	caldera311	caldera311.goober.org    
+  etc/hosts                               192.168.0.111	conectiva51	connectiva51.goober.org 
+  etc/hosts                               192.168.0.112	conectiva60	connectiva60.goober.org 
+  etc/hosts                               192.168.0.113	conectiva70	connectiva70.goober.org 
+  etc/hosts                               192.168.0.161	fedora2		fedora2.goober.org         
+  etc/hosts                               192.168.0.121	immunix62	immunix62.goober.org      
+  etc/hosts                               192.168.0.131	mandrake71	mandrake71.goober.org    
+  etc/hosts                               192.168.0.132	mandrake80	mandrake80.goober.org    
+  etc/hosts                               192.168.0.133	mandrake81	mandrake81.goober.org    
+  etc/hosts                               192.168.0.134	mandrake82	mandrake82.goober.org    
+  etc/hosts                               192.168.0.141	redhat62	redhat62.goober.org        
+  etc/hosts                               192.168.0.142	redhat70	redhat70.goober.org        
+  etc/hosts                               192.168.0.143	redhat71	redhat71.goober.org        
+  etc/hosts                               192.168.0.144	redhat72	redhat72.goober.org        
+  etc/hosts                               192.168.0.145	redhatskipjack	redhatskipjack.goober.org
+  etc/hosts                               192.168.0.146	redhat73	redhat73.goober.org        
+  etc/hosts                               192.168.0.148	redhat9		redhat9.goober.org         
+  etc/hosts                               192.168.0.151	turbolinux7	turbolinux7.goober.org  
+  etc/hosts                               192.168.0.250	uml-test	uml-test.goober.org        
+  etc/hosts                               192.168.0.254	router xdisplay                     
+  etc/resolv.conf                         nameserver 192.168.0.254                          
+  etc/sysconfig/network                   HOSTNAME=redhat62.goober.org                      
+  etc/sysconfig/network-scripts/ifcfg-eth0IPADDR=192.168.0.141                              
+  etc/sysconfig/network-scripts/ifcfg-eth0GATEWAY=192.168.0.254                             
+  etc/sysconfig/network-scripts/ifcfg-eth0NETMASK=255.255.255.0                             
+  etc/sysconfig/network-scripts/ifcfg-eth0NETWORK=192.168.0.0                               
+  etc/sysconfig/network-scripts/ifcfg-eth0BROADCAST=192.168.0.255                           
+  etc/sysconfig/static-routes             any host 192.168.0.254 dev eth0                   
+  etc/sysconfig/static-routes             any net 0.0.0.0 netmask 0.0.0.0 gw 192.168.0.254  

Enabling services: Done!
Disabling services: Done!
�ļ�ϵͳ 1K-�� ���� ���� ����% ���ص�
/root_fs 1007896 136 956560 1% /mnt
In /
Unmounting /mnt/proc
Unmounting //mnt
Unmounting //rpmdeptree

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 13 lines · Qin An

Hi wstearns,

I now use the UML to do my jobs. However, it is my first time to use the system, and met a problem in building my own root_fs.

I downloaded the scripts in http://www.stearns.org/mkrootfs/ and run the commands

# ./mkrootfs

It run not very well but finially finished and got a file 'root_fs'. I booted the UML using the file.

Quoted 6 lines
# linux ubd0=root_fs

It was so pity that it didn't work and said:

Kernel panic - not syncing: No init found.  Try passing init= option to

kernel.

Then the root_fs built wasn't correct. Loop mount it and look to see what happened.

We cannot diagnose why without the error messages, but I'm not sure whether mkrootfs still works well, and I cannot say whether UML boots at all there (there are buggy releases out there).

Quoted 1 line

How to do next? Could you give me some advices?

Download a pre-built root_fs from here:
http://uml.nagafix.co.uk/
Or follow the installation log of your chosen root_fs and follow it.

Quoted 11 lines

Thanks a lot~

-------------
Qin An
2007-01-17

Research Center for Grid and Service Computing Institute of Computing Technology, Chinese Academy of Sciences P.O.Box 2704, 100080, Beijing, China
Tel: 86-10-62600974
Email: [email protected]

Signature · 16 lines
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel