LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2006, 07:16 AM   #1
cucmi
LQ Newbie
 
Registered: May 2004
Location: Shanghai/China
Posts: 28

Rep: Reputation: 15
what's wrong with grub?


There are windowsxp and centos4.2 in my harddisk.
Today, after I format /dev/hda4 and made it as a swap disk, the grub cannot boot windows xp.

Windowsxp was installed on /dev/hda5

What shall I do to boot windowsxp?

The grub.conf contains the following lines to bootup windows
default=0
timeout=10
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.9-34.EL)
root (hd0,2)
kernel /boot/vmlinuz-2.6.9-34.EL ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-34.EL.img
title CentOS-4 i386 (2.6.9-22.EL)
root (hd0,2)
kernel /boot/vmlinuz-2.6.9-22.EL ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-22.EL.img
title WindowsXP
rootnoverify (hd0,4)
makeactive
chainloader +1



here is the partitions in my harddisks

Disk /dev/hda: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 64 32098+ de Dell Utility
Partition 1 does not end on cylinder boundary.
/dev/hda2 64 30106 15141262+ f W95 Ext'd (LBA)
Partition 2 does not end on cylinder boundary.
/dev/hda3 30107 75098 22675968 83 Linux
Partition 3 does not end on cylinder boundary.
/dev/hda4 * 75114 77536 1220940 e W95 FAT16 (LBA)
Partition 4 does not end on cylinder boundary.
/dev/hda5 64 30106 15141231 7 HPFS/NTFS

Disk /dev/hdb: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 2 3284 26370697+ f W95 Ext'd (LBA)
/dev/hdb2 * 3285 5834 20482875 c W95 FAT32 (LBA)
/dev/hdb3 5835 7476 13189365 c W95 FAT32 (LBA)
/dev/hdb5 2 2551 20482843+ b W95 FAT32
 
Old 05-08-2006, 09:12 AM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
Save your grub menu.lst file somplace like your home directory and then reinstall grub to the mbr. Then simply copy your menu.lst back to /boot/grub/
 
Old 05-08-2006, 09:18 AM   #3
cucmi
LQ Newbie
 
Registered: May 2004
Location: Shanghai/China
Posts: 28

Original Poster
Rep: Reputation: 15
The grub can boot linux though it cannot boot the windowsxp?
Need I reinstall the grub?
 
Old 05-08-2006, 09:38 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
something very strange about your partition setup: Cylinder size is set to 1008. On all of my setups it is 16065 (255 heads X 63 sectors/track). This may be why none of the partitions end on a cylinder boundary. If this was changed after the partitions were setup, then I'm guessing it would cause real problems.

You say that you made /dev/hda4 into swap space, but the partition table does not say that. Also hda4 is bootable, but hda5 is not.
 
Old 05-08-2006, 09:52 AM   #5
cucmi
LQ Newbie
 
Registered: May 2004
Location: Shanghai/China
Posts: 28

Original Poster
Rep: Reputation: 15
Yes, the partition table is strange.
I noticed this but I don't know how to fix it.
Once, I installed solaris 10 x86 in the same disk for some days.
Then I install the CentOS4.2 in /dev/hda4 and erase the solaris installation.

If I reinstall Windows XP in /dev/hda5 now , will the parititon table corrupt?

Quote:
Originally Posted by pixellany
something very strange about your partition setup: Cylinder size is set to 1008. On all of my setups it is 16065 (255 heads X 63 sectors/track). This may be why none of the partitions end on a cylinder boundary. If this was changed after the partitions were setup, then I'm guessing it would cause real problems.

You say that you made /dev/hda4 into swap space, but the partition table does not say that. Also hda4 is bootable, but hda5 is not.
 
Old 05-08-2006, 09:52 AM   #6
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
Quote:
Originally Posted by pixellany
Also hda4 is bootable, but hda5 is not.
Good catch pixellany, I missed that (not enough coffee yet). Can't boot a partition if it isn't bootable.
 
Old 05-08-2006, 02:37 PM   #7
FerkoPica
Member
 
Registered: Mar 2004
Distribution: FC5,Slackware
Posts: 53

Rep: Reputation: 15
I not sure but, you probably erase your logical disk(/dev/hda4) and the 1 logical partition (/dev/hda5) on which windows was installed is in that way erased too. Q: your's partitions was set up during windows installation?

You need to set up correct partition's for example:
/dev/hda1 - root
/dev/hda2 - swap
/dev/hda3 - /usr
/dev/hda4 - logical partition in which
/dev/hda5 - windows
/dev/hda6 - games
... etc. next logical partitons will be set up.
 
Old 05-08-2006, 09:39 PM   #8
cucmi
LQ Newbie
 
Registered: May 2004
Location: Shanghai/China
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by masonm
Good catch pixellany, I missed that (not enough coffee yet). Can't boot a partition if it isn't bootable.
I toggle the /dev/hda5's bootable flag using fdisk /dev/hda and reboot

then the grub report "error12 Invalid Device Request".

What can I do?

The partition is made by winodws a long time ago. The redhat 9 , solaris x86 and centos4.2 has been installed on the partition /dev/hda5
 
  


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 installs in wrong HDD mariogarcia Debian 2 04-24-2006 06:53 PM
Something wrong with GRUB Cybes51 Linux - Software 13 03-16-2005 07:22 PM
Problem With Grub, wrong partition. Alias5785 Linux - Newbie 9 09-20-2004 02:23 AM
Whats wrong with my GRUB config? Memzback Linux - Newbie 1 04-26-2004 12:25 AM
Grub wrong can't boot *anything* Bruce Hill Linux - Newbie 3 07-23-2003 10:29 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration