Question

grub.conf / dual boot redhat 9 and WinXP

Asked by: helpmealot

Hello,

My guess is that this question has been asked hundreds of times and will thus be an easy 250 points for someone :)  Enjoy.

Here is my hard drive configuration (view in monotype font for better readability)

===========================================================================================================
Partition Information for Disk 1:    28,623.6 Megabytes
Volume         PartType    Status    Size MB    PartSect  #   StartSect  TotalSects
===========================================================================================================
               Linux Ext3  Pri,Boot    101.9           0  1          63     208,782
               Linux Ext3  Pri      20,528.4           0  2     208,845  42,042,105
*:SWAPSPACE2   Linux Swap  Pri       1,992.4           0  3  42,250,950   4,080,510
               ExtendedX   Pri       6,000.8           0  0  46,331,460  12,289,725
Info: MBR Partition Table not in sequential order.
               EPBR        Log       6,000.8        None --  46,331,460  12,289,725
E:LINUX CDS    FAT32       Log       6,000.8  46,331,460  0  46,331,523  12,289,662


===========================================================================================================
Partition Information for Disk 2:    43,974.8 Megabytes
Volume         PartType    Status    Size MB    PartSect  #   StartSect  TotalSects
===========================================================================================================
               Unallocated Pri           7.8        None --          63      16,002
               ExtendedX   Pri,Boot 43,967.0           0  0      16,065  90,044,325
               EPBR        Log       8,001.1        None --      16,065  16,386,300
F:             NTFS        Log       8,001.1      16,065  0      16,128  16,386,237
               Unallocated Log      35,965.8        None --  16,402,365  73,658,025


===========================================================================================================
Partition Information for Disk 3:    190,779.7 Megabytes
Volume         PartType    Status    Size MB    PartSect  #   StartSect  TotalSects
===========================================================================================================
C:             NTFS        Pri,Boot 49,999.1           0  0          63 102,398,247
               ExtendedX   Pri      140,780.5           0  1 102,398,310 288,318,555
               EPBR        Log      140,780.5        None -- 102,398,310 288,318,555
D:             NTFS        Log      140,780.5 102,398,310  0 102,398,373 288,318,492

Additional information:
Disk 1 (30gb) is connected to the Primary IDE controller and set to Master
Disk 2 (45gb) is connected to the Primary IDE controller and set to Slave
Disk 3 (200gb) is connected to a separate PCI controller (Promise Ultra100 TX2).  Disk3 is the only device on this controller and is configured as "Single"

Windows XP is installed on Disk3.
Disk 1 has a FAT32 partition for holding Linux setup CD images, and Disk1 holds the Linux installation itself.

When I setup Linux, I had it install GRUB to the MBR of disk1.  I reconfigured the system BIOS to boot from disk1 instead of disk3.  Thus, when the computer boots, I'm presented with the GRUB menu from which I can choose which OS to boot.  Unfortunately, if I choose "Windows" it does not boot.  It spits out:

"Booting Windows
rootnoverify (hd0, 4)
chainloader +1"

and then sits there.

Linux boots fine from this menu.

I am still able to get into Windows by changing the BIOS setting to boot from disk3 instead of disk1.  This is cumbersome, and is what this question is about:
How do I reconfigure GRUB so that it boots windows properly on this system?

Here is the /boot/grub/grub.conf file:

==============
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/hda3
#          initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Linux (2.4.20-8smp)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8smp.img
title Linux-up (2.4.20-8)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8.img
title Windows
      rootnoverify (hd0,4)
      chainloader +1
==============

I am confident the problem lies with the line: "rootnoverify (hd0,4)" but I am unsure what values to put in there.  So, how do I tweak the above grub.conf file so that I can boot Windows XP and Linux?

Thanks!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-09-11 at 14:59:34ID20736369
Tags

grub

,

boot

Topic

Linux Setup

