Re: dump/restore and SElinux security context problem



Kayvan A. Sylvan wrote:
Hi everyone.

I was trying to upgrade from FC4 to FC5, but my root partition was too small
to accomodate the DVD image. So, I had to resize some partitions. GNU parted
was useless in that task (see Redhat Bugzilla Bug 90894).

Finally, I used "dump" to create a snapshot of a filesystem, then, using
the FC5 DVD to boot into rescue mode, used "restore" to recreate it.

The problem: during the restore, for every file, I get messages like this:

restore: lsetxattr ./System.map-2.6.15-1.1833_FC4 failed: Invalid argument

This feels like it's related to SELinux. In fact, looking at
the restored files with "ls -Z", I see that they are all unlabeled.

If I don't use the rescue CD, and instead, on a running system where SELinux
is enabled, do the following:

1) setenforce 0
2) restore from the dump.
3) setenforce 1

Then, the restored files are in their correct security context.

How do I get this same result (files completely restored, along with
their extended attributes) while using the rescue CD?

Hi Kayvan,

Interesting problem. Why is it important that you use the rescue CD?
Why can't you just do a fresh install of FC5 and then do a restore?
My end goal is to be able to do a dump, boot into a rescue mode,
resize partitions, format new filesystems and restore the dump, and have
all files retain all their attributes (including their SELinux context
information).
If you use the install procedure, can't you resize partitions and format new filesystems and then, from the running FC5-system do a restore?

Guus.

--
A.J. Bonnema, Leiden The Netherlands,
user #328198 (Linux Counter http://counter.li.org)

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: System Volume Information Wont Die
    ... The SVI folders I'm talking about came from the merged partitions, i.e., ... SVI folder and delete them all. ... Do all partitioning and restore the saved files to the ... Restore tab in Control Panel to be sure that System Restore really was ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: image a disk/partition?
    ... >restore them, either completely or just a few first partitions. ... To backup any of my partitions I use the following command, ... believe this is because I zero the drives before turning them into test ...
    (freebsd-questions)
  • Re: ASR - XP Pro q
    ... before the recovery starts. ... "Everything" and reformat it's partitions also. ... that the law requires the consumer be able to restore the computer back to ... The consumer should NOT have to purchase a restore tool, a tape backup unit, ...
    (microsoft.public.windowsxp.general)
  • Re: Out of Disk Space SBS2003
    ... Restoring from tape to larger partitions should be fine. ... You dont really have to update the server too extensively when running the restore stage as this will overwrite everything, though I tend to put any major service pack on if available. ... On the Exchange side you can move the databases really easily. ...
    (microsoft.public.windows.server.sbs)
  • Re: Cloning CompactFlash image
    ... When you clone the image on a different CF card, did you verify the result CF content? ... Did you see the partitions created with proper FS and file&directory structure of your image? ... verify that the system partition in your design is marked as active on the new CF card after you restore the image on it. ... > connect the systems to a network, and doesn't matter the SID problem. ...
    (microsoft.public.windowsxp.embedded)