LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2005, 12:06 PM   #1
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Rep: Reputation: 15
cfdisk error


Hi

I was trying to install linux on a partition on my laptop's harddisk. I got a copy of PartitionMagic and used it to split one of my partitions. Then I wanted to install knoppix via 'sudo knoppix-installer' on my harddrive and I used an other program (I think it is called something like 'qtparted') to make a linux swap and a ext2 partition.

I stopped the knoppix installation, because before I finished, I talked to some ppl using IRC and they convinced me, that knoppix is not the right thing for me.

After exiting the knoppix installer and rebooting the computer, I used PartitionMagic again to format the linux swap and the ext2 partitions back to FAT32.

I rebooted the computer again.

Then I wanted to change the drive letter's of my harddrives using PartitionMagic, but my first harddrive was not visible anymore as you can see here

I tried to use cfdisk in order to solve that problem, but cfdisk told me:

FATAL ERROR: Bad logical partition 5: Partition ends before sector 0

cfdisk is not showing me anything, just this error.

As the only option it tells me that it can delete the entirely partition table for that harddisk, but thet would destroy all my data on that harddisk. I cannot do this because WindowsXP is installed on that harddisk and I am not the only one who uses this laptop.

There must be a way to solve that problem.

By the way, Windows is working just as normal and is not recognizing that something is not right with the partitions of the harddrive. I can do everything, every program runs just as usual.

I think the error could be the following. During the use of qtparted under knoppix I deleted one FAT32 partition and first I created a swap partition. Then I wanted the whole rest of the partition to be formatted with ext2. There was about 8324,12 MB of free space, but after formatting with the ext2 filesystem there was still 0,5 MB free space, but I decided to not use this and closed the program. Maybe that little amount of free space is making the trouble?

Please help me! I don't know what to do

I can not install linux at the moment because of the cfdisk error, but I can not delete the whole harddisk or delete the partition table of the harddisk (which would be the same as deleting the whole hrddisk), because there are a lot of important files on an other partition of that harddisk, and an other operating system (windows). That is my dilemma!
 
Old 02-11-2005, 02:44 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
If you've got data on a drive you haven't backed up, you shouldn't really be playing with disk partitioning anyway.

You could try fdisk. SuSE's auto-installer screwed up several partitions and cfdisk chickened out in a similar way to what you describe, but fdisk ran, showed the screwed up partitions, I deleted the screwed up parts and recreated them properly.

Also, if you have a copy of your proper partition table, you *can* delete the whole table as long as you reconstruct the relevant parts of it precisely. In other words, if you've got
Code:
/dev/hda1 start end
/dev/hda2 bork bork
/dev/hda3 start end
you can wipe the table and recreate the proper start/end on 1 and 3 and a new start/end for 2, without losing the data on 1 and 3. Just don't truncate the data or format it.

But definitely try to avoid having to do that. Good luck.

(And maybe someone else can more precisely identify your problem. If fdisk -l will spit out data, that'd be helpful.)
 
Old 02-11-2005, 04:48 PM   #3
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by digiot
If you've got data on a drive you haven't backed up, you shouldn't really be playing with disk partitioning anyway.
I see, that was my failure

Quote:
Originally posted by digiot
You could try fdisk. SuSE's auto-installer screwed up several partitions and cfdisk chickened out in a similar way to what you describe, but fdisk ran, showed the screwed up partitions, I deleted the screwed up parts and recreated them properly.

Also, if you have a copy of your proper partition table, you *can* delete the whole table as long as you reconstruct the relevant parts of it precisely. In other words, if you've got
Code:
/dev/hda1 start end
/dev/hda2 bork bork
/dev/hda3 start end
you can wipe the table and recreate the proper start/end on 1 and 3 and a new start/end for 2, without losing the data on 1 and 3. Just don't truncate the data or format it.

But definitely try to avoid having to do that. Good luck.

(And maybe someone else can more precisely identify your problem. If fdisk -l will spit out data, that'd be helpful.)
The strange thing is that when I use the Ubuntu Live CD it shows the following devices (I have only 1 harddrive, so the devices are actually partitions of that harddrive):

hda1
hda2
hda4 and
hda5

I don't know where hda3 is...

If I do, for example, 'fdisk -l /dev/hda1' under Ubuntu, it says 'Cannot open /dev/hda1'. The same thing with /dev/hda2, /dev/hda4 and /dev/hda5.

But when I open /mnt/hda1 with the file manager (Ubuntu Live CD uses GNOME), it can display all the content in it and I can copy files on that partition. (It's the partition where WindowsXP is running, the format is FAT32 so it is possible for Linux to read and write on the partition. I can also open /mnt/hda2, /mnt/hda4 and /mnt/hda5

The same is under WindowsXP itself. Everything looks normal, the only thing is that one partition (the one I've played with formatting the file system and so on (it's a logical partition)), seems to be about 1 GB smaller than it was before.

I am really depressed.. because when I can not solve this problem, then there is no way that I can install linux. I can't even install it on my external harddrive because cfdisk and fdisk is not working and because of that I can not format any harddrives or partitions...
 
Old 02-11-2005, 06:04 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
fdisk doesn't take partition arguments - just disks - so you need to do 'fdisk /dev/hda' rather than 'hda[number]'. And it's possible /dev/hda3 is an extended partition, which means it's just containing 4 and 5 and they contain the data. So missing a number's not necessarily an issue. For instance, from a long time ago, my hdb has 1,2 and jumps to 5 because 3 is extended.

Post up the output of 'fdisk -l' with no other arguments. With just one drive, you don't need to specify.

-- Oops, wait. If you have 4 that doesn't apply. 3 can't be extended or you wouldn't have a 4 either.

Last edited by slakmagik; 02-11-2005 at 06:06 PM.
 
Old 02-11-2005, 10:28 PM   #5
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Original Poster
Rep: Reputation: 15
I am very happy ,

and very confused...

First of all, it is working again. I have rebooted the PC into the debian installer (using CD1 of the debian "woody" release) and started cfdisk. Everything was there. I have written a new partition table, saved it and went back to windows to check partitionmagic. It worked, everything is back to normal now .

I have reflected about this and here is my conclusion:

I have not done anything, really. It just works again. That is just so awsome crazy xD

I have a few additional questions:

How to backup my data? (I really have no clue how to do this...) The thing is that if I backup my harddrive I have to do a backup by what I am able to recover my whole system (including WindowsXP) if something goes wrong. Please tell me how to do that, or give me a link to a side where I can find that sort of information. (I have an external harddrive with enough free space left to just copy and paste my whole harddrive, but I think that's not the way how to do this)
 
Old 02-11-2005, 11:35 PM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Huh. That is strange, but I'm glad you got it working.

As far as backing up, if you've got an external hard drive, you've got it made in the shade. Just google for 'rsync' and backups and/or read the rsync man page. There are actual many ways and programs - some people do incremental tars and there are various backup-specific programs, but I find rsyncing an external hard drive to be ideal.

I haven't tried to back up a Windows system with it, though, so I don't know about that. Might need some Windows-specific tool, at least if it's NTFS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
CFDISK error Superme Linux - Hardware 3 10-20-2004 04:09 PM
Error in cfdisk? Cant partition! bobthebear Linux - General 6 07-05-2004 10:14 AM
While trying to use cfdisk I get this error.... EThitop Linux - Newbie 3 05-08-2004 09:46 PM
CFDISK problem, FATAL ERROR Eradicator Linux - Newbie 9 10-28-2003 11:34 AM
cfdisk - Fatal Error IceGrill Linux - Newbie 3 11-03-2002 03:10 AM


All times are GMT -5. The time now is 10:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration