How to remove linux from a computer without touching Windows databy Aurelien Botman, February 2006
Published on www.botmanfamily.net/~aurelien/articles. The problemMy Windows partition on my laptop was running out of disk space. I knew I had plenty of unused disk space on my linux partitions. This article describes how I removed linux without touching the Windows data. Removing linuxThe easy bit. Boot up a Knoppix CD version 4.02+ [1], and use QTParted to (a) delete the linux partitions (b) resize the Windows (NTFS) partition. Reboot. Making your computer bootable againDon't panic - grub/lilo was installed on the MBR but its stage1.5 was pointing to a now disappeared linux partition - hence your computer will not boot up. Just boot up your Knoppix CD again. Go to the root-user command line and type:
fdisk -H 255 /dev/hda At the prompt, type in u then p. Write down the sector numbers of the NTFS partition. Somewhere safe. Then: dd if=/dev/zero of=zero.img bs=512 count=1 dd if=zero.img of=/dev/hda This will have the effect of completely zapping your MBR. Your computer will not even recognise your hard disk any more. Don't panic just yet - your data is still there... Now we need to rebuild that MBR: fdisk -H 255 /dev/hda At the prompt, type in o (lower-case letter) then n, followed by p, 1 (the number one), and either the sector numbers you wrote down earlier or return twice for default values. Next, t then 1 (the number one) then 07 (zero-seven, the code for NTFS, hit L for a list of codes). Conclude with p to verify, w to write, and q to quit. Having rebuilt the partition table, the final step is to make the NTFS bootable: parted -i /dev/hda set 1 boot on That's all. Reboot, and Windows should boot up with your data. It worked for me, but your mileage may vary. Referencesaurelien botmanNavigate this site: Welcome My research Publications Tech stuff Project: flat3d Software Other links About the site Email me
|