
Remove Grub From Windows
2020-4-3 How can I uninstall GRUB through the Arch Linux shell? Stack Exchange Network. Stack Exchange network consists of 175 Q&A communities including Stack. How to uninstall GRUB. Ask Question Asked 9 years, 3 months. You should be able to chainload the Windows bootloader from grub by following code BTW: title Windows rootnoverify (hd0,0.
Reverting to GRUB Legacy
If a user chooses to return to GRUB legacy (0.97), these steps will remove GRUB 2 and install GRUB.
The command line produces a cleaner uninstall and reinstallation. While adding and removing the packages can be accomplished with Synaptic, certain steps must be accomplished in a terminal.
- Open a terminal: Applications, Accessories, Terminal.
- Optional: Make backup copies of the main GRUB 2 directories and files.
- Remove GRUB 2
sudo apt-get purge grub-pc
The system will be unbootable until another bootloader is installed.
- Once the packages are removed, many files will still remain in '/boot/grub'
- Install GRUB 0.97
sudo apt-get install grub
With grub installed, the user must still create the menu.lst and stage1/stage2 files by running the following two commands.
sudo grub-install /dev/sdX
- Choose the correct device (sda, sdb, etc), normally the one on which Ubuntu is installed.
Creates the stage1 and stage2 files in /boot/grub and writes to the MBR.
sudo update-grub
Generates menu.lst
- Tab to 'Yes' when prompted.
- Reboot
If the user receives an 'Unrecognized device string Error 11' message on rebooting see the Resolving an 'Unrecognized Device String' (Error 11) section for instructions on how to edit the menu and make the system bootable.
Q. How do I uninstall GRUB? I need to uninstall everything before sending this hard disk to someone including GRUB. All I need to keep is windows XP.
A. GNU GRUB ('GRUB' for short) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts.
You can overwrite MBR with standard dd command. You can also use old good MS-DOS fdisk command to overwrite MBR.
Using MS-DOS/Windows 9x boot disk
In order to remove the GRUB bootloader from a Linux and Windows XP machine, boot with a Windows 9x startup disk or CD and execute the MS-DOS command:fdisk /mbr
Using Windows XP boot disk
Boot computer using Windows XP (Windows 2000) setup disc / CD / DVD. Next, type the following commands:# fixmbr
# exit
Using Linux
You can also use dd command from Linux itself (it removes partition table):# dd if=/dev/null of=/dev/sdX bs=512 count=1
Just remove MBR, without the partition table (see comment below):# dd if=/dev/null of=/dev/sdX bs=446 count=1
Replace /dev/hdX with your actual device name such as /dev/hda. Use fdisk -l command to find out device name:# fdisk -lOutput:
- Mount the floppy drive if it's not mounted (assumes /mnt/floppy exists): mount -t msdos /dev/fd0 /mnt/floppy
- Run the following command: dd if=/dev/hda2 of=/mnt/floppy/linux.bin bs=512 count=1Substitute the path for the if= parameter (the input file) with the appropriate partition from the previous step. E.g., set if= to /dev/hda2.
- Mount the FAT32 partition if it's not mounted yet. If it isn't listed in the df output, it hasn't been mounted yet. Check out steps 3a-3c for mounting a FAT32 partition on the 'Share Partitions HOWTO'.
- Run the following command: dd if=/dev/hda2 of=/osshare/linux.bin bs=512 count=1Substitute the path for the if= parameter (the input file) with the appropriate partition from the previous step. E.g., set if= to /dev/hda2. Substitute the path for the of= parameter (the output file) with whatever is appropriate for your system. The example here (of=/osshare/linux.bin) is for copying onto a FAT32 partition called osshare.
- Use Explorer:
- Go to Tools->Folder Options->View and select Show hidden files and folders and deselect Hide protected operating system files (Recommended).
- Right-click on the file, view the Properties and uncheck Read-only. You can now edit the file.
- After editing the file, restore the settings to their original state.
- Use the command-line:
- Make the file writable: attrib -R -S -H C:boot.ini.
- After you've finished editing the file, put the settings back: attrib +R +S +H C:boot.ini
Troubleshooting
- When I select Linux from the boot menu, I get a frozen 'GRUB' (or an 'L' in the case of LILO)
- Make sure you created the linux.bin file correctly with the dd command. If you think you ran the command correctly, the problem may be that your /boot partition is beyond cylinder 1024 and your BIOS can't reach it. At system startup, the Windows boot loader lists the choices from boot.ini. When you select Linux, the boot loader then loads the 512-byte linux.bin file, and then BIOS tries to access the /boot partition to run GRUB. Some BIOS implementations can only address the first 1024 cylinders of a hard drive, which corresponds to ~8.5 GB. How do you fix this? Create your /boot partition before cylinder 1024; i.e. before ~8.5 GB.
- If I select Linux from the boot menu, I get an error message that says 'Windows XP could not load: The file hal.dll (windows/system32/) is missing or corrupt. Please reinstall.
- This is usually caused by an error in the boot.ini file. If you are unable to find and fix the error, check out Kelly Theriot's page that provides various methods for addressing the problem.
Acknowledgments
- Jimmy Andriambao: for recommending the link regarding hal.dll problems
- Leif Roger Kolberg: for creating a Norwegian translation of this page
- Dirk Goepfert: for creating a German translation of this page
- Fred van Lieshout: for creating a Dutch translation of this page
- Rostislav 'Udo' Galicek: for creating a Czech translation of this page
- Arun Swami: for validating the dual-boot setup with multiple hard drives. Thanks Arun!
- Adrián I. Correa: for enthusiastically providing a Spanish translation of this page. Adrián said it best: 'I love this wonder called The Internet!'
- Devesh Mistry: for pointing out the use of chroot /mnt/sys/mnt/syimage when in linux rescue mode
- Emmanuel Brun: for graciously providing a French translation of this page
- Jason Noll: for reporting the hal.dll problem resulting from error(s) in boot.ini
- Garth Patil: for helping to troubleshoot why GRUB was freezing and having a great sense of humor
- Piete Brooks: for pointing out that editing C:boot.ini requires administrator-level privileges and providing the content for making the file editable using Explorer
- Paul Feehan: for providing the commands to make C:boot.ini editable for Windows XP
- Jan Holm Jensen: for reporting that C:boot.ini is a hidden system file
- Hampus Hedberg Hankell: for the following suggestion: I think you should add help for users in despair that already have installed grub on mbr ,thus loosing the their ability to boot into windows xp. Procedure for this is ,boot from a windows start disc and do a fdisk /mbr At least then they can reach their windows and this time doing it right
- Mark Jordan: for verifying that this works on Windows XP and suggesting the content for copy to floppy
- Darryl Eaton: for introducting me to Red Hat Linux
