[go: up one dir, main page]

Menu

#3 Formal support for PXELINUX boot / install

Bering-uClibc 5.1.0
assigned
None
Buildimage
minor
4.0-beta1
enhancement
2011-10-04
2010-10-19
No

For a machine which has no floppy disk or CD-ROM drive it will be convenient to be able to boot and / or install Bering-uClibc 4.x using PXELINUX (boot over the network).
The developments required to support this are:
1. Extend buildimage.pl to generate a .tar.gz file to install on the PXE (TFTP) server. This will need to include "pxelinux.0" (from the syslinux source package) in addition to the kernel, initrd, .lrp and other files.
2. Modify "linuxrc" (actually /init on a running system) to download leaf.cfg and the
.lrp files using TFTP instead of loading these from local media. (Need to change the format of PKGPATH?)
3. Optionally provide a facility to write the downloaded files to local Compact Flash or similar media so that subsequent boots will be from that local media rather than using PXE. Also need to be able to partition, format and "syslinux" the local media.
4. Optionally provide a facility to upload configdb.lrp and moddb.lrp to a TFTP server for full diskless operation (machine always boots using PXE).

A key objective should be to permit a PC Engines ALIX or similar machine to have Bering-uClibc installed without physical access to the machine.

See also http://leaf.sourceforge.net/doc/buci-ide3.html#id3226960

Discussion

  • david M brooke

    david M brooke - 2010-11-28

    A small part of Step 1 is now complete, in as much as the buildimage.pl script recognizes "pxelinux" as a build image type.

     
  • Per Sjöholm

    Per Sjöholm - 2010-12-01
    • cc taspts added

    We could provide a leaf version as an application for use in Qemu or virtualbox that can act as an PXE server with script for installing on target.

    The same application could also install itself locally.

    This would bypass the problem with using disk.img that lacks ioctl and different media having different metrics.

     
  • david M brooke

    david M brooke - 2011-02-06

    While it is essential to use TFTP for the very first step - downloading pxelinux.0 (or gpxelinux.0) and its configuration file - it is not essential to use TFTP for all of the subsequent downloads.
    By using gpxelinux.0 either HTTP or FTP can be used to download the kernel and initrd.
    Then, for downloading leaf.cfg and the Package .lrp files, any sensible file transfer mechanism can be used:

    • FTP
    • HTTP(S)
    • SSH (or rather scp / sftp)
    • NFS
    • CIFS ?

    Basically all that we need is to establish network connectivity when running "init" and to provide the relevant file transfer client software for the chosen protocol.

    We should try to support as many of these file transfer protocol options as is practical, with some simple means of specifying which one should be used. Other distributions (e.g. http://www.minimyth.org/) do this by using a "URL" format for the path. For example we might choose to support:

    • tftp://server/directory/
    • http://server/directory/
    • ssh://user@server:directory/
    • dev:///dev/sda1:vfat (the current LEAFCFG and PKGPATH standard with "dev://" prepended)
     
  • david M brooke

    david M brooke - 2011-02-06
    • milestone changed from Bering-uClibc 4.0.1 to Bering-uClibc 4.1

    Provisionally allocated to Milestone 4.1

     
  • david M brooke

    david M brooke - 2011-02-20

    Seems that "curl" might be a good option for the file download (and upload) rather than using multiple different file transfer protocol clients. It supports lots of good protocols:

    • TFTP
    • HTTP(S)
    • FTP(S)
    • SSH (actually SCP and SFTP) when linked against "libssh2"
    • FILE (i.e. <file: dir1="" dir2="" file=""> for a local file) </file:>

    and several more email-related protocols (e.g. SMTP, IMAP, POP3)

    I have a "curl" package in development (for "asterisk" as it happens). Sounds like it might be a useful utility to have available anyway.

     
  • david M brooke

    david M brooke - 2011-02-28
    • owner set to davidmbrooke
    • status changed from new to assigned

    I am making some progress on this and now have PXE boot working on a development system.
    The basic requirements are:

    • Add files to a special PXE initrd.lrp: network card driver .ko's, DHCP client. "ip" command, file transfer client etc.
    • Change /init (root.linuxrc) to bring up the network if requested (it looks for a kernel command-line parameter) and to accept an alternative style of LEAFCFG and PKGPATH (e.g. http://1.2.3.4/path/leaf.cfg) in addition to the existing /dev/sda1:vfat format.
      • I want to retain a single /init script, so that we don't have to maintain two copies. The downside is that we need to change the existing /init script, which carries some risk of breaking current operations.
      • Not sure whether this is too risky to try to include in 4.0-beta3 and hence 4.0. I will review the changes and make a judgement.
    • Some minor changes to buildimage.pl and the creation of buildimage.cfg files for PXELINUX images.

    Automatically saving back changes over the network is more complicated so I propose to leave that for later.

    There are some more design decisions to make:

    • Which file transfer client to use. "curl" is working OK for me in development, and it is very flexible, but it is quite large. Maybe OK to ship that by default - users can always edit initrd.lrp and replace curl with something else.
    • What set of network card drivers to include by default.
     
  • KP Kirchdörfer

    KP Kirchdörfer - 2011-10-04
    • milestone changed from Bering-uClibc 4.1 to Bering-uClibc 4.2
     

Log in to post a comment.