VMware Cloud Community
useraf
Contributor
Contributor

Kernel panic -- boot Suse-10.1 virtualized

Hi all,

I've used Converter 5.5 to virtualize a physical machine Linux Suse-10.1 server that is working fine.

When I boot this virtual machine I've problems with mounting devices and this produce a Kernel panic error.

* Mounting /dev/sda1 on /sysroot

mount: mounting /dev/sda1 on /sysroot failed : No such device

mknod: /sysroot/dev/console: No such file or directory

mknod: /sysroot/dev/null: No such file or directory

mknod: /sysroot/dev/zero: No such file or directory

* Switching / to /sysroot

switch_root: bad newroot /sysroot

Kernel panic - not syncing: Attempted to kill init!

I was trying diferents options like they were explained here : V2V LVM2 Conversion and resize causes kernel panic and here : http://comments.gmane.org/gmane.linu...general/106216

I boot from LiveCD (openSuse-13.2) to mount and make manually a new image initrd, following all the steps described in the two links I detailed before, but I've problems with mkinitrd command :

mkinird_bugzillaVM.jpg

I can explore correctly all directory and files virtualized from the physical machine in a linux console from Livecd.

[liveCD Suse-13.2]

linux:/run/media/linux/1be67fd1-c225-4ab3-bdd2-60a8a2398346 # ls -la /boot

total 15119                                                                                                                                                                                    

drwxr-xr-x 1 root root    1024 Jan 28 10:58 .                                                                                                                                                  

drwxr-xr-x 1 root root    1024 Jan 28 10:58 ..                                                                                                                                                 

-rw-r--r-- 1 root root      65 Oct 22 07:33 .vmlinuz-3.16.6-2-default.hmac                                                                                                                     

-rw-r--r-- 1 root root 2266119 Oct 22 07:20 System.map-3.16.6-2-default                                                                                                                        

lrwxrwxrwx 1 root root       1 Oct 27 15:36 boot -> .                                                                                                                                          

-rw-r--r-- 1 root root    1484 Oct 22 04:40 boot.readme                                                                                                                                        

-rw-r--r-- 1 root root  152805 Oct 22 06:04 config-3.16.6-2-default                                                                                                                            

-rw-r--r-- 1 root root       0 Oct 27 15:36 do_purge_kernels                                                                                                                                   

drwxr-xr-x 2 root root       3 Oct 22 04:51 dracut                                                                                                                                             

drwxr-xr-x 2 root root     259 Oct 27 15:36 grub                                                                                                                                               

drwxr-xr-x 4 root root      48 Oct 27 15:34 grub2                                                                                                                                              

lrwxrwxrwx 1 root root      23 Oct 27 15:36 initrd -> initrd-3.16.6-2-default                                                                                                                  

-rw-r--r-- 1 root root  194992 Sep 25 20:22 memtest.bin                                                                                                                                        

-rw-r--r-- 1 root root  424448 Oct 27 16:27 message                                                                                                                                            

-rw-r--r-- 1 root root  314852 Oct 22 07:33 symvers-3.16.6-2-default.gz                                                                                                                        

-rw-r--r-- 1 root root     393 Oct 22 07:33 sysctl.conf-3.16.6-2-default                                                                                                                       

-rw-r--r-- 1 root root 6852085 Oct 22 07:41 vmlinux-3.16.6-2-default.gz                                                                                                                        

lrwxrwxrwx 1 root root      24 Oct 27 15:36 vmlinuz -> vmlinuz-3.16.6-2-default

-rw-r--r-- 1 root root 5266736 Oct 22 07:20 vmlinuz-3.16.6-2-default

[Suse-10.1 virtualizado]

linux:/run/media/linux/1be67fd1-c225-4ab3-bdd2-60a8a2398346 # ls -la ./boot

total 12664

drwxr-xr-x  3 root root    4096 Dec 18 13:17 .

drwxr-xr-x 22 root root    4096 Jan 22 16:48 ..

-rw-r--r--  1 root root  703081 Apr 10  2006 System.map-2.6.16-20-smp

-rw-------  1 root root     512 Oct  1  2008 backup_mbr

lrwxrwxrwx  1 root root       1 Dec 18 12:47 boot -> .

-rw-r--r--  1 root root   67584 Apr 10  2006 config-2.6.16-20-smp

drwxr-xr-x  2 root root    4096 Dec 18 13:17 grub

-rw-r--r--  1 root root 6120792 Dec 18 13:17 initrd

-rw-r--r--  1 root root 2394806 Oct  1  2008 initrd-2.6.16-20-smp

lrwxrwxrwx  1 root root      20 Dec 18 12:47 initrd.old.0 -> initrd-2.6.16-20-smp

-rw-r--r--  1 root root  134144 Oct  1  2008 message

-rw-r--r--  1 root root   98299 Apr 10  2006 symsets-2.6.16-20-smp.tar.gz

-rw-r--r--  1 root root  334493 Apr 10  2006 symtypes-2.6.16-20-smp.gz

-rw-r--r--  1 root root   92289 Apr 10  2006 symvers-2.6.16-20-smp.gz

-rwxr-xr-x  1 root root 1605898 Apr 10  2006 vmlinux-2.6.16-20-smp.gz

