Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
User Mode Linux afficionados out there
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
galahad7
n00b
n00b


Joined: 18 Mar 2003
Posts: 50

PostPosted: Tue Mar 25, 2003 1:31 am    Post subject: User Mode Linux afficionados out there Reply with quote

Hi All,

I've attempted to set up User Mode Linux as per the guide. I followed it exactly (twice) to make sure.
Well, its booting up in single user mode with a readonly filesystem. I ain't too pleased about that - its such a hot idea; I want to use it on our Internet servers.

If anyone can cast an eye over this - would be fantastic - here is the output of the UML boot

<snip>
* Regenerating GNU info directory index...
* Processed 4 info files.
/usr/bin/gcc-config: line 116: return: can only `return' from a function or sourced script
python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
</snip>

If it helps, here is the full text I get when running UML as per the guide
<snip>
Checking for the skas3 patch in the host...not found
Checking for /proc/mm...not found
tracing thread pid = 170
Linux version 2.4.20-1um (root@general.shine.co.nz) (gcc version 3.2.2) #4 Mon Mar 24 12:56:23 Local time zone must be set--see zic manu
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: ubd0=root_fs ubd1=swap_fs root=/dev/ubd0
Calibrating delay loop... 1588.61 BogoMIPS
Memory: 29272k available
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 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 that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Diskquotas version dquot_6.4.0 initialized
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x0
JFFS version 1.0, (C) 1999, 2000 Axis Communications AB
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
SCSI subsystem driver Revision: 1.00
scsi0 : scsi_debug, Version: 0.61 (20020815), num_devs=1, dev_size_mb=8, opts=0x0
Vendor: Linux Model: scsi_debug Rev: 0004
Type: Direct-Access ANSI SCSI revision: 03
blkmtd: error, missing `device' name
Initializing software serial port version 1
mconsole (version 2) initialized on /root/.uml/RCwmWe/mconsole
Partition check:
ubda: unknown partition table
ubdb: unknown partition table
Initializing stdio console driver
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (ext2 filesystem) readonly.
init-2.05b# df
df: cannot read table of mounted filesystems: No such file or directory
</snip>

Thanks again

Stephen
Back to top
View user's profile Send private message
Kap
n00b
n00b


Joined: 29 Aug 2002
Posts: 23
Location: Lima, Peru

PostPosted: Wed Mar 26, 2003 4:00 am    Post subject: Reply with quote

Can you elaborate a little on what you've already done?

have you installed gentoo under UML, or created an already installed filesystem?

your output seems to me like the kernel has finished booting but hasn't run any startup script. that's why it's readonly

maybe it's executing bash instead of init ? what command line are you using to invoke it?
Back to top
View user's profile Send private message
galahad7
n00b
n00b


Joined: 18 Mar 2003
Posts: 50

PostPosted: Fri Mar 28, 2003 1:00 pm    Post subject: What I've done Reply with quote

Hi Kap

Thanks for your reply. It has taken me a couple of days to get back to you. I had to install a server urgently for a customer - an all nighter and then last night I hit the sack early to recover. HTH.

Re the UML post
1. Host install is gentoo 1.4rc3 and I used the standard Gentoo kernel (I considered using the Gentoo UML kernel for the host, however figured it wasn't necessary)
2. I then downloaded the gentoo-usermodelinux kernel "emerge sys-kernel/usermode-sources"
3. Proceeded as per the Gentoo UML guide
http://www.gentoo.org/doc/en/uml.xml

I ran through the process twice and got the same result as shown in the first post. The only differences to the guide were
1. The guide said to "mount -o bind /usr/portage/packages /mnt/gentoo/usr/port age/packages" however this must refer to an earlier Gentoo version as that directory didn't exist on my system. In any case, it seemed non-essential (just there to save time and disk space I gather)
2. I used "web-rsync" instead of "emerge rsync" because of the firewall
3. When I ran "scripts/bootstrap.sh && emerge --usepkg system", I don't know what the significance of the message is
<snip>
* Regenerating GNU info directory index...
* Processed 4 info files.
/usr/bin/gcc-config: line 116: return: can only `return' from a function or sourced script
python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
</snip>

Your questions...
I created filesystem root_fs, with a reference to it being /dev/ubd/0 in fstab. The filesystem was created via "dd if=/dev/zero of=root_fs seek=1000 count=1 bs=1M" and I put ext2 on it. Then untarred the Gentoo UML file system that I had just previously created into the file.

Startup script will be standard Gentoo startup I assume since an emerge-websync was done into the file system built for Gentoo

Command to invoke is
linux ubd0=root_fs ubd1=swap_fs

I notice that when it boots up,
<snip>
Partition check:
ubda: unknown partition table
ubdb: unknown partition table
</snip>
Hmmm is that the problem

Thanks for your response Kap.
Hope you have a great day.
Back to top
View user's profile Send private message
Kap
n00b
n00b


Joined: 29 Aug 2002
Posts: 23
Location: Lima, Peru

PostPosted: Fri Mar 28, 2003 2:17 pm    Post subject: Reply with quote

Quote:
3. When I ran "scripts/bootstrap.sh && emerge --usepkg system", I don't know what the significance of the message is
<snip>
* Regenerating GNU info directory index...
* Processed 4 info files.
/usr/bin/gcc-config: line 116: return: can only `return' from a function or sourced script
python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
</snip>


I think this is your problem; the 'system' package includes (AFAICR) the 'init' executable and 'inittab' file. without this, the kernel doesn't know what to do after starting up.

mount your filesystem image and check for the existance of /sbin/init and /etc/inittab if they're missing you won't be able to start up.

Quote:
I notice that when it boots up,
<snip>
Partition check:
ubda: unknown partition table
ubdb: unknown partition table
</snip>
Hmmm is that the problem


No, this is normal since the filesystem images don't have partition tables. they're the content of a single partition, not a whole disk (more like /dev/hda1 than /dev/hda) it doesn't matter since the kernel mounts /dev/ubda, and doesn't try to find any /dev/ubda1 (that doesn't exist)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum