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

Bug#646137: marked as done (add script to handle dhcp-client when netbooting)



Your message dated Tue, 03 Apr 2012 08:33:07 +0200
with message-id <4F7A99A3.80703@progress-technologies.net>
and subject line Re: add script to handle dhcp-client when netbooting
has caused the Debian Bug report #646137,
regarding add script to handle dhcp-client when netbooting
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
646137: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646137
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-boot-initramfs-tools
Version: 2.0.15-1
Severity: normal

I am using a debian live system which is started via netboot.
The root file system lives in a squashfs-file on a NFS share (as usual)
and the network adress is acquired via dhcp.
Here is my /proc/cmdline:
boot=live vga=791 live-config=hostname,openssh-server netboot=nfs nfsroot=192.168.0.250:/srv/nfs live-media-path=debian-live/$

When looking at the network traffic one can see that the DHCP lease is
never renewed. This means it might happen, that this address is given to
another client while my client still uses it.

Cause:
The root of the problem lies in Bug #627166
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627166 
"ipconfig: ignores dhcp options":

In the initramfs generated from /usr/share/initramfs-tools/hooks/live the
'ipconfig' tool is used to get an IP address via dhcp. As described in the bug
mentioned above ipconfig dos not report lease time, so this information is
not available. And no DHCP client is started later on.

Workaround:
Does NOT work: trying to force reallocation of the IP addrress via the "dhcp"
kernel comand line option does not work since then the network will disconnected
later in the boot sequence. -> not good with root on NFS :-)

Does work: I have just started 'dhclient' from the comand line when the system
is up. This spawns a dhclient deamon which properly renewes the lease as needed.
The network is not disconnected and everything is fine. I will try starting
dhclient from rc local later on, but don't see a reason why this should not work.

Proposed solution:
Since the information about which interface is started with dhcp is already made
available in the final root of the running system (/var/log/netboot.config and
/var/log/live.log) this information could be used to start a dhclient on this
interface later in the boot process. This still seems a bit like a hack since
the proper solution would imho require ipconfig to report the lease time, then
construct a proper /var/lib/dhcp/dhclient.leases file and only start dhclient
after that.
I also don't know what would be the best place to start the dhclient from.
Maybe live-config?

Here is my /proc/cmdline:
boot=live vga=791 live-config=hostname,openssh-server netboot=nfs nfsroot=192.168.0.250:/srv/nfs live-media-path=debian-live/test01 initrd=debian-live/test01-x64.ird BOOT_IMAGE=debian-live/test01-x64.knl

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-boot-initramfs-tools depends on:
ii  busybox                       1:1.17.1-8 Tiny utilities for small and embed
ii  initramfs-tools               0.98.8     tools for generating an initramfs
ii  udev                          164-3      /dev/ and hotplug management daemo

live-boot-initramfs-tools recommends no packages.

live-boot-initramfs-tools suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
not applicable anymore with isc-dhcp 4.x, closing.

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/


--- End Message ---

Reply to: