1 |
In the aftermath of my recent disaster in which I accidentally |
2 |
reformatted my root partition I have been trying to install a new |
3 |
system. Unfortunately this has led to some more partitions being |
4 |
accidentally deleted and one of them had important data on it I need to |
5 |
recover. |
6 |
|
7 |
Unlike last time, this time the error was not mine. It was a fault |
8 |
either in the Gentoo Linux Installer or in whichever utility it uses to |
9 |
deal with partitions. |
10 |
|
11 |
This is what happened. |
12 |
|
13 |
I booted the live CD with evms enabled. |
14 |
|
15 |
At the start there were two primary partitions on the disk in question, |
16 |
followed by one extended one. The extended one in turn had four logical |
17 |
partitions. |
18 |
|
19 |
When I started the installer I went through all the screens and told it |
20 |
what I wanted. When it came to partitioning I told it to delete the |
21 |
first primary partition and replace it with one the same size, and to |
22 |
delete the first logical partition and replace it with one the same size |
23 |
also. This one was to be formatted reiserfs. I then saved my settings |
24 |
before setting the installer to work. |
25 |
|
26 |
It appeared from the messages that the installer had reformatted deleted |
27 |
and replaced the first logical partition (although I don't know whether |
28 |
it formatted it or not), but it borked when it came to the first primary |
29 |
partition, saying that it was in use by the system. It wasn't mounted so |
30 |
I suspected this might have had something to do with evms, but that |
31 |
didn't make sense to me because both of the partitions in question had |
32 |
entries in /dev/evms, but only one could be deleted and not the other. I |
33 |
decided not to use evmsn to edit them and instead to try again with the |
34 |
gentoo installer. |
35 |
|
36 |
I started up the installer a second time (well, a fifth time actually) |
37 |
and reloaded my settings from before. I was a bit puzzled when it came |
38 |
to the partitioning screen because there was no easy way to tell whether |
39 |
the partition diagram it displayed was how things actually were, or was |
40 |
how things were supposed to be after various operations were carried |
41 |
out. However I didn't want to spend all night choosing my use flags over |
42 |
and over again each time the installer failed so I went ahead with the |
43 |
settings from previously. |
44 |
|
45 |
This time the installer complained that it couldn't have two partitions |
46 |
in the same place, or something like that. I don't remember exactly. So |
47 |
I started the installer again, reloaded my settings and found that the |
48 |
three partitions after the logical partition I wanted replaced had now |
49 |
all been deleted. |
50 |
|
51 |
When I looked at the partition layout in parted I was surprised to find |
52 |
that the logical partition I had wanted replaced was now larger than it |
53 |
had been. It had been around 98GB or 99GB, but now it was 105GB. This |
54 |
would be large enough to extend into the space occupied by the second |
55 |
and third logical partition, but not the fourth, which was nonetheless |
56 |
deleted too. parted listed no file system type for the remaining logical |
57 |
partition, so I don't know whether it has been formatted (with reiserfs) |
58 |
or not. I suppose I should have tried to mount it -ro to check, I can go |
59 |
back and do that if it would be useful. |
60 |
|
61 |
Anyway, the partition I now need to recover would be the third logical |
62 |
partition (the one that the remaining logical partition just overlaps). |
63 |
Am I right in thinking that if the remaining logical partition has in |
64 |
fact been formatted, that the only changes that will have been made to |
65 |
the disk will have been at the beginning of that partition, and that |
66 |
therefore the data from the third partition ought to be intact? |
67 |
|
68 |
Presumably then I simply need to find out where the beginning of that |
69 |
partition would have been and to create another one of a sufficient size |
70 |
starting in the same place (having deleted the first logical partition |
71 |
of course). Is that right? |
72 |
|
73 |
If so, how can I determine where the beginning would have been of that |
74 |
deleted partition? It was, in its former life, an ext3 partition. |
75 |
|
76 |
Many thanks |
77 |
Robert |
78 |
|
79 |
-- |
80 |
gentoo-user@g.o mailing list |