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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-11-2005, 11:06 AM
|
#1
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Rep:
|
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!
|
|
|
02-11-2005, 01:44 PM
|
#2
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep: 
|
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.)
|
|
|
02-11-2005, 03:48 PM
|
#3
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
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... 
|
|
|
02-11-2005, 05:04 PM
|
#4
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep: 
|
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 05:06 PM.
|
|
|
02-11-2005, 09:28 PM
|
#5
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
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)
|
|
|
02-11-2005, 10:35 PM
|
#6
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep: 
|
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.
|
|
|
All times are GMT -5. The time now is 09:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|