salvaging hard drive contents

2009-10-08 Thread jeffry killen

Hello;
I have a hard drive that contains the /var file system in a system that
will not boot.
In single user mode I can mount  /var.

I want to take this disk and put it in another FreeBSD system and
try to copy the files I need off of it to a safe place.

The system I will plug it into will also have a separate disk with
/var.

Is there going to be a conflict with the labels and how would I
best go about this?


response to above query---

There will be no conflict.  All the magic as to 'wher to mout what' is 
in
the /etc/fstab file.  because it doesn't know about the disk you're 
adding,
ther won'tbe any conflicts. Simply use the long form of mount(1), to 
wit:

mount devicename mountpoint, and mount it on any convenient location,
say '/mnt'.
--
Now I have the hard disk I want to recover mounted but please for give 
me

for being in the learning phase, but how to I cd on to this drive?

I mounted it using the suggested 'mount -r (in this case ad12s1d) /var'
now how do I actually read it?
I tried cd ad12s1d/var and I got the 'file does not exist' response.
If I do
cd /;  ls -la
I do not see an added entry.

Thanks for suggestions, info, etc
Jeff K




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: salvaging hard drive contents

2009-10-08 Thread Warren Block

On Thu, 8 Oct 2009, jeffry killen wrote:


Now I have the hard disk I want to recover mounted but please for give me
for being in the learning phase, but how to I cd on to this drive?

I mounted it using the suggested 'mount -r (in this case ad12s1d) /var'
now how do I actually read it?


What you've done there is mount your salvage drive over your running 
system's /var.  That's probably going to give you problems, possibly 
very quickly.  Just umounting the incorrect /var is probably not going 
to be enough.  You might have to reboot.


Once that's cleared up, use a mountpoint that's not doing anything. 
/mnt is commonly used for that.


mount -r /dev/ad12s1d /mnt

Then /mnt contains the salvage drive's var filesystem:

cd /mnt
ls

-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org