Tuesday, July 13, 2010

Boot into Single usermode with Read Write Access to root

Why you want read write access to your system in Single User Mode ? ? Why ? ? Ofcourse its bad practice but we want rw access to bash in some situations like in Maintenance Mode ? ? ? still why ? ? ? ok . . . .lemme explain you . . .

Imagine you are doing LVM (I hope u know LVM) and you already activates USER QUOTA (Hope you know it) Now If this is the situation and you forgot to Disable USER QUOTA before reducing LVM size then probably after restart you will simply lang to maintenance mode!!!
Now what ? ? In this situation you must edit /etc/fstab which is must , to start back your Red Hat!!!! And for this you need to have write access to these files which is not by default!!

Method 1:

When you will boot you will see something like this :

module /vmlinuz-2.6.18-8.el5xen ro root=LABEL=/ rhgb quiet

Here a little modifications can land you to bash prompt with read write access

module /vmlinuz-2.6.18-8.el5xen rw root=LABEL=/ rhgb quiet

Method 2:

You can normally boot in single user mode as :

module /vmlinuz-2.6.18-8.el5xen ro root=LABEL=/ rhgb quiet single

or

module /vmlinuz-2.6.18-8.el5xen ro root=LABEL=/ rhgb quiet 1

you get bash prompt as :

bash# (type here)
bash# mount -o remount /,rw --> which provides read write access to root

Thats how we can get out of maintenance mode . . .

Thank You . . .

Enjoy RHEL

No comments:

Post a Comment