对于我的UML (user mode linux)
,我构建了一个基于 Debian 的根文件系统并添加了一个用户“uml”。但是当我尝试登录 UML 时,它没有被接受:
<snip>
(none) login: uml
Ubuntu 5.10 "Breezy Badger" (none) tty0
(none) login:
</snip>
我的 UML 是从 Linux 2.6.27 源代码树构建的。root-fs 被创建为: debootstrap --arch i386 breezy <my-dir>
创建后root-fs
,我 chroot 进入它并执行“adduser uml”。但是为什么UML不接受用户名“uml”呢?
顺便说一句,我也尝试过“root”,但也没有被接受。
谢谢。
更新:这是我在登录会话期间的完整日志:
./linux mem=128M ubda=/nobackup/hxu2/uml/debian-2
Locating the bottom of the address space ... 0x0
Locating the top of the address space ... 0xffffd000
Core dump limits :
soft - 104857600
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
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
[ 0.000000] Linux version 2.6.27 (hxu2@sjc-ads-445) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)) #1 Sat Jan 26 21:41:07 PST 2013
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: mem=128M ubda=/nobackup/hxu2/uml/debian-2 root=98:0
[ 0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[42949372.960000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[42949372.960000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[42949372.960000] Memory: 126832k available
[42949372.960000] Calibrating delay loop... 3774.87 BogoMIPS (lpj=18874368)
[42949373.250000] Mount-cache hash table entries: 512
[42949373.250000] Checking for host processor cmov support...Yes
[42949373.250000] Checking that host ptys support output SIGIO...Yes
[42949373.250000] Checking that host ptys support SIGIO on close...No, enabling workaround
[42949373.250000] net_namespace: 288 bytes
[42949373.250000] /usr/include/linux/aio_abi.h not present during build
[42949373.250000] 2.6 host AIO support not used - falling back to I/O thread
[42949373.250000] NET: Registered protocol family 16
[42949373.280000] NET: Registered protocol family 2
[42949373.440000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[42949373.440000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[42949373.440000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[42949373.440000] TCP: Hash tables configured (established 4096 bind 4096)
[42949373.440000] TCP reno registered
[42949373.510000] NET: Registered protocol family 1
[42949373.510000] Checking host MADV_REMOVE support...<3>MADV_REMOVE failed, err = -22
[42949373.510000] Can't release memory to the host - memory hotplug won't be supported
[42949373.510000] mconsole (version 2) initialized on /users/hxu2/.uml/DytWds/mconsole
[42949373.510000] Host TLS support detected
[42949373.510000] Detected host type: x86_64 (GDT indexes 12 to 15)
[42949373.510000] VFS: Disk quotas dquot_6.5.1
[42949373.510000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[42949373.510000] msgmni has been set to 248
[42949373.510000] io scheduler noop registered
[42949373.510000] io scheduler anticipatory registered (default)
[42949373.510000] io scheduler deadline registered
[42949373.510000] io scheduler cfq registered
[42949373.510000] TCP cubic registered
[42949373.510000] NET: Registered protocol family 17
[42949373.510000] Initialized stdio console driver
[42949373.510000] Console initialized on /dev/tty0
[42949373.510000] console [tty0] enabled
[42949373.510000] Initializing software serial port version 1
[42949373.510000] console [mc-1] enabled
[42949373.510000] ubda: unknown partition table
[42949373.510000] kjournald starting. Commit interval 5 seconds
[42949373.510000] EXT3-fs: mounted filesystem with ordered data mode.
[42949373.510000] VFS: Mounted root (ext3 filesystem) readonly.
* version 2.86 booting
* Entering runlevel: 2
Ubuntu 5.10 "Breezy Badger" (none) tty0
(none) login: uml
(none) login: root
df^H^H^H
* Id "1" respawning too fast: disabled for 5 minutes
* no more processes left in this runlevel
Ubuntu 5.10 "Breezy Badger" (none) tty0
(none) login: uml
Ubuntu 5.10 "Breezy Badger" (none) tty0
(none) login: uml
(none) login:
Login timed out after 60 seconds.
更新:我尝试与答案相同,并收到此错误。注意我在 32 位 i386 中构建了 2.6.27 内核。
[42949373.510000] VFS: Mounted root (ext3 filesystem) readonly.
modprobe: FATAL: Could not load /lib/modules/2.6.27/modules.dep: No such file or directory
INIT: version 2.88 booting
INIT: Entering runlevel: 2
[42949373.660000] Serial line 0 assigned device '/dev/pts/8'
INIT: Id "c0" respawning too fast: disabled for 5 minutes
Debian GNU/Linux 6.0 (none) tty0
(none) login: root
Login incorrect