0
I have a dual-boot laptop (Windows 7/Kubuntu 12.04) with an IDE spinning-rust disk.
I'd like to reinstall Windows. The problem is that the only medium for that is a factory-installed recovery partition, and I'm concerned it might potentially damage the Linux partitions.
My current plan of attack is:
- Note down existing partition information (from e.g.
parted
). - Back up the Linux partitions using
dd
. - Use the Windows recovery to reinstall Windows.
- If the recovery process damages the Linux partitions or dual boot configuration, use a LiveCD to:
- Partition the disk as it was before the reinstall.
- Use
dd
to write the partition data into the newly created partitions. - Restore the dual boot configuration (I have yet to research how I go about that).
The question I'd like to ask: is this the correct approach, and, if yes, what are the gaps and potential pitfalls I should be mindful about?
So I'm on the right track, then? Thanks for the GRUB instructions. One question 'though - why this specific byte buffer (466) in
dd
? – mikołak – 2013-06-07T16:51:53.463OK, since this answer has gone unaccepted for too long, I'll assume this is just for convention's sake. – mikołak – 2013-06-18T15:21:41.643
@TheTerribleSwiftTomato Whoops, I missed the notification about your comment: The first 512 bytes of a DOS-formatted harddrive (as opposed to Apple or GPT) are the bootloader and partition table. Specifically, the first 466 are the boot loader, and then 467-512 are the partition table. Since we just want the boot loader, we set the block size to 466 and tell
dd
to copy 1 block. "Disk Convention" isn't the right word for it (though it is a convention I suppose); "Disk Format" better describes it. – Darth Android – 2013-06-18T16:30:25.843heh, I also had a brainfart and missed the
– mikołak – 2013-06-18T17:32:05.773count=1
bit and hence the entire point of the command. Thanks for the clarification. I suggest it would be worthwhile to edit it into the answer. BTW, I think you might have probably meant446
instead of466
: https://en.wikipedia.org/wiki/Master_Boot_Record#Sector_layout .1Indeed I did; Fixed! – Darth Android – 2013-06-18T18:49:16.913