LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Making Grub boot a cd/dvd? (https://www.linuxquestions.org/questions/linux-software-2/making-grub-boot-a-cd-dvd-421416/)

Chomper 03-03-2006 09:01 PM

Making Grub boot a cd/dvd?
 
Hopefully this is an easy question.

I want to be able to boot my WinXP cd from grub. Unfortunately i can't get grub to see my cd or dvd drive.

Here's grub.conf:

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hda1
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.14-1.1656_FC4)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.14-1.1656_FC4 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.14-1.1656_FC4.img
title Fedora Core (2.6.14-1.1644_FC4)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.14-1.1644_FC4 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.14-1.1644_FC4.img
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.11-1.1369_FC4.img
title Windows XP
        map (hd0,0) (hd1,2)
        map (hd1,2) (hd0,0)
        rootnoverify (hd1,2)
        chainloader +1
title Windows Install
        map (hd0,0) (hd1,2)
        map (hd1,2) (hd0,0)
        rootnoverify (hd1,2)
        chainloader (hdc)+1
title Other
        rootnoverify (hd1,0)
        chainloader +1

As you can see under Windows Install i'm trying to chainload from hdc which should be my dvd drive.

Here's a part of my fstab:

Code:

/dev/hdd                /media/cdrom            auto    pamconsole,exec,noauto,managed 0 0
/dev/hdc                /media/cdrecorder      auto    pamconsole,exec,noauto,managed 0 0

Instead of using (hdc)+1 i've also tried hdd, hd2, hd3 in the parenthesis as well. No luck. I hit TAB when i'm in GRUB to let me see the available devices and it only finds the drives hd0 and hd1 with their individual partitions and it finds my floppy disk drive fd0.

Does anybody know what's going wrong? If there is a better way to get at my cd or dvd drive through grub, i'm eager to know how.

I'd really appreciate some help on this. Thanks in advance.

Oliv' 03-04-2006 04:38 AM

Hello,

just a question: why doing that with Grub whereas it's up to your BIOS to do such a work :confused:

Oliv'

Basel 03-04-2006 04:55 AM

As Oliv' said this does not have anything to do with Grub or any boot loader. Are you trying to install Windows from a CD/DVD or boot your installed Windows?

TuxSurfer 03-04-2006 09:52 AM

...
 
Quote:

Originally Posted by Oliv'
Hello,

just a question: why doing that with Grub whereas it's up to your BIOS to do such a work :confused:

Oliv'

I don't think that what you want to do is possible with GRUB. GRUB gets its info from the boot image on your HD of installed operating systems. If you want to install or run an operating system from a CD drive you will need to do that through the BIOS.

Chomper 03-04-2006 11:14 AM

The goal was to install WinXP on the 3rd partition of my second harddrive. I know that WinXP only likes to be on the first partition of the first disk but i've read a few places online that you can use GRUB to trick windows into thinking it's on a partition that it's not.

I admit that i don't know a whole lot about this kind of stuff, but i've heard that windows will take over my MBR and mess with my linux partitions if you don't install it correctly.

My BIOS is set up to boot from both my cd and dvd drives.

I've been trying to follow this:
http://tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/

Most help i find online for installing windows with linux is always starting with windows and adding linux. My case is that i want windows while keeping my existing linux. The above and a few other websites have made it seem like i need to use GRUB to trick windows.

Any advice? Is this still something beyond what GRUB can do?

Basel 03-04-2006 10:22 PM

GRUB tricks Windows at boot time. It cannot and has nothing to do with tricking Windows at the installation time.
Long ago when I tried to install Windows on my second HD, I removed the first HD physically and set the second HD as primary for the duration of Windows Installation. After that I reset everything to normal.
Here is the trick that GRUB uses to trick Windows at boot time:
Code:

title winxp
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive

chainloader +1
boot

Please refer to the following thread for more information: Win 98 won't boot from hdb0 with GRUB

EDIT: I forgot to mention that you need to find a way to boot Fedora and install GRUB again after you are done with your Windows installation. With Slackware and SuSE I usually use the first CD to boot the system. It might be the case with Fedora.

jdogpc 03-07-2006 11:02 AM

Hi Chomper

Just edit your partition tables as you want and leave a space for MS XP or you might even make a partition for XP and format it as FAT32, configure your bios to boot from the cdrom and install MS XP in the partition you have reserved for it.
Boot up with FC4 first disk and choose recovery, after recovery is loaded your dropped to a shell as root, issue the following commands:

chroot /mnt/sys
/sbin/grub-install

to reinstall grub to MBR of your disk.

Another thing, if you wish to have MS XP installed on drive C: you MUST NOT HAVE ANY PARTITIONS IT CAN RECOGNIZE, i.e. you may not have any fat32, fat or ntfs partition on your disk. If this is the case use FC4 fdisk to change the partition type to anything MS XP does not reconize and have changed back again after MS XP is intalled, this way XP will be drive C: and the other that were hidden will be E: and so forward.

Hope this helps.

JdogPC

clausawits 03-12-2006 01:53 PM

From the aforementioned tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/index.html
Quote:

Originally Posted by tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/proc.html
title DOS Boot Disk
map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
chainloader (fd0)+1

The above section is what got me looking to try to boot a CDROM from within GRUB. It seems that GRUB can map the hard drives and then boot from the floppy (I don't have an install floppy, or else maybe I'd try things that way). ...So I tried the same thing as the original poster, but likewise can't get GRUB to boot from an install CD in my case either..

I've already tried getting my windows onto this drive, but it failed, screwing up my partition tables in the process! (thank goodness for gpart - http://www.stud.uni-hannover.de/user/76201/gpart/ )... I thought that doing that mapping stuff would be a safer way to go for my second try...

Anyway, so the final word is that GRUB can NOT boot a CDROM, despite the above evidence that it can do it to a floppy? It isn't ignorance or error on my part, but a missing capability on GRUB's part?

Thanks...

bigrigdriver 03-12-2006 05:00 PM

Making a grub-bootable cd/dvd-rom
 
You might be interested it this short little HOWTO:
http://www.gnu.org/software/grub/man...le-CD-ROM.html

staticd 01-14-2010 09:31 PM

BIOS
 
I do realize that I am incredibly late to the game for the original poster's question. However, I came across this thread because of a problem of my own and want others that may be in the same boat as me to get the solution that I found.

It is true that grub is not meant to provide the user with an interface to select bootable locations. You can trick it but that didn't help me.

I forgot my password to my linux box and wanted to load a new distro on it from a cd. Of course, grub does not offer that option natively. So, I found this article that reminded me that the BIOS menu is part of the motherboard of ALL computers and can be accessed immediately after power on. Here's the link:

http://pcsupport.about.com/od/fixthe...accessbios.htm

Cheerio.


All times are GMT -5. The time now is 06:42 PM.