Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 15:38:29 -0500 (CDT)
From:      "Roger P. Johnson" <rpj@fep.hirshfields.com>
To:        freebsd-questions@freebsd.org
Subject:   Restoring disk from tape, now I can't login.
Message-ID:  <200004242038.PAA15680@fep.hirshfields.com>

next in thread | raw e-mail | index | archive | help
Hi,

I was trying to make a copy of my disk sd0 so I would have a backup disk
in case it should die. I'm doing this working on 2 different machines at the
same time.

I'm using FreeBSD 2.2.6.

On the 2nd machine and hard drive, I created my disklabel, installed the
minimim FreeBSD OS option, reboot it and can boot and run from this 2nd
machine and disk (all from the FreeBSD installation program as usual).

Now on this 2nd machine, I boot up into "Fixit" mode, mount all the partions
onto their repective places (/mnt, /mnt/usr, /mnt/var etc).

Then I do a full restore from tape onto the 2nd hard drive containing the
data from my 1st machine and drive.

I unmount all the partions from /mnt.

I reboot.
 
I get the login and password prompts. I enter _valid_ username and password
combonations, but instead of getting logged into the system, it cycles back
to the login: prompt again.

I have checked ownership & permissions on the 2nd drive of these files:

   /etc/group         OK
   /etc/passwd        OK
   /etc/master.passwd OK
   /etc/spwd.db       OK
   /etc/login.conf    OK
   /usr/bin/login     OK
   /etc/login.access  OK

I have also copied the passwd, master.passwd, and spwd.db from the 1st disk
to the 2nd. Same problem again.

I have also, from the Fixit mode, rebuilt the passwd security stuff via
pwd_mkdb. Same problem again.

Now I did a dd(1) partion image copy from the 1st disk:
   dd if=/dev/rsd0s1a of=/var/tmp/sd0s1a bs=8192
Then tar'd this to tape (called sd0s1a btw). Brought it over to the 2nd
machine, tar'd it off of tape onto its hard drive, then dd'd this file
onto the root partion (which is unmounted of course):
   dd if=/mnt/sd0s1a of=/dev/sd0a bs=32768
   (NOTE: if I use of=/dev/rsd0a; dd comes back with:
          dd: /dev/rsd0a: Read-only filesystem.
          Say what? why does dd question what devices I feed it?
          BTW: cp /mnt/sd0s1a /dev/sd0a works too)
So anyways, the copy finishes.
Reboot the machine.
Same exact problem. I get login:, but whatever login/password used just gives
me login: again!

What did I miss? This has happend on two different FreeBSD 2.2.6 systems now.

Now my confidence in restoring a crash root disk for real bothers me!

The 1st disk was archived to tape using tar.

Any suggestions?

Thanks
Roger


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004242038.PAA15680>