lrwxrwxrwx  1 root root      21 Dec 18 12:47 vmlinuz -> vmlinuz-2.6.16-20-smp

-rw-r--r--  1 root root 1333468 Apr 10  2006 vmlinuz-2.6.16-20-smp

Filesystems of physical machine are :


bugzilla:~ # df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda1             9.9G  9.4G   28M 100% /

udev                 1014M  104K 1014M   1% /dev

/dev/sda3              22G   11G  9.2G  55% /opt


bugzilla:~ # tail /etc/fstab

/dev/sda1            /                    ext3       acl,user_xattr        1 1

/dev/sda3            /opt                 ext3       acl,user_xattr        1 2

/dev/sda2            swap                 swap       defaults              0 0

proc                 /proc                proc       defaults              0 0

sysfs                /sys                 sysfs      noauto                0 0

usbfs                /proc/bus/usb        usbfs      noauto                0 0

devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

bugzilla:~ # tail /etc/grub.conf

root (hd0,0)

install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0,0) /boot/grub/stage2 0x8000 (hd0,0)/boot/grub/menu.lst

quit

any idea?

thanks in advance,

regards

0 Kudos
7 Replies
JarryG
Expert
Expert

  1. Mounting /dev/sda1 on /sysroot  
  2. mount: mounting /dev/sda1 on /sysroot failed : No such device 

Probably your filesystem has different path in VM (i.e. /dev/sdb1 or /dev/sda2, etc) or it does not have driver for this controller compilled in at all. If possible, use the same live-cd version to see if it detects /dev/sda1.

BTW, this is a good example why using persistent device-names makes sense: with UUID or LABEL instead of device-path you would not face this problem: either partition is mounted (and does not matter to which port/controller drive is attached), or not detected at all.

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
useraf
Contributor
Contributor

Hi all and thanks JarryG for your recomendations.

I've used the same live-cd version too, but I've had problems with that way :

Using a Suse-10.1 Live-cd to boot the VM I can't see the phisical disks with de Operating System virtualized

................................................................................................................

linux:/ # df -h

Filesystem            Size  Used Avail Use% Mounted on

rootfs                3.9G  3.9G     0 100% /

hda                   3.9G  3.9G     0 100% /.CD.real

/dev/cloop            3.9G  3.9G     0 100% /

swap                 1014M   80K 1014M   1% /dev

udev                 1014M   80K 1014M   1% /dev

................................................................................................................

I was trying with Yast too, but when I try to mount devices (Particioner application) a crash occurred...: mount, df, ... doesn't works.

After that, I've used a Suse-10.2 Live-cd to try again.

In this case, I used Particioner application succesfully to mount /dev/sda1 and /dev/sda3 like in the original server that I virtualized :

................................................................................................................

linux:/ # df -h

Filesystem            Size  Used Avail Use% Mounted on

rootfs                3.9G  3.9G     0 100% /

hda                   3.9G  3.9G     0 100% /.CD.real

/dev/cloop            3.9G  3.9G     0 100% /

swap                 1014M   80K 1014M   1% /dev

udev                 1014M   80K 1014M   1% /dev

/dev/sda1             3.9G  3.9G     0  100% /

/dev/sda3             22G   12G   9.0G 56% /opt

................................................................................................................

But when I've tried to mount the rest of directories and to make the initrd image...all operations failed because "Read-only file system"

Any idea to solve this problem?

Thanks in advance!

0 Kudos
JarryG
Expert
Expert

As I expected: Suse-10.1 simply does not have proper driver for virtualized disk-controller. It can not mount /dev/sda1 simply because it does not see it. Try edit VM-properties and change disk-controller to something very common. You know, 10.1 is very old version, with some quite outdated 2.6.x kernel. It lacks support of a lot of modern hardware. Or simply first upgrade physical machine from 10.1 to 12, and then convert p2v.

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
useraf
Contributor
Contributor

Hi all and thanks JarryG for your recomendations.

The VMware software has options for virtualize Suse 8, 9, 10, 11 ... I know that Suse 10.1 is very old version, but If VMware works with older versions of Suse than 10.1, I guess the 2.6.16 kernel version is not the problem here, is it?

0 Kudos
JarryG
Expert
Expert

"Works" does not mean "works out of the box". Maybe it is necessary to re-compile kernel with corresponding modules (i.e. for disk-controller). That might be the case, because as you wrote, 10.1 live-cd does not detect partitions either. You can try to load 10.2 (or any newer which detects those /dev/sda* partitions) and compare "lsmod" output with 10.1. Then you will find which module is missing...

And concerning that read-only partition, try to remount it with "mount -o remount,rw /dev/path /mount/path"

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! 😉
0 Kudos
useraf
Contributor
Contributor

Hi all,

finally the main problem was solved!

The steps to do that was founding in this thread : https://www.novell.com/support/kb/doc.php?id=7005233

Change INITRD_MODULES was the key.

Now, I can log-in into the VM server with the correct filesystem!

I'm going to review the rest of the configuration, because it's has network problems

0 Kudos
nordhuus
Enthusiast
Enthusiast

How did you solve this? What did you change in the /etc/sysconfig/kernel?

_____________________________________________
If this post helps you, please leave Kudo or mark this reply as an answer
0 Kudos