Participating Experts
5
Points
250
Comments
23

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Grub vs. lilo
    Which is better; grub or lilo and why? Is lilo still used by most users or is grub catching up?
  2. GRUB
    Hi all I have the following setup: XP on SATA (sda1 & sda2) Linux on ATA IDE Bios setting: boot ATA (hdb1 & hdb2) [root@ramses dell]# fdisk -l Disk /dev/hdb: 123.5 GB, 123522416640 bytes 255 heads, 63 sectors/track, 15017 cylinders Units = cylinders of 16065 * 51...
  3. grub.conf
    I trying to edit grub.conf but can't locate the file in /boot/grub in ubuntu(warty). Any thoughts on where to find it?
  4. grub can't find Linux kernel
    I was cleaning up old kernels and now grub can't find either of the two that remain (I ran an rpm query before rebooting). I get this: 1. root (hd0,0) 2. kernel /vmlinuz-2.4.21-32.0.1.EL ro root=LABEL=/ hdc=ide-scsi (one line) 3. initrd /initrd-2.4.21-32.0.1.EL.img My attem...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: b_vishwajitPosted on 2003-09-11 at 17:09:16ID: 9341195

(hd0, 4) >>(hd0, 2)

 

by: helpmealotPosted on 2003-09-11 at 18:04:52ID: 9341371

Hello,

Thanks for your concise response.  I'm not at the computer at the moment, but could you at least briefly explain the logic you used to arrive at this answer?  hd0 seems to be the drive on which linux is installed, and as you can see from the disk layout, windows is not on that same disk.  How could your answer possibily be right?

 

by: churcherPosted on 2003-09-11 at 18:28:41ID: 9341463

I _think_ your XP disk is /dev/hdc.  HOWEVER, please don't take this as gospel, since you have not posted an fdisk partition table.  I would boot to Linux, then try fdisk -l /dev/hdc .  Here's my /dev/hda for comparison:

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1         7     56196   83  Linux
/dev/hda2   *         8      4085  32756503+   7  HPFS/NTFS
/dev/hda3          4086     14593  84405510    f  Win95 Ext'd (LBA)
/dev/hda5          4086      4149    514048+  82  Linux swap
/dev/hda6          4150     14593  83891398+  83  Linux

You're looking for something akin to that HPFS/NTFS, which BTW is my XP Professional partition.

Now, _IF_ your disk 3 is /dev/hdc (and I can't think of any reason why it shouldn't be) then you should try adding the following entry to your grub.conf:

title=XP Pro
root (hd2,0)
chainloader (hd2,0)+1

Remember, Grub counts from 0, so (hd2,0) equates to /dev/hdc1.  Note that I use 'root' instead of 'rootnoverify' here, as the former should work just fine.

It won't hurt to try this, and I suspect it will boot XP for you.  Do check with fdisk -l first, however.

 

by: helpmealotPosted on 2003-09-12 at 07:59:20ID: 9346340

Hello,

Here are the complete results from fdisk -l:

==============================
Disk /dev/hde: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hde1   *         1      6374  51199123+   7  HPFS/NTFS
/dev/hde2          6375     24321 144159277+   f  Win95 Ext'd (LBA)
/dev/hde5          6375     24321 144159246    7  HPFS/NTFS
 
Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1          2885      3649   6144862+   f  Win95 Ext'd (LBA)
/dev/hda2   *         1        13    104391   83  Linux
/dev/hda3            14      2630  21021052+  83  Linux
/dev/hda4          2631      2884   2040255   82  Linux swap
/dev/hda5          2885      3649   6144831    b  Win95 FAT32
 
Partition table entries are not in disk order
 
Disk /dev/hdb: 46.1 GB, 46115758080 bytes
255 heads, 63 sectors/track, 5606 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         2      5606  45022162+   f  Win95 Ext'd (LBA)
/dev/hdb5             2      1021   8193118+   7  HPFS/NTFS
==============================

As you can see, the 200gb hard disk is actually /dev/hde.  I neglected to mention earlier that I have two optical drives on the secondary IDE channel, which is why I needed a separate PCI IDE controller for the 200gb hard disk.  /dev/hda is the drive on which Linux is installed, and the one which is chosen to be booted from in the BIOS.

In any case, I tried tweaking the grub.conf file as you suggested, and upon trying to boot windows from it, was greeted with the following:
"root(hd2,0)
Filesystem type unknown, partition type 0xf
chainloader (hd2,0)+1"

Since the 200gb disk is actually /dev/hde, not /dev/hdc, how should I modify the grub.conf file?  Thanks for your help.

 

by: churcherPosted on 2003-09-12 at 16:08:01ID: 9349567

