* /dev/.initramfs copy state before switch_root
@ 2009-06-08 21:27 Warren Togami
[not found] ` <4A2D8242.40205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Warren Togami @ 2009-06-08 21:27 UTC (permalink / raw)
To: <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
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
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /dev/.initramfs copy state before switch_root
[not found] ` <4A2D8242.40205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-09 2:58 ` Seewer Philippe
[not found] ` <4A2DCFC3.7010606-omB+W0Dpw2o@public.gmane.org>
2009-06-09 7:37 ` Seewer Philippe
1 sibling, 1 reply; 5+ messages in thread
From: Seewer Philippe @ 2009-06-09 2:58 UTC (permalink / raw)
To: Warren Togami; +Cc: <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Warren Togami wrote:
> 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!
> 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.
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /dev/.initramfs copy state before switch_root
[not found] ` <4A2DCFC3.7010606-omB+W0Dpw2o@public.gmane.org>
@ 2009-06-09 5:18 ` Warren Togami
[not found] ` <4A2DF0B3.8010301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Warren Togami @ 2009-06-09 5:18 UTC (permalink / raw)
To: Dan Williams; +Cc: <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
On 06/08/2009 10:58 PM, Seewer Philippe wrote:
> 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.
>
> 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
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /dev/.initramfs copy state before switch_root
[not found] ` <4A2DF0B3.8010301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-09 6:45 ` Harald Hoyer
0 siblings, 0 replies; 5+ messages in thread
From: Harald Hoyer @ 2009-06-09 6:45 UTC (permalink / raw)
To: Warren Togami
Cc: Dan Williams,
<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
On 06/09/2009 07:18 AM, Warren Togami wrote:
> On 06/08/2009 10:58 PM, Seewer Philippe wrote:
>> 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.
>
>>
>> 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
> wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /dev/.initramfs copy state before switch_root
[not found] ` <4A2D8242.40205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-09 2:58 ` Seewer Philippe
@ 2009-06-09 7:37 ` Seewer Philippe
1 sibling, 0 replies; 5+ messages in thread
From: Seewer Philippe @ 2009-06-09 7:37 UTC (permalink / raw)
To: Warren Togami; +Cc: <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Warren Togami wrote:
[snip]
> * 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:
---
diff --git a/modules.d/40network/ifup b/modules.d/40network/ifup
index de459c3..8280b73 100755
--- a/modules.d/40network/ifup
+++ b/modules.d/40network/ifup
@@ -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() {
diff --git a/modules.d/99base/init b/modules.d/99base/init
index fb1a604..eab923e 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-06-09 7:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 21:27 /dev/.initramfs copy state before switch_root Warren Togami
[not found] ` <4A2D8242.40205-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-09 2:58 ` Seewer Philippe
[not found] ` <4A2DCFC3.7010606-omB+W0Dpw2o@public.gmane.org>
2009-06-09 5:18 ` Warren Togami
[not found] ` <4A2DF0B3.8010301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-09 6:45 ` Harald Hoyer
2009-06-09 7:37 ` Seewer Philippe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.