Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background: I normally use Linux as OS. I had a dual boot with Windows XP. Since I had some problems with the windows partition (too long to explain), I shifted it of a while. This is what I have done:

  1. resized the filesystem with ntfsresize -s idontrememberthenewsize /dev/sda3
  2. rebooted the system and checked that windows boots normally
  3. backed up the partition with dd if=/dev/sda3 of=~/win.img
  4. using fdisk, I deleted the old partition and recreated it, restoring its id and boot flag. Now windows partition is /dev/sda8:

    $ fdisk -l
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x000da6c5
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048      616447      307200   83  Linux
    /dev/sda2          616448  3907028991  1953206272    5  Extended
    /dev/sda5          618496    17395711     8388608   82  Linux swap / Solaris
    /dev/sda6        17397760    78837759    30720000   83  Linux
    /dev/sda7        78839808  3702228991  1811694592   83  Linux
    /dev/sda8   *  3702231040  3907028991   102398976    7  HPFS/NTFS/exFAT
  5. restored the partition image with dd if=~/win.img of=/dev/sda8

  6. sudo update-grub
  7. changed the partition number to "5" in the boot.ini file of the windows partition (read here for more info)

I also tried other partition numbers, from 1 to 8, but nothing. Only a black screen with the blinking text cursor at top-left is displayed.

share|improve this question
Boot to recovery console and repair boot? If you move the system to another partition, NTLDR needs to know about this. – Sami Kuhmonen May 19 '14 at 13:45
@SamiKuhmonen: I tried with fixboot c:, but it doesn't work. bootcfg /rebuild gives me the error Failed to add the selected boot entry – Marco Sulla May 19 '14 at 21:53
up vote 0 down vote accepted

Fixed, I forgot that Windows XP must reside on a primary partition. I deleted it, resized the extended partition, recreated it as primary and restored the image.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .