1

Topic: Can I fix table partition with GParted live CD?

Hi,

This is what TestDisk says:

TestDisk 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 310101 16 63
Current partition structure:
     Partition                  Start        End    Size in sectors
1 * HPFS - NTFS              0   1  1 50028  15 63   50429169
2 E extended LBA         50029   0 63 281743   1 63  233567776
5 L HPFS - NTFS          50029   1  1 258852  15 63  210494529
   X extended             258856  14  1 279655   4 63   20964825
6 L Linux                258856  15  1 279655   4 63   20964762

Warning: Bad starting head (CHS and LBA don't match)
   X extended             279655   5  1 281743   1 63    2104515

Warning: Bad ending head (CHS and LBA don't match)
7 L Linux Swap           279655   6  1 281743   1 63    2104452

Warning: Bad starting head (CHS and LBA don't match)

Is it possible to fix something like this with GParted? Or maybe you know any other program that can fix it? I already tried Partition Magic, but it doesn't even start. I don't have any problems with booting winxp or kubuntu or accesing any of these partitions, but I'd like to resize my NTFS system partition and I'd like to fix this before.

2

Re: Can I fix table partition with GParted live CD?

Well, the problem is not as simple as it seems : partitions are not managed in the same form with each tool ! For instance, PM *always* says when you launch it on a linux drive, that there is an error and gives you the possiblity to correct this ; but if you do, your linux wont never boot anymore !

So i think the best you should do is to use parted (yes "parted" is no "G") and then if it doesnt report any problem you should try to resize your ntfs partition using GPArted.
TO use parted, run the livecd, open a terminal, type parted /dev/your_device (it might be hda, sda, ....)
the type "p" to print , and see what it returns.
Type "q" to quit *without* any modification !

Then past here the output of the parted test.
You have a screenshot tool on the livecd. You must backup the screenshot on usb key (e.g.), after you mount it.

hope it helps smile

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

3

Re: Can I fix table partition with GParted live CD?

First I got Xserver error, fortunately the other Xserver worked.

Parted doesn't show any errors. In fact, it shows only 4 partitions - 2 NTFS, ext3 and swap - it doesn't show unallocated space at all.

Gparted, like all other apps I tried, shows - 2 NTFS partitions, 2MB of unallocated space (I have no idea why it's here), ext3, swap and 13GB of unallocated space at the end.

I made a screenshot, but I couldn't mount my usb drive to save it. Now I'm in WinXP and it says that there's no partition on the usb drive and that it has RAW filesystem. I tried fixing it with TestDisk, but it didn't help - somehow I lost all my data on it sad

I still have no idea what to do next. Partition Magic and TestDisk show similar errors (that CHS and LBA are different) and I have really bad experience with my disk - when I've recently removed NTFS partition (that's where 13GB come from), it removed ext3 and swap at the same time. Before that, I lost my second NTFS partition (recovered by TestDisk) just by resizing other partition.

If I'd try to resize my first NTFS partition anyway - how should I do it? The partition is at the very beginning and the free space is at the very end.

4

Re: Can I fix table partition with GParted live CD?

Well, you really need to post a screenshot !
But you can mount your ntfs partition :
just use ntfs6"g /dev/your_partition /mnt/windows
Then cp /root/gparted/jpeg /mnt/windows/the_folder_you_want_on_XP

I guess you could have a idea of the work you should be by seeyng this doc : http://gparted.sourceforge.net/larry/tips/gfs.htm

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

5 (edited by g0nzo 2007-01-12 21:53:10)

Re: Can I fix table partition with GParted live CD?

Just to clarify:

- how to create "/mnt/something" folder? It says the the disk is read-only...
- how should I mount my ntfs drive? "mount /dev/sda1 /mnt/windows"? I hope it won't disappear like my usb smile
- do you want screenshot from parted ("p" option) or gparted (or both?)

6

Re: Can I fix table partition with GParted live CD?

g0nzo wrote:

Just to clarify:

- how to create "/mnt/something" folder? It says the the disk is read-only...

mkidr /mnt/something (i have no problem to create anything on /mnt !)
But anyway, there already is a folder named windows in /mnt !

- how should I mount my ntfs drive? "mount /dev/sda1 /mnt/windows"? I hope it won't disappear like my usb smile

ntfs-3g /dev/hda1 /mnt/soemthing
Here is a screenshot on howto do : http://gparted.free.fr/gparted.jpeg

- do you want screenshot from parted ("p" option) or gparted (or both?)

both please ! So you *must* take one screenshot and copy it to your window, then take another one (which overwrite the first)

see you later wink

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

7 (edited by g0nzo 2007-01-12 22:41:04)

Re: Can I fix table partition with GParted live CD?

many reboots later...

I can't create any folder in /mnt. It says "read-only filesystem". The strange thing is that inside "/mnt" there are the same folders that are in main folder "/" (usr, bin, dev, mnt(!) etc.), but additionally there's linuxrc file (wtf?). I.e. I can go to "/mnt/mnt"...

If nothing will work, I'll just remove both linux partitions. I reinstalled Kubuntu yesterday, so I won't loose much. Maybe if there will be just a single unallocated space, hopefully the errors will disappear smile

Thanks for your patience smile

8

Re: Can I fix table partition with GParted live CD?

hey, one question : what livecd do you use ?
Did you try the last one ?
http://gparted-forum.surf4.info/viewtopic.php?id=313

because i remember the previous version unable the creation of anything in /mnt !!!

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

9

Re: Can I fix table partition with GParted live CD?

Ok, finally I managed to make these screenshots (using Ubuntu 6.10 live CD smile ).

Here they are:
http://img411.imageshack.us/img411/5797/screenshotdevsdagpartedac8.png

and

http://img411.imageshack.us/img411/1359/screenshotkv0.png

Sorry for their size. The small 2mb partition was created after Kubuntu installation, I have no idea why it's there. I'd like to enlarge sda1 partition by these 13gb at the end.