LinuxQuestions.org
Register a domain and help support LQ
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 07-01-2007, 07:47 AM   #1
akkalyankar
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
GRUB problem or BIOS problem?


I have two harddisks in my system, one SATA (/dev/sda) and another PATA (/dev/hdb). I have 15 partitions on SATA harddisk and 10 partitions on PATA harddisk with different distributions installed. I use GRUB to load the desired operating system and had no problem in loading desired operating system. Recently, since there was space left in /dev/hdb, I created 2 extra partitions (/dev/hdb11 and /dev/hdb12) on it and installed STUX and Zenwalk Linux and accordingly modified menu.lst file of GRUB. GRUB boot menu shows entries for these distributions but when I try to load these operating systems, GRUB hangs. I have to reboot the system.

Other operating systems can be booted except the two newly installed systems.

I use GRUB from Mandriva spring edition i.e. Mandriva 2007.1

Command fdisk -l /dev/hdb* shows all partitions. I can even mount these newly added partiions under /mnt directory and verify that distributions are installed.

I have searched the forums for similar problem but could not get any solutions. Can anybody help?.
 
Old 07-01-2007, 07:54 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
What exactly are the error messages?
what happens after you select one of the problem entries? eg do you see the kernel starting up?
 
Old 07-01-2007, 08:37 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
What does your /boot/grub/menu.lst from Spring Mandy look like, maybe you should post that also.
 
Old 07-01-2007, 03:52 PM   #4
Paul G.
LQ Newbie
 
Registered: May 2006
Location: Auckland, New Zealand
Distribution: ArtistX 0.9
Posts: 7

Rep: Reputation: 0
Post

Quote:
Originally Posted by akkalyankar

Command fdisk -l /dev/hdb* shows all partitions. I can even mount these newly added partiions under /mnt directory and verify that distributions are installed.
Have you checked that those two new partitions are shown as bootable in the output of the fdisk command?

It may pay to post that output here.

I'm very new here but have struggled with GRUB myself so have a smattering of understanding.

Paul

Last edited by Paul G.; 07-01-2007 at 03:56 PM.
 
Old 07-01-2007, 07:12 PM   #5
canopic
LQ Newbie
 
Registered: Oct 2005
Distribution: Mandrake10.1
Posts: 3