Aha!  Now we're talking.  Ok, you're blessed with a lot of storage.  I tend to just buy more computers!  Anyway...

/dev/hde is (hd4) in grub-ese.  The first partition on that disk appears to be XP, and is marked with the boot flag.  Therefore, my suggestion for your grub.conf would be:

title=XP Pro
root (hd4,0)
chainloader (hd4,0)+1

This is taken directly from my grub.conf (with drive numbers changed, of course), which boots my XP partition flawlessly.  It Should Work (TM).  If it doesn't, I'll check back with this topic in a short while so let me know.

 

by: helpmealotPosted on 2003-09-12 at 16:31:27ID: 9349688

I tried changing the /boot/grub/grub.conf file as you suggested.  Upon rebooting, and selecting windows from the list, it spat:

"Error 21: Selected disk does not exist"

I can confirm that the first partition on the 200gb drive is the one on which windows XP is installed.  Could it be confused because of the separate PCI IDE controller?

Here is the complete, modified, grub.conf file, as found in /boot/grub

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/hda3
#          initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Linux (2.4.20-8smp)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8smp.img
title Linux-up (2.4.20-8)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8.img
title Windows
      root (hd4,0)
      chainloader (hd4,0)+1

 

by: helpmealotPosted on 2003-09-12 at 16:46:35ID: 9349757

I looked in /boot/grub/device.map, and that file contained:

================
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
================

I tried changing it to this:
================
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
(hd4)     /dev/hde
================

but that had no effect--I was presented with the same error upon rebooting.  Perhaps this provides a clue as to what else I need to change.  I'm pretty new to Linux :)

 

by: churcherPosted on 2003-09-12 at 17:24:07ID: 9349912

Hrm.  Life's never that simple, is it?  Ok, I think I steered you wrong because GRUB's manual has the following reference regarding Windows on a non-first drive:

----
GRUB cannot boot DOS or Windows directly, so you must chain-load them (see Chain-loading). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.

If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

This performs a virtual swap between your first and second hard drive.
----

Let's try the following grub.conf entry:

title=Windows XP
map (hd0) (hd4)
map (hd4) (hd0)
rootnoverify (hd0,0)
chainloader +1
makeactive

I should stress that at this point I'm experimenting, since none of my additional hard drives have XP installations on 'em!  I usually keep XP to a bare minimum around here, if in fact it is present at all.

If this doesn't work you may need to hide the other NTFS partition on the disk during boot, but I hope not.  Waiting with interest for your results.

 

by: churcherPosted on 2003-09-12 at 17:33:39ID: 9349947

Another thought occurs: if you still have no luck, try moving the device.map file away and see if GRUB will detect your drive properly.  IOW, something like "mv /boot/grub/device.map /boot/grub/device.map_old".  My GRUB was installed without one.  The "Selected disk does not exist" is usually GRUB's way of saying a drive isn't recognised by the BIOS (or isn't present at all, obviously).

BEFORE you do this, make sure you have a boot disk for your Linux, as I don't want you to render your system completely unbootable!  In fact, I probably should have told you to do this earlier ;o)

 

by: helpmealotPosted on 2003-09-12 at 17:39:28ID: 9349970

It didn't work, but it's no worse than before :)  I hadn't seen your second comment when I tried it though.

Here's the new grub.conf:

===============
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/hda3
#          initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Linux (2.4.20-8smp)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8smp.img
title Linux-up (2.4.20-8)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8.img
title Windows
      map (hd0) (hd4)
      map (hd4) (hd0)
      rootnoverify (hd0,0)
      chainloader +1
      makeactive
===============

When I selected windows from the grub menu, it gave me this error "Error 12: Invalid device requested"

As far as ruining Linux, it's no problem since it's a fresh install.  I do have a boot disk for it though.  Ruining windows would be a somewhat greater bother, but I have lots of windows boot disks with various utilities (in particular, Partition Magic) so that shouldn't be a problem.

I'll await your response before getting rid of device.map

 

by: churcherPosted on 2003-09-12 at 17:52:51ID: 9350005

Right, one more tweak.  Although we've swapped the drives for booting, the rootnoverify line needs to refer to the actual drive.  So your entry looks like this:

