On Fri, Jul 14, 2017 at 10:46:14PM -0400, Nick Holland wrote:
> On 07/14/17 09:00, Raimo Niskanen wrote:
> > Hi misc@.
> > 
> > I wonder how to restore from an /altroot backup?
> > 
> > (I missed that pax -r happily writes absolute paths and wrote over
> >  /etc from a backup file of another machine)
> > 
> > 
> > Is it to dd(1) back all but the first 16 blocks - the reverse of what
> > daily(8) does?  Is that all that is needed?
> 
> don't...
> 
> > (I missed to skip the first 16 blocks, and I used the block devices instead
> >  of the character devices.  The result was a vegetable, and would like to
> >  understand which of my mistakes that were fatal.)
> 
> yeah, that's why.  It CAN work, but ... it is the hard way and it's
> error prone.
> 
> better way: let's say sd1k is your /altroot...
> 
>     # mount /dev/sd1k /altroot
> 
> now...it's just a normal file system on a normal place.  Copy out
> whatever you want.  umount it when done, please.
> 
> Nick.

Yes, thank you!  That is the safe way.  In this case I wanted to get rid
of all files that my pax fumbling had put there, so I wanted to clear the
root filesystem and copy back all from /altroot.  But then I also would
have ro run installboot on the restored root filesystem, right?

Is that the right(tm) way to do it?

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply via email to