LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   remove bootloader (https://www.linuxquestions.org/questions/linux-hardware-18/remove-bootloader-4175422340/)

spezticle 08-16-2012 01:08 AM

remove bootloader
 
i have 2 drives
sda and sdb

sda used to be my only drive. now i've added sdb and it contains my /boot partition as well as containing my bootloader.
i've simply changed my bios to boot to sdb first.
now sda still has a bootloader but it's invalid. if i do boot from sda it'll go to a grub rescue prompt because the bootloader is expecting a partition scheme that isn't there anymore.

ideally, sda would have no bootloader at all.
sdb is a usb thumb drive. the idea is, without the drive plugged in, the pc won't boot. Technically it does do that, but i don't want the computer to boot to the dead bootloader on the old, sda, drive.
how might i remove the bootloader on sda without destroying my partition?


thanks in advance,

pan64 08-16-2012 01:54 AM

probably this helps: http://www.axllent.org/docs/data_storage/erase_your_mbr

Be careful and make backups before destroying anything!

TobiSGD 08-16-2012 03:46 AM

That is pretty easy. You have to overwrite the bootloader part without overwriting the partition table (the MBR contains the bootloader and the partition table, so don't overwrite the whole MBR).
The bootloader part contains the first 446 bytes of the MBR, so the command
Code:

dd if=/dev/zero of=/dev/sda bs=446 count=1
will do the job.

spezticle 08-18-2012 03:52 PM

thanks, i just wasn't sure if it would also destroy my partition table.
it didn't.
:)


All times are GMT -5. The time now is 02:27 AM.