Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 10-29-2007, 04:29 PM   #1
LQ Newbie
Registered: Jun 2007
Posts: 9

Rep: Reputation: 0
Red face GRUB to point to USB CDROM?

I currently have a Sony Vaio VGN-S470p Laptop running windows xp and ubuntu
The cdrom is no longer working (hardware is physically broken), and the laptop does not have the ability to boot from USB (not an option in the bios).

My issue is this; I need to re-install the Windows. I was thinking since by laptop does not have the option to boot from USB (and I have a working USB Cdrom) that I would modify the Grub boot loader to look at the USB cdrom, and ultimately boot off of it.

Any help would be greatly appreciated

Last edited by supasharp; 10-29-2007 at 04:32 PM.
Old 10-29-2007, 05:06 PM   #2
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I don't think Grub can help.

Grub booting from a hard disk does not recognise a cdrom. To boot from cdrom Grub has to switch to a different stage2 file called stage2_Eltorito with which a CD can be booted. I haven't find out a way to make it boot up a CD even though it recognises the device (cd).

I believe your problem may be resolve this way.

Make a fat32 partition, load up the installation CD and copy its content into the fat32 partition.

You then boot up a Dos from Win9x. Navigate into the partition and run the "set.exe".

Not have a need to try it myself but it was reported like this and technically it looks possible to me.
Old 10-29-2007, 05:46 PM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Please allow me to *think out loud* for a moment.

Suppose you create a fat32 partition as Saikee suggests, and copy (from Ubuntu and the USB cdrom) the contents of the XP install cd to that partition. The command would be something like: cp -R /path to usb cdrom/* /fat32/partition, stated in pseudo code for the actual path to the usb drive and the new partition. You now have the cd on disk.

Now, suppose you edit the Ubuntu grub config file /boot/grub/grub.conf (or menu.lst on some distros) to point to that partition:
title xp_install_cd
root (hd0,x) # where x is the partition number
chainloader +1

Would the copied cd boot? I've used a similar method to boot the OpenSUSE 10.3 install cd on disk (my dvd drive has given up the ghost). It may work for a windows cd image as well.

Last edited by bigrigdriver; 10-29-2007 at 05:50 PM.
Old 10-29-2007, 06:21 PM   #4
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112

No it doesn't. And this is my explanation.

Normally Grub can boot an OS directly or indirectly.

Directly - Grub must be able to read the filing system first, then goes inside the partition and grabs the kernel by its neck (by the command "kernel" in menu.lst), places it in the memory and buggers off not to be seen until the next boot. This is how Grub boots the Linux that hosts Grub. Grub can't boot a MS Windows because it never has a kernel ( or its kernel has not been written to a standard as used in Linux). Therefore Grub booting a MS Windows directly is out. Historically Grub or Lilo never boots Windows directly.

Indirectly - Grub boots another operating system's boot loader. It passes the control to the second boot loader and buggers off as quickly as possible. It is always up to the second boot loader to boot up its master. In order for Grub to boot an OS indirectly that OS must has a boot loader implanted at the boot sector. Grub then counts the +1 position or the second sector of the partition, which reserves the entire first track as the boot sector, and loads up the boot loader into the memory. Linux users think Grub may be the best thing since slice bread but the poor bugger can't even read a NTFS partition and can only count the sector position in the hard disk to load a MS Windows. Both LIlo and Grub are "blind" in a NTFS partition but both can fire up any Dos and Windows ever brought out by M$.

Now if one copies the files from a CD into a partition then that partition has no boot loader. A boot loader is not part of the filing system and must be arranged by the installer or the OS itself.

Linux works because the command "grub-install /dev/sda3" will make the kernel to implant Grub into the boot sector of sda3 and "grub-install /dev/sda" will implant Grub in the MBR. The command "grub-install" is a Bash command. Grub also has in a Grub shell or Grub prompt the equivalent of "root (hd0,2)" + "setup (hd0,2)" and "root (hd0,2)" + "setup (hd0)" respectively for the two Bash commands.

If an OS has the boot loader in the boot sector it resides in that OS is chainloadable by Grub, Lilo or any other boot loader.

I cannot be right all the time but this is my explanation. I would love to know if it can be done differently to the above.

Last edited by saikee; 10-29-2007 at 06:23 PM.


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
Mount point /mnt/cdrom does not exist. njbrain Linux - General 4 02-13-2007 08:01 PM
can i use grub/lilo to boot an ext usb cdrom? jcoder24 Linux - General 0 02-18-2004 01:15 PM
can i use grub/lilo to boot an ext usb cdrom? jcoder24 Linux - Hardware 0 02-17-2004 08:28 AM
How to release /dev/cdorm or mount point (/mnt/cdrom) after doing this : norman68 Linux - Software 3 07-02-2003 07:07 PM
slackware cdrom mount point alexphyd Linux - Distributions 1 10-23-2002 07:07 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:13 AM.

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