[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Booting Debian-live-501 over HTTP



2009/9/26 Pravin <shindepravin@gmail.com>:
> Hi Michal,
> I got few quick questions about how networking.
>
> What I want to do is to check if dhcp networking is present or not.
> In case, dhcp fails, I would fallback to "${STATICIP}" which comes
> from "ip=" boot parameter.
>
> but I am having some problems in reliably confirming if ipconfig has failed.
> Unfortunately I only have dhcp setup available, so I dont know what
> output will be provided
> by ipconfig when dhcp fails.
> Can you tell me any relible way to check if ipconfig is failed to get dhcp ip.
> Once that is confirmed, I plan to use STATICIP parameter to configure eth0
> so that network booting will work for static networks also.

debian-live should use the address specified with ip= and try dhcp otherwise.

There are two reasons for this. Trying dhcp on a network that does not
have a dhcp server takes a long time because the dhcp client would go
through several increasing timeouts before giving up.

The ip= parameter must be set in a specific way for each statically
configures network, there is no default that can be used in case dhcp
fails.


>
> Other problem is with dns resolving.
> The httpfs I am using is statically linked (most probably with ulibc
> library) so the dns resolving works.
> but other default applications inside initramfs (ping, nslookup) fail
> to do nslookup.
> It seems that it is library problem.  When library files from actual
> running system were copied
> to initramfs, these applications worked.

What libraries did you copy?

> I need iscsiadm to work with DNSname but it does not work with
> initramfs library.
> I am trying to write small program which will do dns-lookup and return
> IP as output,
> and statically link this program with ulibc.  This way, copying
> libraries from outside can be avoided.

You would have to relink every binary copied to initramfs with ulibc.
This is not feasible because you would have to download the sources of
appropriate packages and rebuild them in a non-standard environment in
which many packages may fail to build simply because ulibc does not
provide all features they require.

> But statically linking with ulibc is proving more difficult that what
> I had expected.
> If you can think of any other way to get iscsiadm work with DNSnames
> then let me know.

I guess copying the required library from the chroot is the right way.
This can be easily repeated for every debian-live build.

>
> Lastly, I am also facing few problems with Ubuntu network booting.
> I have managed to get it booting over httpfs and iscsifs, but it is
> definitely not clean way.

If you are using debial-live to build a netbootable Ubuntu then this
is probably the right place. I recall seeing some code for Ubuntu in
live-initramfs.

Thanks

Michal


Reply to: