Author Topic: Rescuing HDD [SOLVED]  (Read 10467 times)

Riki

  • Guest
Re: Rescuing HDD
« Reply #15 on: August 04, 2009, 05:39:23 AM »
OP, the m command is not found, below are the results:

[root@localhost root]# fdisk /dev/hda

The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Unable to seek on /dev/hda
[root@localhost root]#
« Last Edit: August 04, 2009, 07:09:39 AM by Riki »

Riki

  • Guest
Re: Rescuing HDD
« Reply #16 on: August 04, 2009, 06:52:21 AM »
Quote
Command (m for help): m     <-- The fdisk prompt and command.

Just to confirm OP: The fdisk prompt: Command (m for help): does not appear (see previous post). To make sure that I am acting 101% correctly, I have tried your instructions on this working (touch wood!  ;D) desktop successfully.

So, is it all lost on the laptop?
« Last Edit: August 04, 2009, 07:33:06 AM by Riki »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Rescuing HDD
« Reply #17 on: August 04, 2009, 11:12:44 AM »
Quote
Command (m for help): m     <-- The fdisk prompt and command.

Just to confirm OP: The fdisk prompt: Command (m for help): does not appear (see previous post). To make sure that I am acting 101% correctly, I have tried your instructions on this working (touch wood!  ;D) desktop successfully.

So, is it all lost on the laptop?

Well, It's not looking good.

Right now we don't know exactly whats in the MBR, as far as the partition table is concerned, but we know it can't be read properly. A new or wiped drive has nothing in the MBR, and fdisk can work with that. If it were my drive, and I was trying to save the Windows stuff, before giving up, I'd zero the MBR using the dd application. This is the same process as wiping a drive, except can be limited to the first 512 bytes of the hard drive, the MBR. Hopefully fdisk would then see the drive as new, give a prompt, and allow us to continue.

Just FYI, the MBR is the first sector of the first cylinder of a drive. this is followed by a reserve area, that contains the space where grub writes the stage1_5 files. The actual partitions start at the beginning of the second cylinder, which is designated cylinder 1, as the count starts at 0. There are 63 sectors between the MBR and the start of the first partition, so the data on the drive should not be compromised by wiping only the first sector.

We know fdisk can see the drive as a whole, and read it's correct size, from the first part of the fdisk output, so it would appear its the garbled partition table itself that causes the Unable to seek on /dev/hda message. I've used fdisk for 10 years, and never before seen that particular error. Google searches indicate that error is given when fdisk cannot determine the type of the partition table, DOS, SGI, etc. because it does not follow a correct form for any known type. This makes sense, considering we already knew it was mucked up by the overlapping partitions, and the removal of the extended partition.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Riki

  • Guest
Re: Rescuing HDD
« Reply #18 on: August 04, 2009, 11:45:23 AM »
Quote
Command (m for help): m     <-- The fdisk prompt and command.

Just to confirm OP: The fdisk prompt: Command (m for help): does not appear (see previous post). To make sure that I am acting 101% correctly, I have tried your instructions on this working (touch wood!  ;D) desktop successfully.

So, is it all lost on the laptop?

Well, It's not looking good.

Right now we don't know exactly whats in the MBR, as far as the partition table is concerned, but we know it can't be read properly. A new or wiped drive has nothing in the MBR, and fdisk can work with that. If it were my drive, and I was trying to save the Windows stuff, before giving up, I'd zero the MBR using the dd application. This is the same process as wiping a drive, except can be limited to the first 512 bytes of the hard drive, the MBR. Hopefully fdisk would then see the drive as new, give a prompt, and allow us to continue.


OK OP, so if this is going to be my last shot I might as well proceed as you suggest whatever the outcome might be. Can you provide me with instructions on how to use the dd application? If it's going to be my last chance... :(

Quote
Just FYI, the MBR is the first sector of the first cylinder of a drive. this is followed by a reserve area, that contains the space where grub writes the stage1_5 files. The actual partitions start at the beginning of the second cylinder, which is designated cylinder 1, as the count starts at 0. There are 63 sectors between the MBR and the start of the first partition, so the data on the drive should not be compromised by wiping only the first sector.

We know fdisk can see the drive as a whole, and read it's correct size, from the first part of the fdisk output, so it would appear its the garbled partition table itself that causes the Unable to seek on /dev/hda message. I've used fdisk for 10 years, and never before seen that particular error. Google searches indicate that error is given when fdisk cannot determine the type of the partition table, DOS, SGI, etc. because it does not follow a correct form for any known type. This makes sense, considering we already knew it was mucked up by the overlapping partitions, and the removal of the extended partition.
« Last Edit: August 04, 2009, 11:47:07 AM by old-polack »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Rescuing HDD
« Reply #19 on: August 04, 2009, 11:55:00 AM »
It's not necessarily the "last shot", but the next logical one. ;D

