Salvage files from harddrive

David Cross crossd at
Wed Aug 4 03:08:03 UTC 2010

FreeBSD 6.2 didn't use volume labels the same way that 7 and above do; 
and even then only if you specifically label the filesystems, and even 
then you can get to the filesystems with the 'bus' methods (which is 
what you need to do in 6.2 anyway)

On your system that you have access to /var in single user mode, note 
what 'df /var' returns for the device, it will be in the form of:


where X and Y are numbers, and 'L' is a letter.  Take note of  'Y' and 
'L', but you can ignore 'X'.

on the working system note what disks are currently in the system, if 
you run 'df -l' you'll get a list of everything in the form of above, 
there make note of 'X' (and ignore 'Y' and 'L').

Now shutdown, move the drive over, and reboot, pay attention to the 
kernel messages, you should see a new 'adX' line come up that wasn't 
there on the working system before, this is where your new drive is.

(typical layouts are that ad0 is the primary-master, ad1 is the 
primary-slave, ad2 is the secondary-master, ad3 is the 
secondary-slave... with sata motherboards ad4 can be the first sata 
port, ad6 is the next, etc.. these are just generalities to help guide 
you, pay attention to what the kernel tells you)

now that you have that do

mount /dev/adXsYL /mnt    (take 'X' from the "new" disk on the working 
system, and YL that you took note of above.).. your old /var will now be 
on /mnt

David E. Cross

On 10/7/2011 7:07 AM, jeffry killen wrote:
> 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?
> system is FreeBSD v6.2
> Thank you in advance for guidance, suggestions.
> JK
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list