Any Alternative To Single User Mode

Home » CentOS » Any Alternative To Single User Mode
CentOS 13 Comments

Hi, I am working on CentOS6.6 on a VirtualBox on Windows Host. Today I started to have booting issues in the OS. It won’t get past the loading screen. I
checked and found that the files related to the user “cloudera” on the system were not accessible. Only the files related to root were accessible. This is why I was am not able to do a single user login but an emergency login was possible. This is just a guess. This all happened due to some update in the Virtual Machine that I use to run CentOS.

Is there any workaround for this issue?

Thanks and regards, Animesh Pandey

13 thoughts on - Any Alternative To Single User Mode

  • I wish you could provide more info.

    How can you determine that inaccessibility to a user’s files will prevent CentOS from taking you all the way to the login (or welcome) screen?

    I think something else is going on and my guess is that the CentOS files themselves have been corruped. Can you re-install CentOS ?

  • I actually opened the Virtual Disk Image (.vdi) on http://www.vmxray.com/. I could see that despite my disk being of 100GB only ~65GB was being shown. All the stuff related ot the local user was not visible at all. After I restarted my VM, the OS gets stuck here (
    http://i.stack.imgur.com/KVYxV.png). Even after trying the single user login it was stuck there. But the emergency mode worked alright.

  • Please do not top-post.

    I am having trouble following your terminology. Emergency model?
    On my CentOS installation, there is no “Emergency ….”
    to select from the list of kernels to boot.

    Also, when you say “worked alright” do you mean that you were able to access what you thought was missing?
    Can you go to full multiuser?

  • Sorry for top posting.

    Let me give you a clearer idea.

    1. My regular boot freezes after loading is completed.
    2. I read on the internet that sometimes due to an update in VirtualBox, this error might occur. To rectify it, I must re-install VirtualBox’s Guest Additions. For this, I require booting in a Single User Mode.
    3. For that, I followed the correct steps as given here (
    https://www.CentOS.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-booting-single.html). But still the system froze on that same point.
    4. Then I read about an Emergency mode which is even lower level to that of Single User mode. I was able to log in and see the files that I
    created/modified as root. I could not see any file/folder that related the local user “cloudera” on which I used to work. This is where I thought of seeing the contents of the Image using vmxray.com and found that a large part of the dick is not visible. This part contains that files related to
    “cloudera”. I felt as if any information related to “cloudera” user has been lost.

    I basically need to access files that I made as “cloudera” on CentOS and if possible re-install the Guest Additions that ma solve this issue. But for this I need to be able to boot as a Single User.

  • Did you try switching to another VT and logging in via the text login prompt? How about hitting escape during boot to see what it was doing when it hung? I also suggest removing ‘rhgb quiet’ from the kernel command line in the bootloader, so you can see more during boot.

  • I assume you are using a virtual drive, which is a file on the host machine (You said windows??? ). If you can somehow use a tool to dump that disk image to a real hard drive (for example using dd ), and connect the hard drive a a working linux computer to run fsck on it to see what it will find. I assume you have no backup of your drive???

  • Yes it is windows. By dumping a disk image do you mean a VDI (VirtualBox Disk Image). These are files that are used by VirtualBox for booting. I
    have a copy of that as well. Can Gparted be used for connecting that VDI?

  • You will more than likely need a conversion tool to convert a vdi image to a normal HD image. I do not know of such a tool.

    Another possibility is to create another VM, install your linux on it with it’s own separate disk, but add you bad vdi disk as a second drive. Once booted, use linux to fsck the second drive. Again, be sure you have a copy it before you connect it to this new VM.

  • I did exactly as you said. I used Gparted to create a secondary drive. I
    can do “/dev/” to see the four partitions that my original VM had. How do I
    go about it now?

  • So, the drive (you want to fix) is visible in the new vm. Good. be sure it is unmounted. As root, run fsck /dev/sd?
    You supply the value of ?
    Is it b or c …?

    fsck could end up deleting files or even truncating them to shorter lengths if blocks that belong to those files are no longer referenced in the file’s inode.

    Good luck

  • Well, I think you misunderstood what I asked you to try.
    /dev/sda should be your VM’s ‘new’ drive you would have created for the new VM. And I asked you to attach a copy of the bad drive as a second disk which Linux would see as /dev/sdbb In otherwords, you boot from the new drive on which you installed a fresh installation of CentOS. Once booted, then you fsck the partitions or volumes of /dev/sdb

    That will reveal to you what problems you are having with the bad drive when you fsck those partitions or vol groups.

  • Animesh Pandey wrote:

    Just a wild guess…

    Could it be possible that your /home, which contains all the files of the “cloudera” user, is located on a separate file system that does not automatically get mounted in emergency mode? That would at least explain why those files appear to be missing.

    Patrick