-
Senior Member
registered user
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.
-
Senior Member
registered user
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.
-
Senior Member
registered user
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
-
Senior Member
registered user

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.
-
Senior Member
registered user
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.
-
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.
-
Senior Member
registered user

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
-
By Maverick977 in forum Hardware & Booting
Replies: 5
Last Post: 04-15-2005, 03:48 AM
-
By Flash00 in forum Ideas
Replies: 8
Last Post: 04-12-2005, 12:34 AM
-
By mwer in forum General Support
Replies: 10
Last Post: 01-27-2005, 10:13 PM
-
By guardianx in forum General Support
Replies: 1
Last Post: 01-22-2004, 12:47 AM
-
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
-
Forum Rules

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray
$39.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

Seagate BarraCuda 28TB 7.2K SATA 6Gb/s 3.5in Internal HDD ST28000DM000 - Tested
$670.00

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95

Seagate ST4000NM0034 Enterprise 4TB 7200RPM SAS 12Gb/s HDD v4
$39.00

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive
$14.99

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

HGST HUS724040ALA640 HDD 4TB SATA 6Gb/s 7.5K 3.5" 0F19459 512 b/s
$78.00

(ST8000NM0045) SEAGATE ENTERPRISE 8TB 7200RPM 4Kn SATA 6Gb/s 3.5" HARD DRIVE
$199.99

Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS
$184.99