WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] resetting lost root password on a xen guest

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] resetting lost root password on a xen guest
From: Darren Jacobs <dhj@xxxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2007 11:32:35 -0400
Delivery-date: Tue, 30 Oct 2007 08:33:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi All,

I need to get into a xenguest running linux for which the root password has been lost.  I'm running xen 3.0.3 under RH 5.

I'm trying to figure out how to get pygrub for this guest to load up the typical "init=/bin/sh" to get the console to come up at the command line prompt so I can reset the root password.  

Trolling though google I've see suggestions to add args = 'init=/bin/sh' or opts = 'init=/bin/sh' to the guest configuration file.  None of them appeared to have worked.  If I do a 'xen create echo11 -n' after making any of the above file mods I see that the args were not modified:

--
(vm
    (name echo11)
    (memory 500)
    (on_reboot restart)
    (on_crash restart)
    (vcpus 1)
    (uuid cb855323-2867-b84a-d766-32a39d252bb7)
    (bootloader /usr/bin/pygrub)
    (image
        (linux
            (ramdisk /var/lib/xen/initrd.kIQYUw)
            (kernel /var/lib/xen/vmlinuz.Xwl81-)
            (args 'ro root=/dev/VolGroup00/LogVol00')
        )
    )
    (device
        (tap (uname tap:aio:/var/lib/xen/images/echo11) (dev xvda) (mode w))
    )
    (device (vif (bridge xenbr0) (mac 00:16:3e:69:69:90)))
--

So I tried to bring the guest up manually from dom0 with " pygrub /var/lib/xen/images/echo11.dsk".  When the menu comes up I edit the kernel line directly and insert "init=/bin/sh".  You can see below that the init statement was indeed read:

--
[root@dom0 xen]# pygrub /var/lib/xen/images/echo11
Going to boot Fedora (2.6.20-2925.13.fc7xen)
  kernel: /vmlinuz-2.6.20-2925.13.fc7xen
  initrd: /initrd-2.6.20-2925.13.fc7xen.img
linux (kernel /var/lib/xen/vmlinuz.pBqWti)(ramdisk /var/lib/xen/initrd.9IdU7X)(args 'ro root=/dev/VolGroup00/LogVol00 init=/bin/bash')
[root@dom0 xen]#
--

However the guest did not start up :'(  Its starts just fine if I issue a "xm create echo11".  Any suggestions on where to look from here?



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users