LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 08-16-2012, 01:08 AM   #1
spezticle
Member
 
Registered: May 2010
Distribution: Ubuntu 10.04
Posts: 30

Rep: Reputation: 0
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,
 
Old 08-16-2012, 01:54 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,001

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

Be careful and make backups before destroying anything!
 
1 members found this post helpful.
Old 08-16-2012, 03:46 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,880
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
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.
 
1 members found this post helpful.
Old 08-18-2012, 03:52 PM   #4
spezticle
Member
 
Registered: May 2010
Distribution: Ubuntu 10.04
Posts: 30

Original Poster
Rep: Reputation: 0
thanks, i just wasn't sure if it would also destroy my partition table.
it didn't.
 
  


Reply

Tags
bootloader, remove


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How would I remove a double bootloader? Paladinleeds Linux - General 2 02-27-2010 09:32 PM
How to remove LILO and restore Windows Bootloader RobertRBuce Linux - Newbie 14 10-20-2009 05:08 AM
remove bootloader hoffmanyew Linux - General 3 05-19-2005 10:18 PM
remove bootloader hoffmanyew Linux - General 1 05-19-2005 09:02 PM
Remove Linux, Restore WINXP Bootloader costasm Linux - General 2 07-31-2004 07:41 AM


All times are GMT -5. The time now is 11:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration