 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

23rd January 2011, 01:11 AM
|
|
Registered User
|
|
Join Date: Dec 2006
Age: 79
Posts: 404

|
|
|
Need quick guide to installing grub in /boot
I am setting up a dual boot machine with Windows 7 on the first disk and Fedora 14 on a second disk. I meant to put grub in the /boot partition of the second drive, but the point at which anaconda allowed me to do that went right past me, so I ended up with a conventional system with the first part of grub in the MBR of the first disk. I need to reinstall grub so that it all in /boot. In addition I need to fix the MBR on the first disk. My plan is to go into Linux, create a boot Cd with grub on it which I can use to boot Fedora, then reboot into Windows and fix the MBR. Then I will use the CD to boot Fedora, and reinstall grub so it is all in /boot, go back and boot Windows and use Easy BCD to set up the Windows boot loader to do all the booting.
So I need three things
1) A quick reminder of how to create a grub CD.
2) A quick reminder of how to reinstall grub so that it is entirely in /boot.
3) A warnings about what might go wrong.
I've done this before on another machine, but I remember that there were several false starts, so any help would be well appreciated.
|

23rd January 2011, 03:07 AM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: Need quick guide to installing grub in /boot
In this particular situation, you can skip the boot CD. Boot on into Fedora, open a terminal, and re-install GRUB in the first sector of the boot partition from there. Then reboot with your Windows disk and repair the Windows boot loader. Then reboot into Windows, install EasyBCD, and use it to configure the Windows boot loader to boot Fedora. It should work. You have to do it all correctly, but it should work.
One classic method of re-installing GRUB is with the grub-install command. In a Fedora terminal...
Code:
su
grub-install /dev/sdxy
You change x & y to the drive & partition of the Fedora boot partition. You can get that from fdisk -l.
P.S.: Sometimes a problem occurs attempting to use another boot loader to boot stage1 in a boot sector of a partition on another hard drive. Maybe. Maybe not. But when it happens, it's because of 0xFF being at offset 40h of stage1 that got installed in the first sector of the boot partition. That code in that spot just means that GRUB gets the drive number from BIOS, and it's normally okay. But for the times it failed for me (Geom Error), I have fixed that by editing those two bytes to 0x81 when Fedora is on the second drive, 0x82 for the third drive, and so on. It's not really that hard to do, and you may not have to do it. But it does happen sometimes, and it doesn't hurt to know about it.
P.P.S.: If you insist on a boot CD (in case something goes wrong), then download and create a Super Grub Disk. It will boot Fedora if you botch the EasyBCD stuff. It also can re-install GRUB, emergency boot Windows, and repair a Windows boot loader. I think everyone should possess one.
|

23rd January 2011, 04:05 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Age: 79
Posts: 404

|
|
|
Re: Need quick guide to installing grub in /boot
Quote:
Originally Posted by stoat
In this particular situation, you can skip the boot CD. Boot on into Fedora, open a terminal, and re-install GRUB in the first sector of the boot partition from there. Then reboot with your Windows disk and repair the Windows boot loader. Then reboot into Windows, install EasyBCD, and use it to configure the Windows boot loader to boot Fedora. It should work. You have to do it all correctly, but it should work.
One classic method of re-installing GRUB is with the grub-install command. In a Fedora terminal...
Code:
su
grub-install /dev/sdxy
You change x & y to the drive & partition of the Fedora boot partition. You can get that from fdisk -l.
P.S.: Sometimes a problem occurs attempting to use another boot loader to boot stage1 in a boot sector of a partition on another hard drive. Maybe. Maybe not. But when it happens, it's because of 0xFF being at offset 40 of stage1 that got installed in the first sector of the boot partition. That code in that spot just means that GRUB gets the drive number from BIOS, and it's normally okay. But for the times it failed for me (Geom Error), I have fixed that by editing those two bytes to 0x81 when Fedora is on the second drive, 0x82 for the third drive, and so on. It's not really that hard to do, and you may not have to do it. But it does happen sometimes, and it doesn't hurt to know about it.
P.P.S.: If you insist on a boot CD (in case something goes wrong), then download and create a Super Grub Disk. It will boot Fedora if you botch the EasyBCD stuff. It also can re-install GRUB, emergency boot Windows, and repair a Windows boot loader. I think everyone should possess one.
|
Thanks for the advice. I knew I could probably do what I want using the super grub disk, which I have.
But I would like to create a bootable CD with grub on it. I found the instructions for so doing that I used previously, but it fails ith the mkisofs command. Apparently mkisofs has been superceded by genisoimage, and it may be that the sintax is slightly different.
Does anyone know where to find explicit directions how to do this under Fedora 14?
|

23rd January 2011, 04:23 PM
|
 |
Administrator (yeah, back again)
|
|
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 67
Posts: 21,213

|
|
|
Re: Need quick guide to installing grub in /boot
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651
Don't use any of my solutions on working computers or near small children.
|

23rd January 2011, 09:12 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: Need quick guide to installing grub in /boot
Quote:
|
Originally Posted by leonardevens
But I would like to create a bootable CD with grub on it. I found the instructions for so doing that I used previously, but it fails ith the mkisofs command. Apparently mkisofs has been superceded by genisoimage, and it may be that the sintax is slightly different.
Does anyone know where to find explicit directions how to do this under Fedora 14?
|
Well, you're certainly not wrong to persist for a bootable GRUB CD. I keep simple native GRUB floppies and CDs handy at all times even though I also have Super Grub Disks. If you know what to do at a native grub> prompt, it is the handiest of all emergency utilities IMO. How to make a bootable GRUB CD with genisoimage in Fedora 14... - Make a working directory for the files in this project:
Code:
mkdir -p iso/boot/grub
- Copy the file stage2_eltorito:
Code:
cp /usr/share/grub/i386-redhat/stage2_eltorito iso/boot/grub
NOTE: The file may be in /usr/lib/grub/i386-pc in other Linux distros. You can add more files to the project if you want (e.g., menu.lst).
- Make an ISO9660 image file:
Code:
genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso
- Burn the resulting ISO file to CD with K3b or similar software.
|

23rd January 2011, 10:36 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Age: 79
Posts: 404

|
|
|
Re: Need quick guide to installing grub in /boot
Stoat,
Thanks a lot.
It turns out that I did get my previous instructions to work. I must have been copying the mkisofs statement incorrectly.
It was amusing that when I used it, I couldn't tell for sure I was booting from grub on the CD. It looked exactly the way booting from the grub on the hard disk looked since I had copied from that. But I changed the title statement by adding CD to it, and burning a new CD. That confirmed that it was in fact booting from the CD's grub.
I will save your explanation and put it aside for future reference.
As you say, I am really determined to do it, although I will have to make a new one periodically as kernels are upgraded and I remove older kernels from /boot. super grub would have worked, but I like to have multiple ways to proceed. There is nothing more frustrating that having a perfectly good system on your hard disk that you can't get to run because of some minor glitches. I am usually well enough backed up that I can pretty much start from scratch and get my system up, but it always takes time to do it. At my age (77) I am less willing to waste time if I can avoid it. I had a narrow escape from death or possible serious disability last August, so I prize all the time I have left.
Last edited by leonardevens; 23rd January 2011 at 10:43 PM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 07:20 (Wednesday, 22-05-2013)
|
|
 |
 |
 |
 |
|
|