LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Fixing An Incorrect Partition Table? (https://www.linuxquestions.org/questions/linux-hardware-18/fixing-an-incorrect-partition-table-42737/)

Leben 01-25-2003 10:43 AM

Fixing An Incorrect Partition Table?
 
Hi, okay here are the steps I used to bring about this extremely irritating problem. I have known about and wanted to use Linux for some time and yesterday I decided to dual boot. (I'd like to state that I have at least a basic knowledge of Linux, using FreeBSD for a long time on a secondary 486 box which I don't have anymore)

I used Partition Magic to seperate 10 gigs from my C drive which was running Windows 2000. Then I rebooted and used a copy of the Mandrake 8 CD's to install Mandrake, unfortuantely the CD was scratched so it couldn't install, but I didn't find that out until after I was able to partition the free space on my hard drive.

I then opted to use an copy of RedHat 7.2 to install with, figuring that old linux is better than no linux. Well this CD just seemed to be extremely diagreeable, and was a bit testy about installing to the previously existing linux partitions. I cancled the install and rebooted, so I could move back to Windows and merge the space back into the C drive and try Linux when I could get a copy of Mandrake 9.

I found there that the Windows Partitions (Drives C and F on my hard drive) had been converted from NTFS to ext2. Windows still booted and ran without a problem, and when using the Windows Logical Drive Manager (I believe that's the name) it read the drives as NTFS.

I later (yesterday) installed Mandrake 9 on the still existing linux partitons. The install went without a hitch and after a little lilo/boot.ini juggling, I was able to setup a Dual Boot correctly. Both OS's work fine, no problems at all (other than my @#$% winmodem) but I can't run wine because apparently there's no windows partitions on my harddrive anymore.

Does anyone have ANY idea how to fix my partition table in a safe way? (without destorying my stuff)

Darin 01-25-2003 11:24 AM

It is possible that your partitions didn't actually get converted but just got their ID changed. If you KNOW what partitions are which you can use a Linux program like cfdisk to change the partition ID back, I'm not sure if Partition Magic can change the IDs like what you would need. Rather than try unsuccessfully to explain how to do this I would recomend you read through the Linux Partition mini HOWTO over at The Linux Documentation Project and that you figure out how to change the partition type ID number without destroying data.

Bert 01-25-2003 11:43 AM

Welcome to LQ.org, Leben.

Why did you use Partition Magic? It's fdisk with a GUI!

Best to use fdisk - you can relabel a partition easily using the t command.
If you need more help, post the output of

fdisk -l /dev/hda

and we'll work out what you might need to do.
Bert

Leben 01-25-2003 12:17 PM

fdisk -l results
 
Disk /dev/hda: 255 heads, 63 sectors, 4982 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 3060 24579418+ 83 Linux
/dev/hda2 3061 4982 15438465 f Win95 Ext'd (LBA)
/dev/hda5 3061 3698 5124703+ 83 Linux
/dev/hda6 3699 4399 5630751 83 Linux
/dev/hda7 4400 4430 248976 82 Linux swap
/dev/hda8 4431 4982 4433908+ 83 Linux

now I know for a fact that hda1 is ntfs. That's my windows partition and I think hda5 is NTFS as well because that should be my (F) drive with all my music. No idea what hda2 is.

I'd like to thank you guys for helping me out here, and I'm checking into changing ID's on the Table. Found the -t option for cfdisk...any examples on it's usage (checking man now). I dare not jump into it too much... I'm rather fond of my games and music :)

Bert 01-25-2003 12:26 PM

Type

fdisk /dev/hda

and type 'm' to get a list of options. When you press 't', it will ask you which partition you want to change and what you want to change it to, with a list of partition ids.

Choose the one corresponding to what the drive is and change it. You can laways change it back through Linux if it doesn't work.

Leben 01-25-2003 12:44 PM

It worked!!
 
Thanks guys!! It worked from as far as I can tell! I'm supremely grateful for the help and I'll be sure to stop by if I have any more problems.
Once again, thanks!

Bert 01-25-2003 01:43 PM

You're welcome.

BTW, hda2 is an extended partition. Your BIOS does that to "encase" the other partitions. It's because of a historical reason to do with drive geometries and limitations of BIOS programs that it needs to do this. If you want to look at why it does this, check out "Logical Block Addressing".

:)

Bert


All times are GMT -5. The time now is 12:25 AM.