如何从命令行正确启动Ubuntu用户模式Linux


8

我已经为UML内核安装了软件包user-mode-linux。我使用以下命令构建了用户模式linux文件系统, 甚至从以下网址尝试了Ubuntu文件系统:http : //fs.devloop.org.uk/

但是看来我无法正确启动Ubuntu文件系统。即使Fedora和Suse文件系统都可以工作并显示提示。

我已经使用各种方法启动了系统,但似乎无法获得登录提示。我当前的命令行是:linux ubda =。/ Ubuntu-MaverickMeerkat-i386-root_fs mem = 512M umid = maverick con0 = xterm con1 = xterm con = null

但是,这导致我出现错误,并且没有提示访问系统。

Initializing cgroup subsys cpuset
Linux version 2.6.35.1 (root@rothera) (gcc version 4.4.5 20100813 (Linaro prerelease) [release 2010.08-0] (Ubuntu/Linaro 4.4.4-8ubuntu2) ) #2 Mon Aug 16 10:45:47 UTC 2010 ()
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 135115
Kernel command line: ubda=./Ubuntu-MaverickMeerkat-i386-root_fs mem=512M con0=xterm con1=xterm con=null root=98:0
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
allocated 2723580 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 507252k available
SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
    RCU-based detection of stalled CPUs is disabled.
    Verbose stalled-CPUs detection is disabled.
NR_IRQS:15
Calibrating delay loop... 3774.87 BogoMIPS (lpj=18874368)
pid_max: default: 32768 minimum: 301
Security Framework initialized
AppArmor: AppArmor initialized
Yama: becoming mindful.
Mount-cache hash table entries: 512
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Checking for host processor cmov support...Yes
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Using 2.6 host AIO
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
Switching to clocksource itimer
AppArmor: AppArmor Filesystem Enabled
NET: Registered protocol family 2
IP route cache hash table entries: 8192 (order: 3, 32768 bytes)
TCP established hash table entries: 32768 (order: 6, 262144 bytes)
TCP bind hash table entries: 32768 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 32768 bind 32768)
TCP reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
mconsole (version 2) initialized on /home/andrew/.uml/maverick/mconsole
Checking host MADV_REMOVE support...OK
Mapper v0.1
mmapper_init - find_iomem failed
UML Watchdog Timer
Host TLS support detected
Detected host type: i386 (GDT indexes 6 to 9)
audit: initializing netlink socket (disabled)
type=2000 audit(1302186437.301:1): initialized
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFS: nTxBlock = 3962, nTxLock = 31703
SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
SGI XFS Quota Management subsystem
Btrfs loaded
msgmni has been set to 990
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered (default)
SoftDog: cannot register miscdev on minor=130 (err=-16)
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: unknown partition table
registered taskstats version 1
EXT3-fs (ubda): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (ubda): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (ubda): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 98:0.
modprobe: FATAL: Could not load /lib/modules/2.6.35.1/modules.dep: No such file or directory

init: ureadahead main process (756) terminated with status 5
init: console-setup main process (777) terminated with status 1
udevd[787]: failed to create queue file: No such file or directory

udevd[787]: error creating queue file

init: udev main process (787) terminated with status 1
init: udev main process ended, respawning
init: udevmonitor main process (789) terminated with status 2
udevadm[1406]: error sending message: Connection refused

modprobe: FATAL: Could not load /lib/modules/2.6.35.1/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.35.1/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.35.1/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.35.1/modules.dep: No such file or directory

line_ioctl: tty7: unknown ioctl: 0x4b70
line_ioctl: tty7: unknown ioctl: 0x5602
line_ioctl: tty7: unknown ioctl: 0x5603
line_ioctl: tty7: unknown ioctl: 0x4b3a
line_ioctl: tty7: unknown ioctl: 0x5606
line_ioctl: tty1: unknown ioctl: 0x4b3a
mountall: Disconnected from Plymouth
init: plymouth main process (757) killed by SEGV signal
init: plymouth-splash main process (1407) terminated with status 2

Answers:


4

我将这些文件系统和IIRC制成,后来的Ubuntu文件系统在与UML一起使用时可能会出现问题,因为控制tty vs plymouth之类的东西。

我已经尝试过了,可以使用以下命令引导到shell:

./kernel32-2.6.37.5 ubda=Ubuntu-MaverickMeerkat-i386-root_fs mem=256m root=/dev/ubda init=/bin/bash

从那里,您可能可以找出问题所在,或者可以尝试以单用户模式启动,等等。请发送您的解决方案,以便如有需要,我可以更新文件系统。


我尝试过使用单用户模式的“ S”参数进行引导,并删除了init = / bin / bash,但这最终以相同的冻结告终。
Andrew Stern

1
我尝试使用init = / bin / bash选项启动,然后执行exec / sbin / init来启动其余的启动过程。这也最终处于冻结状态。
Andrew Stern

1
要轻松冻结,请在命令行中添加umid选项。就像:“ linux ubda = Ubuntu-MaverickMeerkat-i386-root_fs mem = 256M root = / dev / ubda umid = maverick”。现在在另一个外壳中启动“ uml_mconsole maverick”。现在,您可以从uml_mconsole提示符下键入halt以关闭UML实例。
Andrew Stern

1
我设法了解了冻结情况。这些步骤是:使用init = / bin / bash启动UML。在提示符下,我执行getty命令'getty -8 -n -l / bin / bash 38400 tty2&'。这将在#2上启动一个虚拟控制台。现在我执行'exec / sbin / init'。这将启动系统。请注意,即使所有其他控制台窗口都没有响应,Virtual Console#2仍然会提示并可用。
安德鲁·斯特恩

2

getty -8 -n -l /bin/bash 38400 tty2 & 确实起到了很大的作用,经过一番戳后,我发现所有“启动时”的东西都没有在启动时运行!

'start tty1'

是启动外壳程序所需的全部,tty1而且添加rw到内核​​标志似乎还提供了更多帮助!

看起来它所需要的只是此命令,它可以完美地工作:

./vmlinux ubda=/dev/shm/vm_1.ext3 mem=256M umid=test rw

谢谢-“ rw”才是让我前进的动力,没有弄乱getty等,等等……
Greg

请始终在上游报告您的更改(我现在已完成)
totaam 2013年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.