[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Kernel panic - not syncing: Attempted to kill init



Hi, Ian
Thanks for your help.

2012/8/23 Ian Campbell <Ian.Campbell@xxxxxxxxxx>
On Thu, 2012-08-23 at 11:35 +0100, Yaogun Wen wrote:
> $ dd if=/dev/zero of=pv-rootfs.img bs=1024k seek=20480 count=0
> $ mkfs.ext3 pv-rootfs.img
> $ sudo mount -o loop pv-rootfs.img /mnt/tmp/
> $ sudo cp -ax /{bin,dev,etc,lib,lib32,lib64,root,sbin,usr,var} /mnt/tmp
> $ mkdir /mnt/tmp/{home,proc,opt,sys,tmp}
> $ chmod 777 /mnt/tmp/tmp/

This doesn't seem like a terribly reliable way to produce a root
filesystem to me.

You might want to investigate the use of "debootstrap" or the xen-tools
scripts which simplify its use to create Xen guest images.

I have tried debootstrap. But it didn't work.
I think I will try again when I be free.

If /sbin/init exists in the root file system then this would usually
mean one of:
      * The dynamic loader referred to by /sbin/init is missing
      * One of the libraries referenced by /sbin/init is missing
      * The kernel does not support the architecture used by /sbin/init
        (e.g. it is a 32 bit binary and kernel is 64 bit but doesn't
        have the IA32_EMULATION option enabled)

I would start by "chroot /mnt/tmp" and within the chroot running
"ldd /sbin/init".

Ian.


I tried to run "ldd /sbin/init" within the chroot , and the result is as follow:
linux-vdso.so.1 =>  (0x00007fff3d3ff000)
libnih.so.1 => /lib/libnih.so.1 (0x00007f0542ccf000)
libnih-dbus.so.1 => /lib/libnih-dbus.so.1 (0x00007f0542ac5000)
libdbus-1.so.3 => /lib/libdbus-1.so.3 (0x00007f0542885000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f0542668000)
librt.so.1 => /lib/librt.so.1 (0x00007f0542460000)
libc.so.6 => /lib/libc.so.6 (0x00007f05420dc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0543128000)
I'm not very familiar with ldd, so I just check the existence of shared libraries required by /sbin/init.
Does it look right?

In fact, when I use the same filesystem image file and configuration file today, it work!
Although I use "sync" to flush pending writes to the filesystem image file, it seems that I need to reboot when I encounter this problem.

However, it stops booting at "Checking battery state" after I create pv domU.
After I do the search, I add this file to /etc/init and call it hvc0.conf.

# hvc0 - getty
#
# This service maintains a getty on hvc0 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -8 38400 hvc0

It seems to work now. :-)

--
Best regards,

Yao-Jing Wen
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.