/dev/.initramfs copy state before switch_root
I have pushed the following changes.
* If netboot, copy /tmp/net.* to /dev/.initramfs/. Initscripts of your distribution or NetworkManager can read the files in this location to be aware of prior configured interfaces. A distribution may choose to do something with this information.
* If you specify kernel cmdline "rdcopystate", then all of /tmp/* is copied into /dev/.initramfs/. This could sometimes be useful for post-boot examination or debugging.
* net.<interface name>.lease is written containing the DHCP lease, because dcbw asked for this for NetworkManager. Your own tools could choose to do something with it or not.
TODO:
* We need something to write out a file like /dev/.initramfs/net.eth0.static in the case of a static IP during initrd. I have never used static IP with initrd before. Are there multiple syntaxes to configure static IP? Others have touched this part of the code.
Warren Togami
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Warren Togami
I have pushed the following changes.
* If netboot, copy
/tmp/net.*to/dev/.initramfs/. Initscripts of your distribution or NetworkManager can read the files in this location to be aware of prior configured interfaces. A distribution may choose to do something with this information.* If you specify kernel cmdline "rdcopystate", then all of
/tmp/*is copied into/dev/.initramfs/. This could sometimes be useful for post-boot examination or debugging.* net.<interface name>.lease is written containing the DHCP lease, because dcbw asked for this for NetworkManager. Your own tools could choose to do something with it or not.
That's great, thanks!
Quoted 3 lines
TODO:
* We need something to write out a file like
/dev/.initramfs/net.eth0.staticin the case of a static IP during initrd. I have never used static IP with initrd before. Are there multiple syntaxes to configure static IP? Others have touched this part of the code.
I don't know if this is really necessary. After all, it just a static conf and initscripts can just check if an interface is already up?
Anyway, the syntax to use on the commandline is ip=... See http://apps.sourceforge.net/trac/dracut/wiki/commandline for more information.
As for a file format, why not ask the NetworkManager people what they'd like to have?
Hope that helps
Philippe
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Seewer Philippe
I don't know if this is really necessary. After all, it just a static conf and initscripts can just check if an interface is already up?
NetworkManager or initscripts perhaps cannot differentiate between checking if it is already up immediately at boot-up or if it is run again sometime later. It is really better for dracut to inform the OS explicitly in a uniform manner similar to if dhcp were used.
Quoted 8 lines
Anyway, the syntax to use on the commandline is ip=... See
http://apps.sourceforge.net/trac/dracut/wiki/commandline for more information.As for a file format, why not ask the NetworkManager people what they'd like to have?
Dan, what file format would you prefer?
Warren Togami
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Warren Togami
Quoted 2 lines · Seewer Philippe
I don't know if this is really necessary. After all, it just a static conf and initscripts can just check if an interface is already up?
NetworkManager or initscripts perhaps cannot differentiate between checking if it is already up immediately at boot-up or if it is run again sometime later. It is really better for dracut to inform the OS explicitly in a uniform manner similar to if dhcp were used.
Hmm, but in both cases NetworkManager should just preserve this state. So if no dhcp was involved, reading the actual network state (interface and routes) and preserving them, should be preferred.
Quoted 10 lines
Quoted 9 lines
Anyway, the syntax to use on the commandline is ip=... See
http://apps.sourceforge.net/trac/dracut/wiki/commandline for more information.As for a file format, why not ask the NetworkManager people what they'd like to have?
Quoted 8 lines
Dan, what file format would you prefer?
Warren Togami
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Warren Togami wrote:
[snip]
Quoted 1 line
* net.<interface name>.lease is written containing the DHCP lease, because dcbw asked for this for NetworkManager. Your own tools could choose to do something with it or not.
By the way, why not do this:
---
modules.d/40network/ifup +1 -1
@@ -70,7 +70,7 @@ do_dhcp() { # /sbin/dhclient-script will mark the netif up and generate the online # event for nfsroot # XXX add -V vendor class and option parsing per kernel - dhclient -1 -q -R ${reqs} -pf /tmp/dhclient.$netif.pid -lf /tmp/net.$netif.lease $netif + dhclient -1 -q -R ${reqs} -pf /tmp/dhclient.$netif.pid -lf /dev/.initramfs/net.$netif.lease $netif
}
ip_to_var() {
modules.d/99base/init +0 -0
@@ -35,6 +35,7 @@ mknod /dev/null c 1 3
mknod /dev/ptmx c 5 2
mknod /dev/console c 5 1
mkdir /dev/pts
+mkdir /dev/.initramfs/
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1
# run scriptlets to parse the command line @@ -139,7 +140,6 @@ for x in "$@"; do done
# Copy state
-mkdir /dev/.initramfs/
if getarg rdcopystate; then
cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1
else
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html