Results 1 to 7 of 7

Thread: Grub and MBR

  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
  •  


🔀 Juniper Networks EX2300-C-12P 12× Gigabit PoE+ • 2× 10G SFP+ Compact Switch ⚡ picture

🔀 Juniper Networks EX2300-C-12P 12× Gigabit PoE+ • 2× 10G SFP+ Compact Switch ⚡

$109.99



Juniper EX2300 12-Port Gigabit PoE+ Managed Network Switch P/N: EX2300-C-12P picture

Juniper EX2300 12-Port Gigabit PoE+ Managed Network Switch P/N: EX2300-C-12P

$149.99



Juniper Networks EX2300-48P 48-Port PoE Gigabit Switch (Renewed) picture

Juniper Networks EX2300-48P 48-Port PoE Gigabit Switch (Renewed)

$361.91



Juniper QFX5100-48S-3AFI 48-Port SFP+ 6 QSFP+ 2x SFP/RJ-45 Management picture

Juniper QFX5100-48S-3AFI 48-Port SFP+ 6 QSFP+ 2x SFP/RJ-45 Management

$249.97



Juniper MX204 +JUNOS and Dual Power Supply picture

Juniper MX204 +JUNOS and Dual Power Supply

$7299.99



Juniper QFX5120-48Y-AFO 48 x 1/10/25GB SFP28 + 8 x 40/100GB Switch w/Dual AC picture

Juniper QFX5120-48Y-AFO 48 x 1/10/25GB SFP28 + 8 x 40/100GB Switch w/Dual AC

$10499.99



Juniper Networks EX2300-48P 48-Port Gigabit PoE Managed Ethernet Switch picture

Juniper Networks EX2300-48P 48-Port Gigabit PoE Managed Ethernet Switch

$79.99



Juniper EX2300-C-12P 12 Port Gigabit PoE+ 2x10G SFP+ Managed Compact  Switch picture

Juniper EX2300-C-12P 12 Port Gigabit PoE+ 2x10G SFP+ Managed Compact Switch

$179.99



Juniper EX3400-24P 24-Port PoE+ GbE + 4-Port 1/10Gb SFP Switch picture

Juniper EX3400-24P 24-Port PoE+ GbE + 4-Port 1/10Gb SFP Switch

$245.00



Juniper EX4300-24P 24 Port Gigabit PoE+ Switch. picture

Juniper EX4300-24P 24 Port Gigabit PoE+ Switch.

$95.62