Reformatting hard disk. - Hardware

This is a discussion on Reformatting hard disk. - Hardware ; After various experiments, including an attempt to install Windows 2000 (it failed) I can no longer boot from /dev/hda. I have reassigned /dev/hdb as my hard drive boot device in the bios. Now I want to do a low level ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Reformatting hard disk.

  1. Reformatting hard disk.

    After various experiments, including an attempt to install Windows
    2000 (it failed) I can no longer boot from /dev/hda. I have
    reassigned /dev/hdb as my hard drive boot device in the bios.

    Now I want to do a low level format on /dev/hda and start all over. I
    have already tried the trick of using a DOS fdisk from a floppy to
    zero out the MBR:
    A: fdisk /mbr
    That may have made things worse, I don't know.

    There is a dd command that will zero out the mbr first block but I
    forget what the exact string is.

    Here are some specs on the drives from dmesg:
    hda: ST3250824A, ATA DISK drive
    hdb: Maxtor 6Y080P0, ATA DISK drive

    The /hda drive is a recent 250MB drive. Windows 2000 however sees it
    as a 133MB drive.
    When I try to use it in a normal manner as the boot device LILO gives
    me an L followed by
    series of 99 99 99 etc.

    Other than the booting problem the drive seems to operate OK. I can
    boot a partition on it and so on using either my LILO file on the
    second drive or an install cdr. I began having trouble after the
    failed Win 2000 install.

    I want to boot from it because it is my newest drive and I routinely
    buy a new drive every three years, retiring the oldest one to the
    junque box. This one has only been in service about one year.

    Any other suggestions appreciated.

    John Culleton

  2. Re: Reformatting hard disk.

    > Now I want to do a low level format on /dev/hda and start all over. I
    > have already tried the trick of using a DOS fdisk from a floppy to
    > zero out the MBR:
    > A: fdisk /mbr
    > That may have made things worse, I don't know.


    The newer windows method is fixmbr. Or something like that.

    > There is a dd command that will zero out the mbr first block but I
    > forget what the exact string is.


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

    NOTE: fdisk /MBR does NOT zero out the MBR. I puts the windows
    stuff/bootloader into the MBR. With a zero'd out MBR, you cannot boot
    anything off of the drive until you run fdisk /MBR or fixmbr in windows,
    or install grub or lilo to the MBR. Granted that it's hard to run fdisk
    /MBR in windows when it requires you to reboot before you've had a chance
    to run it. Thank goodness for grub boot cd's and floppies. Also note
    that the partition table is also in that first 512 bytes, so you'll likely
    need to repartition it after running that dd command.


    > Here are some specs on the drives from dmesg: hda: ST3250824A, ATA DISK
    > drive
    > hdb: Maxtor 6Y080P0, ATA DISK drive
    >
    > The /hda drive is a recent 250MB drive. Windows 2000 however sees it as
    > a 133MB drive.


    There's a motherboard limitation on older boards that only recognizes
    about that much of a drive larger than that. Not much of a problem in
    linux as you can boot from it and use all of the drive in most cases.
    Just make sure your boot partition is in that first 133MB seen by the
    motherboard. In windows you're pretty much screwed and can only use 133MB
    of that 250MB drive. At least until you upgrade your motherboard and cpu,
    or bios.

    HTH

  3. Re: Reformatting hard disk.

    On Mon, 28 Jan 2008 09:08:23 -0800 (PST), "john@wexfordpress.com" wrote:

    >After various experiments, including an attempt to install Windows
    >2000 (it failed) I can no longer boot from /dev/hda. I have
    >reassigned /dev/hdb as my hard drive boot device in the bios.
    >
    >Now I want to do a low level format on /dev/hda and start all over. I
    >have already tried the trick of using a DOS fdisk from a floppy to
    >zero out the MBR:
    >A: fdisk /mbr
    >That may have made things worse, I don't know.


    Doesn't help linux
    >
    >There is a dd command that will zero out the mbr first block but I
    >forget what the exact string is.


    dd if=/dev/zero bs=512 count=63 of=/dev/hda

    Zeroes out the first cylinder, clears the partition table...

    I prefer to zero the entire drive for reuse, this also gives the drive a
    chance to remap any iffy sectors:

    dd if=/dev/zero bs=1M of=/dev/hda

    >The /hda drive is a recent 250MB drive. Windows 2000 however sees it
    >as a 133MB drive.


    You need winxp sp2 to get the LBA48 driver (LBA48 is how to address >128GiB),
    don't know if msft made a fix for win2k.

    >When I try to use it in a normal manner as the boot device LILO gives
    >me an L followed by
    > series of 99 99 99 etc.


    Forget to run lilo after rewriting /etc/lilo.conf?

    Grant.
    --
    http://bugsplatter.mine.nu/

  4. Re: Reformatting hard disk.

    "john@wexfordpress.com" writes:
    >After various experiments, including an attempt to install Windows
    >2000 (it failed) I can no longer boot from /dev/hda. I have
    >reassigned /dev/hdb as my hard drive boot device in the bios.
    >
    >Now I want to do a low level format on /dev/hda and start all over.


    No need for a low-level format.

    > I
    >have already tried the trick of using a DOS fdisk from a floppy to
    >zero out the MBR:
    >A: fdisk /mbr
    >That may have made things worse, I don't know.


    You should also be able to use one of the Linux partition tools to
    repartition the drive.

    >There is a dd command that will zero out the mbr first block but I
    >forget what the exact string is.


    dd if=/dev/zero of=/dev/hda bs=64k count=1

    should be sufficient.

    Actually the partition table has never been a problem in my
    experience, but sometimes I have had to erase the start of the
    partition (because, e.g., the md driver would ignore the partition
    type and just grab the partition). You can do that with a similar
    command, but use the partition device instead of /dev/hda).

    >>When I try to use it in a normal manner as the boot device LILO gives

    >me an L followed by
    > series of 99 99 99 etc.


    My guess is that you have the first stage of LILO in the MBR, but the
    rest has been overwritten. Just reinstalling LILO (maybe after
    installing a Linux distro) should fix that.

    - anton
    --
    M. Anton Ertl Some things have to be seen to be believed
    anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
    http://www.complang.tuwien.ac.at/anton/home.html

  5. Re: Reformatting hard disk.

    On Jan 28, 12:46 pm, Grant wrote:
    > On Mon, 28 Jan 2008 09:08:23 -0800 (PST), "j...@wexfordpress.com" wrote:
    > >After various experiments, including an attempt to install Windows
    > >2000 (it failed) I can no longer boot from /dev/hda. I have
    > >reassigned /dev/hdb as my hard drive boot device in the bios.

    >
    > >Now I want to do a low level format on /dev/hda and start all over. I
    > >have already tried the trick of using a DOS fdisk from a floppy to
    > >zero out the MBR:
    > >A: fdisk /mbr
    > >That may have made things worse, I don't know.

    >
    > Doesn't help linux
    >
    >
    >
    > >There is a dd command that will zero out the mbr first block but I
    > >forget what the exact string is.

    >
    > dd if=/dev/zero bs=512 count=63 of=/dev/hda
    >
    > Zeroes out the first cylinder, clears the partition table...
    >
    > I prefer to zero the entire drive for reuse, this also gives the drive a
    > chance to remap any iffy sectors:
    >
    > dd if=/dev/zero bs=1M of=/dev/hda
    >

    I am doing that as we speak (or write, actually.) It takes a long
    time.



    > >When I try to use it in a normal manner as the boot device LILO gives
    > >me an L followed by
    > > series of 99 99 99 etc.

    >
    > Forget to run lilo after rewriting /etc/lilo.conf?
    >

    No. But lilo might have gone to the wrong drive.

    In any case the work proceeds. Thanks to all who wrote.

    John C.

  6. Re: Reformatting hard disk.

    On 2008-01-28, john@wexfordpress.com wrote:

    > After various experiments, including an attempt to install Windows
    > 2000 (it failed) I can no longer boot from /dev/hda. I have
    > reassigned /dev/hdb as my hard drive boot device in the bios.
    >
    > Now I want to do a low level format on /dev/hda and start all over. I
    > have already tried the trick of using a DOS fdisk from a floppy to
    > zero out the MBR:
    > A: fdisk /mbr
    > That may have made things worse, I don't know.
    >
    > There is a dd command that will zero out the mbr first block but I
    > forget what the exact string is.


    Boot linux (use a CD if necessary; e.g. http://www.sysresccd.org/) and
    fire up fdisk:

    fdisk /dev/hda

    From the fdisk command prompt type "o" to create a new, emtpy partition
    table, then "n" to create new partitions (if that's what you want), then
    "w" to write the changes onto the disk.

    If you want to use something else to create your new partitions, skip
    the "n" and just use "w" to write the empty table to the disk.

    --

    John (john@os2.dhs.org)

+ Reply to Thread