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?
Answer
It probably will damage the linux partitions and any other partitions (so back up to an external, detachable disk), if it's anything like what I've dealt with before; good news is you do have a solid plan of attack. However, you might also want to back up your boot loader (probably GRUB), which is stored in the first 446 bytes of the drive:
dd of=/backup/bootloader.mbr if=/dev/sda bs=446 count=1
And then restore it after you replace the partitions
dd of=/dev/sda if=/backup/bootloader.mbr
Alternatively, I think you can use a live CD to boot the linux partition, and then
sudo update-grub
to re-write the bootloader.
No comments:
Post a Comment