LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-10-2003, 05:36 PM   #1
Verso
LQ Newbie
 
Registered: Jul 2003
Location: Belgium
Distribution: Mandrake 9.1
Posts: 8

Rep: Reputation: 0
corrupt partition table


I got my copy of deus ex:Iw today and desided to install windows XP on my system cause it didn't run well in win98, but i ended up screwing up my partition table...

I had a dual booting machine with mandrake 9.1 and win98 SE.

XP replaced Lilo with it's own bootloader, so i decided to boot in rescue mode with my mandrake cd, and chose to install lilo again. Guess i shouldn't have done that because nothing wanted to boot anymore...

So i went back in reascue mode.
when i print the partition table from fdisk i get the following :

Device Boot Start End Blocks Id System
/dev/hda1 1 6271 50371776 5 Extended
/dev/hda2 * 6272 14945 69673905 7 HPFS/NTFS
/dev/hda5 1 1024 8225217 83 Linux
/dev/hda6 3575 3675 811251 82 Linux swap
/dev/hda7 3676 6271 20852338+ 83 Linux

however typing lspart in the rescue console gives me the following partitions :

hda2 : NTFS 86040 MB
hda5 : Ext3 : / 8032 MB
hda6 : Fat32 Lba mode (win98SE) 20002 MB
hda7 : Swap 792 MB
hda8 : Ext3 : /home 20363 MB

so i mounted hda5, went to /etc/fstab and changed the values accordingly, then changed my lilo.conf and installed lilo again.

Now my machine boots again in mandrake and i can mount all my partitions and see the data on them.

I tried diskdrake but it gives me this error :

" I can't read the partition table of device hda, it's too corrupted for me
I can try to go on, erasing over bad partitions (ALL DATA will be lost!).
The other solution is to not allow DrakX to modify the partition table.
(the error is extended partition: more than one normal partition in extended partition.
)

Do you agree to loose all the partitions? "

when i answer "no" i see all my partitions like they should be, but i can't change them. saving the partition table to a file and trying to restore it gives me this error when i try to write the table :

"a read-only table should not be dirty ! "

Am I doomed to reinstall my whole system or can i still fix the partition table ?

Any help is greatly appreciated !
 
Old 12-10-2003, 06:32 PM   #2
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
1) Until you can, BACKUP
2) Before nuking, you can try this dos tool: runs from a floppy, allows raw partition table editing... likely to destroy your system, but it saved my a** once.
Ranish Partition Manager: http://geocities.yahoo.com.br/downlo.../info/part.htm
 
Old 12-10-2003, 08:28 PM   #3
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
I had a disk report a corrupted partition table and assumed all was lost. I zeroed it and reinstalled. Later I read about gpart. It is possibly what is used with your "lspart" command (??). I have never tried it yet, but hope to have it available if that ever happens again.
http://www.linux.org/apps/AppId_2496.html
Good Luck.
 
Old 12-11-2003, 06:16 AM   #4
Verso
LQ Newbie
 
Registered: Jul 2003
Location: Belgium
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the replies!

It seems that whatever partition program i use, i get the same result; still keeps me showing a corrupt table.
I Ran gpart multiple times but ik keeps guessing the wrong partitions.

It seems that i'll have to reinstall my system, but i'm already happy that i'm able to look at my partitions from within mandrake and make a decent backup.

However I don't understand how mandrake manages to mount the partitions i've put in the fstab file, and how the rescue console is also able to see those partitions and mount them.

It seems that at boottime, linux manages somehow to get the partitions right, but whenever i try to install or upgrade any other distro i have here, it keeps telling me there's no usable partition or space to install on, the same counts for win98 and xp.
Shouldn't i be able to somehow retrieve the start and endposition of the mounted partitions and change them manualy with fdisk -u ?

Anyway, thanx for helping me out here !
 
Old 12-12-2003, 08:46 PM   #5
flysideways
Member
 
Registered: Jul 2003
Posts: 151

Rep: Reputation: 30
Hi,


"whenever i try to install or upgrade any other distro i have here, it keeps telling me there's no usable partition or space to install on, the same counts for win98 and xp."

If you want to install a new os it needs someplace to go that is not already used.

When you install windows it asks you where to put it. Now if you are reinstalling it that is easy, you can delete the partition where it exists and then let it install in the now unused space. The same works for various Linux distros that I've tried. You need to know accurately which partition or partitions that you want to use for the install, specify them and then let the distro format and install in the correct place. If you are trying to add an os to a disk that already has all available space formatted and used by other oses then it gets a little harder. You have to use one of the programs that will resize partitions, nondestructively. Partition Magic is one that will do it and there are others. Then you install in the freed up space.

"I had a dual booting machine with mandrake 9.1 and win98 SE.

XP replaced Lilo with it's own bootloader, so i decided to boot in rescue mode with my mandrake cd, and chose to install lilo again. Guess i shouldn't have done that because nothing wanted to boot anymore..."

This is normal when installing/reinstalling windows to any partition. It writes a new mbr. You then are required to reinstall your previously used bootloader. I am not familiar with lilo, instead I have been using grub (having started my Linux foray with RH). With grub I use the install disk, boot into rescue mode, chmod /mnt/sysimage then do grub-install /dev/hda (I need to confirm the syntax) and am on my way again.

Using multiple oses and changing things frequently is not easy for the noob and requires some forethought and planning, exactly what I did not have when I came to Linux. I've read RH8 for Idiots, Running Linux, RH9 Unleashed, RH9 Bible and issues of Linux Journal and finally searched LQ heavily and have found no comprehensive guide for exploring Linux with a multiboot setup as most people do when coming to Linux. LQ has been the most help.
 
Old 12-16-2003, 10:23 AM   #6
shack
Member
 
Registered: Dec 2003
Distribution: Debian Sid
Posts: 77

Rep: Reputation: 15
For future reference: the safe way to reinstall lilo.
- Boot off the install disk, making sure that the root directory is your main Linux partition. To do this with lilo, when you get the boot prompt, select the appropriate rescue mode and add "root=/dev/hd??" (fill in the ?? with the appropriate values). I don't know if your Mandrake rescue disk will do this by default ...
- Once Linux is boot up off the hard disk, login as root and type "lilo" at the command prompt.
- Reboot (that's it!)

I have done this at least twice with Debian. (bloody Windows)
___
shack
 
  


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
Reduce LV -> Partition table corrupt dubya Fedora 5 06-17-2005 10:35 PM
superblock or partition table corrupt? Kristian2 Linux - Newbie 1 05-11-2004 09:34 AM
partition table invalid or corrupt colindoig Linux - Software 3 10-01-2003 09:14 PM
Corrupt Partition Table BigBadPenguin Linux - Hardware 3 09-02-2003 11:02 AM
Corrupt partition table mback Linux - Software 3 04-27-2002 11:30 AM

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

All times are GMT -5. The time now is 07:52 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