Rep: Reputation: 0
Hi Ak! [I can't spell names more than 4 letters long! :-)]
I run a similar setup to you - 15 partitions on my Sata drive, 24 partitions on my Pata drive, and I use a single small boot partition from which to boot all distros and WinXP from GRUB. I locate this small boot partition near the start of the drive.
I can tell you about 2 problems, but not exactly what your problem is.
First, I have found that most linux distros will not work on a Sata drive if they are installed on a partition higher than 15 [ie 3 Primary and 12 Extended/secondary. Depending on installation method used, the installer will usually fail. If you get as far as trying to boot this distro, it will fail to mount this root partition. There may be a work around for this but I have not seen one in any forum yet. I only tell you this as it seems you are already on this limit of partitions for your Sata drive. On large Sata Drives - 250 GB or 500 GB etc., this is quite a serious restriction. Also, for some reason, Fedora Core 6 will not install higher than partition 14, or Anaconda will fail. Now I use Fedora Core 7, but I played it safe and didn't try to install on partition 15. I have Knoppix5.1.1 running on partition 15.

Second, there can be BIOS problems. With some bioses Grub can not reach the boot partition unless it is near the start of the HDD. In this case though you usually get the Grub Error 18.

You didn't get any error message, so your problem is probably something else. Maybe syntax, or maybe with your motherboard you need some extra kernal parameter with these newly added distros?
Good luck - I must run to my meeting now. Rob.
 
Old 07-01-2007, 09:09 PM   #6
akkalyankar
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
GRUB problem or BIOS problem ?

Quote:
What exactly are the error messages?
what happens after you select one of the problem entries? eg do you see the kernel starting up?
There are no error messages. On selecting the problematic OS, grub starts and shows hd parameters and hangs. Kernel does not start.

Quote:
What does your /boot/grub/menu.lst from Spring Mandy look like, maybe you should post that also.
Here is the copy of menu.lst file, edited to delete commented lines.

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.


splashimage=(hd0,5)/boot/grub/mysplash.xpm
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 1

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 30

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
title Windows XP (/dev/sda1,5,6)
root (hd1,0)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1

title Mandriva 2007-spring (/dev/hdb6)
root (hd0,5)
kernel /boot/vmlinuz root=/dev/hdb6 splash=silent vga=788 resume=/dev/sda8
initrd /boot/initrd.img
savedefault
boot

# Entry for fedora core 5

title Fedora Core 5 (/dev/sda9)
root (hd1,8)
kernel /boot/vmlinuz root=/dev/sda9 vga=788
initrd /boot/initrd.img


title Yoper 3.0 Titanium (hdb7)
root (hd0,6)
kernel /boot/vmlinuz root=/dev/hdb7 ro
initrd /boot/initrd.img
savedefault
boot


title Ubuntu 6.06 (/dev/sda7)
root (hd1,6)
kernel /boot/vmlinuz root=/dev/sda7 ro quiet splash
initrd /boot/initrd.img

title Slax 5.1.6 (hdb3)
root (hd0,2)
kernel /boot/vmlinuz vga=769 root=/dev/hdb3 rw nopcmcia nohotplug

title SUSE LINUX 10.1 (i586) (on /dev/hdb8)
root (hd0,7)
kernel /boot/vmlinuz root=/dev/hdb8
initrd /boot/initrd
savedefault
boot

title Vector Linux 5.8 (hdb1)
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 vga=788 splash=silent ro
initrd /boot/initrd


title PCLinuxOS 2007 (/dev/sda4)
root (hd1,3)
kernel /boot/vmlinuz root=/dev/sda4 vga=788 splash=silent
initrd /boot/initrd.img

title CentOS 4.4 (/dev/sda10)
root (hd1,9)
kernel /boot/vmlinuz-2.6.9-42.EL root=/dev/sda10 vga=788
initrd /boot/initrd-2.6.9-42.EL.img

title Puppy 216 (sda11)
kernel (hd1,10)/boot/vmlinuz root=/dev/sda11 ro vga=normal

title MCN Live Delft (sda12)
kernel (hd1,11)/boot/vmlinuz root=/dev/sda12 resume=/dev/sda8 splash=silent vga=788 apic=ht
initrd (hd1,11)/boot/initrd.img

title Dream Linux 2.2 (sda14)
kernel (hd1,13)/boot/vmlinuz root=/dev/sda14 splash=silent vga=788
initrd (hd1,13)/boot/initrd

title Slackware 11 (sda15)
kernel (hd1,14)/boot/vmlinuz root=/dev/sda15 vga=788

title Sam Linux 2007 (hdb10)
kernel (hd0,9)/boot/vmlinuz root=/dev/hdb10 vga=788
initrd (hd0,9)/boot/initrd.img

title Stux Linux 5.8 (hdb11)
root (hd0,10)
kernel /boot/vmlinuz root=/dev/hdb11 vga=788 ro
initrd /boot/initrd

title Zenwalk (hdb12)
root (hd0,11)
kernel /boot/vmlinuz root=/dev/hdb12 vga=788 ro
initrd /boot/initrd.splash

Quote:
Have you checked that those two new partitions are shown as bootable in the output of the fdisk command?
None of the partitions except /dev/hdb1 are bootable. See output of fdisk -l /dev/hdb below:

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 6113 3080920+ 83 Linux
/dev/hdb2 6114 77545 36001728 5 Extended
/dev/hdb5 6114 6596 243400+ 82 Linux swap / Solaris/dev/hdb6 6597 18786 6143728+ 83 Linux
/dev/hdb7 18791 30409 5855661 83 Linux
/dev/hdb8 30410 40560 5116072+ 83 Linux
/dev/hdb9 50252 62441 6143728+ 83 Linux
/dev/hdb10 62442 70758 4191736+ 83 Linux
/dev/hdb11 70759 77545 3420616+ 83 Linux
/dev/hdb12 40561 50251 4884232+ 83 Linux

Partition table entries are not in disk order

Suggestions made by Canopic are noted with thanks.

I am amazed at the quick response. Thanks to all.
 
Old 07-01-2007, 10:00 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
One thing I'd like to mention, is to try simplifying the menu list for entries other than Mandriva's. Every time you upgrade a kernel you'll have to edit this file, and if the kernel entry is not quite right it won't boot. Have you seen how saikee keeps it simple, you just have to specify the partition containing the boot files and chainload:
http://www.justlinux.com/forum/showt...hreadid=143973
Back up you're current one first.
 
Old 07-01-2007, 10:06 PM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Also, /dev/hdb suggests it is the second disk, you have root of those two installations in the first drive.
EDIT: I guess the others are setup like that and they boot.

Last edited by Junior Hacker; 07-01-2007 at 10:10 PM.
 
Old 07-02-2007, 12:29 AM   #9
grahamatlq
Member
 
Registered: Dec 2006
Posts: 37

Rep: Reputation: 17
You could try:

1. defining the drives with a "device" entry in the grub.conf/menu.lst
device (hd0,10) /dev/sdb11
device (hd0,11) /dev/sdb12

2. reinstalling grub to the MBR

# grub
grub> root (hd1,0)
grub> setup (hd1)
grub> quit
 
Old 07-02-2007, 07:37 AM   #10
Tinkerbelle
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Rep: Reputation: 0
I have found that some distro's read the bios in a different order.

I have 1 sata and 2 ide drives which Fedora 7 sees as sda1, sdb1 and sdc1, only the first is sata and it will only boot if the sata disk is the boot disk. Suse 10.2 sees them as sda1, hda1 and hda2 and will boot from either sda1 or hda1. Debian Etch also sees 2 ide and 1 sata but places the sata last in the list it passes to grub on install, it will only boot from ide 1.

Most of the non running installs stop at Stage 1.5 and as it seems you do not get this far it could be some other problem for you but this info may assist. Afaik these problems only started with the last version of Grub, but that may be a false report.
 
Old 07-02-2007, 08:10 AM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Grub pleads not guilty, your honour.

This is its defence.

(1) Grub legacy declared no more support after Grub 0.97. Thus Grub has not been changed for at least 3 years. It isn't even maintained!

(2) Kernel 2.6.20 and later decided to abandon the naming of Pata disk and group them under SCSI/Sata/USB disks family. Although some distros still support hda to hde many of them have jumped ship and go with the trend.

-------------------------------------------------------

Distros with different kernels, thus seeing a Pata disks in different names, can coexist in the same box. You just have to edit the partition reference of hda to sda or sdb to suit the circumstance.

The only problem that will cause problem is if your Pata disk has more than 15 partitions, which is the limit for a Sata, the new distros with latest kernels, cannot cope and could regard it as a raw disk. To the new kernels it is illegal to have more than 15 partitions as the device's minor number does not support more than 16 names. The 16th (or the 1st ) name is reserved for the whole disk.

Last edited by saikee; 07-02-2007 at 08:20 AM.
 
Old 07-02-2007, 09:06 AM   #12
drakebasher
Member
 
Registered: Aug 2004
Location: Proprio Qui
Distribution: Debian
Posts: 85

Rep: Reputation: 16
One way of getting past GRUB's limitations in understanding your system is to keep your kernels where GRUB can find them easily and load them from there. I have done the following successfully:

Create a directory in the shared boot partition for each distro and keep kernels and initrds there:

Code:
/sharedBoot
  /grub
  /debian
  /centOS
  /fluxbuntu
Each distro will have its own /boot directory in its own partition where kernels and initrds will be updated to. Following an update or new installation, copy the new files from the distro /boot directory to the corresponding distro directory on the sharedBoot partition. The GRUB menu.lst entries will be like this:

title Debian
root (hd0,0)
kernel /debian/vmlinuz root=/dev/hdb8 ro
initrd /debian/initrd

title Distro 27: Fluxbuntu 2.7 kernel
root (hd0,0)
kernel /fluxbuntu/kernel-2.7 root=/dev/hdb14 ro
initrd /fluxbuntu/initrd-2.7

If the kernel and/or initrd files have the drivers needed to understand your system topology, then once the kernel is loaded from the shared boot directory, Linux will understand your system.

Last edited by drakebasher; 07-02-2007 at 10:22 PM.
 
Old 07-03-2007, 07:26 AM   #13
akkalyankar
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
grahamatlq:

Tried your suggestion with no luck. Thanks for help.

tinkerbelle/saikee

All distribution which I installed saw my SATA disk as /dev/sda and my PATA disk as /dev/hdb. Recently when I installed Zenwalk-4.6.1 on /dev/hdb2, I was completely confused during installation as it showed my PATA harddisk as /dev/sda and my SATA disk as /dev/sdb. From the number of partitions I could guess which partition is /dev/hdb2 (/dev/sda2 in Zenwalk's view). Upon Zenwalk installation, when I checked /etc/fstab, I found that root partition is shown as /dev/hdb2 whereas in kernel parameters if I put root=/dev/hdb2, Zenwalk will come out with error stating to correct my root= parameter. When I substituted root=/dev/hdb2 to root=/dev/sda2, I could boot. I find anamoly in /etc/fstab and kernel parameter amusing.

To come to my problem, I have reformatted my PATA harddisk and created fresh partitions. The problem is now over.

Thanks to all for help.

Last edited by akkalyankar; 07-03-2007 at 07:29 AM.
 
Old 07-03-2007, 08:37 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
From my observation the decision by the kernel newer than 2.6.20 to group Pata disks into the SCSI/Sata/USB family is a recent event and many issues have yet to be discovered and resolved.

There is a movement towards to calling the disk/partition by disk ID and by UUID. These types of addressing methods for the partitions are unique and can do away with the traditional device names problems. I am not sure how easy to use them but I have started a thread here..

The by-UUID method has been with the Ubuntu family for a while. I only notice the by-disk ID recently in a OpenSuse 10.3.

Many of you may also know the Red Hat family has long been addressing the partition by the "label".

Depending on how the Bios is written it may scan the SCSI disks before the Sata or Patas Disk thus giving the sda first on whichever is detected first. From experience the USB disks always come last.
 
Old 07-22-2007, 09:45 PM   #15
rwilcher
LQ Newbie
 
Registered: Mar 2006
Location: Maple Heights OHIO
Distribution: Centos 6
Posts: 21

Rep: Reputation: 0
Hi! If you have not solved the problem yet , I had a similar problem
just recently. System would boot and hang. Came to find out that the
BIOS was finding drives in the wrong order and trying to boot off the
wrong one. As you can imagine, serious gastric disturbences were the
result of this foolishness. I added a kernel boot parameter to my grub
boot sequence and found this. Try this and see where the bios places
things. boot single user so you can look around. Dont think it will
hurt your setup.
-------------------------grub.conf
kernel /vmlinuz-2.6.21.4 -s root=/dev/hda10 ro ide=reverse
-----------------------------------------------------------
^^ single user.
My root boot disk = /dev/hda10. Change to what yours is.
I hit the E key before the machine boots and edit the boot
parms. At least this is how I got mine to boot.
Good luck.
 
  


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
bios problem everyonebleeds General 4 12-20-2006 01:30 AM
GRUB error 18.... not a BIOS problem Loopey Suse/Novell 2 06-19-2006 06:01 PM
GRUB Problem - Can't Get into BIOS chetanbhatsp Linux - General 12 01-07-2006 01:29 AM
BIOS problem rogk Linux - Hardware 6 06-18-2004 06:46 PM
Trying to dual-boot XP and RH9 with GRUB...GRUB stops right after BIOS EvilYoda Linux - Newbie 5 06-20-2003 03:38 PM


All times are GMT -5. The time now is 01:57 PM.

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