LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-03-2006, 09:01 PM   #1
Chomper
LQ Newbie
 
Registered: Jan 2005
Location: Columbus Ohio
Distribution: Slackware 11
Posts: 23

Rep: Reputation: 15
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.
 
Old 03-04-2006, 04:38 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello,

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

Oliv'
 
Old 03-04-2006, 04:55 AM   #3
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
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?
 
Old 03-04-2006, 09:52 AM   #4
TuxSurfer
Member
 
Registered: May 2004
Location: NC USA
Distribution: Linux Mint "Nadia" - Cinnamon Flavored
Posts: 267

Rep: Reputation: 32
Exclamation ...

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

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.
 
Old 03-04-2006, 11:14 AM   #5
Chomper
LQ Newbie
 
Registered: Jan 2005
Location: Columbus Ohio
Distribution: Slackware 11
Posts: 23

Original Poster
Rep: Reputation: 15
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?
 
Old 03-04-2006, 10:22 PM   #6
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
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.

Last edited by Basel; 03-04-2006 at 10:27 PM.
 
Old 03-07-2006, 11:02 AM   #7
jdogpc
Member
 
Registered: Jul 2005
Location: Mafra, PT
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
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
 
Old 03-12-2006, 01:53 PM   #8
clausawits
Member
 
Registered: Jun 2001
Posts: 128

Rep: Reputation: 16
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...
 
Old 03-12-2006, 05:00 PM   #9
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,770

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
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
 
Old 01-14-2010, 09:31 PM   #10
staticd
LQ Newbie
 
Registered: Jan 2010
Distribution: _MANY_
Posts: 9

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
making a grub boot floppy PLS HELP!! mlu Linux - Software 5 09-27-2005 10:25 PM
Making DVD: dvd-file OK but no VOBU.. pingu Linux - Software 4 06-01-2005 04:57 AM
boot live cd or dvd with grub sharky Linux - Software 5 04-05-2005 02:23 PM
grub making my redhat boot into init 1? seth Linux - Software 3 08-25-2003 10:49 PM


All times are GMT -5. The time now is 11:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration