LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-25-2003, 10:43 AM   #1
Leben
LQ Newbie
 
Registered: Jan 2003
Location: USA
Distribution: SuSE 9.2
Posts: 17

Rep: Reputation: 0
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)
 
Old 01-25-2003, 11:24 AM   #2
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
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.
 
Old 01-25-2003, 11:43 AM   #3
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
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
 
Old 01-25-2003, 12:17 PM   #4
Leben
LQ Newbie
 
Registered: Jan 2003
Location: USA
Distribution: SuSE 9.2
Posts: 17

Original Poster
Rep: Reputation: 0
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

Last edited by Leben; 01-25-2003 at 12:22 PM.
 
Old 01-25-2003, 12:26 PM   #5
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
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.
 
Old 01-25-2003, 12:44 PM   #6
Leben
LQ Newbie
 
Registered: Jan 2003
Location: USA
Distribution: SuSE 9.2
Posts: 17

Original Poster
Rep: Reputation: 0
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!
 
Old 01-25-2003, 01:43 PM   #7
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fixing a partition table on new hard drive demerson3 Linux - Newbie 18 12-18-2019 05:14 PM
incorrect partition table Dasc Debian 2 11-18-2005 07:11 PM
Need help fixing the partition table Hungry ghost Linux - Newbie 2 02-08-2005 01:52 PM
Fixing a bad partition table pen^2 Linux - General 2 07-21-2004 06:25 AM
Data Recover Help -> Incorrect Partition Table PhuckFonix Linux - General 8 05-30-2004 10:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration