LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Always Single user mode (https://www.linuxquestions.org/questions/linux-newbie-8/always-single-user-mode-825408/)

jia786 08-10-2010 02:54 PM

Always Single user mode
 
Hi,

I've created Oracle Enterprise 5 Virtual machine. It was running fine but not sure what went wrong and now when ever I reboot the machine, it goes to single user mode. If I enter "init 5" command it boots to multi-user X11 mode without any problem.
I checked inittab file and default line has id 5. So it looks OK. What else can be wrong?

Thanks,
Javed

MensaWater 08-10-2010 03:11 PM

The line is the following?
Code:

id:5:initdefault:
If so then it sounds like something isn't starting correctly. If you have issues with filesystems mounting or not fsck'ing correctly it will default to single user to do clean up so as to avoid risk to the filesystems. Watch your boot (click on "show details" when the GUI boot screen is being shown so you can see if everything is actually starting).

r3sistance 08-10-2010 03:16 PM

Another thing to check would be /etc/grub/grub.conf make sure nobody accidentally placed a 1 or single in the default boot option on the kernel line.

jia786 08-10-2010 03:19 PM

Thanks for reply.

Yes the line is exactly same. I'll monitor the boot screen to look for any error. A newbie question, I added a disk and the filesystem on it got corrupted but I removed the entry from fstab for auto mount. Will this be a still problem? Should I remove the disk?

r3sistance 08-10-2010 03:29 PM

It might lead to a labeling conflict (very common with RHEL/Fedora based Distributions) as they use labels rather then direct partition references in FSTAB. so essentially you can have 2 /, 2/var, 2 /tmp and what not, what can conflict things... Change fstab to physical references to avoid that, also ensure the hard drive is the secondary within BIOS.

jia786 08-10-2010 07:00 PM

Quote:

Originally Posted by MensaWater (Post 4062286)
Watch your boot (click on "show details" when the GUI boot screen is being shown so you can see if everything is actually starting).

last few boot messages are:

Remounting root filesystem in read-write mode: [OK]
Mounting local filesystems: [OK]
Enabling local filesystem quotas: [OK]
Enabling /etc/fstab swaps: [OK]

INIT: Entering runlevel: 1
Entering non-interactive startup
Starting monitoring for VG VolGroup00: 2 logical volume(s) in volume group "VolGroup00" monitored [OK]

Telling INIT to go to single user mode
INIT going single user
INIT sending process the TERM signal
INIT sending process the KILL signal
sh-3.2#


Do ypu see anything wrong in messages?

bsat 08-11-2010 02:43 AM

did you check the grub config file as pointed by r3sistance, doesn't look like any thing else is wrong.

linuxlover.chaitanya 08-11-2010 04:29 AM

Quote:

Originally Posted by jia786 (Post 4062445)
last few boot messages are:

INIT: Entering runlevel: 1

Do you see this? It is entering runlevel 1 which is a single user mode. You should check your grub configuration file if you say your inittab file is correct.
/boot/grub/grub.conf should most probably be your file.
See if anyone has passed option to kernel to boot to single user mode.

jia786 08-11-2010 08:08 PM

Quote:

Originally Posted by bsat (Post 4062670)
did you check the grub config file as pointed by r3sistance, doesn't look like any thing else is wrong.

The /boot/grub/grub.conf contents are as follow:

Code:

#boot=/dev/xvda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Enterprise Linux Enterprise Linux Server (2.6.18-92.1.1.0.1.el5xen)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.1.1.0.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-92.1.1.0.1.el5xen.img


jia786 08-11-2010 08:21 PM

I also see following in /var/log/messages file. Does the "1" in this line mean that system is booting in single user mode?

kernel: Kernel command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet 1

GrapefruiTgirl 08-11-2010 08:36 PM

That's certainly how it looks in post #10; the "1" means single-user mode, or "init 1" - but where's the "1" in post #9? Are you sure that is the correct grub section - is that the entire grub file, and the only grub file?

r3sistance 08-12-2010 02:57 AM

Another thing to check, shutdown the VM and use the following command

"xm create -c <virtualmachinename>"

This should allow you to interact with grub, from here you should be able to view the options/lines that are being loaded.

jia786 08-12-2010 08:22 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 4063608)
Are you sure that is the correct grub section - is that the entire grub file, and the only grub file?

I checked /etc/grub.conf and /boot/grub/menu.lst have same contents.

Quote:

Originally Posted by r3sistance
"xm create -c <virtualmachinename>"

This gave me one option only "Enterprise Linux Enterprise Linux Server (2.6.18-92.1.1.0.1.el5xen)". There was no other option.

r3sistance 08-13-2010 04:21 AM

Quote:

Originally Posted by jia786 (Post 4064712)
This gave me one option only "Enterprise Linux Enterprise Linux Server (2.6.18-92.1.1.0.1.el5xen)". There was no other option.

ok... if you can do this again, hit "e" on that option, go to the kernel line and hit e again

it should show you a line like "kernel /boot/vmlinuz-2.<kernel build> ro root=<partition>"

Could you possible put down the exact content of that line here?

jia786 08-13-2010 05:11 AM

Quote:

Originally Posted by r3sistance (Post 4064987)
ok... if you can do this again, hit "e" on that option, go to the kernel line and hit e again

it should show you a line like "kernel /boot/vmlinuz-2.<kernel build> ro root=<partition>"

Could you possible put down the exact content of that line here?

I can see 3 options now:

> root (hd0,0)

> kernel /vmlinuz-2.6.18-92.1.1.0.1.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet

> initrd /initrd-2.6.18-92.1.1.0.1.el5xen.img


All times are GMT -5. The time now is 03:05 AM.