Fedora Linux Support Community & Resources Center
  #1  
Old 23rd January 2011, 01:11 AM
leonardevens Offline
Registered User
 
Join Date: Dec 2006
Age: 81
Posts: 491
linuxfedorafirefox
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.
Reply With Quote
  #2  
Old 23rd January 2011, 03:07 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxdebianiceweasel
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.
Reply With Quote
  #3  
Old 23rd January 2011, 04:05 PM
leonardevens Offline
Registered User
 
Join Date: Dec 2006
Age: 81
Posts: 491
linuxfedorafirefox
Re: Need quick guide to installing grub in /boot

Quote:
Originally Posted by stoat View Post
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?
Reply With Quote
  #4  
Old 23rd January 2011, 04:23 PM
bob Online
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 69
Posts: 22,169
linuxfedorafirefox
Re: Need quick guide to installing grub in /boot

One option: http://www.supergrubdisk.org/
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #5  
Old 23rd January 2011, 09:12 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfedorafirefox
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...
  1. Make a working directory for the files in this project:
    Code:
    mkdir -p iso/boot/grub
  2. 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).

  3. 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
  4. Burn the resulting ISO file to CD with K3b or similar software.
Reply With Quote
  #6  
Old 23rd January 2011, 10:36 PM
leonardevens Offline
Registered User
 
Join Date: Dec 2006
Age: 81
Posts: 491
linuxfedorafirefox
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.
Reply With Quote
Reply

Tags
grub, guide, installing, or boot, quick

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The multi-OS, multi-boot GRUB guide (Windows included!) Firewing1 Guides & Solutions (No Questions) 35 14th July 2009 08:03 AM
Iptables (easy, quick, clean and short as possible) guide alpha645 Guides & Solutions (No Questions) 8 3rd June 2008 11:12 AM
Mini-Guide: Installing grub from Fedora Core 5 (FC5) Rescue CD Nemesis02 EOL (End Of Life) Versions 3 5th June 2006 10:35 PM
grub.conf quick kernel boot question ride153 Servers & Networking 3 19th May 2006 04:07 AM
Installing GRUB boot record to the first /boot sector option does not work for me styryx Installation, Upgrades and Live Media 2 18th April 2006 03:32 PM


Current GMT-time: 13:50 (Wednesday, 22-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Lahti Photos on Instagram - Eseka Photos - Okrika