Re: Grub won't boot to linux partion

From: Jean-David Beyer (jdbeyer_at_exit109.com)
Date: 04/25/04


Date: Sun, 25 Apr 2004 05:13:09 -0400

Jesse Benton wrote:
> Lenard,
> Here is my /etc/fstab file. Fdisk kept saying bad command.

You normally say /sbin/fdisk (and do it as root). The first thing it
says when coming up is to type "m" for help. If you do that, it gives
you a list of valid commands. Command "p" will "print" your partition table.

If none of that happens, you have to solve that problem first.

> I tried
> using 1,1 and 1,4 but they still didn't work.

fdisk will not like those as commands. If you put those into
/boot/grub/grub.conf, who knows? My grub.conf looks like this (on this
machine):

# 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,0)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-9.0.3.ELsmp)
         root (hd0,0)
         kernel /vmlinuz-2.4.21-9.0.3.ELsmp ro root=LABEL=/
         initrd /initrd-2.4.21-9.0.3.ELsmp.img
title Red Hat Enterprise Linux ES (2.4.21-9.0.3.EL)
         root (hd0,0)
         kernel /vmlinuz-2.4.21-9.0.3.EL ro root=LABEL=/
         initrd /initrd-2.4.21-9.0.3.EL.img
title Red Hat Enterprise Linux ES (2.4.21-9.0.1.ELsmp)
         root (hd0,0)
         kernel /vmlinuz-2.4.21-9.0.1.ELsmp ro root=LABEL=/
         initrd /initrd-2.4.21-9.0.1.ELsmp.img

You may wish to compare this with yours. But you will have to know where
your boot (or root) partition is. Just guessing can take a long time.

> This system only has one
> hard drive anyway. I know GRUB needs to start on partion 4 and the 0
> means the first hard drive.
> Thanks in advance for your help
>
> Jesse
>
>
> LABEL=/ / ext3 defaults 1 1
> none /dev/pts devpts gid=5,mode=620 0 0
> none /proc proc defaults 0 0
> none /dev/shm tmpfs defaults 0 0
> /dev/hdc3 swap swap defaults 0 0
> /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
> /dev/scd0 /mnt/cdromscsi iso9660 noauto,user,ro 0 0
> /dev/hdc1 /mnt/dos vfat defaults
> 0 0
>
Mine works with no problem. Here is /etc/fstab:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext2 defaults 1 2
LABEL=/dataA /dataA ext2 defaults 1 2
LABEL=/data0 /data0 ext2 defaults 1 2
LABEL=/data1 /data1 ext2 defaults 1 2
LABEL=/data2 /data2 ext2 defaults 1 2
LABEL=/data3 /data3 ext2 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults,usrquota 1 2
LABEL=/opt /opt ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults,usrquota 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/usr/local /usr/local ext3 defaults 1 2
LABEL=/usr/src /usr/src ext3 defaults 1 2
LABEL=/var /var ext3 defaults,usrquota 1 2
/dev/sdd2 swap swap defaults,pri=15 0 0
/dev/sdc2 swap swap defaults,pri=15 0 0
/dev/sdb2 swap swap defaults,pri=15 0 0
/dev/sda2 swap swap defaults,pri=15 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

and here is fdisk output (for drive /dev/hda only. There are four other
hard drives on a SCSI controller.

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 

    Device Boot Start End Blocks Id System
/dev/hda1 * 1 49 393561 83 Linux
/dev/hda2 50 1354 10482412+ 83 Linux
/dev/hda3 1355 1615 2096482+ 83 Linux
/dev/hda4 1616 9964 67063342+ f Win95 Ext'd (LBA)
/dev/hda5 1616 2659 8385898+ 83 Linux
/dev/hda6 2660 3703 8385898+ 83 Linux
/dev/hda7 3704 4225 4192933+ 83 Linux
/dev/hda8 4226 4747 4192933+ 83 Linux
/dev/hda9 4748 5073 2618563+ 83 Linux
/dev/hda10 5074 5196 987966 83 Linux

Note that /dev/hda1 is the /boot partition. Since you do not have a
separate boot partition, you will probably have fdisk set hda? to bootable.

-- 
   .~.  Jean-David Beyer           Registered Linux User 85642.
   /V\                             Registered Machine   241939.
  /( )\ Shrewsbury, New Jersey     http://counter.li.org
  ^^-^^ 04:50:00 up 2 days, 5:32, 5 users, load average: 4.14, 4.03, 4.07


Relevant Pages

  • Re: Bug report added
    ... just a designator of a partition on a hard drive. ... case with fdisk I found both hard drives have changed. ... title Fedora ... root ...
    (Fedora)
  • Rights on a FAT32 partition. Accesing it from Windows XP and Suse 9.2
    ... I have to hard drives. ... One on which are Windows XP and Suse 9.2 on two ... I created that partition on the second drive with YaST -> Partitioner. ... If I create as the root a txt file on that partition, ...
    (comp.os.linux.misc)
  • SUMMARY: Moving /usr From Under Root "/" To Its Own Partition
    ... One of the reasons for doing this is to end up with a smaller root ... Install the boot block and boot off the new drive. ... " In order for the root partition to be fscked and remounted ... D> temporarily on the existing disk. ...
    (SunManagers)
  • Re: Full System Backup (bfk) Restore Advice.
    ... space on disk 1 to accomodate all 5 partitions that are now on ... in restoring the backup files, ... hard drives, i.e. includes installed apps that reside on other ... partitions) within an Extended partition on Disk 1? ...
    (microsoft.public.windowsxp.general)
  • Re: Cloning
    ... Similar with clone. ... I backed up the partition to another ide hard as images using ... Those restorations were botched as well using the Seagate ... Hard drives in removable trays connected to a Promise Ultra133 TX2 card. ...
    (microsoft.public.windowsxp.hardware)