Hi Eric,

I've never tried this, but it should work. Boot into your Mandrake
install media. Once you get to the main screen, type "F1" to get the
other options screen. Once there, type "rescue". If memory serves, the
install CD should work as a rescue disk as well and you should (after a
minute or two) be placed in a very slimmed down console version of
Linux.

While the kernel is loading, pay close attention to where your hard
drive is located. You should see the name of your hard drive and
something like "/dev/hda" go by. You can use scroll lock if it goes by
too fast. Write this down, you'll need it later.

Once you're in the "rescue" mode, you'll have basically a bare bones
system with none of your drives mounted. Create a directory off the root
called "mydrive" (or anything you would like). Then, mount your Linux
partition.

To mount your Linux partition, use the command mount -t ext2 <device>
mydrive

<device> tells Linux what you're mounting. Part of it will be the device
that was identified as your hard drive as you booted up (/dev/hda or
something similar) and part will be the partition number of that device.
For example, if your Linux partition is the second partition of the hard
drive identified as "/dev/hda", <device> would be probably be /dev/hda2
(it can get a little goofy with extended partitions and such). In this
example, your mount command would be:

mount -t ext2 /dev/hda1 mydrive

This also assumes that you used ext2 (the default) file system type when
you installed Mandrake. If you used Reiser, you would replace ext2 with
"reiserfs" I believe.

If you get the cryptic error "wrong fs type, bad option....." it means
your mounting the wrong partition. Don't fear. In the worst case, start
with /dev/hda1 and go to /dev/hda10 until something works. You'll get it
eventually. If your familiar with fdisk, you can also get more
information about your partitions there by running the command "fdisk
/dev/hda" and using the "p" option to print the partition tables. 

Once you have the hard drive mounted, go to the /mydrive directory. Type
"chroot /mydrive" and hit enter. This "fools" Linux into thinking that
the root of the filesystem is now in /mydrive rather than the rescue
filesystem provided by Mandrake. At this point, you're essentially
working with your filesystem.

To change your root password, type /usr/bin/passwd <new password>. You
should get the message that "all authentication tokens updated
successfully" or something like that after you're prompted for a
confirmation (and in my case, usually scolded for having a weak password
:).

At this point, you're done! I can't remember how to get out of rescue
mode cleanly off the top of my head. I would try typing "exit" and
seeing if that works. Otherwise, "shutdown -h now" or maybe just
"reboot" will probably work. Barring that, I would just reboot the
machine via the power switch. Cross your fingers and good luck!

Good luck!

David

-----Original Message-----
From: Eric [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 1:40 PM
To: [EMAIL PROTECTED]
Subject: [expert] New user.


I forgot my password to my linux mandrake 7.1 platform and I can't get
in.
I cannot log in as root or anything.  Is there anyway to create a new
user
without that?  I have my hardrive partitioned so that I have windows and
linux installed.  I am using a program called grub to select which disc
operating system I want.  When I boot into Linux I have only the choice
of
the graphical logon.  The regular one only lasts for about 2 seconds and
then it logs onto the graphical one.  I tried hitting ctrl+alt+backspace
but
it just logs back into the graphical logon.  I am really really screwed
over
here and I would appreciate any help.  I sent this to the newbie mailing
list and they were not any help.  Oh, trying to logon as 'linux single'
does
not work for me.  If anyone has these configurations and this version,
your
input is much appreciated.  Thanks for your time.

Confused,
Eric


Reply via email to