Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-15 Thread H . J . Lu

> 
> The clean way to handle it, and I'll take a look it to have
> root=/dev/nfs (and the rdev equivalent) to set ip=on if it isn't

Yes.

> already.  The current 2.4.4 behavior of root=/dev/hda3 doing ip
> autoconfig when the code is compiled into the kernel is just bad.

Agreed.


H.J.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-15 Thread Eric W. Biederman

David Woodhouse <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] said:
> >  There wasn't even DHCP support before so yes you did.   As you can't
> > get the nfs mount point from bootp. 
> 
> Wasn't there a default? The Indy behind me seems to try to mount
> /tftpboot/172.16.18.195, so I put a filesystem there just to make it happy.
> 
> It's a 2.4.3 kernel.

Duh.  I forgot about the default path.

> >  Well I think in the CONFIG_BLK_DEV=n case it might wind up being a
> > ramfs or tmpfs image.  Something like a simplified version of tar. 
> 
> Well, if it stops working and stays broken, I suppose I'll just have to 
> hack up a built-in command line option. ISTR ARM already has such an option.
> 
> I'd rather it didn't break, though.

The clean way to handle it, and I'll take a look it to have
root=/dev/nfs (and the rdev equivalent) to set ip=on if it isn't
already.  The current 2.4.4 behavior of root=/dev/hda3 doing ip
autoconfig when the code is compiled into the kernel is just bad.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-14 Thread Russell King

On Mon, May 14, 2001 at 05:51:19PM +0100, David Woodhouse wrote:
> Well, if it stops working and stays broken, I suppose I'll just have to 
> hack up a built-in command line option. ISTR ARM already has such an option.

Indeed it does, because some platforms don't have any way to pass anything
to the kernel period.  (Because they are using a serial loader called
Angel).

--
Russell King ([EMAIL PROTECTED])The developer of ARM Linux
 http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-14 Thread David Woodhouse


[EMAIL PROTECTED] said:
>  There wasn't even DHCP support before so yes you did.   As you can't
> get the nfs mount point from bootp. 

Wasn't there a default? The Indy behind me seems to try to mount
/tftpboot/172.16.18.195, so I put a filesystem there just to make it happy.

It's a 2.4.3 kernel.

>  Well I think in the CONFIG_BLK_DEV=n case it might wind up being a
> ramfs or tmpfs image.  Something like a simplified version of tar. 

Well, if it stops working and stays broken, I suppose I'll just have to 
hack up a built-in command line option. ISTR ARM already has such an option.

I'd rather it didn't break, though.


--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-14 Thread David Woodhouse


[EMAIL PROTECTED] said:
>  I hate config options that change how the core of the kernel boot
> makes decisions.  Things like "where is root", "what is my network
> address or where do I get that information" have no reasonable
> default.  This is why the command line args are there.

If you're told (by rdev because the poxy bootloader on the board can't 
pass args to the kernel) that root is /dev/nfs, and you don't have a 
command line telling you your IP information, then there _is_ a reasonable 
default, and it is to do DHCP.

--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-14 Thread David Woodhouse


[EMAIL PROTECTED] said:
>  Since you have to set the command line anyway ip=dhcp is no extra
> burden and it lets you use the same kernel to boot of the harddrive
> etc.

You don't have to set the command line anyway. At least you _didn't_.


[EMAIL PROTECTED] said:
>  I boot diskless all of time and supporting a ramdisk is trivial.  You
> just a have a program that slaps a kernel a ramdisk, and some command
> line arguments into a single image, along with a touch of adapter code
> to set the kernel parameters correctly and then boot that.

It's a PITA. Downloading a kernel by TFTP each time you make a one-line 
change is painful enough, without having to download a ramdisk to go with 
it.

And once those kernels are being built with CONFIG_BLK_DEV=n, the ramdisk 
is going to be an even more unattractive solution.

--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread David S. Miller


Eric W. Biederman writes:
 > Mostly I like the situation where I can compile it in and turn it on
 > when I need it, instead of having to do thing differently if it is
 > compiled in or not.
 > 
 > ip=on is all it really takes.

This is the main reason I like the current 2.4.x behavior.

I hate config options that change how the core of the kernel
boot makes decisions.  Things like "where is root", "what is
my network address or where do I get that information" have
no reasonable default.  This is why the command line args
are there.

If you want a kernel which automatically does "foo", you have
several options already by which to do this:

1) Many platforms allow you to store a boot comand line
   in the firmware (Sparc, several MIPS, PPC, etc.)

2) Failing #1, you can add a default prefix/postfix to the
   kernel command line at build time if you wish, just add
   some simple variable to the toplevel Makefile and have
   init/main.c frob this thing onto the kernel command
   line string after initially fetching it.

Really, H. J., you are asking for a static command line feature.
That's cool, so add it :-)

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread David S. Miller


H . J . Lu writes:
 > Have you tried ramdisk on diskless ... sparc  .. booting
 > over network?

I know that sparc works fine, what is your point though?