Again from the liveCD;

[root@localhost ~]# dd if=/dev/zero of=/dev/hda bs=512 count=1     <Enter>

This will only take a second or two to run. When the prompt returns, try again, to run fdisk on /dev/hda.

[root@localhost ~]# fdisk /dev/hda                <Enter>

You should get the fdisk prompt this time.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Riki

  • Guest
Re: Rescuing HDD
« Reply #20 on: August 04, 2009, 02:40:49 PM »
It's not necessarily the "last shot", but the next logical one. ;D

Again from the liveCD;

[root@localhost ~]# dd if=/dev/zero of=/dev/hda bs=512 count=1     <Enter>

This will only take a second or two to run. When the prompt returns, try again, to run fdisk on /dev/hda.

[root@localhost ~]# fdisk /dev/hda                <Enter>

You should get the fdisk prompt this time.

It worked:

[root@localhost root]# dd if=/dev/zero of=/dev/hda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.352148 seconds, 1.5 kB/s
[root@localhost root]# fdisk /dev/hda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xabb5a3b7.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0xabb5a3b7

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): o
Building a new DOS disklabel with disk identifier 0xcafe6a45.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): q

[root@localhost root]#
                         

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Rescuing HDD
« Reply #21 on: August 04, 2009, 03:09:35 PM »
Riki:

Good show! ;D ;D

I've run the whole process, and saved the output, I'll need to make a couple of edits, to show the correct readouts for your machine, then I'll post the entire thing. You should be able to just follow along, step by step, just like the test run, you just did. Nothing will be any more difficult than what you've already seen. When the partitions are established, let me know, and we'll get the /etc/fstab and /boot/grub/menu.lst edited, and grub installed. ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Rescuing HDD
« Reply #22 on: August 04, 2009, 03:54:04 PM »
Riki:

Each command is followed by an Enter key press, as a given. I will only show <Enter> where it's used to accept a default.

The block numbers shown in the p printouts may be slightly different from what you show, as I had to calculate them. What's important are the cylinder numbers, (start and end) and they should be exact.


-----------------------------------------------------------------------------------------------

[root@localhost ~]# fdisk dev/hda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xabb5a3b7.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x56f75eda.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-155061, default 1):                                     <Enter>
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-155061, default 155061): 12495

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (12496-155061, default 12496):                        <Enter>                
Using default value 12496
Last cylinder, +cylinders or +size{K,M,G} (12496-155061, default 155061): 64812

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 3
First cylinder (64813-155061, default 64813):                         <Enter>
Using default value 64813
Last cylinder, +cylinders or +size{K,M,G} (64813-155061, default 155061):                <Enter>
Using default value 155061

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (64813-155061, default 64813):                          <Enter>
Using default value 64813
Last cylinder, +cylinders or +size{K,M,G} (64813-155061, default 155061): 72938

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (72939-155061, default 72939):                          <Enter>
Using default value 72939
Last cylinder, +cylinders or +size{K,M,G} (72939-155061, default 155061): 75018

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (75019-155061, default 75019):                           <Enter>
Using default value 75019
Last cylinder, +cylinders or +size{K,M,G} (75019-155061, default 155061):                   <Enter>
Using default value 155061

Command (m for help): p

Disk dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x17df17de

   Device Boot      Start         End      Blocks   Id  System
dev/hda1               1       12495    6297417   83  Linux
dev/hda2           12496       64812   26367768   83  Linux
dev/hda3           64813      155061   45485400+   5  Extended
dev/hda5           64813       72938    4095472+  83  Linux
dev/hda6           72939       75018    1048288+  83  Linux
dev/hda7           75019      155061   40341640+  83  Linux

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id       <-- We use this to change the partitions IDs
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): t
Partition number (1-7): 2
Hex code (type L to list codes): 7
Changed system type of partition 2 to 7 (HPFS/NTFS)

Command (m for help): t
Partition number (1-7): 6
Hex code (type L to list codes): 82
Changed system type of partition 6 to 82 (Linux swap / Solaris)

Command (m for help): p

Disk dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x17df17de

   Device Boot      Start         End      Blocks   Id  System
