[lug] grub confusion

Hugh Brown hugh at math.byu.edu
Mon Mar 1 20:05:42 MST 2004


On Mon, 2004-03-01 at 18:56, D. Stimits wrote:
> I'm trying to reinstall KRUD 9 on a machine that had a drive go bad, and 
> I have a completely new install there. It worked fine, until it is 
> actual boot time, and I get a GRUB error. The stage 1.5 error of "Error 
> 16" appears to have more than one definition, depending on where I look 
> up/google. In one case (the case that is probably more correct) it says 
> that a device string was expected, but that the device string found did 
> not follow correct syntax rules. The other source says the filesystem 
> structure is inconsistent (probably correct if the string syntax is bad, 
> seeing as a non-existent device couldn't match any structure).
> 
> I've been going over grub.conf and trying over and over with variations 
> different syntax. The hard drive is partitioned as follows:
> /dev/hda is sole hard drive, plus there is a cdrom.
> /dev/hda1 is a primary ext2 partition with /boot/.
> /dev/hda2 is an extended that covers the rest of the drive.
> /dev/hda5 is swap, about 100 MB.
> /dev/hda6 is root partition, consuming the remainder of the drive.
> 
> 
> Can someone elaborate on this particular variation what is wrong?
> default=0
> timeout=15
> splashimage=(hd0,0)/grub/splash.xpm.gz
> title KRUD9 (2.4.20-13.9)
> 	root (hd0,0)
> 	kernel /vmlinux-2.4.20-13.9 ro root=/dev/hda6
> 	initrd /initrd-2.4.20-13.9.img
> 
> NOTE: The kernel and initrd are found in /boot/, so (hd0,0)/vmlinux... 
> is correct for kernel and (hd0,0)/initrd... is correct for location of 
> initrd.
> 


usu. the kernel is vmlinuz-... (on stock installs) instead of
vmlinux-..., you might try checking to see if it is a typo.


> One thing that sticks out is that I switched from LABEL= syntax after I 
> failed to get any variation to work this way. FYI, how does one go about 
> viewing labels? tune2fs apparently only writes them, and does not read 
> labels. In the past I've tended to shift away from labels due to 
> multiple installs and hard-coded partition numbering being more clear 
> when it comes time to alter hardware.

from the tune2fs manpage

     -l     List the contents of the filesystem superblock.


one of the items in the superblock is the label

tune2fs -l /dev/hda6 | grep "volume name" 

would tell you the volume name for /dev/hda6


> 
> Another variation is to have the "root (hd0,0)" as "root (hd0,5)" since 
> /dev/hda6 is the root partition. However, I'm not sure if the 
> extended/logical partition numbering counts hda6 and partition number 5 
> of hd0. Any suggestions?
> 

root in this case tells grub which partition the grub.conf is on.  if
/boot weren't on  a separate partition then you would root (hd0,5) for
/dev/hda6 and then the kernel line would read

kernel /boot/vmlinuz-....
initrd /boot/initrd....


Hugh





More information about the LUG mailing list