Jump to content

How To Move Grub From Disk 1 To Disk2?


Recommended Posts

Posted

Through some convoluted circumstances (hard-disk crashes, my ignorance), my computer now has this structure

1. Disk 1: SATA 250 GB, sda, Grub on MBR, two partitions corrupted and not usuable, a usable but small (20-GB) FAT32 partition.

2. Disk 2: SATA 250 GB, sdb, and in this order: Mac OS X, Ubuntu Edgy, Win XP, Edgy Swap, FAT 32 (Share), and NTFS partitions.

Here's what happens when I try booting in various combinations:

a. If I boot off Disk 1 (sda) as master and Disk 2 (sdb) is slave, I can get the Grub menu list to let me boot to any of the three OSs. All is fine here.

b. If I boot off Disk 1 (sda) as master and Disk 2 (sdb) is disconnected completely, I get a "Grub Error", indicating there is Grub on Disk 1.

c. If I boot off Disk 2 (sdb) as master and Disk 1 (sda) is slave or disconnected entirely, I get a frozen computer needing a hardware reset.

d. If I use SuperGrub to try and boot off individual partitions on Disk 2, I can only boot off the Ubuntu sector (hd1,1). Both the Mac (hd1,0) and XP (hd1,2) partitions just end with a blinking cursor and nothing else.

I'd like to move the Grub on Disk 1 (sda) to Disk 2 (sdb), and be able to boot off from one disk only. I guess Disk 1's Grub is written on the disk's Master Boot Record (MBR). I don't know enough on how to move that MBR/Grub from Disk 1 to Disk 2, and where to put it on Disk 2. Also, since Disk 1's MBR shows corrupted partitions, I gather via googling that I have to only get the Grub portion of the MBR out, otherwise I could put these corrupted partitions on Disk 2, and I don't know how to get only Grub out of the MBR (something about 446 bytes vs 512 bytes).

The goal is to reformat Disk 1, and then use it for backup or for reloading a cleaned up system via dd from Disk 2 to Disk 1 in the traditional triple-booting order: XP, Edgy, Mac. I'm afraid that if I just start to dd the various OS partitions from Disk 2 to Disk 1 that I might overwrite the current MBR/Grub on Disk 1 and make the whole system unusable.

Or, maybe I'm looking at it completely wrong, and there's a better way out of this mess. So, what would be the best and safest way to boot all three OSs from one disk -- either Disk 1 (sda) or Disk 2(sdb)?

I posted on the Ubuntu forum but came up with nada. I'm hoping the gurus on TV can come up with some advice/pointers... Thanks

Posted

i am not a linux guru but this is what I would be doing.

download knoppix 5.1.1 (approx 700MB) and burn the iso to CD.

put the knoppix CD in your CD drive and boot (altering the boot order in the BIOS may be necessary first). boot from live CD knoppix 5.1.1 and satisfy yourself that you can still do so while your disk 1 is disconnected. you should also be able to access and move around files on both disks and to external media such as usb flash and external drives. if you are unable to figure the rest out yourself more help could be forthcoming.

Posted
i am not a linux guru but this is what I would be doing.

download knoppix 5.1.1 (approx 700MB) and burn the iso to CD.

put the knoppix CD in your CD drive and boot (altering the boot order in the BIOS may be necessary first).....if you are unable to figure the rest out yourself more help could be forthcoming.

Thanks, I've been using similar tools -- Ubuntu's live CD, Parted Magic, the Linux Rescue CD, etc. -- and decided I need to read the manuals more on Grub and MBR before I can ask more questions. I'll try Knoppix also. It just bugs me that a hard-drive crash can keep me from using an empty disk (except for the MBR) as a backup. Oh, these two disks are new, but my haphazard recovery of different OSs and their data in a moment of panic is what is making this troublesome.

Again, thanks for offering further help. I'm sure I'll need it.

Posted

Okay, I finally got it fixed.

Just for the record, if anybody faces a similar situation: I did a grub-install on MBR of Disk 2 (sdb). Of course, I couldn't boot any of three OSs (mount errors, etc.), so I had to go to BIOS, change boot disk order, and then edit device.map and menu.lst in /boot/grub. A few anxious moments, but everything worked as it should have. Not knowing much about all this, I did a lot reading and re-reading of the manuals, and different forum threads, and still don't know too much, but at least it helped somewhat in avoiding doing the more-risky commands. Supergrub is a good tool to try and figure out what Grub does.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...