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
  •  


ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield picture

ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield

$42.00



***NEW*** BCM RX67Q Gaming Motherboard | Intel Q67 2nd/3rd Gen. | LGA1155 | DDR3 picture

***NEW*** BCM RX67Q Gaming Motherboard | Intel Q67 2nd/3rd Gen. | LGA1155 | DDR3

$29.77



Micro ATX Desktop Motherboard ASUS H110M-C LGA 1151 picture

Micro ATX Desktop Motherboard ASUS H110M-C LGA 1151

$31.95



Asrock Z390 Phantom Gaming 4S/AC Wifi 8th/9th Gen Intel 1151 Motherboard Bulk picture

Asrock Z390 Phantom Gaming 4S/AC Wifi 8th/9th Gen Intel 1151 Motherboard Bulk

$47.39



ASUS Prime Z390-A LGA 1151 Intel Z390 SATA USB 3.1 ATX Motherboard NO I/O picture

ASUS Prime Z390-A LGA 1151 Intel Z390 SATA USB 3.1 ATX Motherboard NO I/O

$99.00



MSI B450M PRO-VDH MAX AM4 AMD B450 USB3.2 Micro-ATX Motherboard picture

MSI B450M PRO-VDH MAX AM4 AMD B450 USB3.2 Micro-ATX Motherboard

$67.99



ASUS Prime Q270M-C LGA1151 DP HDMI VGA SATA 6GB/s USB 3.0 MicroATX Motherboard picture

ASUS Prime Q270M-C LGA1151 DP HDMI VGA SATA 6GB/s USB 3.0 MicroATX Motherboard

$34.19



X99 LGA 2011-v3 MR9D Motherboard 8*DDR4 RAM USB 3.0 SATA3.0 M.2 for E5 V3 V4 CPU picture

X99 LGA 2011-v3 MR9D Motherboard 8*DDR4 RAM USB 3.0 SATA3.0 M.2 for E5 V3 V4 CPU

$79.99



GIGABYTE Z790 AORUS Elite AX Gaming Motherboard | ATX LGA 1700, DDR5, WiFi 6E picture

GIGABYTE Z790 AORUS Elite AX Gaming Motherboard | ATX LGA 1700, DDR5, WiFi 6E

$149.99



BTC-S37 Mining Motherboard Kit /w SSD & Ram Preinstalled picture

BTC-S37 Mining Motherboard Kit /w SSD & Ram Preinstalled

$59.99