A corrupted MBR is not fun, trust me on this one.


Results 1 to 7 of 7

Thread: A corrupted MBR is not fun, trust me on this one.

  1. #1
    Join Date
    Aug 2000
    Posts
    728

    A corrupted MBR is not fun, trust me on this one.

    So, somehow I corrupted my MBR. When my bios is supposed to show lilo instead I just get a long list of "99"s. So no booting into linux or windows. Anyways, I've been looking but I can't find any USB linux boot disks that can fix an MBR. I've found plenty of CD and floppy ones, but the computer I'm using to write this doesn't have a CD burner (and mine doesn't have a floppy drive). So, does anyone have any suggestions?
    `Only dead fish swim with the stream. . .

  2. #2
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    That is corrupted talk!

    Task B3 in the last link of my signature refers. Dead easy to fix with any Linux Live CD!

    Even if you have no floppy drive and no CD drive you can put Grub into a USB pen drive, boot up Grub and use it to fire up the Linux. Then you restore Lilo.
    Last edited by saikee; 08-30-2007 at 07:41 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #3
    Join Date
    Aug 2000
    Posts
    728
    Cool. Goood to know that it's easy. One question though, by "putting grub on the USB" do you mean just the grub boot loader or do you mean putting a whole knoppix linux CD on the USB drive?
    `Only dead fish swim with the stream. . .

  4. #4
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Just Grub or a part of it really because you don't even build it.

    Get any Live CD that has Grub on any PC that can read CD/DVD and support USB pen drive. Boot up the Live CD and insert the pen drive.

    Mount the pen drive and make a /boot/grub directory in the USB pen drive. Say it is in the first partition and the pen drive is the second disk so the partition known to Grub as (hd1,0)

    Use "find / -name stage1" to find the location of the Grub directory in the boot up Linux and Copy the content Grub directory in the pen drive's /boot/grub

    Invoke a Grub shell in a Linux terminal and make the pen drive bootable by Grub by commands
    Code:
    grub
    root (hd1,0)
    setup (hd1)
    Take this pen drive to any PC with unbootable Linux and arrange the Bios to boot the usb device first.

    You get a Grub prompt and nothing else. But there isn't a PS system that cannot be booted by a Grub Prompt.

    In the Grub prompt you can check the disk partition geometry by
    Code:
    geometry (hd0)
    geometry (hd1)
    etc
    Having locate the partition of the unbootable Linux, say it is in (hd2,1) that has lilo.conf you can ask Grub to display its Lilo.conf content by
    Code:
    cat (hd2,1)/etc/lilo.conf
    You can then use GRub's kernel command to boot the Linux previous booted by Lilo by the 4 lines of command
    Code:
    root (hd2,1)
    kernel <content from the "image=" statement"> plus <ro> Plus <root=device name>
    initrd <any relevant initrd file>
    boot
    You do similar for an Unbootable Linux that has Grub

    For Dos, WIndows, Solaris or BSD you chainload the system
    Code:
    root <relevant partition in GRub term>
    chainloader +1
    boot
    That is what I call "real fun" when your MBR is corrupted because a Linux user does not need a MBR to boot any PC system. We have Grub! GRub can be installed in any bootable media; floppy, CD, DVD, internal hard disk, USB pen drive, USB external hard disk, etc....
    Last edited by saikee; 08-31-2007 at 03:30 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #5
    Join Date
    Aug 2000
    Posts
    728
    Thanks for the help, I actually was able to burn a CD, so all is well. Well, kind of. I'm able to boot an old kernel, but not my newest one. This is an unrelated problem that I talk about here: http://justlinux.com/forum/showthread.php?p=873313 . Once again, thanks for the help.

    --Gabe
    `Only dead fish swim with the stream. . .

  6. #6
    Join Date
    Mar 2004
    Location
    Zoetermeer, Holland
    Posts
    147
    Never realized that. New PC's do not come with floppy drives any more, so your "good old" MS-dos flop containing FDISK.exe cannot do the job anymore...

    I've got an gparted-live cd lying around. whenever I'm in that kind of trouble, can that CD help me?
    It's a known "problem" with OS/2. It runs continuously until the underlying hardware crumbles under you hands....

    the irony of quality

  7. #7
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    One can burn a Dos bootable floppy disk image into a CD. It is called emulation mode and the CD boots up as Drive "A".

    The MS fdisk.exe can also be "sourced" from FreeDos which provides a bootable iso image to be burn into a CD. It is always there whenever we need it.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

Posting Permissions

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