Results 1 to 7 of 7

Thread: Grub and MBR

Hybrid View

  1. #1
    Member registered user
    Join Date
    Apr 2005
    Location
    HULL
    Posts
    30

    Grub and MBR

    Hi Guy's. I have had a lot of problems since I installed onto my USB Hard Drive. My hard drive got mangled and I am stuck with Grub interfering with my Win XP boot.

    I have backed up my MBR and using the Knoppix 'Live' cd have entered the following.

    dd if=/dev/null of=/dev/hda1 bs=446 count=1

    I thought that this would remove Grub and leave me with a clean MBR. But I keep getting refered to the dd--help files which are not being a whole lot of use to me.

    Could one of the knowlegeable members please tell me if I have written this command correctly and if it is the right one to get rid of Grub from my MBR. Much appreciate any help you can give me on this. It is more than a bit worrying. Thanks Grandad Walt

  2. #2
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    Hi Walt.
    What that command does is write 0's from (dev/null) into the master boot record but keeping your partition table intact.
    This will get rid of grub but you wont be able to load windows as you have no bootloader now.

    So, to get XP back, start with either Knoppix 5.1.1 or Knoppix 5.3.1
    Install a Debian programm called install-mbr

    From a terminal (make sure network is configured and working)

    su
    apt-get install install-mbr

    install-mbr /dev/hda

    Notice that the command is /dev/hda this installs new standard bootloader code into the mbr of the first hard drive.

    After this windows should load, however it may be worth checking that the partition (windows always likes the first partition is set to active)
    so, still as root:

    fdisk /dev/hda

    type p to print the hard drive partition table, there should be an * against your windows partition. If not, press a, then 1 (or window partition)
    then w to write changes and reboot.

    More info on install-mbr below
    http://pwet.fr/man/linux/administrat...me/install_mbr

    Replace hda with sda if your internal hard drive is sata. You now have to reinstall grub to load linux. This experience is something
    most linux users go through, some more than others. Hope that helps.

  3. #3
    Member registered user
    Join Date
    Apr 2005
    Location
    HULL
    Posts
    30

    Grub and MBR

    Hi there Hal8000. You are a pal and no mistake.Well I tried the code you sent me, but it seems like the Apt-get command does not work when you are using the Knoppix 'live' cd. Seems It does work,...... but only when you have it installed to the Hard Drive. It works in Debian okay, but I no longer had Debian. Did I? Groan!
    Well that wiped the grin off my face for a while, but then I started looking deeper into the Knoppix Hacks and found the following. Sudo install-mbr /dev/hda The outcome was that it took Grub right out of the MBR and .......would you believe it......never ripped up the MBR. Cor! That was a relief. I had made a backup of it just in case.

    So now I have my win XP back in shape except for a couple of minor glitches, which I got rid of by doing a system Restore to an earlier point. But I still do not have Debian on my hard drive. Seems I am going to have to do some research, because I partitioned the drive okay. Ahem! Sort of! Only every time Debian booted it kept telling me that I had not made a swap file. I had, but obviously not right.
    The mysterious thing is that it still booted up great. I made a right muck of it somewhere though because although I gave a password that I was familiar with (Debian sugested I use my first name for a user name) it would never recognise that password and I couldn't get into it to sort it out. Dratt!
    Yeh well! Guess it is back to the learning curve for this old guy. Must dig into the mysteries of Debian Partions. Guess I am rambling Guy's. Sorry about that. Thanks again. What would I do without you? Regards Grandad Walt.

  4. #4
    Member registered user
    Join Date
    Apr 2005
    Location
    HULL
    Posts
    30

    Grub and MBR

    Hi Hal8000. Got stuck in this morning and printed out Sudo fdisk -l and this is what I got back from the terminal. I will just put it down as it printed out. OK?

    Units=cylinders of 16065 * 512=8225280 bytes

    Device. Boot. Start. End. Blocks. Id. System
    /dev/hda1 * 1 2433 19543041 7 HPFS/NTFS

    Disk/dev/sda: 80.0GB, 80026361856 bytes
    255 heads. 63 sectors/track. 9729 cylinders.
    Units=cylinders ofg 16065 * 512=8225280 bytes

    Device Boot Start. End. Blocks. Id. System.
    /dev/sda1 1 25550 20482843+ 7 HPFS/NTFS
    /dev/sda2 2551 9562 56323890 7 HPFS/NTFS


    Disk/dev/sdb: 4047 MB, 404750848 bytes
    4 heads, 32 sectors/track, 61759 cylinders
    Units=cylinders of 128 * 512=65536 bytes

    Device. Boot. Start. End. Blocks. ID. System.
    /dev/sdb1 * 1 61760 3952623+ b W95 FAT32
    Knoppix@Knoppix:~$

    Hope that this makes some sort of sense to you and that it might help you in some way to get a grasp of my situation. I have logged in to the Debian forums and will ask around on there to see if I can get some sort of a walk through with the Debian installer.(it seemed so simple, but wasn't) and maybe I shall be able to have another go. Regards Grandad Walt.

  5. #5
    Member registered user
    Join Date
    Apr 2005
    Location
    HULL
    Posts
    30

    Grub and MBR

    Hi Guy's. Guess what? I now have Debian 4.0 up and running on my computer. I can't get over the amount of help I have been given. This forum is really the greatest. Still love my Knoppix though and I feel that we shall be having a long and happy relationship. But Debian is now in full swing and I am one very happy bunny. Thanks a lot guy's. You are the best. Grandad Walt.

  6. #6
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282

    Re: Grub and MBR

    Quote Originally Posted by grandad
    Hi Hal8000. Got stuck in this morning and printed out Sudo fdisk -l and this is what I got back from the terminal. I will just put it down as it printed out. OK?

    Units=cylinders of 16065 * 512=8225280 bytes

    Device. Boot. Start. End. Blocks. Id. System
    /dev/hda1 * 1 2433 19543041 7 HPFS/NTFS

    Disk/dev/sda: 80.0GB, 80026361856 bytes
    255 heads. 63 sectors/track. 9729 cylinders.
    Units=cylinders ofg 16065 * 512=8225280 bytes

    Device Boot Start. End. Blocks. Id. System.
    /dev/sda1 1 25550 20482843+ 7 HPFS/NTFS
    /dev/sda2 2551 9562 56323890 7 HPFS/NTFS


    Disk/dev/sdb: 4047 MB, 404750848 bytes
    4 heads, 32 sectors/track, 61759 cylinders
    Units=cylinders of 128 * 512=65536 bytes

    Device. Boot. Start. End. Blocks. ID. System.
    /dev/sdb1 * 1 61760 3952623+ b W95 FAT32
    Knoppix@Knoppix:~$

    Hope that this makes some sort of sense to you and that it might help you in some way to get a grasp of my situation. I have logged in to the Debian forums and will ask around on there to see if I can get some sort of a walk through with the Debian installer.(it seemed so simple, but wasn't) and maybe I shall be able to have another go. Regards Grandad Walt.
    Yes , this makes sense 3 HD's and their partitions.
    If you install Debian or Knoppix install using a linux filesystem i.e. reiser or ext3 not a windows file system.
    HTH

  7. #7
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282

    Re: Grub and MBR

    Quote Originally Posted by grandad
    Hi Guy's. Guess what? I now have Debian 4.0 up and running on my computer. I can't get over the amount of help I have been given. This forum is really the greatest. Still love my Knoppix though and I feel that we shall be having a long and happy relationship. But Debian is now in full swing and I am one very happy bunny. Thanks a lot guy's. You are the best. Grandad Walt.

    I've not seen you forums.debian.org unless you have a different user name. All linux forums are great, the fastest and mot busiest seems ubunti forms at the moment, but that can always change.

Similar Threads

  1. Grub
    By tenlientl in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 05-02-2005, 08:23 PM
  2. How to remove grub
    By Mic Q in forum General Support
    Replies: 9
    Last Post: 11-04-2004, 07:31 PM
  3. How to use Grub
    By Neil Young & Crazy Ho in forum General Support
    Replies: 1
    Last Post: 05-14-2004, 07:05 AM
  4. GRUB ... then nothing
    By dantay in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 03-16-2004, 02:06 PM
  5. Getting rid of Grub
    By fingers99 in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 08-10-2003, 04:04 AM

Posting Permissions

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


Kineses PS/2 Keyboard to Macintosh Adapter Converter Vintage Interface Apple picture

Kineses PS/2 Keyboard to Macintosh Adapter Converter Vintage Interface Apple

$60.00



Apple Macintosh Plus 1Mb Vintage Desktop Computer w/ Keyboard & Mouse picture

Apple Macintosh Plus 1Mb Vintage Desktop Computer w/ Keyboard & Mouse

$245.00



VINTAGE Apple Mac OS X Computer Monitor picture

VINTAGE Apple Mac OS X Computer Monitor

$250.00



Vintage Apple iMac G4 15

Vintage Apple iMac G4 15" Lamp 700MHz 512MB Mac OS X 10.4.6 W/ Pro Speakers

$300.00



185--Sonnet Crescendo G3 PPCG3-375-5-K-06 G3 Add-On Card for Vintage Mac picture

185--Sonnet Crescendo G3 PPCG3-375-5-K-06 G3 Add-On Card for Vintage Mac

$90.00



256k VRAM Vintage Apple Macintosh 670-0269 works with 630-0044 80ns QTY: 2 picture

256k VRAM Vintage Apple Macintosh 670-0269 works with 630-0044 80ns QTY: 2

$76.20



Rare Vintage Macintosh Apple Wooden Disk Storage Box Dovetailed picture

Rare Vintage Macintosh Apple Wooden Disk Storage Box Dovetailed

$69.95



Vintage 1998 iMac G3 M4984 Mac OS + Keyboard Working but Needs Some Repair Read picture

Vintage 1998 iMac G3 M4984 Mac OS + Keyboard Working but Needs Some Repair Read

$295.00



Vintage Apple PowerBook 15” G4 “Aluminum” (1.25GHz/2gb/150gb/Tiger) 2 picture

Vintage Apple PowerBook 15” G4 “Aluminum” (1.25GHz/2gb/150gb/Tiger) 2

$109.99



Apple Power Macintosh PowerPC 7300/200 VTG w Keyboard Mouse Storage Drive Read picture

Apple Power Macintosh PowerPC 7300/200 VTG w Keyboard Mouse Storage Drive Read

$199.99