dev/hda1               1       12495    6297417   83  Linux
dev/hda2           12496       64812   26367768    7  HPFS/NTFS
dev/hda3           64813      155061   45485400+   5  Extended
dev/hda5           64813       72938    4095472+  83  Linux
dev/hda6           72939       75018    1048288+  82  Linux swap / Solaris
dev/hda7           75019      155061   40341640+  83  Linux

Command (m for help) w

------------------------------------------------------------------------------------

I can't show the last printout, as I would have destroyed my own partition table to do so. ;D

Basically it should indicate the write was successful, but may say something about not being able to read the new partition table, and using the old, until a reboot. That's a normal output and nothing to worry about. As it had no partition table before, it may not show that output at all.

If it uses the partition table as is that's fine. I would still recommend a reboot, so that the liveCD will create mount point directories for the new partitions. After a reboot, try to mount each of the partitions, to see if all the directories appear to be intact.

Post your results.
« Last Edit: August 04, 2009, 04:04:30 PM by old-polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Riki

  • Guest
Re: Rescuing HDD
« Reply #23 on: August 05, 2009, 12:03:22 AM »
Results:

[root@localhost root]# fdisk /dev/hda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x6e6fe61e.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x6f01111e.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 155061.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-155061, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-155061, default 155061): 12495

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (12496-155061, default 12496):
Using default value 12496
Last cylinder or +size or +sizeM or +sizeK (12496-155061, default 155061): 64812

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 3
First cylinder (64813-155061, default 64813):
Using default value 64813
Last cylinder or +size or +sizeM or +sizeK (64813-155061, default 155061):
Using default value 155061

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (64813-155061, default 64813):
Using default value 64813
Last cylinder or +size or +sizeM or +sizeK (64813-155061, default 155061): 75018

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (75019-155061, default 75019):
Using default value 75019
Last cylinder or +size or +sizeM or +sizeK (75019-155061, default 155061):
Using default value 155061

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x6f01111e

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       12495     6297448+  83  Linux
/dev/hda2           12496       64812    26367768   83  Linux
/dev/hda3           64813      155061    45485496    5  Extended
/dev/hda5           64813       75018     5143792+  83  Linux
/dev/hda6           75019      155061    40341640+  83  Linux

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): t
Partition number (1-6): 2
Hex code (type L to list codes): 7
Changed system type of partition 2 to 7 (HPFS/NTFS)

Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): 82
Changed system type of partition 6 to 82 (Linux swap / Solaris)

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x6f01111e

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       12495     6297448+  83  Linux
/dev/hda2           12496       64812    26367768    7  HPFS/NTFS
/dev/hda3           64813      155061    45485496    5  Extended
/dev/hda5           64813       75018     5143792+  83  Linux
/dev/hda6           75019      155061    40341640+  82  Linux swap / Solaris

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost root]#       

Riki

  • Guest
Re: Rescuing HDD
« Reply #24 on: August 05, 2009, 12:36:58 AM »
After a reboot, in PCC, I see 4 tabs as follows:

1. /mnt/win_c - hda1  - 6GB (blue)

2. HDD - hda2 - 25GB (blue)

3. /mnt/hda5 - 4.9GB (red)

4. /mnt/hda6 - 38GB (red)

NB. No swap showing.

After mounting, all partitions are there. The BACKUP (hda1) partition appears empty: Free: 74.5GB, Total: 74.5GB, Used: 16.0KB, Usage: 0%. This confuses me because in PCC it shows as size 6GB (8%) and in Devices 74.5GB (the whole drive?) of empty space. You will no doubt be able to decipher all this! I'm just the silly robot following instructions from a remote control !!!  ;D


Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Rescuing HDD
« Reply #25 on: August 05, 2009, 12:52:03 AM »
You missed! The first logical partition, /dev/hda5, should end at 72938. the next, /dev/hda6, (the swap partition) should start at 72939, and end at 75018, and last, /dev/hda7 starts at 75019 and ends with the default 155061

You need to go back into fdisk, use the d command to delete the 2 logical partitions you have, and then use the n command to create the 3 logical partitions you need to have.

First use the m command to see the menu.

Next the d command to delete the last logical partition 6.

Use the p command to check the results.

Use the d command again to delete the other logical partition 5.

Use the p command to check the results once more.

you should see the two primary, and the extended partitions left.

Next pick up from the original post to create the three logical partitions using the n command.

You will need to do the t command for partition 6, with the code 82. The Windows partition 2 already has the correct ID code and will not need to be changed.

Use the a command to mark partition 2 as active/bootable.