All platforms ought to work with ramdisks just fine, in fact.

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread H . J . Lu

On Sun, May 13, 2001 at 07:24:31PM -0600, Eric W. Biederman wrote:
> 
> I agree it isn't intuitive, and if nfsroot=xxx is specified it should
> probably turn on if there is missing information.
> 
> But if you have to select the command line anyway
> 
> Mostly I like the situation where I can compile it in and turn it on
> when I need it, instead of having to do thing differently if it is
> compiled in or not.
> 

In fact, I like the idea. But passing nfsroot=xxx to kernel doesn't
imply "ip=on" is very annoying. My setup worked fine with 2.4.4. It
took me a while to figure out why it didn't work with 2.4.4-ac8.

> > Have you tried
> > ramdisk on diskless alpha, arm, m68k, mips, ppc, sh, sparc, booting
> > over network?
> 
> First the booting situation on linux with respect to multiple platform
> sucks.  We pass parameters in weird ways on every platform.  The command
> line is the only thing that stays mostly the same.  I'm looking at what
> it takes to clean that up, so we can have multiplatform bootloaders.

I don't think we have total control over how to boot over network on
all platforms. On some platforms, you may only load kernel over the
network and run from it.

> 
> I have implemented what it takes to attach a ramdisk, and if you can
> boot an arbitrary kernel it isn't hard to have a program that attaches
> a ramdisk.  
> 
> Now although I believe this is the right direction to go, you will
> notice I ported the dhcp IP auto configuration from 2.2.19 to to 2.4.x
> Buying a little more time to get this working.

Thanks. I appreciate it.


H.J.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread Eric W. Biederman

"H . J . Lu" <[EMAIL PROTECTED]> writes:

> On Sun, May 13, 2001 at 01:24:18PM -0600, Eric W. Biederman wrote:
> > "H . J . Lu" <[EMAIL PROTECTED]> writes:
> > 
> > > It doesn't make any senses. When I specify CONFIG_IP_PNP and
> > > BOOTP/DHCP, I want a kernel with IP config using BOOTP/DHCP. I would
> > > expect IP config is turned for BOOTP/DHCP by default. You can turn
> > > it off by passing "ip=off" to kernel. Did I miss something?
> > 
> > Since you have to set the command line anyway ip=dhcp is no extra
> > burden and it lets you use the same kernel to boot of the harddrive etc.
> 
> Why do I have to set "ip=dhcp"? If I have selected CONFIG_IP_PNP and
> DHCP in my kernel configuration, should it be on by default?

I agree it isn't intuitive, and if nfsroot=xxx is specified it should
probably turn on if there is missing information.

But if you have to select the command line anyway

Mostly I like the situation where I can compile it in and turn it on
when I need it, instead of having to do thing differently if it is
compiled in or not.

ip=on is all it really takes.

> > > > This same situation exists for 2.2.18 & 2.2.19 as well.
> > > > 
> > > > The only way to get long term stability out of this is to write
> > > > a user space client, you can put in a ramdisk.  One of these days...
> > > 
> > > It doesn't work with diskless machines which don't support ramdisk
> > > during boot.
> > 
> > I don't believe that is a real world situation.
> > 
> > I boot diskless all of time and supporting a ramdisk is trivial.  You
> > just a have a program that slaps a kernel a ramdisk, and some command
> > line arguments into a single image, along with a touch of adapter code
> > to set the kernel parameters correctly and then boot that.
> 
> Let me guess. Your diskless machines are mostly x86. 
Mostly, but not exclusively.

> Have you tried
> ramdisk on diskless alpha, arm, m68k, mips, ppc, sh, sparc, booting
> over network?

First the booting situation on linux with respect to multiple platform
sucks.  We pass parameters in weird ways on every platform.  The command
line is the only thing that stays mostly the same.  I'm looking at what
it takes to clean that up, so we can have multiplatform bootloaders.

I have implemented what it takes to attach a ramdisk, and if you can
boot an arbitrary kernel it isn't hard to have a program that attaches
a ramdisk.  

Now although I believe this is the right direction to go, you will
notice I ported the dhcp IP auto configuration from 2.2.19 to to 2.4.x
Buying a little more time to get this working.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread H . J . Lu

On Sun, May 13, 2001 at 01:24:18PM -0600, Eric W. Biederman wrote:
> "H . J . Lu" <[EMAIL PROTECTED]> writes:
> 
> > It doesn't make any senses. When I specify CONFIG_IP_PNP and
> > BOOTP/DHCP, I want a kernel with IP config using BOOTP/DHCP. I would
> > expect IP config is turned for BOOTP/DHCP by default. You can turn
> > it off by passing "ip=off" to kernel. Did I miss something?
> 
> Since you have to set the command line anyway ip=dhcp is no extra
> burden and it lets you use the same kernel to boot of the harddrive etc.

Why do I have to set "ip=dhcp"? If I have selected CONFIG_IP_PNP and
DHCP in my kernel configuration, should it be on by default?

