Restoring backup on vergin disk

Pawel pawciobiel at gmail.com
Thu Jan 19 17:33:47 PST 2006


Hi
I have done backup my root,usr,var directorys using tar ( tar cvlzf -X 
exclude /usr/backup/root.tar /usr ), made bootable cd with backup on it.
I then, decide to restore my system on a vergin drive
and on another hdd which already contains old linux.
So I've put in my vergin brand new disk in, boot freebsd from CD which 
contains my backup and typed:

/sbin/fdisk -BI ad0

/sbin/disklabel -w -r -B ad0s1 auto

# Copy blank label to tmp
/sbin/disklabel ad0s1 > /tmp/saved_label

# Add generic partition table from cd and re-apply to the disk
cat ./partition_layout
   a:  130M      0       4.2BSD
   b:  512M      *       swap
   e:  256M      *       4.2BSD
   f:  256M      *       4.2BSD
   g:  100%      *       4.2BSD

/bin/cat /root/partition_layout >> /tmp/saved_label
/sbin/disklabel -R ad0s1 /tmp/saved_label

# Format the disk and enable auto-updates
/sbin/newfs /dev/ad0s1a
/sbin/newfs /dev/ad0s1e
/sbin/newfs /dev/ad0s1f
/sbin/newfs /dev/ad0s1g
/sbin/tunefs -n enable /dev/ad0s1a
/sbin/tunefs -n enable /dev/ad0s1e
/sbin/tunefs -n enable /dev/ad0s1f
/sbin/tunefs -n enable /dev/ad0s1g

# Copying backup to drive
/sbin/mount /dev/ad0s1a /mnt
mkdir /mnt/var
mkdir /mnt/usr
/sbin/mount /dev/ad0s1e /mnt/var
/sbin/mount /dev/ad0s1g /mnt/usr
/sbin/mount /dev/ad0s1f /mnt/tmp
/sbin/mount_cd9660 /dev/acd0a /mnt1
tar xvpf /mnt1/root.tar -C /mnt
tar xvpf /mnt1/var.tar -C /mnt
tar xvpzf /mnt1/usr.gzip -C /mnt
...

reboot and it didn't worked on vergin disk but it worked on old one.
I have tryed few other ideas like put some old hdd with M$ on it and after 
   restore system boot.
So I have put another brand new, vergin disk and it didn't.

Any Suggestions?

Regards,
pawciob





More information about the freebsd-fs mailing list