DomainU启动时出现的问题及其解决
从jailtime下载了一个Debian4.0(64位)的镜像启动后出现错误,启动过程如下:
Using config file "/home/cs/xen/cfg/pv.deb.4-0.64.cfg".
Started domain cs.pv.deb.4-0.64
Calibrating delay using timer specific routine.. 3193.14 BogoMIPS (lpj=15965730)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 256
, L1 D cache: 32K
CPU: Physical Processor ID: 1
CPU: Processor Core ID: 1
SMP alternatives: switching to UP code
Brought up 1 CPUs
migration_cost=0
checking if image is initramfs... it is
Freeing initrd memory: 3960k freed
NET: Registered protocol family 16
SMP alternatives: switching to SMP code
Initializing CPU#1
migration_cost=11444
Brought up 2 CPUs
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
PCI: System does not support PCI
PCI: System does not support PCI
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
IA-32 Microcode Update Driver: v1.14a-xen
audit: initializing netlink socket (disabled)
audit(1230455412.105:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
rtc: IRQ 8 is not free.
Non-volatile memory driver v1.2
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
Xen virtual console successfully installed as xvc0
Event-channel device installed.
netfront: Initialising virtual ethernet driver.
Console: switching to colour frame buffer device 100x37
input: Xen Virtual Keyboard as /class/input/input0
input: Xen Virtual Pointer as /class/input/input1
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
NET: Registered protocol family 1
NET: Registered protocol family 17
xen-vbd: registered block device major 8
blkfront: sda1: barriers enabled
XENBUS: Device with no driver: device/console/0
IP-Config: Complete:
device=eth0, addr=192.168.205.49, mask=255.255.255.0, gw=192.168.205.1,
host=192.168.205.49, domain=, nis-domain=(none),
bootserver=127.0.255.255, rootserver=127.0.255.255, rootpath=
Freeing unused kernel memory: 172k freed
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v3.0
SCSI subsystem initialized
register_blkdev: cannot get major 8 for sd
Adaptec aacraid driver (1.1-5[2409]-mh2)
ext3: No journal on filesystem on sda1
Kernel panic - not syncing: Attempted to kill init!
奇怪的是之前同样从jailtime下了个Debian3.1(32位)的镜像,可以正常使用。开始不知道怎么回事,以为是64位系统的缘故,于是下了个Debian4.0的64位的镜像,但还是出现了同样的问题。
上网搜了下,用命令tune2fs -j pv.deb.4-0.img(其中的-j选项可以“Add an ext3 journal to the filesystem”),输出:
tune2fs 1.39 (29-May-2006)
Creating journal inode: done
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
重新启动DomainU问题依旧;后来怀疑是镜像中的fstab的问题,于是挂载镜像,发现根文件夹对应的一行最后一个是0,于是将之改为1,重启后问题依旧;
最后怀疑是文件系统格式原因,把镜像重新解压后file了一下,原来是ext2格式!于是在fstab中把格式改为ext2但还是不行,最后不得不自己做了个镜像并格式化为ext3,这样就可以启动了,但启动过程还是出现了错误提示:
FATAL: Could not load /lib/modules/2.6.18.8-xen/modules.dep: No such file or directory
而且整个启动过程出现了不止一次,我试着把Domain0的/lib/modules/2.6.18.8-xen/文件夹拷贝到镜像中,再启动,终于OK了。
但最后还有个小问题:fdisk -l时提示:
Disk /dev/sda1 doesn't contain a valid partition table
后来发现之前可以正常启动的Debian3.1也有同样问题。
感觉整个就是磁盘格式的原因,ext2和ext3混了。后来又创建了ext2格式的镜像,把下载的磁盘镜像中的文件全部拷贝到其中后不能启动,问题和开始时一样,看来只有这一个方法了:自己建个ext3的镜像,把下载镜像的所有内容拷贝到其中,以及Domain0中/lib/modules/2.6.18.8-xen/modules.dep拷贝到镜像中,用自己的镜像启动。
下面是我的几个配置文件:
1. cat pv.deb.3-1.cfg:
kernel = "/boot/vmlinuz-2.6-xen"
ramdisk = "/boot/initrd-2.6.18.8-xen.img"
vcpus=2
memory = 512
name = "cs.pv.deb.3-1"
vif = [ '' ]
ip = "192.168.205.47"
netmask = "255.255.255.0"
gateway = "192.168.205.1"
#disk = ['file:/home/cs/xen/img/deb/pv.deb.3-1.img,sda1,w', 'file:/home/cs/xen/img/deb/debian.swap,sda2,w']
disk = ['file:/home/cs/xen/img/deb/pv.deb.3-1.img,sda1,w']
root = "/dev/sda1 ro"
#vfb = [ 'type=sdl' ]
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=47' ]
extra="xencons=xvc0"
2. cat pv.deb.4-0.cfg:
kernel = "/boot/vmlinuz-2.6-xen"
ramdisk = "/boot/initrd-2.6.18.8-xen.img"
vcpus=2
memory = 512
name = "cs.pv.deb.4-0"
vif = [ '' ]
ip = "192.168.205.48"
netmask = "255.255.255.0"
gateway = "192.168.205.1"
#disk = ['file:/home/cs/xen/img/deb/pv.deb.4-0.img,sda1,w', 'file:/home/cs/xen/img/deb/debian.swap,sda2,w']
disk = ['file:/home/cs/xen/img/deb/pv.deb.4-0.img,sda1,w']
root = "/dev/sda1 ro"
#vfb = [ 'type=sdl' ]
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=48' ]
extra="xencons=xvc0"
3. cat pv.deb.4-0.64.cfg:
kernel = "/boot/vmlinuz-2.6-xen"
ramdisk = "/boot/initrd-2.6.18.8-xen.img"
vcpus=2
memory = 512
name = "cs.pv.deb.4-0.64"
vif = [ '' ]
ip = "192.168.205.49"
netmask = "255.255.255.0"
gateway = "192.168.205.1"
disk = ['file:/home/cs/xen/img/deb/pv.deb.4-0.64.img,sda1,w']
root = "/dev/sda1 ro"
#vfb = [ 'type=sdl' ]
vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncdisplay=49' ]
extra="xencons=xvc0"
Labels: Linux, Operation and Maintenance
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home