title Windows
    map (hd0) (hd4)
    map (hd4) (hd0)
    rootnoverify (hd4,0)
    chainloader +1
    makeactive

Once again I stress, I'm experimenting and you should take all available precautions.  I wouldn't blame you a bit if you decided to wait for someone who's actually done this before.  I'll hold comment on the device.map business until after I hear how this latest trial goes.  I would leave the (hd4) line that you added in the file, though.

 

by: helpmealotPosted on 2003-09-12 at 18:18:55ID: 9350111

Alright, I made that change, but upon selecting "Windows" GRUB returned the error "Error 21: Selected disk does not exist"

I probably won't be at my computer for at least the next 12 hours, so feel free to take your time :)

 

by: churcherPosted on 2003-09-12 at 18:27:37ID: 9350167

Well, dang.  I have to go to work now, will consider it subconsciously for the next few hours.  This may all be a BIOS thing, in which case changing GRUB configuration may not be very much help.

 

by: adulaaminPosted on 2003-09-13 at 05:51:05ID: 9352566

Hi.  I don't know if it's ethical to have my problem be addressed in this thread but my problem is related.

I have three OSs installed on two disks.  I installed Windows XP Pro on disk 1, Windows Server 2003 Web on disk 2, and Red Hat Linux 9 on an extended logical partition on disk 1.  I installed them in that order.  Before installing RHL9, I was dual-booting with the two Windows OSs.  After I installed RHL9, using grub as my boot loader, I now have 3 entries in my boot menu.  Here's the contents of the grub.conf file:

--------
default=0
timeout=10
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title Windows XP Pro
      rootnoverify (hd0,0)
      chainloader +1
title Windows Server 2003, Web
      rootnoverify (hd1,0)
      chainloader +1
title Red Hat Linux (2.4.20-8)
      root (hd0,4)
      kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /boot/initrd-2.4.20-8.img
--------

When I boot Linux, it's fine, but when i boot any of the two Windows OSs, it takes me to the boot.ini menu that I originally had before I installed Linux.  Is there a way of bypassing boot.ini?  Advanced thanks for your future help.

 

by: helpmealotPosted on 2003-09-13 at 08:08:13ID: 9353121

Hmm, since your question is not really the same as mine, you would probably be served best by posting it as a separate question in this topic area.  Simply copy and paste what you wrote here into a new question.  Then other folks visiting experts-exchange will be able to address your question and my question separately.  Having two parallel discussions progressing in this thread would no doubt make for confusing reading.

 

by: helpmealotPosted on 2003-09-13 at 08:11:27ID: 9353139

>> This may all be a BIOS thing
For what it's worth, this computer is essentially brand new.  The motherboard is an ASUS P4P800, based on the i865PE chipset.  The BIOS it has now was last updated in the middle of July, and the motherboard was released in late May or so.

 

by: churcherPosted on 2003-09-13 at 17:22:05ID: 9354829

Oh, I'm not saying the BIOS is _broken_, just that it may be a BIOS configuration problem.  It seems odd to me that fdisk can find your drive but GRUB can't.  Then again, I'm probably missing something obvious... it's a bit hard without actually sitting in front of your PC.

There's another thing you can try, if you like, though it may not shed any more light on the problem.  When you see the GRUB menu, press 'c' to get to a command line.  Then try entering the commands one by one and see where GRUB is having the problem (it may well be with the first map statement, in which case we haven't really learned anything new).  To leave command line mode, hit escape (or just reboot).  To boot from command line after entering your commands, type 'boot'.

The usual warnings about borking your installation, yada yada yada.

 

by: churcherPosted on 2003-09-13 at 17:33:56ID: 9354873

The other thing you can try is autocompletion.  Go to command line mode, either at boot time or from a linux console (become root, then 'grub').  Type 'root (hd' and then hit TAB; GRUB should give you a list of drives it knows about.  You can then enter a drive number and hit TAB again, and it should show you a list of partitions for that drive.  The output from these may be enlightening, or it may not ;o)

 

by: helpmealotPosted on 2003-09-15 at 11:44:16ID: 9365118

Got it! :)

I went into the GRUB command line mode by pressing 'c'.  I tried entering the commands one by one, and it returned the error 21 on the "chainloader +1" line.  Since this didn't help me at all, I next tried the "root (hd" followed by a tab trick, to see the list of drives.  It returned hd0, hd1, hd2 which is rather odd given the names hda hdb and hde given in Linux itself.

