In the aftermath of my recent disaster in which I
accidentally
reformatted my root partition I have been trying to install
a new
system. Unfortunately this has led to some more partitions
being
accidentally deleted and one of them had important data on
it I need to
recover.
Unlike last time, this time the error was not mine. It was a
fault
either in the Gentoo Linux Installer or in whichever utility
it uses to
deal with partitions.
This is what happened.
I booted the live CD with evms enabled.
At the start there were two primary partitions on the disk
in question,
followed by one extended one. The extended one in turn had
four logical
partitions.
When I started the installer I went through all the screens
and told it
what I wanted. When it came to partitioning I told it to
delete the
first primary partition and replace it with one the same
size, and to
delete the first logical partition and replace it with one
the same size
also. This one was to be formatted reiserfs. I then saved my
settings
before setting the installer to work.
It appeared from the messages that the installer had
reformatted deleted
and replaced the first logical partition (although I don't
know whether
it formatted it or not), but it borked when it came to the
first primary
partition, saying that it was in use by the system. It
wasn't mounted so
I suspected this might have had something to do with evms,
but that
didn't make sense to me because both of the partitions in
question had
entries in /dev/evms, but only one could be deleted and not
the other. I
decided not to use evmsn to edit them and instead to try
again with the
gentoo installer.
I started up the installer a second time (well, a fifth time
actually)
and reloaded my settings from before. I was a bit puzzled
when it came
to the partitioning screen because there was no easy way to
tell whether
the partition diagram it displayed was how things actually
were, or was
how things were supposed to be after various operations were
carried
out. However I didn't want to spend all night choosing my
use flags over
and over again each time the installer failed so I went
ahead with the
settings from previously.
This time the installer complained that it couldn't have two
partitions
in the same place, or something like that. I don't remember
exactly. So
I started the installer again, reloaded my settings and
found that the
three partitions after the logical partition I wanted
replaced had now
all been deleted.
When I looked at the partition layout in parted I was
surprised to find
that the logical partition I had wanted replaced was now
larger than it
had been. It had been around 98GB or 99GB, but now it was
105GB. This
would be large enough to extend into the space occupied by
the second
and third logical partition, but not the fourth, which was
nonetheless
deleted too. parted listed no file system type for the
remaining logical
partition, so I don't know whether it has been formatted
(with reiserfs)
or not. I suppose I should have tried to mount it -ro to
check, I can go
back and do that if it would be useful.
Anyway, the partition I now need to recover would be the
third logical
partition (the one that the remaining logical partition just
overlaps).
Am I right in thinking that if the remaining logical
partition has in
fact been formatted, that the only changes that will have
been made to
the disk will have been at the beginning of that partition,
and that
therefore the data from the third partition ought to be
intact?
Presumably then I simply need to find out where the
beginning of that
partition would have been and to create another one of a
sufficient size
starting in the same place (having deleted the first logical
partition
of course). Is that right?
If so, how can I determine where the beginning would have
been of that
deleted partition? It was, in its former life, an ext3
partition.
Many thanks
Robert
--
gentoo-user gentoo.org mailing list
|