Hi all, How can I boot a XEN domU guest into safe mode? One of our servers was forcefully shutdown, and it seems like one of my VM''s could be corrupt, or something. When I boot it up, I get the following on the console: Creating root device. Mounting root filesystem. kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. Setting up other filesystems. Setting up new root fs no fstab.sys, mounting internal defaults Switching to new root and running init. unmounting old /dev unmounting old /proc unmounting old /sys /sbin/init: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory Kernel panic - not syncing: Attempted to kill init! So, is it possible to boot the VM into safe mode, and fix this problem somehow? -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan de Konink
2009-Apr-05 14:49 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
Rudi Ahlers wrote:> So, is it possible to boot the VM into safe mode, and fix this problem somehow?This has nothing todo with a safe mode, just mount the filesystem somewhere else and fix the corrupted files. Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2009-Apr-05 14:58 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
On Sun, Apr 5, 2009 at 4:49 PM, Stefan de Konink <stefan@konink.de> wrote:> Rudi Ahlers wrote: >> >> So, is it possible to boot the VM into safe mode, and fix this problem >> somehow? > > This has nothing todo with a safe mode, just mount the filesystem somewhere > else and fix the corrupted files. > > > Stefan > > > _______________________________________________Hi Stefan, Are you saying, I should mount the LVM on the host node, and then run fsck on the mounted LVM, or are you referring to something else? -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan de Konink
2009-Apr-05 15:06 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
Rudi Ahlers wrote:> Are you saying, I should mount the LVM on the host node, and then run > fsck on the mounted LVM, or are you referring to something else?You should fsck first and then mount; (to see if that library still exists) Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2009-Apr-05 15:11 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
On Sun, Apr 5, 2009 at 5:06 PM, Stefan de Konink <stefan@konink.de> wrote:> Rudi Ahlers wrote: >> >> Are you saying, I should mount the LVM on the host node, and then run >> fsck on the mounted LVM, or are you referring to something else? > > You should fsck first and then mount; (to see if that library still exists) > > > Stefan > > _______________________________________________Ok, after running fsck, and trying to boot the VM again, I still get the same error. Can I just copy that library from the internet somewhere, since I won''t be able to yum update, or anything like that? -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Apr-05 15:21 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
On Sun, Apr 5, 2009 at 9:23 PM, Rudi Ahlers <rudiahlers@gmail.com> wrote:> Hi all, > > How can I boot a XEN domU guest into safe mode?When using pygrub, start the guest with "xm create -c" or "xm start -c", and you can edit the grub menu to add "single". If the domU is using kernel and initrd from dom0, you should be able to add "extra=single" on domU config file.> /sbin/init: error while loading shared libraries: libselinux.so.1: > cannot open shared object file: No such file or directory > Kernel panic - not syncing: Attempted to kill init!As Stefan said, it might be easier to check for the missing file by fsck and mounting domU''s filesystem from dom0. Be sure to do this ONLY while domU is stopped though. If it was indeed missing, then most likely you''re experiencing a serious problem and the missing file is just the tip of the iceberg. I highly suggest you call a Linux expert to help fix the problem. If you insist on restoring the file manually, you need to know : - which packages were damaged, what version (something like "rpm -V" and "rpm -qa" on chroot or single mode) - get the original package. - extract it and copy the missing package If you don''t know how to perform the above steps, it would be easier to simply create a new domU and copy data from the old one. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2009-Apr-06 05:12 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
On Sun, Apr 5, 2009 at 5:21 PM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Sun, Apr 5, 2009 at 9:23 PM, Rudi Ahlers <rudiahlers@gmail.com> wrote: >> Hi all, >> >> How can I boot a XEN domU guest into safe mode? > > When using pygrub, start the guest with "xm create -c" or "xm start > -c", and you can edit the grub menu to add "single". > > If the domU is using kernel and initrd from dom0, you should be able > to add "extra=single" on domU config file. > >> /sbin/init: error while loading shared libraries: libselinux.so.1: >> cannot open shared object file: No such file or directory >> Kernel panic - not syncing: Attempted to kill init! > > As Stefan said, it might be easier to check for the missing file by > fsck and mounting domU''s filesystem from dom0. Be sure to do this ONLY > while domU is stopped though. If it was indeed missing, then most > likely you''re experiencing a serious problem and the missing file is > just the tip of the iceberg. I highly suggest you call a Linux expert > to help fix the problem. > > If you insist on restoring the file manually, you need to know : > - which packages were damaged, what version (something like "rpm -V" > and "rpm -qa" on chroot or single mode) > - get the original package. > - extract it and copy the missing package > If you don''t know how to perform the above steps, it would be easier > to simply create a new domU and copy data from the old one. > > Regards, > > Fajar >Hi Fajar, Thanx for the tip, but unfortunately the VPS was beyond repair, and I had to recreate it from scratch. -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Apr-06 06:06 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
On Mon, Apr 6, 2009 at 12:12 PM, Rudi Ahlers <rudiahlers@gmail.com> wrote:> Hi Fajar, > > Thanx for the tip, but unfortunately the VPS was beyond repair, and I > had to recreate it from scratch.Sorry to hear that. Is the domU using storage-backed files, with "file:/" in domU config ? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2009-Apr-06 11:10 UTC
Re: [Xen-users] how to boot domU XEN guest in safe mode?
On Mon, Apr 6, 2009 at 8:06 AM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Mon, Apr 6, 2009 at 12:12 PM, Rudi Ahlers <rudiahlers@gmail.com> wrote: >> Hi Fajar, >> >> Thanx for the tip, but unfortunately the VPS was beyond repair, and I >> had to recreate it from scratch. > > Sorry to hear that. Is the domU using storage-backed files, with > "file:/" in domU config ? > > _______________________________________________Hi Fajar, No, it''s using an LVM partition: root@usaxen01:[~]$ more /home/xen/knocky.vm/knocky.vm.cfg kernel = ''/boot/hypervm-xen-vmlinuz'' ramdisk = ''/boot/hypervm-xen-initrd.img'' memory = 1024 name = ''knocky.vm'' disk = [''phy:/dev/VolGroup01/knocky_rootimg,sda1,w'', ''phy:/dev/VolGroup01/ knocky_vmswap,sda2,w''] root = ''/dev/sda1 ro'' -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users