mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: initramfs <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Warren Togami <wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: dracut network
Date: Mon, 18 May 2009 16:10:55 +0200	[thread overview]
Message-ID: <4A116C6F.1020509@redhat.com> (raw)

fixed the dracut network module in
git://dracut.git.sourceforge.net/gitroot/dracut

if you boot with "ip=dhcp", /net.<iface>.dhcpopts will contain 
new_root_path=<dhcp root path option> in the initrd root.

Next steps:
- add NFS root mount to the dracut initrd
- add NFS to the server with the test/root.ext2 loop mounted and exported
- add a proper testsuite structure

Tested with:

$ sudo ./test/make-server-root

which creates test/server.ext2 with a dnsmasq dhcp/dns server

To start the server:

$ sudo qemu-kvm -hda test/server.ext2 -m 256M \
      -net nic,macaddr=52:54:00:12:34:56 \
      -net socket,mcast=230.0.0.1:1234 \
      -kernel /boot/vmlinuz-$(uname -r) \
      -initrd test/initramfs.testing  \
      -append "root=/dev/sda rw"

Create the client image:

$ sudo ./dracut -c test/dracut.conf.test -l -f test/initramfs.testing

Then start the client

$ sudo qemu-kvm  -m 256M -nographic \
    -net nic,macaddr=52:54:00:12:34:57 \
    -net socket,mcast=230.0.0.1:1234  \
    -kernel /boot/vmlinuz-$(uname -r) \
    -initrd test/initramfs.testing \
    -append "ip=dhcp rw console=ttyS0,115200n81"

eth0: link up, 100Mbps, full-duplex, lpa 0x05E1
Bug in initramfs /init detected. Dropping to a shell. Good luck!
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.0# cat /net.eth0.dhcpopts
new_broadcast_address='192.168.1.255'
new_dhcp_lease_time='604800'
new_dhcp_message_type='5'
new_dhcp_rebinding_time='529200'
new_dhcp_renewal_time='302400'
new_dhcp_server_identifier='192.168.1.1'
new_domain_name='test.net'
new_domain_name_servers='192.168.1.1'
new_expiry='1243260313'
new_ip_address='192.168.1.100'
new_network_number='192.168.1.0'
new_root_path='192.168.1.1:/mnt/root'
new_routers='192.168.1.1'
new_subnet_mask='255.255.255.0'


To exit qemu, press <ctrl-a> <c> <return>

sh-4.0#
(qemu) quit

--
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

                 reply	other threads:[~2009-05-18 14:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A116C6F.1020509@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox