Results 1 to 7 of 7

Thread: backing up the MBR

  1. #1
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    276

    backing up the MBR

    Okie, I need to reinstall windows which resides on the 3 partitions of hda. I have my kanotix install on hdb5 and a gimpy install of mandrake on hb6. I use grub menu on hdb5 and the bootloader is in mbr. Kanotix my default o/s

    I know from going through this a few weeks ago on spare box that windows is going to blow away the mbr and I will have to fix. I forget how I fixed it (most faqs and posts assume you have gotten in there with a floppy and it goes easy). The only way I will get linux is with a live CD that mounts everything readonly and the directions on how to get grub back under those conditions - well, I can't find it anywhere now

    Found this though here:
    A: To backup use "sudo dd if=/dev/hda of=mbr.backup bs=512 count=1" and "sudo dd of=/dev/hda if=mbr.backup bs=512 count=1" to restore.

    err, OK. Sounds handy. But where is this backing the information up to? I will be reformatting the partitions of the windows drive (same partition info, just wiped and starting fresh).

    Help appreciated. Will have my hands full installing windows from scratch and I want to get my kanotix back first thing.

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    The commands you mentioned are correct, but copy the mbr to a file name mbr.backup in the cwd. Obviously you need to move this tiny one block file to either a floppy or some partition you intend to keep (not NTFS preferably). A network copy or flash key are other possibilities.

  3. #3
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    276
    I have wiped the 2 of three windows partitions (3rd on the disk is just data) but haven't reinstalled so the mbr is still intact at this point. Will give this a shot...if it doesn't work, anybody know of the excellent link to a post here that went into the having to redo grub with a live CD? I know I chrooted something or other but search hasn't found it again for me. I think it was here, may have been linuxquestions.org but nothing found there either. Thanks baldyeti

  4. #4
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    900
    Quote Originally Posted by nishtya
    I have wiped the 2 of three windows partitions (3rd on the disk is just data) but haven't reinstalled so the mbr is still intact at this point. Will give this a shot...if it doesn't work, anybody know of the excellent link to a post here that went into the having to redo grub with a live CD? I know I chrooted something or other but search hasn't found it again for me. I think it was here, may have been linuxquestions.org but nothing found there either. Thanks baldyeti
    Piece of cake:
    Boot the Kanotix cd.
    Code:
    su
    mount /dev/hda1 /mnt/hda1
    grub-install --root-directory=/mnt/hda1 --recheck --no-floppy /dev/hda
    Of course if you installed Kanotix in another partition besides hda1 then you'll need to change the --root-directory= option accordingly.

  5. #5
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    276
    mzi, I tried that --- what Kano has over in kanotix forum. Got "operation not permitted". Su doesn't work on live cd? Tried it with sudo. Got something about a bin not existing. Then went through some contortions with device busy. I unmounted. I chmodded 777 the whole dang box. I chrooted. Then gave up. I installed BH9a over the fubared mandrake on the spare partition. Let it install grub. Booted into my BH8, su'ed and fixed it all back to where it was except I have BH9 where I used to have mandrake (no loss)

    Somewhere out there is the answer of how to do it with a live CD. I did it on the spare box upstairs. Haven't been able to find it again. I just remember a thread that wasn't about grub lol that had a link to another that was ALL about grub and just this same problem with using the Live CD to fix a hd install.

    Anyhow, I am back in business with 2 kanotix's the more the merrier, I guess. And windows is now flying. Wow. I gotta admit I am impressed again. I suppose it was about 10 reboots with all the drivers for the various bits and the nic and the printer were a bit of a headache. But it is humming along and I am ready for my games. Linux is better but windows is oooooh so much better for the blood pressure.

  6. #6
    Member registered user
    Join Date
    Jun 2004
    Posts
    83
    I've said it before but I'll say it again. Why don't you guys get rid of all these silly lilo/grub/windows MBR issues and simply install the free "smart boot manager" into your MBR? The whole boot manager fits into the MBR it is not related to any partitions/distributions etc. It is trivially configured entirely by menu and can boot any partition with all the possible options/labels etc you will ever need. Once you do this then you always install your linux lilo/brub into the start of a partition and then all your partitions/installations are completely independent. Keep a copy of it on floppy and you can install in back in a whim if it gets overwritten (e.g. by windows).

    See http://btmgr.sourceforge.net/

    I've never looked back.

  7. #7
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    900
    Quote Originally Posted by markb
    I've said it before but I'll say it again. Why don't you guys get rid of all these silly lilo/grub/windows MBR issues .
    I have never had a problem with GRUB. Besides SBM doesn't even come close to being able to do what GRUB does like boot my remasters for example.

    Nishtya - dunno what's wrong but reinstalling GRUB from live cd does work as does su.

Similar Threads

  1. Backing up the files thru Knoppix
    By Maverick977 in forum Hardware & Booting
    Replies: 5
    Last Post: 04-15-2005, 03:48 AM
  2. Backing up Windows using Knoppix
    By Flash00 in forum Ideas
    Replies: 8
    Last Post: 04-12-2005, 12:34 AM
  3. backing up HDD's with dd
    By mwer in forum General Support
    Replies: 10
    Last Post: 01-27-2005, 10:13 PM
  4. backing up question
    By guardianx in forum General Support
    Replies: 1
    Last Post: 01-22-2004, 12:47 AM
  5. backing everything up
    By UselessPython in forum General Support
    Replies: 2
    Last Post: 12-09-2003, 01:03 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
  •  


Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb

$374.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD picture

Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD

$99.99



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD

$149.99



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$409.99



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$248.00



Dell PowerEdge R640 10SFF 2x Gold 6140 2.3GHz 36-Cores 64gb H730p 2x Trays picture

Dell PowerEdge R640 10SFF 2x Gold 6140 2.3GHz 36-Cores 64gb H730p 2x Trays

$599.99



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W

$524.99



Dell PowerEdge R730 Server 2x Xeon E5-2630 V4 64GB DDR4 2TB HDD Rackmount picture

Dell PowerEdge R730 Server 2x Xeon E5-2630 V4 64GB DDR4 2TB HDD Rackmount

$489.99



Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM picture

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM

$699.00