restore

Jerry McAllister jerrymc at clunix.cl.msu.edu
Tue Mar 1 21:36:06 GMT 2005


> 
> In which it is proven yet again that I don't know what
> in blazes I'm doing-----.
> 
> I am a great fan of swappable hard drives.
> i have two machines I plan to use for FreeBSD.
> Let's call them the production machine and the
> development machine.
> 
> The production machine is working just fine.
> All the FreeBSD stuff is on ad0s1, a 40 GB hard drive.
> I have been using a 120 GB drive on ad0s1 for
> backup, and have (apparently successfully) done
> a dump of production / and /usr.
> 
> So, I fire up the development machine with
> the 120 GB drive as the slave of controller 1,
> what I would like to be the main drive of the
> development system (a 40GB hard drive) as
> the master of controller 0, and disk 2 of the 
> Free BSD CD-ROMs in the CD-ROM drive.
> 
> Up comes beastie and I boot.
> I select "fixit" from the menu, followed by alt-F4.
> 
> Then:
> mount /dev/ad0s1a /mnt (to make the new root accessible to 
>                                          the system).
> mkdir backup                   (make a mount point for the 120GB drive)
> mount /dev/ad3s1a /backup (mount the 120 GB drive)
> newfs /dev/ad0s1a           (start the new root with a clean sheet 
>                                           prior to doing a retore)
> 
> BUT instead I get a diagnostic as follows:
> fstab: /etc/fstab:0: No such file or directory
> newfs: /dev/ad0s1a: failed to open disk for writing
> 
> Could anybody tell me what I *should* be doing (bonus
> extra points for expalining why :-) )?"

Well, I got a little confused as to which machine has which drive[s]
Especially when you say early on that everything on the production 
machine is on ad0s1 - a 40 GB drive and then say you are doing
backups to ad0s1 - a 120 GB drive.   That sounds like you have
two ad0 drives on the machine at the same time.   I suspect something
is missing of twisted in the description.

But, farther down seems to be your real problem.
The first question is did you look at the boot messages when you
came up in fixit and are sure that ad0 and ad3 are the devices you 
need to be dealing with?   I kind of would have expected ad0 and ad1
or maybe ad0 and ad2, but I am not used to mucking with IDE controllers.

Next, why did you try and mount /dev/ad0s1a and then newfs /dev/ad0s1a
That should not work at all.   You don't newfs a mounted partition.
Second, that would wipe what is on there - maybe you want that.

I don't know why it complains about fstab at that point.  The fixit
does not create one, but I don't see where it is needed for what you
are trying.   Maybe, just doing the wrong thing with newfs got it
to trying to check stuff.

Anyway, There are some thoughts of things to work out.  Maybe
they will give you a clue of what to try next.

////jerry

>   -LenZ-


More information about the freebsd-questions mailing list