# UML kernel 3.8

## Pes88

Hi!

I am trying to run Gentoo in UML, the kernel is started correctly  but I don t get any login terminal. 

I use a vanilla kernel dowload from the kernel.org web site, and i create the root file system from a stage3. 

When I start the kernel with this comand :

```

./linux  ubda=uml.root ubdb=swap_fs  mem=256MB 

```

I  get the following messages : 

```

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 2748416 bytes to physical memory to account for exec-shield gap

Initializing cgroup subsys cpuset

Initializing cgroup subsys cpu

Linux version 3.8.13 (giuseppe@dex) (gcc version 4.6.3 (Gentoo 4.6.3 p1.13, pie-0.5.2) ) #5 Tue May 21 13:45:20 CEST 2013

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65301

Kernel command line: ubda=uml.root ubdb=swap_fs mem=256MB root=98:0

PID hash table entries: 1024 (order: 1, 8192 bytes)

Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)

Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)

Memory: 250600k available

NR_IRQS:15

Calibrating delay loop... 4574.41 BogoMIPS (lpj=22872064)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 256

Initializing cgroup subsys cpuacct

Initializing cgroup subsys devices

Initializing cgroup subsys freezer

Initializing cgroup subsys blkio

Checking that host ptys support output SIGIO...Yes

Checking that host ptys support SIGIO on close...No, enabling workaround

devtmpfs: initialized

Using 2.6 host AIO

NET: Registered protocol family 16

bio: create slab <bio-0> at 0

Switching to clocksource itimer

NET: Registered protocol family 2

TCP established hash table entries: 2048 (order: 3, 32768 bytes)

TCP bind hash table entries: 2048 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP: reno registered

UDP hash table entries: 256 (order: 1, 8192 bytes)

UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)

NET: Registered protocol family 1

mconsole (version 2) initialized on /home/giuseppe/.uml/6xBDEC/mconsole

Checking host MADV_REMOVE support...OK

VFS: Disk quotas dquot_6.5.2

Dquot-cache hash table entries: 512 (order 0, 4096 bytes)

msgmni has been set to 489

io scheduler noop registered

io scheduler deadline registered (default)

TCP: cubic registered

NET: Registered protocol family 17

Initialized stdio console driver

Console initialized on /dev/tty0

console [tty0] enabled

Initializing software serial port version 1

console [mc-1] enabled

 ubda: ubda1

 ubdb: ubdb1

EXT4-fs (ubda): couldn't mount as ext3 due to feature incompatibilities

EXT4-fs (ubda): couldn't mount as ext2 due to feature incompatibilities

EXT4-fs (ubda): mounted filesystem with ordered data mode. Opts: (null)

VFS: Mounted root (ext4 filesystem) readonly on device 98:0.

devtmpfs: mounted

INIT: version 2.88 booting

EXT4-fs error (device ubda): ext4_lookup:1416: inode #60: comm init: deleted inode referenced: 27016

   OpenRC 0.11.8 is starting up Gentoo Linux (x86_64)

 * Mounting /proc ...

 [ ok ]

rm: cannot remove '/run/openrc': Read-only file system

 * Mounting /run ...

 * /run/openrc: creating directory

 * /run/lock: creating directory

 * /run/lock: correcting owner

 * Caching service dependencies ...

Service `netmount' needs non existent service `net'

Service `pydoc-2.7' needs non existent service `net'

Service `pydoc-3.2' needs non existent service `net'

Service `sshd' needs non existent service `net'

 [ ok ]

 * Using /dev mounted from kernel ...

 [ ok ]

 * Mounting /dev/pts ...

 [ ok ]

 * Mounting /dev/shm ...

 [ ok ]

 * Mounting /sys ...

 [ ok ]

 * Mounting cgroup filesystem ...

 [ ok ]

 * Starting udev ...

 [ ok ]

 * Generating a rule to create a /dev/root symlink ...

 [ ok ]

 * Populating /dev with existing devices through uevents ...

 [ ok ]

 * Waiting for uevents to be processed ...

 [ ok ]

 * Autoloaded 0 module(s)

 * Checking local filesystems  ...

 [ ok ]

 * Setting hostname to localhost ...

 [ ok ]

 * Remounting root filesystem read/write ...

 [ ok ]

 * Remounting filesystems ...

 [ ok ]

 * Updating /etc/mtab ...

 [ ok ]

 * Activating swap devices ...

swapon: /dev/ubdb1: read swap header failed: Invalid argument

 [ ok ]

 * Mounting local filesystems ...

 [ ok ]

 * Bringing up interface lo

 *   Caching network module dependencies

 *   127.0.0.1/8 ...

 [ ok ]

 *   Adding routes

 *     127.0.0.0/8 via 127.0.0.1 ...

 [ ok ]

 * Activating additional swap space ...

swapon: /dev/ubdb1: read swap header failed: Invalid argument

 [ ok ]

 * Configuring kernel parameters ...

 [ ok ]

 * setting up tmpfiles.d entries ...

 [ ok ]

rm: cannot remove '/var/lib/misc/random-seed': Input/output error

INIT: Entering runlevel: 3

 * Starting local

 [ ok ]

INIT: Id "c5" respawning too fast: disabled for 5 minutes

INIT: Id "c4" respawning too fast: disabled for 5 minutes

INIT: Id "c3" respawning too fast: disabled for 5 minutes

INIT: Id "c2" respawning too fast: disabled for 5 minutes

INIT: Id "c6" respawning too fast: disabled for 5 minutes

INIT: Id "c1" respawning too fast: disabled for 5 minutes

```

What's the cause of these messages ? :

```

INIT: Id "c5" respawning too fast: disabled for 5 minutes

INIT: Id "c4" respawning too fast: disabled for 5 minutes

INIT: Id "c3" respawning too fast: disabled for 5 minutes

INIT: Id "c2" respawning too fast: disabled for 5 minutes

INIT: Id "c6" respawning too fast: disabled for 5 minutes

INIT: Id "c1" respawning too fast: disabled for 5 minutes

```

Can be a init/open RC problem rather than kernel misconfiguration?

----------

## Pes88

I solve it!  :Very Happy: 

The problem was that UML connects stdin, stdout and stderr to tty0, while Gentoo starts agetty on only tty{1-6}. So I modified the innitab file as follows and it worked out. : D

```

# TERMINALS

c0:12345:respawn:/sbin/agetty 38400 tty0 linux

#c1:2345:respawn:/sbin/agetty 38400 tty1 linux

#c2:2345:respawn:/sbin/agetty 38400 tty2 linux

#c3:2345:respawn:/sbin/agetty 38400 tty3 linux

#c4:2345:respawn:/sbin/agetty 38400 tty4 linux

#c5:2345:respawn:/sbin/agetty 38400 tty5 linux

#c6:2345:respawn:/sbin/agetty 38400 tty6 linux

```

For more info see : http://www.jjoseph.org/linux_work/user_mode_linux_and_gentoo

----------

