LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to use A rescue disk? (https://www.linuxquestions.org/questions/slackware-14/how-to-use-a-rescue-disk-867592/)

M$ISBS 03-09-2011 09:01 PM

How to use A rescue disk?
 
Ive got an old hard drive with slack on it but I lost the root password. I booted up with the slack install disk but I dont remember how to mount the drive so I can see whats on it.
Ive tried to mount it with things like mount /dev/hda
and mount /dev/sda and others with no luck.

corp769 03-09-2011 09:08 PM

Did you look into /dev to see what all devices you have?

M$ISBS 03-09-2011 09:22 PM

Yea, ive looked there Theres a whole bunch of stuff. When I try to mount I get the message "cannot find /dev/sda in fstab"

ewsmith 03-09-2011 09:30 PM

i use 'mount /dev/sda6 /mnt/gentoo' to mount my gentoo partition with slackware
and 'mount /dev/sda2 /mnt/slackware' to mount my slackware partition with gentoo
try to find the partition number of the / then use that

corp769 03-09-2011 09:30 PM

Maybe your HD is there but being listed as something different? Are you able to boot via hard drive? If so, then it most likely has to be there man. If anything, post the contents of /dev.

M$ISBS 03-09-2011 09:38 PM

I just figured it out... I booted to the HD and saw that it was sda1, I thought I had tried that already, I guess not.
Thanks for the help. :)

corp769 03-09-2011 09:41 PM

What was the problem?

disturbed1 03-09-2011 09:54 PM

cat /proc/partitions will give you a list of partitions.

You don't mount a drive, you mount the partitions.

If you only lost the password, boot to single user, and issue the passwd command to change the password.
At the lilo screen press tab. Type in the name of your kernel followed by init=/bin/bash. If you kernel is named Linux it would be -
Code:

Linux init=/bin/bash
This boots directly before single user mode, and logs you in as root. Mount the root file system as read/write
Code:

mount -o rw,remount /
Issue the passwd to change the root password, and reboot.

M$ISBS 03-09-2011 10:19 PM

The problem was that I simply did not format the mount command properly... :-

disturbed.... I will give that a try, I did not know you could do that. Thanks.

PDock 03-10-2011 03:03 PM

disturbed1, it is really disturbing how reading posts such as your #8 make me realize how little I know having puttered with Slackware for more years than I wish to admit.

Here I've been: booting a live/install cd, mounting the / partition on /mnt, using vi (which I am not fond of cause I found mc and never became proficient in vi) to remove the first 'x' of the root line in /etc/passwd, saving the file and rebooting.

While Grecian formula may hide my gray hairs, it has no regenerative effect on the gray cell beneath.

Thanks for your post

ppd

M$ISBS 03-10-2011 08:42 PM

Quote:

Originally Posted by disturbed1 (Post 4284997)
cat /proc/partitions will give you a list of partitions.

You don't mount a drive, you mount the partitions.

If you only lost the password, boot to single user, and issue the passwd command to change the password.
At the lilo screen press tab. Type in the name of your kernel followed by init=/bin/bash. If you kernel is named Linux it would be -
Code:

Linux init=/bin/bash
This boots directly before single user mode, and logs you in as root. Mount the root file system as read/write
Code:

mount -o rw,remount /
Issue the passwd to change the root password, and reboot.

I followed these instructions and they worked perfectly, Thanks for the help. :)

Side Note: Being able to change a root password so easily seems kinda strange.... :----:

disturbed1 03-10-2011 08:54 PM

Quote:

Originally Posted by M$ISBS (Post 4286320)
I followed these instructions and they worked perfectly, Thanks for the help. :)

Side Note: Being able to change a root password so easily seems kinda strange.... :----:

Keep in mind a person needs physical access to the machine. You can also enable password protections in the BIOS and Lilo :)
http://www.brunolinux.com/05-Configu...tect_Lilo.html

T3slider 03-10-2011 09:06 PM

Quote:

Originally Posted by disturbed1 (Post 4286334)
Keep in mind a person needs physical access to the machine. You can also enable password protections in the BIOS and Lilo :)
http://www.brunolinux.com/05-Configu...tect_Lilo.html

But then you can just move the hard drive to another machine, do what you want, and move it back. Encrypting the hard drive is the only method (that I'm aware of) that requires considerable effort to get around when you have local access to the machine. Remote access of course is more difficult to obtain...


All times are GMT -5. The time now is 05:24 AM.