soup4you2
September 8th, 2003, 19:19
Ok this is a tricky one...
When i installed FreeBSD i goofed and installed it on the wrong damm drive.. i've also spent many days customizing it.. so i value my config..
the current drive installed is ad1 the drive i want it on is ad2
i made all the labels and everything the way i want it.. even added a bit of extra sauce this time.. i've copied everything to the new locations via ( cp -Rvp) edited the fstab to reflect ad2 and all the new labels..
now how do i get a proper working boot loader on this puppie so if i disable ad1 it will fire up.. ?
works right now off ad2 but ad1 still needs to be attached because of the current loader..
bsdjunkie
September 8th, 2003, 20:22
Instead of copying everything by hand that way, you want to check out using dump/restore or dd.
v902
September 8th, 2003, 20:30
Just a question but does dump/restore have an advantage over pax?
bmw
September 8th, 2003, 21:01
Just a question but does dump/restore have an advantage over pax?
For doing regular backups? Yes, very much.
dump/restore handle all filesystem objects, including devices, sockets, named pipes, symlinks, etc., and restores them in their original form, dates and modes included.
dump can do incremental backups, where the only backed-up data is that which is newer than the previous lower-numbered incremental or full backup. This is a big win in any situation where your backup media is smaller than storage, and/or you want to be able to do a series of nightly unattended backups onto a single tape.
restore -i (interactive) allows you to browse through a backup dump tape and mark items for restoring, then restore them all in one operation unattended.
Of course, dump/restore dates back to a happier time before GUIs when real men used 80x24 dumb terminals, so the ui is pretty modest, basically command-line like pax/tar/cpio.
soup4you2
September 8th, 2003, 21:29
ok PLEASE correct me if i'm wrong on this... i havent tried it yet..
we make our newfs
newfs /dev/ad2s1a (though ad2s1h)
mkdir -p /tmp/root (including the other filesystems)
mount /dev/ad2s1a /tmp/root
(dump -0f - / ) | ( cd /tmp/root ; restore -rf - )
umount /tmp/root
tunefs -n enable /dev/ad2s1a
then move the ide cable to make ad2 ad1 and edit the fstab file
is this process correct?
|MiNi0n|
September 8th, 2003, 22:19
(dump -0f - / ) | ( cd /tmp/root ; restore -rf - )
Looks about right soup, except do you only have one partition (ie - /)? Dump works with filesystems so while a tar of / will include /var, /usr, dump will not!!!
So... depending on your setup, you'll need something like as well:
(dump -0f - /var ) | ( cd /tmp/var ; restore -rf - )
(dump -0f - /usr ) | ( cd /tmp/usr ; restore -rf - )