1
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:
- resized the filesystem with
ntfsresize -s idontrememberthenewsize /dev/sda3
- rebooted the system and checked that windows boots normally
- backed up the partition with
dd if=/dev/sda3 of=~/win.img
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
restored the partition image with
dd if=~/win.img of=/dev/sda8
sudo update-grub
- 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.
Boot to recovery console and repair boot? If you move the system to another partition, NTLDR needs to know about this. – Sami Kuhmonen – 2014-05-19T13:45:42.487
@SamiKuhmonen: I tried with
fixboot c:
, but it doesn't work.bootcfg /rebuild
gives me the errorFailed to add the selected boot entry
– Marco Sulla – 2014-05-19T21:53:32.593