Find the answer to your Linux question:
Results 1 to 8 of 8
Greetings I have few virtual machines running on one of xen servers & I'm experiencing a problem booting up one of clients "domain". How can I force this machine to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Location
    Toronto
    Posts
    34

    How to force virtual machine to boot up into single user mode?


    Greetings

    I have few virtual machines running on one of xen servers & I'm experiencing a problem booting up one of clients "domain".

    How can I force this machine to boot up to runlevel 1? I can't see grub menu when first booting it up!

    Thanks

  2. #2
    Just Joined!
    Join Date
    Sep 2005
    Location
    Edmonton, Canada
    Posts
    48
    If you just need to boot into single user mode a time or two, use grub's editing feature to modify the boot parameters before booting.

    Start the system (virtual or real).
    Begin tapping the 'ESC' key as soon as the system POST ends, and before the kernel starts booting, this will force grub to stop at its boot selection screen. (you may only have 1-2 secs to hit ESC while grub is at its boot selection, depending on the timeout value in grub.conf)
    Hi-light the kernel you wish to boot, and hit 'e' for edit
    Arrow to the 'kernel' line, press 'End' and add a space and an 'S' (uppercase) to the end of the line.
    Hit 'Enter' to save (for this boot only)
    Hit 'b' for boot.

    Hope it helps

  3. #3
    Just Joined!
    Join Date
    Aug 2009
    Location
    Toronto
    Posts
    34
    this is a paravirtual machine, I don't get to see those boot up options when booting up.
    and I can't connect a boot disk and edit grub.conf settings either as those types of virtual machines doesn't support CD/DVD connection.

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Do you get anything when booting or does it just show a blank screen?
    Also this VM did you configure it to use a file image or is it a regular file system on disk?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Aug 2009
    Location
    Toronto
    Posts
    34
    Currently this machine is using image file, and I haven't changed any configuration, is there is settings in some config file I could Change so I could get this vm to boot into single usermode?

    Maybe if I could convert this image file to use file system using dd command and later mount the file system under a termproray location I could modify init tab or grub.conf setting and have it boot up into single user mode??!

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I haven't seen nor read anywhere where you could get a VM file to change how it boots.
    I take it nothing shows on the screen during your attempts to boot it.

    The VM is a system in itself so it might be that your file is corrupt. Time to break out the back and install it. You do have a backup?

    This is why I chose to use file system instead of a file. If something goes wrong I still have access to everything.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,512
    What you need to do depends upon what operating system the VM is running. You don't mention, so what is it? Distribution+version. There are significant differences between distributions, and even versions, depending upon whether they are running grub, grub2, lilo, or whatever.

    However, since this is posted in the Red Hat / Fedora forum it is probably grub. Boot the VM, login as root (if you can), and edit the file /etc/inittab. Change the line that says "id:5:initdefault" to "id:1:initdefault", then reboot. It should now come up in single user "recovery" mode.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #8
    Just Joined!
    Join Date
    Jun 2012
    Posts
    1
    An alternative ... you should be able to mount your file system in as a file in your dom-0 ... from there navigate to the /etc/inittab file in your guest's file system and make the edit noted above.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •