首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法登录用户模式Linux (UML)

无法登录用户模式Linux (UML)
EN

Stack Overflow用户
提问于 2013-01-29 18:49:39
回答 2查看 1.6K关注 0票数 1

对于我的UML (user mode linux),我构建了一个基于Debian的根文件系统,并添加了一个用户"uml“。但是,当我试图登录UML时,它没有被接受:

代码语言:javascript
复制
<snip>
(none) login: uml

Ubuntu 5.10 "Breezy Badger" (none) tty0

(none) login:
</snip>

我的UML是从Linux2.6.27源代码树构建的。根-fs创建为:debootstrap --arch i386 breezy <my-dir>

在创建root-fs之后,我对其进行了修改,并执行了"adduser“操作。但是为什么UML不接受用户名"uml“呢?

顺便说一句,我也试过“根”,但也不被接受。

谢谢。

更新:这是我在登录会话中拥有的完整日志:

代码语言:javascript
复制
./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内核。

代码语言:javascript
复制
[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
EN

回答 2

Stack Overflow用户

发布于 2013-01-29 19:25:41

我已经编辑了我的答案!

,这就是我所做的,它对我有用!

构建内核

代码语言:javascript
复制
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.gz

# bunzip2 linux-2.6.39.tar.gz

# make ARCH=um defconfig

# make ARCH=um

下载root-fs

代码语言:javascript
复制
# wget http://fs.devloop.org.uk/filesystems/Debian-Squeeze/Debian-Squeeze-AMD64-root_fs.bz2

# bunzip2 Debian-Squeeze-AMD64-root_fs.bz2

启动

代码语言:javascript
复制
./vmlinux ubda=/root/Debian-Squeeze-AMD64-root_fs mem=128m umid=debian
...
...
...
Debian GNU/Linux 6.0 (none) tty0

(none) login: root
Last login: Wed Jan 30 19:57:33 UTC 2013 on tty0
Linux (none) 2.6.39 #1 Wed Jan 30 11:49:25 PST 2013 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@(none):~# whoami
root
票数 0
EN

Stack Overflow用户

发布于 2013-07-18 22:31:04

我刚发了一个可能相关的question。然后跌跌撞撞地找到了答案,这至少对我有用。

您运行的是哪个主机版本?我发现,在2.6.18-194.8.1.el5作为主机时,UML的这些版本确实可以工作,而对于2.6.9-89.0.11的194.8.1.el5主机则不起作用。

为什么?我不知道:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14590066

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档