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

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

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.


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

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