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 - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-26-2006, 11:19 AM   #1
szechman
LQ Newbie
 
Registered: Dec 2006
Posts: 7

Rep: Reputation: 0
parted screwup


Help,

I dont know how to fix this one and it is to dangerious to experiment with. I used parted on the wrong drive. All I did was create a new partition on my windows drive. Although window boots fine, partition magic lables it as a "Bad Partition". Any ideas as to how I can fix this?

Thanks,

Scott
 
Old 12-26-2006, 01:06 PM   #2
sagar.1986
LQ Newbie
 
Registered: Nov 2006
Posts: 20

Rep: Reputation: 0
Can you be more specific? Is the linux not booting for you now? Have you used partition magic to create a new partition or Gparted?

IF your linux boots but ends up in a shell, then probably you need to update /etc/fstab.
 
Old 12-26-2006, 02:31 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by sagar.1986
IF your linux boots but ends up in a shell, then probably you need to update /etc/fstab.
This is not relevant to the problem as stated...

The way I read it, OP created a partition in the wrong place and now just wants to get rid of it. fdisk from Linux will do this with no problem.

Partition magic maybe does not recognize Linux partitions?? (I don't remember.)
 
Old 12-26-2006, 04:46 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
If you create a Linux partition using a Linux software you can tell Partition Tragic to stuff itself.

Many partition table problems were created by Partition Tragic wanting to interfere something it doesn't understand.

Partition Tragic supports a limited Linux partitions types but should only be used on Windows partitions where it belongs.

It is quite dangerous to ask/accept opinions of the hard disk partitions from different partitioning tools from different platforms.
 
Old 12-26-2006, 05:47 PM   #5
szechman
LQ Newbie
 
Registered: Dec 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Ok thanks for all the replys. Let me see if I can break this down a little better.

I have 2 drives. 1 drive is dedicated Windows. The other is dedicated linux (Fedora). I was in linix and ran parted. The problem is that I created a new partition on the windows drive NOT the linux drive. Linux works fine. Windows works fine (or at least as well as it did before I ran parted). However when I go into partition magic, it sees my windows drive as 1 partition (not 2 like was originally there or 3 after creating a partition in parted) and it is marked as a "BAD" partition. What I want to do is remove the new partition that was created on the windows drive with parted, make sure that windows (partition magic) sees my ntfs partitions again.

I will try fdisk on the linux side.

Thanks,

Scott
 
Old 12-26-2006, 06:34 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The most authoritative of the partitioning tools are Linux fdisk and cfdisk in my experience but they must be run in terminal mode. These two programs supports over 100 different types of partition types and can be use to made partitions hidden.

I doubt if Partition Tragic can recognise 10 partition types. It is possible that this software can't recognise a LVM partition, that Fedora normally creates, and then condemns it as bad.

You should not worry Partition Tragic's view. It always condemn my hda and hdc as they have 60 and 56 partitions that it can never dream of possible. Every time Partition Tragic "touches" my disks I ended up rebuilding the whole of the partitions from scratch. That is why veteran users know the software is tragic instead of magic when it come to recognise Linux partitions.

If you don't want the partitions created by a Linux tool you can remove it with the same Linux tool.

When friends come to see me with corrupted and unbootable Windows hard disks it is always Linux partitioning tools that can slavage the information inside.

If you still have a problem post the root terminal output of
Code:
fdisk -l
here.

Last edited by saikee; 12-26-2006 at 06:36 PM.
 
Old 12-26-2006, 06:36 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Whoa there!!!!

You started with 2 NTFS partitions and now you have only one, plus something that Partition Magic can't read. DO NOT do anything else to that disk without a plan!!!

If you start changing things you run the risk of losing data that was on the other partition(s)

From Linux, just do fdisk -l and post the results. An don't write to that drive until we have narrowed down what the status is.
 
Old 12-26-2006, 11:47 PM   #8
szechman
LQ Newbie
 
Registered: Dec 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Here is the output of fdisk -l:

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 7 12161 97635006 7 HPFS/NTFS
/dev/hda2 1 6 48163+ de Dell Utility
/dev/hda3 1 1 31 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2434 19446682+ 8e Linux LVM


The partition that I created by mistake is /dev/hda3.
All I want to do is get rid of it, but I am scared. This is my windows drive. I cannot afford to lose anything. Windows boots just fine (as fine can be for being windows) but I am really concerned that the windows utilities no longer see the original 2 partitions that where on that drive. It only sees on partition and says that it is "BAD". I could try to delete /dev/hda3 with fdisk but am reluctant to do so. I have tried to make a copy of the partition onto another HD with with no success as the partition is "BAD".

Thanks again,

Scott
 
Old 12-27-2006, 12:02 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I am still missing something here: Is there critical data on the missing partition(s)? If not, then you have some options.

First, backup your data--if nothing else, to lower your stress level. Once the data is backed up, you can simply ignore the problem partition or you can delete (BUT--see below)

If there WAS critical data in the missing partitions, then return to what I said earlier.

Looking at your fdisk output:
Quote:
/dev/hda1 * 7 12161 97635006 7 HPFS/NTFS
/dev/hda2 1 6 48163+ de Dell Utility
/dev/hda3 1 1 31 7 HPFS/NTFS
Let's decode:
partition 1 goes from unit 7 to 12,161 and has 97M+ blocks of 1024bytes each--ie ~98GB
partition 2 goes from unit 1 to 6, and has a size of ~48Mbytes
partition 3 is also in unit 1 and has a size of only 31Kbytes. From this data, we do not know if it is in front of #2--or maybe somehow overlaps it. Given this, there is maybe some risk that deleting it will cause a new problem.

Finally, deleting #3 will not cause your missing partition to magically appear
 
Old 12-27-2006, 07:07 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I am on Pixellany side of the diagnosis.

My addition is that hda3 may not exist before. What you have done is to pick the little space in front of hda1 and created it a partition. My guess is no harm would be done if you delete it.

In a PC hard disk primary partitions are named according to the order you create them. Thus even hda3 is physically in front of hda1 it was the 3rd partition created and so must take the name hda3 as hda1 and hda2 are existing. This tells us the space in front of hda1 isn't used as a partition and may be used by Dell for other purpose.

I am 99% sure of no partition exists before hda1 because a hard disk has a maximum of 4 primary partitions each described by 16 bytes occupying between the 447th to 510th bytes in the MBR. hda1 represent the first set of 16-bytes position as an OS wouldn't give a toss if you call it a "C" drive, hda1 or sda1 or hde1. To the bios whatever stored there is the first primary partition and everybody shuts up. The Bios then adds 16 bytes to the 447th position and picks up the next 16 bytes as the 2nd primary partition. Therefore it is not possible to change the hda1 position without deleting the entire partition table.

The way I interpret fdisk -l errors on hda1 are as follow

(1) Partition 3 does not end on cylinder boundary.

This is you are using a fraction of a cylinder for a partition. That is not normal and is possibly the objection behind the Windows-based partitioning software.

(2) Partition table entries are not in disk order

This is just a warning saying the hda3 does not follow hda2. Such arrangement never bothers any OS as far as my experience is concerned. It will only cause trouble if you delete hda3 and want to combine the empty space with other parts of the hard disk because physical it is not possible as the addresses of a normal partition must be continuous.
------------------------------------
On the backing up of a hard disk

You need to use dd if you want the MBR to be cloned.
 
Old 12-27-2006, 09:22 AM   #11
szechman
LQ Newbie
 
Registered: Dec 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Success!!!! First, thats to everyone for the help.
saikee was correct, deleting the /dev/hda3 with fdisk did the trick. I also ran dd on the drive and was impressed at how well it "cloned" the drive. I have been looking for a solution to my backup issues on the windows side for months. Anyway, dd make a perfect backup so that put my mind at rest about losing data. Then all I did was delete the extra partition and things returned to normal on the windows side of things. I am now able to see both the partitions again. All is well.

Thanks again,

Scott
 
Old 12-27-2006, 10:41 AM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Glad for happy endings...

For the record, does anyone know how deleting the problem partition would cause the missing one to re-appear?

I don't mind being proven wrong, but I'd like to know WHY I was wrong....
 
Old 12-27-2006, 11:05 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I don't think there was a missing one. More to do with the OP's way of reporting the errors.

However it is possible that the Partition Magic dislikes the hda3 and because it was straddling onto the hda2 boundary (cylinder No.1) so the neighbour was also branded as "bad". Like I said before Partition Tragic's opinion should never be taken seriously.

The defacto information to work with is the output from "fdisk -l".
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Screwup khaleel5000 Linux - Kernel 3 06-03-2006 01:52 AM
Java install screwup Linux4Dummies Linux - Software 3 08-04-2005 10:01 PM
install screwup bwarn Linux - Software 3 06-04-2003 03:00 PM
Screem ScrewUP!! shooter Linux - Newbie 6 10-25-2001 07:31 AM
graphix screwup justin19fl Linux - Newbie 8 06-13-2001 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:17 AM.

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