
Hi,
today, I have written a /cdrom/scripts script which imports the network configuration from an installed Debian system. That way, it becomes possible to have _one_ grml medium around which could then in turn be used as a rescue system for _all_ Debian systems at the place for remote rescue, as long as the root filesystem is still reachable.
The script searches all found hard disk partitions and LVM devices for a mounteable filesystem containing a file /etc/network/interfaces and then proceeds to copy /etc/network from that filesystem into the grml system before restarting the network devices. That way, the grml system comes up with a network configuration that is likely to work.
The script doesn't integrate nicely into grml, it is written in bash, not in zsh, and doesn't use the fancy colorful output of the normal grml init procedure. Maybe one of the grml makers can adapt it to integrate more nicely and then publish it as an example on the grml wiki.
One issue that I find especiall annoying is the fact that grml starts a pump process which is still around when our script runs, and will take down the freshly configured interface after timing out. pump -k will also wait for that timeout, and thus impose a delay in system boot.
Greetings Marc

* Marc Haber mh+grml@zugschlus.de [20051216 21:15]:
today, I have written a /cdrom/scripts script which imports the network configuration from an installed Debian system. That way, it becomes possible to have _one_ grml medium around which could then in turn be used as a rescue system for _all_ Debian systems at the place for remote rescue, as long as the root filesystem is still reachable.
The script searches all found hard disk partitions and LVM devices for a mounteable filesystem containing a file /etc/network/interfaces and then proceeds to copy /etc/network from that filesystem into the grml system before restarting the network devices. That way, the grml system comes up with a network configuration that is likely to work.
Great!
The script doesn't integrate nicely into grml, it is written in bash, not in zsh, and doesn't use the fancy colorful output of the normal grml init procedure. Maybe one of the grml makers can adapt it to integrate more nicely and then publish it as an example on the grml wiki.
Sure, I'll adopt it for zsh and integrate the colorful output. :)
One issue that I find especiall annoying is the fact that grml starts a pump process which is still around when our script runs, and will take down the freshly configured interface after timing out. pump -k will also wait for that timeout, and thus impose a delay in system boot.
Just use the bootoption 'nodhcp' to disable startup of pump.
I'm even thinking about integrating your code into grml-autoconfig, so you can use it with a new bootoption on every grml version. I've to take a closer look at the code, but I'll ping you via #grml anyway. ;)
Thanks, Marc!
regards, -mika-

On Sat, Dec 17, 2005 at 03:20:33PM +0100, Michael Prokop wrote:
- Marc Haber mh+grml@zugschlus.de [20051216 21:15]:
One issue that I find especiall annoying is the fact that grml starts a pump process which is still around when our script runs, and will take down the freshly configured interface after timing out. pump -k will also wait for that timeout, and thus impose a delay in system boot.
Just use the bootoption 'nodhcp' to disable startup of pump.
That would mean that the grml system wouldn't try to obtain an IP address from DHCP in the case that it doesn't find a Debian installation to steal the network config from.
This script also fails if the Debian installation needs special programs to get its connectivity up and if these programs are not available on grml. I didn't even try it yet on a system using my own network init scripts.
I'm even thinking about integrating your code into grml-autoconfig, so you can use it with a new bootoption on every grml version.
You're welcome to do this. Which license do you want it to have? GPL v2 or later?
Greetings Marc

* Marc Haber mh+grml@zugschlus.de [20051217 15:52]:
On Sat, Dec 17, 2005 at 03:20:33PM +0100, Michael Prokop wrote:
- Marc Haber mh+grml@zugschlus.de [20051216 21:15]:
One issue that I find especiall annoying is the fact that grml starts a pump process which is still around when our script runs, and will take down the freshly configured interface after timing out. pump -k will also wait for that timeout, and thus impose a delay in system boot.
Just use the bootoption 'nodhcp' to disable startup of pump.
That would mean that the grml system wouldn't try to obtain an IP address from DHCP in the case that it doesn't find a Debian installation to steal the network config from.
We've to find a way to check whether a network setup works or not. Then it's no problem to reactivate dhcp if "your method" (the /etc/network/interfaces) fails.
This script also fails if the Debian installation needs special programs to get its connectivity up and if these programs are not available on grml. I didn't even try it yet on a system using my own network init scripts.
Ok, I'll check that. thx4info
I'm even thinking about integrating your code into grml-autoconfig, so you can use it with a new bootoption on every grml version.
You're welcome to do this. Which license do you want it to have? GPL v2 or later?
GPL would be great, yes. :)
regards, -mika-

On Sat, Dec 17, 2005 at 04:33:53PM +0100, Michael Prokop wrote:
- Marc Haber mh+grml@zugschlus.de [20051217 15:52]:
That would mean that the grml system wouldn't try to obtain an IP address from DHCP in the case that it doesn't find a Debian installation to steal the network config from.
We've to find a way to check whether a network setup works or not.
Yes. And that is not quite easy.
Then it's no problem to reactivate dhcp if "your method" (the /etc/network/interfaces) fails.
Right. Currently, my script asks pump to buzz off once a /etc/network/interfaces file has been found.
I'm even thinking about integrating your code into grml-autoconfig, so you can use it with a new bootoption on every grml version.
You're welcome to do this. Which license do you want it to have? GPL v2 or later?
GPL would be great, yes. :)
So be it. Hereby licensing the script under GPL v2 or any later version.
Greetings Marc

* Marc Haber mh+grml@zugschlus.de [20051217 16:55]:
On Sat, Dec 17, 2005 at 04:33:53PM +0100, Michael Prokop wrote:
- Marc Haber mh+grml@zugschlus.de [20051217 15:52]:
You're welcome to do this. Which license do you want it to have? GPL v2 or later?
GPL would be great, yes. :)
So be it. Hereby licensing the script under GPL v2 or any later version.
Thanks. Adjusted and added:
,---- [ debian/changelog ] | grml-autoconfig (0.2-20) unstable; urgency=low | | * Added config_debnet (thanks, Marc Haber!). | | -- Michael Prokop mika@grml.org Sat, 17 Dec 2005 18:54:25 +0100 `----
I've tested it already with grml 0.5-3e and the new debnet cheatcode:
http://grml.org/tmp/gkrellShoot_12-17-05_195116.png
works great so far. :)
regards, -mika-
Teilnehmer (2)
-
Marc Haber
-
Michael Prokop