On 11/01/10 17:10, Michel G..Maria-Sube wrote:
Situation was before:
/dev/hda1 * 1 2416 19406488+ 7 HPFS/NTFS
/dev/hda2 2417 2433 136552+ 83 Linux
/dev/hda3 2434 2534 811282+ 82 Linux swap / Solaris
/dev/hda4 2535 4864 18715725 83 Linux
and became:
/dev/hda1 0 16375 131532187+ 83 Linux native
/dev/hda2 u 16375 16381 48195 82 Linux swap
/dev/hda3 0 16381 131580382+ 5 Disque entier
I have some more informations about first configuration, for example with parted:
(parted) unit s print
Disk geometry for /dev/hda: 0s - 78140159s
Type d'étiquette de disque: msdos
Number Start End Size Type File system Fanions
1 63s 38813039s 38812977s primaire ntfs amorce, type=07
2 38813040s 39086144s 273105s primaire ext3 type=83
3 39086145s 40708709s 1622565s primaire linux-swap type=82
4 40708710s 78140159s 37431450s primaire ext3 type=83
But once I got informations, how to re-write in the /dev/hda or MBR??
Regards
Using fdisk.
"d" deletes the partition (first type <d> return, then the partition
number). Repeat for all 3 "bad" partitions.
Once you have removed all 4 "bad" partitions, go into expert mode
("x"),
and set number of sectors (s), heads (h), cylinders (c). As far as I can
see, the disk was supposed to have 63 sectors, 255 heads and 4864 cylinders.
Then return back to main menu using "r".
Use "n" to create a partition. After entering n, fdisk then prompts for
"e"xtended, "l"ogical or "p"rimary => in your case,
it's "p".
Then it prompts for first cylinder (1), and last cylinder (2416)
After you have created the partition, you can activate it using "a", and
change its type (83) using "t".
Repeat for all 4 partitions you want to re-create.
Verify what you entered using "p" ==> it should look the same as what you
had near the top of this mail.
If satisfied, "w"rite.
Regards,
Alain
--- On Mon, 1/11/10, Alain Knaff <alain(a)knaff.lu> wrote:
> From: Alain Knaff <alain(a)knaff.lu>
> Subject: Re: [Lilux-help] restoring partition table
> To: "Michel G..Maria-Sube" <mgms1(a)yahoo.com>
> Cc: Lilux-help(a)lilux.lu
> Date: Monday, January 11, 2010, 2:50 PM
> On 11/01/10 15:34, Michel
> G..Maria-Sube wrote:
>> Hello,
>>
>> Does anybody kno if there is a mean to retreive a
> partition table erased after doing option 'w' in the fsdisk
> menu??
>>
>> Thank you in advance
>> Regards
>>
>
> You could try to "guess" the location of the partition. If
> you have still
> some info about the disk, this may not be as difficult as
> it sounds:
>
> 1. Most disks have only one partition.
> 2. Often, the first partition starts at first sector of
> second head of
> first cylinder. If not, searching for the boot signature
> may help:
>
> hexdump -C /dev/sdf | egrep '[13579bd]f0 .* 55
> aa \|'
>
> 3. If there is indeed only one partition, it extends to the
> end of the disk.
>
> 4. If there is more than one partition, you can find the
> others by:
> a. search for boot signatures as described above, or
> b. mount the first partition(s) found, determine the size
> using df, and
> then check after this (rounding up to nearest track
> boundary)
>
> Regards,
>
> Alain
>