Results 1 to 9 of 9

Thread: Howto delete MBR from USB-HDD??

  1. #1
    Polaris01 NNTP User

    Question Howto delete MBR from USB-HDD??

    Hi Everybody!

    I've got that prob described in title.

    It is caused by an old PC (p3@500Mhz) which is not fast enough to detect a CD/ DVD before he tries to boot from hdd.

    So i need to wipe the MBR.
    But how to do that under openSUSE 11 and the HDD connected via usb?

    Thanks for helping!
    Regards

    Polaris

    P.S.: If it's possible try to explain in German (my native Lang).... THX!!!

  2. #2
    Join Date
    Jul 2008
    Location
    SPAIN
    Posts
    132

    Default Re: Howto delete MBR from USB-HDD??

    Hi,

    Here is an easy and direct way to achieve that:

    As root, run the following command:

    # dd if=/dev/zero of=/dev/sda bs=512 count=1


    Change /dev/sda for the device in your system.

    Keep in mind that the above command will wipe out the entire MBR: boot record plus partition table
    Thus, your data in that disk will be lost forever.

    If in doubt, get a backup copy before by running this:

    # dd if=/dev/sda of=/root/mymbrbackup.img bs=512 count=1

  3. #3
    Polaris01 NNTP User

    Default Re: Howto delete MBR from USB-HDD??

    Hi!

    I've now tried the command above but it still says "Grub Loading stage1.5."

    And the next prompt is "Error 22"...

    Is there any other way to fix that problem?

    Regards
    Polaris

  4. #4
    Join Date
    Jul 2008
    Location
    SPAIN
    Posts
    132

    Default Re: Howto delete MBR from USB-HDD??

    Hi,

    If you are seeing that message, then the stage1 boot code from grub is still in the MBR of your disk.

    That means that the dd command was not given the right parameters.

    Double check that you are typing the right device name corresponding to the disk whose MBR is to be wiped.

    If not sure, run fdisk -l and find the correct one.

    In other words, there is no point in running dd .....on /dev/sda if your system doesn't see any disk device with such a name.
    I used it as an illustrative example.

    If still in trouble, please give more details.

  5. #5
    Polaris01 NNTP User

    Default Re: Howto delete MBR from USB-HDD??

    Ok...i did it again (2x) still not working.

    HDD to Wipe MBR: Seagate Medalist ST33221A

    Following text is copied from terminal window:
    (green marked is disk to wipe)

    linux-s5lm:~ # fdisk -l

    Disk /dev/sda: 40.0 GB, 40007761920 bytes
    255 heads, 63 sectors/track, 4864 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000a6242

    Device Boot Start End Blocks Id System
    /dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
    /dev/sda2 * 263 2563 18482782+ 83 Linux
    /dev/sda3 2564 4864 18482782+ 83 Linux

    Disk /dev/sdb: 3249 MB, 3249340416 bytes
    255 heads, 63 sectors/track, 395 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x623e602d

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 394 3164773+ b W95 FAT32

    linux-s5lm:~ # dd if=/dev/zero of=/dev/sdb1 bs=512 count=1
    1+0 records in
    1+0 records out
    512 bytes (512 B) copied, 2.4863e-05 s, 20.6 MB/s

    linux-s5lm:~ #
    fdisk -l

    Disk /dev/sda: 40.0 GB, 40007761920 bytes
    255 heads, 63 sectors/track, 4864 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000a6242

    Device Boot Start End Blocks Id System
    /dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
    /dev/sda2 * 263 2563 18482782+ 83 Linux
    /dev/sda3 2564 4864 18482782+ 83 Linux

    Disk /dev/sdb: 3249 MB, 3249340416 bytes
    255 heads, 63 sectors/track, 395 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x623e602d

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 394 3164773+ b W95 FAT32


    There is still the error 22 when booting.....

  6. #6
    Will Honea NNTP User

    Default Re: Howto delete MBR from USB-HDD??

    Polaris01 wrote:

    >
    > Hi Everybody!
    >
    > I've got that prob described in title.
    >
    > It is caused by an old PC (p3@500Mhz) which is not fast enough to
    > detect a CD/ DVD before he tries to boot from hdd.
    >
    > So i need to wipe the MBR.
    > But how to do that under openSUSE 11 and the HDD connected via usb?
    >
    > Thanks for helping!
    > Regards
    >
    > Polaris
    >
    > P.S.: If it's possible try to explain in German (my native Lang)....
    > THX!!!


    Many older systems require that you define the specific boot order in the
    BIOS and some will not fall through to alternate boot sources unless
    specifically identified. Several of the machines around here require that
    I change the BIOS settings every time I want to boot from CD rather than
    the HDD then change the setting again to boot from the HDD. Check the BIOS
    setting before you get too far into changing hard drive setup.

    --
    Will Honea

  7. #7
    Polaris01 NNTP User

    Default Re: Howto delete MBR from USB-HDD??

    Hi!

    I've got the same boot order all the time (floppy, cd/dvd, hdd)
    I'm a "little" in practice with PC's because of my first job, so this was the first thing i did....
    The only problem is the missing Linux (detailed)know how.....

  8. #8
    Rikishi 42 NNTP User

    Default Re: Howto delete MBR from USB-HDD??

    On 2008-07-30, Polaris01 <Polaris01@no-mx.forums.opensuse.org> wrote:

    > It is caused by an old PC (p3@500Mhz) which is not fast enough to
    > detect a CD/ DVD before he tries to boot from hdd.


    That seems very, very unlikely.

    Until the reader has scanned the CD/DVD, it's 'busy'. Afterwards, it boots,
    or it has a read error. Then, the HD is used. That can take several minutes,
    if required. At least, on the machines I've seen.

    My current home server is a P-II 350 MHz. Never had the kind of problem you
    describe.


    --
    The sand remembers once there was beach and sunshine
    but chip is warm too
    -- haiku from Effector Online, Volume 1, Number 6

  9. #9
    Join Date
    Jul 2008
    Location
    SPAIN
    Posts
    132

    Default Re: Howto delete MBR from USB-HDD??

    Hi,

    I think you are still seeing the stage1 message in the MBR because it is still there:

    In one of your posts, you stated:

    ...
    ...
    Device Boot Start End Blocks Id System
    /dev/sdb1 1 394 3164773+ b W95 FAT32

    linux-s5lm:~ # dd if=/dev/zero of=/dev/sdb1 bs=512 count=1
    1+0 records in
    1+0 records out
    512 bytes (512 B) copied, 2.4863e-05 s, 20.6 MB/s

    linux-s5lm:~ # fdisk -l
    ...
    ...

    That's the problem.

    That command you submitted, dd if=/dev/zero of=/dev/sdb1 bs=512 count=1, would wipe the boot loader code from the boot record of the first partition of the /dev/sdb disk, but not from the MBR of the disk.

    Let's make it clear:

    A given disk (well, exactly those with dos compliant partition tables) only has one MBR, which happens to be located in the first 512 bytes of the disk, as a whole.
    In addition, each partition has its own boot record, but it is not a MBR: they are only secondary boot records.

    So, when you run dd if=/dev/zero of=/dev/sdb1 bs=512 count=1, you are wiping the boot record of the first partition on your /dev/sdb disk, not the MBR.

    As a said in my very first post, to wipe the MBR of the /dev/sdb disk, run this:

    dd if=/dev/zero of=/dev/sdb bs=512 count=1

    Notice, that I am using the device name corresponding to the disk as a whole, not that of any existing partition in it.

    This should fix your problem.

    Regards.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •