1 (edited by Viperidae 2009-12-17 06:04:24)

Topic: [Solved] Another Partition Resize Error...

Hi there.

Tried to resize my partition tonight, only to learn a few hours later that that's the one thing one shouldn't do with this version...

I'm using gparted-live-0.5.0-3.

Here's the output on fdisk -l -u:



Disk /dev/sda: 250.0 B, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x09d98ee3

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *              63     40965749      20482843+   7  HPFS/NTFS
/dev/sda2       40965750   488392064    223713157+   f   W95 Ext'd (LBA)
/dev/sda5       62926605   488392001    212732698+   7  HPFS/NTFS


It's sda5 that was rendered unreadable.

And the gparted print:



Model: ATA ST3250823AS (scsi)
Disk /dev/sda: 488397168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End          Size         Type      File system     Flags
1      63s                  40965749s     40965687s    primary      ntfs       boot
2      40965750s    488392064s   447426315s    extended                lba   
5      62926605s    488392001s   425465397s    logical



Now when it comes time to saving the PBR file, where will it (or how do I tell it where to) be saved? I'm completely new to Debian, and previous attempts at saving files in gparted live have been unsuccessful (I've tried mounting a FAT USB drive, but terminal keeps telling me that it's the wrong filesystem when I tell it -t vfat).

Thanks.

Edit: Do I need to post the error log too?

2

Re: [Solved] Another Partition Resize Error...

Following is an old link to how to save the gparted_details.html file when using GParted Live:
SAVING DETAILS FOR BUGREPORT.
You can use a similar method to save the PBR and MBR files.

You do not need to post the initial detail log.  We can solve this situation without the detail log.


You can capture the Master Boot Record in a file with the following command:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda-viperidae.mbr bs=512 count=1

where sda-viperidae.mbr is the name of the file that will need to be uploaded.


You can capture the NTFS Partition Boot Record in a file with the following command:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda5-viperidae.pbr bs=512 count=1 skip=62926605

where sda5-viperidae.pbr is the name of the file that will need to be uploaded.


Then upload these files to a media sharing site, such as mediafire, and post the link to these files in this forum post.

3

Re: [Solved] Another Partition Resize Error...

Thanks for that link, makes much more sense now.

Here are the files.

.mbr

.pbr

4

Re: [Solved] Another Partition Resize Error...

From the fdisk -l -u output:
425,465,397 sectors in size of partition 5 which is 195C1635 in hexadecimal.

From the sda5-viperidae.pbr file:
447,426,240 sectors in size for the NTFS volume.

Since you wished to have a smaller NTFS volume, we can decrease the NTFS volume size to fit within the partition size.

The change I have made to the file is from a length of 447,426,240 sectors:
00000020   00 00 00 00  80 00 80 00  C0 2E AB 1A  00 00 00 00
To a new length of 425,465,396 sectors:
00000020   00 00 00 00  80 00 80 00  34 16 5C 19  00 00 00 00

Note:  The NTFS volume size is always 1 sector less than the total number of sectors in the partition table entry because the NTFS backup sector is not considered part of the NTFS volume.

To apply this change:

1) Download the new NTFS PBR: sda5-biperidae_new.pbr

2) Load the new NTFS PBR on your hard disk.
NOTE:  Be extra careful when entering the commands.  Data loss could result otherwise.

dd if=sda5-viperidae_new.pbr of=/dev/sda bs=512 count=1 seek=62926605

3) Reboot the computer

4) Check that the file system is recognized in GParted

5) If all seems fine then I would advise booting into Windows and running "chkdsk /f /r" multiple times, until there are no more faults.