1 (edited by Zonarius 2010-01-15 00:04:37)

Topic: [SOLVED] Resized NTFS Partition

There was unused space before and after the partition, so I extended it to take the whole drive using gparted.

My problem is, that when I try to start my Laptop, it skips booting from my harddisk. Instead it tries to connect to a DHCP server.
If I try to boot from harddisk with a boot tool, the screen goes black and I only see a white blinking underscore. sad
This started after I resized the Windows XP NTFS partition.



fdisk - l -u

Platte /dev/sda: 120.0 GByte, 120034123776 Byte
255 Köpfe, 63 Sektoren/Spuren, 14593 Zylinder, zusammen 234441648 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Disk identifier: 0x24cf24ce

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1              63   234436544   117218241    f  W95 Erw. (LBA)
/dev/sda5             126   234436544   117218209+   7  HPFS/NTFS

parted /dev/sda unit s print

Modell: ATA ST9120823AS (scsi)
Festplatte  /dev/sda:  234441648s
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: msdos

Anzahl  Beginn  Ende        Größe       Typ       Dateisystem  Flags
 1      63s     234436544s  234436482s  extended               lba
 5      126s    234436544s  234436419s  logical   ntfs

I used gparted 0.4.5 from Ubuntu 9.10 live-CD.
I can access all my files on the broken partition from Ubuntu.

I hope you can help me!
Thanks in advance,
Zonarius

2

Re: [SOLVED] Resized NTFS Partition

I have executed these two commands:

dd if=/dev/sda of=sda-bheida.mbr bs=512 count=1
dd if=/dev/sda of=sda1-bheida.pbr bs=512 count=1 skip=126

This is the result:
http://www.mediafire.com/?sharekey=f234 … 841391bc8d

3

Re: [SOLVED] Resized NTFS Partition

From the two files you provided the partition size and NTFS volume size appear to be fine.

234,436,482 length in sectors of partition from MBR.
234,436,408 total sectors in NTFS volume from EBR.  This is at least 1 sector less than the partition size, and hence is a valid NTFS file system.

From looking at the output from fdisk and parted, the NTFS partition is a logical partition (sda5) contained within an extended partition (sda1).  To my knowledge, the Windows operating system cannot boot from a logical partition.  Windows can only be booted from a primary partition.

Did you perhaps delete a primary partition prior to extending the NTFS file system to encompass the whole disk?
If so, then this is most likely the reason why you can no longer boot Windows from this hard drive.

4

Re: [SOLVED] Resized NTFS Partition

You are right. I deleted my Windows 7 partition (which was a primary partition) before I resized my Windows XP partition.
My system always booted Windows XP so I thought the win7 partition was unnecessary.
Thank you for pointing that out.

Is there a way to convert the sda5 to a primary partition without losing data?
Or is it better to backup my data, delete every partition and reinstall WinXP?

5

Re: [SOLVED] Resized NTFS Partition

I am not aware of a way to easily convert a logical partition to a primary partition.

As such my advice would be to follow your latter suggestion to backup your data, delete every partition, and reinstall WinXP.

6 (edited by Zonarius 2010-01-15 00:05:13)

Re: [SOLVED] Resized NTFS Partition

Well I always wanted to format my disk, but I've always been to lazy big_smile
This reason comes in handy.
Off to a fresh start!

I'm going to mark this thread as solved.

gedakc, thank you very much for your answers.

Good Bye