Find the answer to your Linux question:
Results 1 to 9 of 9
Hello: Somehow, the root account got corrupted to the point where any type of trying to log in with it doesn't work. So, I'm using a live CD to boot ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2012
    Posts
    5

    Trying to recover lost root password -- cannot mount /dev/sda1


    Hello:

    Somehow, the root account got corrupted to the point where any type of trying to log in with it doesn't work.

    So, I'm using a live CD to boot the device.

    from fdisk -l, it says /dev/sda1 is the boot device

    I create a temp directory and when I try to mount /dev/sda1, I get a message saying it's busy.

    Hmmm...

    mount | grep -i sda1 yields nothing!

    So I run fsck against /dev/sda1 thinking it's corrupt or something. No luck; same message -- it's busy.

    When I run df -h, I get this:

    /dev/mapper/live-rw

    Is that interfering with mounting /dev/sda1? Or is something else?

    Thanks!

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    917
    Since you're using a live cd, you might have already mounted it by UUID under /media/UUID

    Anyway, the partition marked with the boot flag may or may not be the partition you're looking for. If you installed the system with a separate boot partition, then you are likely looking for a different partition.

    If your distro is Red Hat / Centos, etc, you can boot the system into single user mode to update the password, you don't need a livecd. Just press 'e' or 'tab' (I always forget which) during system boot and add 'single' without quotes to the end of the kernel argument line. Then you can change your password as normal with the passwd command.

  3. #3
    Just Joined!
    Join Date
    Dec 2012
    Posts
    5
    > Since you're using a live cd, you might have already
    > mounted it by UUID under /media/UUID

    If that was the case, wouldn't that still show up in mount???

    > If your distro is Red Hat / Centos, etc,

    It's RedHat, specifically RHEL 5.8; hence posting in the RedHat forum.

    > you can boot the system into single user mode to update
    > the password,

    That's NOT working... root is really messed up on this box for some reason. So yes, I need to use the live CD... and then mount the bootable area to a temp space, and then blank the password portion of the passwd file out.

    > Then you can change your password as normal with the >
    > passwd command.

    Sure, that works if GRUB isn't password protected.

  4. $spacer_open
    $spacer_close
  5. #4
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,025
    Take a look at the methods given here. You may have some luck with them.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  6. #5
    Just Joined!
    Join Date
    Dec 2012
    Posts
    5
    Thanks @jayd512.

    I'm trying to do what is found in the Reset Root Password - Not As Easy Method: section.

    However, the mount part is failing as I mentioned in the original post.

  7. #6
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,025
    What LiveCD are you using? It may be automatically mounting your various drives on startup.
    Are you able to navigate to the /etc directory of sda1?
    If not, since you're getting a report that it's busy, try un-mounting it first. Then mount it again.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  8. #7
    Just Joined!
    Join Date
    Dec 2012
    Posts
    5
    > What LiveCD are you using?

    I tried a knoppix and Fedora 14 CD/

    > Are you able to navigate to the /etc directory of
    > sda1?

    No.

    > If not, since you're getting a report that it's busy, try un-
    > mounting it first. Then mount it again.

    Tried that. But that fails because there is no sda1 in mount.

  9. #8
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,025
    What is the exact output of:
    Code:
    mount
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  10. #9
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    917
    I see this thread posted in the "Security" forum, not RHEL forum :/

    Anyway, I recommend tossing out the Knoppix CD and boot from RHEL media and use rescue mode. It will automatically detect which partition / lvm is the root partition, and mount it under /mnt/sysimage/

    Then, you can chroot to that mount point and set password as normal.

Posting Permissions

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