After poking around in the console a bit more, I typed "help" which was, luckily, a supported command.  One of the commands listed was "geometry".  I then issued "geometry (hd0)" "geometry (hd1)" and "geometry (hd2)" to see if I could figure out which drive was which.

LUCKILY, all three drives are of different make and size, so it was easy to tell which was which based on the total number of sectors present on each drive.  The 30gb drive was hd0, and, get this, the 200gb drive with XP was hd1, followed by the 45gb drive which was hd2.  This numbering scheme makes no sense at all to me, since the 30 and 45 are both hooked up to the primary IDE controller, and the 200gb is hooked up to a separate PCI controller.  The numbers assigned may as well be random.  I wonder what logic they apply in numbering the drives?  And is there a better way to find out within the GRUB command line mode which drive is which?  Perhaps by giving the serial number of each drive?

So, I tried typing the following:
   map (hd0) (hd1)
   map (hd1) (hd0)
   rootnoverify (hd1,0)
   chainloader +1
   makeactive
   boot

and lo-and-behold, windows booted.  So I tweaked the grub.conf file to be:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/hda3
#          initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Linux (2.4.20-8smp)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8smp.img
title Linux-up (2.4.20-8)
      root (hd0,1)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8.img
title Windows
      map (hd0) (hd1)
      map (hd1) (hd0)
      rootnoverify (hd1,0)
      chainloader +1
      makeactive

and indeed, this one works.

Thanks for your help!

 

by: churcherPosted on 2003-09-15 at 14:26:53ID: 9366281

Wierd.  Maybe GRUB doesn't count the CD-ROM drives?  I should have told you about autocompletion sooner :o)  I guess the moral of the story is, when in doubt go to the command line.

Anyway, glad it worked out ok.

 

by: churcherPosted on 2003-09-15 at 14:52:51ID: 9366453

Aha.  It seems that GRUB does not consider CD drives to be boot-capable (even if they are).  I suspect GRUB's numbering has to do with master/slave order.  I think the separate PCI card must have bumped /dev/hde up in GRUB's priorities, counting it before /dev/hdb which is the primary slave drive.  A search on "grub master slave" turned up this potentially enlightening page: http://www.picknowl.com.au/homepages/Tim_Seifert/Linux/restoring_grub.html .  However, you've arrived at the to-be-envied place in troubleshooting parlance, which is: At Least It Works.

 

by: vincentchuaPosted on 2004-02-29 at 02:13:11ID: 10479502

I am having a bit problem, please help.

I did a fdisk -l and got the following

Disk /dev/hda: 40.0 GB, 40017485312 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      4864  39070048+  44  Unknown
 
Disk /dev/hdb: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1        13    104391   83  Linux
/dev/hdb2            14      4868  38997787+  83  Linux
/dev/hdb3          4869      4998   1044225   82  Linux swap

My system is actually loaded with XP Pro, I guess from the list it should be /dev/hda1
I am trying Linux and thus got another harddisk. Installation works fine.
However, I am not able to load back my XP Pro.
the error message is File sytem type unknown.
Reading through all the mail, I realise my column under system is unknown. How to make it recognise as XP Pro?
Please help.

My grub.conf is as follows:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd1,0)
#          kernel /vmlinuz-version ro root=/dev/hdb2
#          initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-30.9)
      root (hd1,0)
      kernel /vmlinuz-2.4.20-30.9 ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi
      initrd /initrd-2.4.20-30.9.img
title Red Hat Linux (2.4.20-30.9smp)
      root (hd1,0)
      kernel /vmlinuz-2.4.20-30.9smp ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi
      initrd /initrd-2.4.20-30.9smp.img
title Red Hat Linux (2.4.20-8smp)
      root (hd1,0)
      kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi
      initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
      root (hd1,0)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi
      initrd /initrd-2.4.20-8.img
title Windows XP
      rootnoverify (hd0,0)
      chainloader +1
      makeactive

 

by: aadilfahadPosted on 2004-09-09 at 14:29:56ID: 12021688

go to l
www.linuxjalali.com

every thing best in it for linux

and make registration on forum
its forum is best couse admin reply you themself in minuts

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...