removing grub from MBR of a flash drive
I have a flash drive that i used on my old netbook to temporally hold a copy of ubuntu as the netbooks internal drive was dead.
i have since got a new netbook and wanted to return the flash drive to simple removable storage ive re-partitioned it back to 14gb fat32 2gb ext2 and everything is working fine except that if i try to boot with the key inserted grub loads then errors imminently (sort of obious if grub is still in the MBR but there is no menu.lst file anymore...) googleing for removal of GRUB just gives me loads of hits for how to restore windows mbrs when you dont want to keep linux anymore... none of these methods seem to have any targeting. i need to remove grub from sdb while keeping it intact in sda sdb shouldn't even be bootable, so that when boot from usb is higher in the bios than boot from hdd the usb key is ingnored and the hdd is booted as normal. any suggestions? |
If you are absolutely sure that the device file for your usb flash drive is sdb then run as root with any and all partitions on sdb unmounted:
# dd if=/dev/zero of=/dev/sdb bs=512 count=1 If you are running on a *buntu distro which doesn't have a root account run: $ sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1 Grub resides on the mbr of the flash drive which is the first sector of the drive and is 512 bytes in size. The above command will zero out the mbr of sdb. All data on the flash drive will be lost and you will have to repartition and reformat the flash drive afterwards. |
actually
the above command will zero out the whole usb you then need to use cfdisk or preferably Gparted to recreate a partition table and then reformat it To just delete the MBR it is Code:
# dd if=/dev/zero of=/dev/xxx bs=446 count=1 http://www.linuxquestions.org/questi...78#post3508978 |
Quote:
both partitions still work fine and neither have the boot flag set any more ideas? [edit] ahh my problem, it seems the bios wont skip any usb device wether its bootable or not if its not you just get the blinking cursor [/edit] |
All times are GMT -5. The time now is 03:09 PM. |