LiveCD wiping root partition?

Douglas McClendon dmc.fedora at filteredperception.org
Tue Jul 31 16:36:11 UTC 2007


Michel Salim wrote:
> I just did a clean install of Fedora 7 from the live CD onto my laptop,
> which previously had a Fedora install upgraded from one of the F7 test
> releases, partitioned as suggested by anaconda (LVM, one swap partition,
> everything else under '/')
> 
> When reinstalling, I kept the partition layout and specifically told
> Anaconda *not* to reformat / (having booted in rescue mode beforehand, and
> removing everything but /home). Anaconda gave a warning that the leftover
> files might interfere with the installed system, which gave the impression
> that those files won't actually be removed during installation.

I don't remember the specific warning, but if it is not clearly indicating that 
unselecting the format option on '/' is not allowed, then that is a bug that 
should be fixed either with better user messages, or alternate installation 
mechanisms.

I didn't have anything to do with what's in F7, though I did know enough about 
it to catch the fact that the 'formatting / filesystem' during the process was 
meaningless and time consuming, so that will be gone from from F8.

> 
> As it turns out, however, the old contents are completely gone (I'm trying
> out different recovery tools now to see if I could rescue some of the data).
> It's as if the live CD simply used dd to transfer the install image to the
> hard drive (in which case, how does it actually handle different partition
> layouts, e.g. /usr, /var, /home on separate partitions -- does it just move
> the files afterwards?)
> 
> As it stands it seems that the Live CD is a very dangerous tool, at least as
> long as
> 1) the default behaviour of Anaconda is to put everything under /
> 2) it does not carry more warnings about what it will do to the / partition
> during installation
> 
> Could someone let us know how the live CD actually performs its work? 


It takes a 4.0G ext3 fsimage from the cd, effectively dd's it to the chosen root 
volume, then does a resize2fs.


It
> would aid tremendously in the data recovery part. Would 'dd'-ing the entire
> partition to an external drive, and mounting it on a Windows computer (most
> recovery tools are unfortunately for that platform) preserve all the data
> required? I'm assuming that the new installation overwrote the same parts of
> the disk that was used to hold the OS in the previous install.

As long as you haven't done much, data that was sitting in the first 4.0G of the 
filesystem will be gone, but data in the rest should be largely untouched.  I 
have no idea how to go about trying to recover it (haven't used any windows 
tools), except asking for expensive professional date recovery help.  Or if all 
I cared about was a text file, using 'strings' and 'grep' on chunks of the disk 
data.

-dmc




More information about the fedora-devel-list mailing list