Mail archive
alpine-devel

Re: [alpine-devel] initrd and kernel-mode DHCP

From: Hugo Landau <hlandau_at_devever.net>
Date: Wed, 10 Apr 2013 05:27:00 +0100

I now have a modified mkinitfs init script which can be used to PXE boot
successfully to userspace using an HTTP server as the apk repository.
The remaining difficulties are making modloop work, and getting overlays
working (I haven't tested this yet).

My understanding is mdev executes shell scripts on certain events, and
many of these scripts call modprobe. Thus, the modloop filesystem needs
to be available perpetually after booting. modprobe, etc. aren't exactly
suited to loading modules over HTTP; some way of doing this could
probably be found but it would be quite against the flow of the system.

This leaves a few possibilities, such as downloading a squashfs image
into memory, which isn't too great, or using NFS, which is better. I'd
like to split the "alpine_dev" argument into "alpine_dev" and
"alpine_repo". alpine_dev would, as now, specify a filesystem
(optionally NFS), for use by things that require a filesystem interface
(modprobe). alpine_repo would specify a line for /etc/apk/repositories.
These are quite different functions and should probably be untied.
Compatibility can be preserved by ensuring that alpine_dev is processed
as it currently (search for .boot_repository on alpine_dev) if
alpine_repo is omitted - this has the side effect of allowing NFS to be
used for apk as well. ovl_dev could specify an HTTP URL for an apkovl
file or a device as usual.

As an example, a PXE-booting system would have a command line of
something like:
alpine_dev=nfs:IP:EXPORT alpine_repo=http://nl.alpinelinux.org/...
ovl_dev=http://.../foo.apkovl.tar.gz
No pre-existing command line would be adversely affected.

After this is all done the only remaining obstacle should be some slight
changes to the modloop init script to make it understand NFS alpine_dev.

Hugo Landau



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Apr 10 2013 - 05:27:00 UTC