migrating to new disk - selinux problem?

Petr Fischer petr.fischer at praguesoft.cz
Wed Feb 15 20:49:24 UTC 2006


Thanks. pf

Stephen Smalley píše v St 15. 02. 2006 v 15:29 -0500:
> On Wed, 2006-02-15 at 12:52 -0500, Stephen Smalley wrote:
> > On Wed, 2006-02-15 at 15:25 +0100, Petr Fischer wrote:
> > > I really don't want install fresh system on new disk (like windows
> > > reinstalls... ugly... fusty...) - I need migration by transparent
> > > filesystem way - and this didn't work - should I post to fedora-dev
> > > list?
> > > 
> > > What about "cp -ax"? Is all (selinux) attributes really copied?
> > 
> > No.  You need cp --preserve=all to preserve SELinux attributes (or at
> > least --preserve=context).  BTW, setfiles has an alternate root path
> > option (-r /path/to/altroot) that can be used to label a filesystem
> > under a different root, which can be helpful when constructing a root
> > filesystem separate from the operational one.
> 
> Short form of --preserve=context is -c, so you could do e.g.
> 	cp -acx /path/to/old /path/to/new
> 
> -- 
> Stephen Smalley
> National Security Agency
> 




More information about the users mailing list