Solved

unable to change root directory to /mnt/sysimage(chroot /mnt/sysimage) in Rescue mode

Posted on 2007-03-24
3
4,002 Views
Last Modified: 2008-01-09
I have forget the redhat6.2 passsword,now i go to rescue mode and type command
chroot /mnt/sysimage but it is showing me error....
"cannot change root directory to /mnt/sysimage:No such file or directory"
Plz help me to change the root password.

Manish
0
Comment
Question by:manishsaxena2007
3 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18787248
Could you boot into single user mode without root password?

If you are using LILO, specify one of these options at the LILO boot prompt (if you are using the graphical LILO, you must press [Ctrl]-[x] to exit the graphical screen and go to the boot: prompt):

boot: linux single

Then at shell prompt "#", type
passwd root   (to reset the password)
0
 
LVL 11

Accepted Solution

by:
kblack05 earned 250 total points
ID: 18809481
You'll need to mount the filesystem first. In that version of Redhat I'm not sure there was a dialog promt to do this. Firstly use fdisk to see which is the master partition, on many this is /dev/hda2, but use fdisk -p to be sure (make sure not to write with FDISK you don't want to modify the partitions, only view them *man fdisk*)
If it is an ext3 filesystem you would do (modify to ext2, or use without '-t' if not)

mount /dev/hda2 -t ext3 /mnt/filesystem
(you may need to mkdir /mnt/filesystem on older kernels)

chroot /mnt/filesystem

passwd
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux : how to see memory usage by various processes in segregated output  format 15 141
Best software based IDS? 5 112
Linux SCP Chroot 2 64
SFTP restrict upload file only 2 33
​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Fine Tune your automatic Updates for Ubuntu / Debian
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now