> 
> > > This same situation exists for 2.2.18 & 2.2.19 as well.
> > > 
> > > The only way to get long term stability out of this is to write
> > > a user space client, you can put in a ramdisk.  One of these days...
> > 
> > It doesn't work with diskless machines which don't support ramdisk
> > during boot.
> 
> I don't believe that is a real world situation.
> 
> I boot diskless all of time and supporting a ramdisk is trivial.  You
> just a have a program that slaps a kernel a ramdisk, and some command
> line arguments into a single image, along with a touch of adapter code
> to set the kernel parameters correctly and then boot that.

Let me guess. Your diskless machines are mostly x86. Have you tried
ramdisk on diskless alpha, arm, m68k, mips, ppc, sh, sparc, booting
over network?


H.J.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread Eric W. Biederman

"H . J . Lu" <[EMAIL PROTECTED]> writes:

> It doesn't make any senses. When I specify CONFIG_IP_PNP and
> BOOTP/DHCP, I want a kernel with IP config using BOOTP/DHCP. I would
> expect IP config is turned for BOOTP/DHCP by default. You can turn
> it off by passing "ip=off" to kernel. Did I miss something?

Since you have to set the command line anyway ip=dhcp is no extra
burden and it lets you use the same kernel to boot of the harddrive etc.

> > This same situation exists for 2.2.18 & 2.2.19 as well.
> > 
> > The only way to get long term stability out of this is to write
> > a user space client, you can put in a ramdisk.  One of these days...
> 
> It doesn't work with diskless machines which don't support ramdisk
> during boot.

I don't believe that is a real world situation.

I boot diskless all of time and supporting a ramdisk is trivial.  You
just a have a program that slaps a kernel a ramdisk, and some command
line arguments into a single image, along with a touch of adapter code
to set the kernel parameters correctly and then boot that.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-13 Thread Eric W. Biederman

"H . J . Lu" <[EMAIL PROTECTED]> writes:

> On Fri, May 11, 2001 at 04:28:05PM -0700, David S. Miller wrote:
> > 
> > H . J . Lu writes:
> >  > 2.4.4-ac8 disables IP auto config by default even if CONFIG_IP_PNP is
> >  > defined.  Here is a patch.
> > 
> > It doesn't make any sense to enable this unless parameters are
> > given to the kernel via the kernel command line or from firmware
> > settings.
> 
> >From Configure.help:
> 
> IP: kernel level autoconfiguration
> CONFIG_IP_PNP
>   This enables automatic configuration of IP addresses of devices and
>   of the routing table during kernel boot, based on either information
>   supplied on the kernel command line or by BOOTP or RARP protocols.
>   You need to say Y only for diskless machines requiring network 
>   access to boot (in which case you want to say Y to "Root file system
>   on NFS" as well), because all other machines configure the network 
>   in their startup scripts.
> 
> It works fine for 2.4.4. However, in 2.4.4-ac8, even if I select
> CONFIG_IP_PNP, I have to pass ip= to kernel, in addition to
> nfsroot=x.x.x.x:/foo/bar. With 2.4.4, I can just pass
> nfsroot=x.x.x.x:/foo/bar to kernel.

O.k. Configure.help needs to be updated. "ip=on" or "ip=bootp" or
"ip=dhcp" work fine.  I wonder if I forgot to forward port the docs?

This same situation exists for 2.2.18 & 2.2.19 as well.

The only way to get long term stability out of this is to write
a user space client, you can put in a ramdisk.  One of these days...

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-11 Thread H . J . Lu

On Fri, May 11, 2001 at 04:28:05PM -0700, David S. Miller wrote:
> 
> H . J . Lu writes:
>  > 2.4.4-ac8 disables IP auto config by default even if CONFIG_IP_PNP is
>  > defined.  Here is a patch.
> 
> It doesn't make any sense to enable this unless parameters are
> given to the kernel via the kernel command line or from firmware
> settings.

>From Configure.help:

IP: kernel level autoconfiguration
CONFIG_IP_PNP
  This enables automatic configuration of IP addresses of devices and
  of the routing table during kernel boot, based on either information
  supplied on the kernel command line or by BOOTP or RARP protocols.
  You need to say Y only for diskless machines requiring network 
  access to boot (in which case you want to say Y to "Root file system
  on NFS" as well), because all other machines configure the network 
  in their startup scripts.

It works fine for 2.4.4. However, in 2.4.4-ac8, even if I select
CONFIG_IP_PNP, I have to pass ip= to kernel, in addition to
nfsroot=x.x.x.x:/foo/bar. With 2.4.4, I can just pass
nfsroot=x.x.x.x:/foo/bar to kernel.


H.J.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: Enable IP PNP for 2.4.4-ac8

2001-05-11 Thread David S. Miller


H . J . Lu writes:
 > 2.4.4-ac8 disables IP auto config by default even if CONFIG_IP_PNP is
 > defined.  Here is a patch.

It doesn't make any sense to enable this unless parameters are
given to the kernel via the kernel command line or from firmware
settings.

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/