Recovering Ubuntu Grub bootloader

0 comments

I was having trouble with Windows and I installed Ubuntu on my laptop. Unfortunately I re-installed windows after Ubuntu and now I don't have the option of viewing the boot menu to select Ubuntu. I was using the dual boot mode. Is there a way to view the boot menu in Windows XP that will allow me to select Unbuntu again?

This is some what tricky question, acutually when you install Ubuntu the bootloader "GRUB" will take care of MBR(Master boot record) and boot menu details such as OS's present either its a linux/nix or windows, because GRUB is a universal bootloader which will understand most of the OS's. But it is not the case with Windows bootloader boot.ini which cant not understand other then Windows,

So when you reinstall windows after Ubuntu, the Windows OS will rewrite the MBR and bootmenu with its own parameters. So your system doesnot know where Ubuntu/linux is located

To resolve this issue just use Ubuntu live cd and reinstall GRUB boot loader.

If you are using Redhat and windows follow below procedure
Step1 : Insert the first cd of your linux and boot from cd.

Step2 : Start with linux rescue method.

Step3 : Mount the partitions via chroot.

then install grub through

#grub-install /dev/hdc

Step4 : reboot
now u will get GRUB loader and your Linux will be rescued.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Login Problems

    0 comments

    Login Problems

    When a user/root try to login to Linux system there are so many problems which will prevent the root/user not to login.

    Here we will see what are the problems which will prevent user from not to login to system and try to resolve them one by one.

    We can divide these problems in to two categories:
    1. Physically present at system.
    2. Accessing system from remote location(through network).

    Logging in to the system when you are present infront of the system.

    Issue1:Check weather the password you are typing is correct or not, what I mean is Case sensitive etc,
    here I am considering that you forgot the password for that system, In this case follow these steps

    Issue2:Still not able to login to system except runlevel1, so how to resolve this issue?
    • Check root user properties such as shell type, age and security etc?


    Step1 : Check the root properties by using finger command.

    #finger root
    Login: root Name: root
    Directory: /root Shell: /sbin/nologin
    Never logged in.

    this command will give you the properties of the root user, here we have to check what is the shell he is using, the shell should not be nologin shell. If the shell for the root user is no login shell he will not able to login to system so we have to change the login shell from /sbin/nologin shell to some other shells such as /bin/bash.
    To do this we can use chsh command

    #chsh -l

    This command will display all the shell's installed in your system, to change the shell.

    #chsh /bin/bash

    then execute finger command to check weather shell has been changed to our required shell or not

    #finger root

    Step2 : Still not able to login? try if there is any age related issues is there on root user

    #chage -l root

    It will display the age related info for the root user.
    Please increase the age of the root user expiry time

    #chage root

    Step3 : Still unable to login? Check for security related restriction on root user

    Check in /etc/securetty file wether all the entries are there or not(in this file there will be entirs of the terminals from where root user can access the system) check weather tty1 to tty7 and vc1 to vc7 are there or not if they are not there add them and try to login.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Lost Root password

    0 comments

    Lost the Root password


    When you lost root password how you can recover and login back in to the system?
    To login in to system there are so many ways to get root access depending on security level of the system.
    Method1: When there is no password set to access runlevel 1.

    Here are the steps to change your root password the most esiest way is as follows..

    1. Start your computer when you see Redhat Linux boot loader(GRUB menu where you can see all the Operating system's in the system) select the redhat linux and press "e", and select second line where you can set the temporary runlevel for the system to boot

    2. You will notice that now you can edit boot loader command arguments now again press "e" and edit the line to add single or 1 without quots at the end of line.

    3. Press enter to return to previous screen

    4. Press b to boot with this new argument which will run Linux into single user mode. Please make sure that you see single at the end of line.

    5. Now you will get root login with out asking for a password in single user mode.

    6. Use "passwd" command to change your password.
    #passwd
    here it will not ask previous password so you can just enter new password.

    7. When updateing the password in runlevel1 if the server is not allowing you to change password giving you error, this is due to /etc/shadow file issue.
    In order to resolve this issue execute the following command and then try to change the password

    #pwunconv

    7.After changing the password just type exit command which will take you to default runlevel of the system or just Reboot and use the new password.

    Method2: When GRUB boot loader is protected with a password.
    When the GRUB boot loader is protected by a password the above mentioned method will not work, so how to login to the system?
    In order to retrive root password we have to have first RHEL cd or a live CD(may be konpics/Ubuntu) .

    It is easy to boot using the first Cd.
    then enter into the rescue mode
    just type linux rescue and boot prompt with out quoat

    Now we will be logged in to a normal shell, do the folowing steps
    Step1 : change the root partation to /mnt/sysimage

    chroot /mnt/sysimage

    Step2 : Now just change the password
    passwd

    Step3 : Exit from rescue mode
    #exit
    #exit

    then login with the new passwd
    And if you don't have the correct version CD, you can boot from a live CD,
    Mkdir /a
    mount ... /a
    vi /a/etc/password

    delete the password in /etc/shadow for root
    Now it will come up with no root password (change immediately).



    Method3: This method will give you how to retrive your lost root password, not for changing the root password
    So how to recover the root password? We can use Rainbow tables technic to do this.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here