All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Knadle <Chris.Knadle@coredump.us>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub and root=label=
Date: Tue, 9 Sep 2008 00:31:00 -0400	[thread overview]
Message-ID: <200809090031.00315.Chris.Knadle@coredump.us> (raw)
In-Reply-To: <BAY118-W185261A2D7559216397150DB540@phx.gbl>

On Monday 08 September 2008 9:26:54 pm Greg White wrote:
> >As far as I know, the "root=" line is passed as one of the parameters to
> >the booting kernel, so it shouldn't matter what version of Grub you're
> >using.  For instance, if you're running Linux, look at the Linux kernel
> >documentation for the kernel in /Documentation/kernel-paraemeters.txt --
> >you'll see that one of the parameters the kernel takes is the "root="
> >parameter -- and that support is there regardless of you use an initrd
> >image or not.
> >
> >The label that you need to enter in "root=LABEL=" is the label on the
> >desired PARTITION, not the drive's VOLUME label.  'cfdisk' can list the
> >partition labels along with the device names on the disk.  For doing a
> >double-check, have a look at the 'findfs' command.
>
> kernel-parameters.txt:
> root=		[KNL] Root filesystem
>
> I know I need the root= parameter.  I need a way to point to a label
> instead of hard coding a dev entry and no initrd.

   Are you compiling your own kernel?  i.e. what are you doing to get rid of 
the initrd image requirement?  I ask because all the popular distributions 
that I know of ship kernels that come with (and require) an initrd image by 
default.

   I recently gave a presentation on the subject of compiling the Linux 2.6 
kernel a couple of months ago, and I went into the details of how to build 
the Linux kernel without an initrd image because that's how I like to build 
my own.  The video and other talk materials are available.

     ftp://ftp.coredump.us/kernel-talk_05-13-2008/

> I tried root=LABEL=WD320G in menu.lst and it didn't work.

   What error do you get?  Was it a kernel panic due to not being able to find 
the root filesystem, i.e. "cannot find init"?

> I used e2label to label the hard drive.

   Okay.

> Here is the output from cfdisk:
>                                   cfdisk 2.12r
>
>                               Disk Drive: /dev/sdc
>                        Size: 250059350016 bytes, 250.0 GB
>              Heads: 255   Sectors per Track: 63   Cylinders: 30401
>
>     Name        Flags      Part Type  FS Type          [Label]        Size
> (MB)
> ---------------------------------------------------------------------------
>--- sdc1        Boot        Primary   Linux ext3       [WD320G]    249637.25
> sdc2                       Primary   Linux swap                   419.49
>
> findfs LABEL=WD320G
> /dev/sdc1

   Good, thanks for including that info -- that looks like it checks out.

> My /etc/fstab looks like this and works:
> LABEL=WD320G / auto defaults 1 1

   Good.

> What did I do wrong?

   As far as I can tell the problem is that the kernel you're trying to boot 
doesn't contain the necessary support to find the hard disk.  Running 'lsmod' 
on a kernel that does boot properly (assuming said kernel uses an intrd image 
and thus loads drivers as modules) will give you some clues as to what device 
drivers you'll need to build-in to the kernel if you want to boot up without 
an initrd image.  Running '/sbin/modinfo <module_name>' should give you an 
idea of whether a device driver module is disk related and thus required to 
build-in.

> Thanks,
>
> PS I know the drive is 250GB but labeled 320G.

   Is it?  I didn't notice....

> And sorry for the other post with the wrong subject.

   Thanks for reposting with the right subject.

   -- Chris

-- 

Chris Knadle
Chris.Knadle@coredump.us



  reply	other threads:[~2008-09-09  4:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09  1:26 grub and root=label= Greg White
2008-09-09  4:31 ` Chris Knadle [this message]
2008-09-09 14:55   ` Greg White
2008-09-09 15:01     ` Felix Zielcke
2008-09-09 15:09       ` Javier Martín
2008-09-09 15:14         ` Felix Zielcke
2008-09-09 16:00           ` Robert Millan
2008-09-10  0:11             ` Chris Knadle
  -- strict thread matches above, loose matches on Subject: below --
2008-09-08 16:02 Greg White
2008-09-08 18:18 ` Chris Knadle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809090031.00315.Chris.Knadle@coredump.us \
    --to=chris.knadle@coredump.us \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.