Do a last p command to check that you have the three logical partitions, 5 6 and 7 and that they have the correct start and end cylinders.

If they are correct, use the w command.
« Last Edit: August 05, 2009, 01:04:41 AM by old-polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Riki

  • Guest
Re: Rescuing HDD
« Reply #26 on: August 05, 2009, 01:07:33 AM »
You missed! The first logical partition, /dev/hda5, should end at 72938. the next, /dev/hda6, (the swap partition) should start at 72939, and end at 75018, and last, /dev/hda7 starts at 75019 and ends with the default 155061

You need to go back into fdisk, use the d command to delete the 2 logical partitions you have, and then use the n command to create the 3 logical partitions you need to have.

First use the m command to see the menu.

Next the d command to delete the last logical partition 6.

Use the p command to check the results.

Use the d command again to delete the other logical partition 5.

Use the p command to check the results once more.

you should see the two primary, and the extended partitions left.

Next pick up from the original post to create the three logical partitions using the n command.

You will need to do the t command for partition 6, with the code 82. The Windows partition 2 already has the correct ID code and will not need to be changed.

Use the a command to mark partition 2 as active/bootable.

Do a last p command to check that you have the three logical partitions, 5 6 and 7 and that they have the correct start and end cylinders.

If they are correct, use the w command.

Oh dear! To save time and further effort, shall we forget the swap partition and get on with it? I can always recreate it when I do a reinstall. Does that make sense?
« Last Edit: August 05, 2009, 01:30:47 AM by Riki »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Rescuing HDD
« Reply #27 on: August 05, 2009, 01:36:03 AM »
Riki:

You can't forget the swap partition, it exists on the hard drive, and is formatted as swap. You've included it with the proper /dev/hda5, so you have one partition showing in the partition table, but two partitions with different formatting actually existing on the hard drive, and a data partition now identified as a swap partition. Just booting in that condition, and checking in PCC may have already lost the contents of that partition.

If we are to have any hope of booting the two OS present, the partition table must correctly describe the actual partitions on the drive. We still need to have proper access to /etc/fstab, and /boot/grub/menu.lst on the correct /dev/hda5, and be able to save them once edited. Then grub needs to find itself on /dev/hda5, to install to the MBR. How can you expect that to happen if the partition table doesn't agree with the reality of where on the hard drive things actually exist?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Riki

  • Guest
Re: Rescuing HDD
« Reply #28 on: August 05, 2009, 01:47:33 AM »
Riki:

You can't forget the swap partition, it exists on the hard drive, and is formatted as swap. You've included it with the proper /dev/hda5, so you have one partition showing in the partition table, but two partitions with different formatting actually existing on the hard drive, and a data partition now identified as a swap partition. Just booting in that condition, and checking in PCC may have already lost the contents of that partition.

If we are to have any hope of booting the two OS present, the partition table must correctly describe the actual partitions on the drive. We still need to have proper access to /etc/fstab, and /boot/grub/menu.lst on the correct /dev/hda5, and be able to save them once edited. Then grub needs to find itself on /dev/hda5, to install to the MBR. How can you expect that to happen if the partition table doesn't agree with the reality of where on the hard drive things actually exist?

Understood OP. I'll correct.

Riki

  • Guest
Re: Rescuing HDD
« Reply #29 on: August 05, 2009, 09:06:16 AM »
You missed! The first logical partition, /dev/hda5, should end at 72938. the next, /dev/hda6, (the swap partition) should start at 72939, and end at 75018, and last, /dev/hda7 starts at 75019 and ends with the default 155061

You need to go back into fdisk, use the d command to delete the 2 logical partitions you have, and then use the n command to create the 3 logical partitions you need to have.

First use the m command to see the menu.

Next the d command to delete the last logical partition 6.

Use the p command to check the results.

Use the d command again to delete the other logical partition 5.

Use the p command to check the results once more.

you should see the two primary, and the extended partitions left. I'm alright up to here and then I get lost...I am working on it...

Next pick up from the original post to create the three logical partitions using the n command.

so far using the n command and then 5 tells me Invalid partition number for type '5'...I'll persevere...

Quote
You will need to do the t command for partition 6, with the code 82. The Windows partition 2 already has the correct ID code and will not need to be changed.

Use the a command to mark partition 2 as active/bootable.

Do a last p command to check that you have the three logical partitions, 5 6 and 7 and that they have the correct start and end cylinders.

If they are correct, use the w command.
« Last Edit: August 05, 2009, 09:11:11 AM by old-polack »