Re: di-netboot-assistant - Debian-Installer netboot assistant - Debian

This is a discussion on Re: di-netboot-assistant - Debian-Installer netboot assistant - Debian ; Hi Franklin, On Tuesday 03 June 2008, Franklin PIAT wrote: > I had a small home-made script to retrieve and untar Debian Installer > netboot images. I've just tried this again after installing your package from unstable. This time I ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Re: di-netboot-assistant - Debian-Installer netboot assistant

  1. Re: di-netboot-assistant - Debian-Installer netboot assistant

    Hi Franklin,

    On Tuesday 03 June 2008, Franklin PIAT wrote:
    > I had a small home-made script to retrieve and untar Debian Installer
    > netboot images.


    I've just tried this again after installing your package from unstable.
    This time I got it working, but only after debugging and making some
    adjustments in the configuration. See bottom of mail for my server setup.

    With your documented configuration the client would try to load this file:
    /tftpboot/debian-installer/pxelinux.cfg/01-08-00-27-ec-a0-ee
    I "fixed" that by creating a symlink to default from that filename.

    Next problem was an error because menu.c32 could not be found. Turned out
    that the client was looking for (note the double debian-installer/):
    /tftpboot/debian-installer/debian-installer/pxelinux.cfg/menu.c32
    This I fixed by doing 'ln -s . debian-installer' (symlink to itself).

    So the first problem was that pxelinux.configfile was being ignored. And
    the second problem that a "default" rootdir was being set.

    After following some links on the web I ended up at:
    http://syslinux.zytor.com/pxe.php

    There I found the magic needed to solve both problems, by using the
    following config (line continuation not in original!):
    filename "debian-installer/pxelinux.0";
    site-option-space "pxelinux";
    option pxelinux.magic f1:00:74:7e;
    if exists dhcp-parameter-request-list {
    # Always send the PXELINUX options (specified in hexadecimal)
    option dhcp-parameter-request-list = \
    concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
    }
    option pxelinux.pathprefix "/";
    option pxelinux.configfile "debian-installer/pxelinux.cfg/default";

    With this dhcpd configuration both problems were fixed and I could use
    di-n-a without the workarounds.
    So, two changes:
    - adding the 'if exists dhcp-parameter-request-list' bit
    - overriding the default rootdir by setting pxelinux.pathprefix

    The explanation from that website for the first is:
    The "option dhcp-parameter-request-list" statement forces the DHCP
    server to send the PXELINUX-specific options, even though they are not
    explicitly requested. Since the DHCP request is done before PXELINUX
    is loaded, the PXE client won't know to request them.

    Regarding the pathprefix. I'd actually prefer to use the default that
    seems to be set automatically on the basis of the location of the
    original "filename" option: "debian-installer/". Using that would mean
    that pxelinux.configfile could just be "pxelinux.cfg/default" and that
    the debian-installer prefix could be dropped in all your generated menus.


    I also have a feature request: support for custom images.
    If I build a netboot image locally, I'd like to be able to add it to the
    menu somehow.
    Main thing is that these cannot be added to the di-n-a sources config file
    as there is no download location for them, so I need some way to just
    extract them into place and get them included in the menus.

    I see several options.

    1) I create a custom "top-level" menu file that I specify in the dhcpd
    config and that has as one option to chainload to the di-n-a menu. This
    will work and gives complete freedom but disadvantage is an extra menu
    level and needing to maintain the menu by hand.

    2) The same, but di-n-a learns how to include the custom menu file in the
    menu it generates automatically either by
    - just appending from a separate file, or
    - preserving manually added entries in the file itself (anything after
    some magic markers maybe, as grub does)

    3) I create a "debian-installer/custom" dir with subdirs and di-n-a is
    made smart enough to scan those for images and add them automatically by
    running something like 'di-n-a update'.

    What do you think? Preferably I'd be able to have several alternative
    custom images at the same time.

    Cheers,
    FJP

    # dpkg -l tftpd-hpa dhcp3-server openbsd-inetd
    ||/ Name Version Description
    +++-==============-=============-==========================================
    ii dhcp3-server 3.0.4-13 DHCP server for automatic IP address ass
    ii openbsd-inetd 0.20050402-6 The OpenBSD Internet Superserver
    ii tftpd-hpa 0.43-1.1 HPA's tftp server

    Server is Debian Etch (i386).

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkiF840ACgkQgm/Kwh6ICoQTZwCfWB6LuC92zzELpK6IvpSvdhQO
    de0An0ZCbMwkweEmiLuHLSBqbpP44GIc
    =ajiQ
    -----END PGP SIGNATURE-----


  2. Re: di-netboot-assistant - Debian-Installer netboot assistant

    On Tuesday 22 July 2008, Frans Pop wrote:
    > 2) The same, but di-n-a learns how to include the custom menu file in
    > the menu it generates automatically either by
    > - just appending from a separate file, or
    > - preserving manually added entries in the file itself (anything after
    > some magic markers maybe, as grub does)


    I see that this is already possible by editing the config files in
    /etc/di-n-a. The only thing that seems to be missing is a command to say
    "please rebuild the menu now" to get changes made there included in the
    current menu file without installing/purging some image.

    Also, what is the difference between pxelinux.cfg.HEAD and pxelinux.HEAD ?

    Cheers,
    FJP

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkiF9cEACgkQgm/Kwh6ICoQXGgCgwK4Fl7GOPz9rxK1FsbuLDjzv
    +F8AoJFaA2pqG7v37SeYhA7dyDpV4DR5
    =u+zI
    -----END PGP SIGNATURE-----


  3. Re: di-netboot-assistant - Debian-Installer netboot assistant

    Hello Franklin,

    On Wednesday 23 July 2008, Franklin PIAT wrote:
    > On Tue, 2008-07-22 at 16:49 +0200, Frans Pop wrote:
    > > With this dhcpd configuration both problems were fixed and I could
    > > use di-n-a without the workarounds.


    I have one more issue for you.

    I installed di-n-a on an Etch box (my DNS/DHCP/TFTP server runs stable),
    which means that debian-installer/pxelinux.0 is also taken from stable.
    I also installed a number of images, both stable and testing.

    When netbooting I would get your menu correctly, but after selecting a
    testing install, instead of the D-I syslinux screen I would get a
    completely white display.

    I solved this by copying the pxelinux.0 from the testing image to the
    debian-installer directory. Apparently pxelinux.0 only gets loaded once
    (which makes sense) and thus the one in the debian-installer dir needs to
    be compatible with _all_ the images installed below it.

    One possible solution to this would be to extract the version from
    pxelinux.0 files of images getting installed, check if that version is
    higher than the one of the current file in the debian-installer dir and
    then replace that with the higher version.

    You could for example use this to get the version:
    $ strings pxelinux.0 | \
    sed -rn "/^PXELINUX [.0-9]+/ s/^[^ ]* ([.0-9]+).*/\1/"
    3.71

    > > I also have a feature request: support for custom images.
    > > If I build a netboot image locally, I'd like to be able to add it to
    > > the menu somehow.
    > > Main thing is that these cannot be added to the di-n-a sources config
    > > file as there is no download location for them, so I need some way to
    > > just extract them into place and get them included in the menus.
    > >
    > > I see several options.
    > >
    > > 1) I create a custom "top-level" menu file that I specify in the
    > > dhcpd config and that has as one option to chainload to the di-n-a
    > > menu. This will work and gives complete freedom but disadvantage is
    > > an extra menu level and needing to maintain the menu by hand.

    >
    > By hand... :-(


    One problem with this.

    When I tried that I found that you modify some paths inside downloaded
    images to make them fit inside your structure. This of course does not
    happen for custom built images if they are installed by hand.

    I managed to work around this by using symlinks from within your structure
    to the custom images, while keeping the original paths inside the images.

    I wonder if that might not be a more solid solution also for images that
    are downloaded by di-n-a. In general it's IMO not very nice to change
    things in "external" sources.

    Let me know if you need more info on this. It was a while ago but I should
    be able to reproduce it without too much trouble.

    Cheers,
    FJP

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkjKIn4ACgkQgm/Kwh6ICoS25wCeLSHPgQrOKKLg0QqLWHIhLJUi
    ZmsAn0EhDs5syZU6MII/ZfP/CGUFEN8H
    =YJ/t
    -----END PGP SIGNATURE-----


  4. Re: di-netboot-assistant - Debian-Installer netboot assistant

    Hello Frans,

    On Fri, 2008-09-12 at 10:04 +0200, Frans Pop wrote:
    > On Wednesday 23 July 2008, Franklin PIAT wrote:
    > > On Tue, 2008-07-22 at 16:49 +0200, Frans Pop wrote:
    > > > With this dhcpd configuration both problems were fixed and I could
    > > > use di-n-a without the workarounds.

    >
    > I have one more issue for you.
    >
    > I installed di-n-a on an Etch box (my DNS/DHCP/TFTP server runs stable),
    > which means that debian-installer/pxelinux.0 is also taken from stable.


    Obviously, running stable on the server side is the right thing to do.

    > I also installed a number of images, both stable and testing.


    We can expect that some sysadmins will want to test installing stable+1
    in advance, so I consider this the standard situation too.

    > When netbooting I would get your menu correctly, but after selecting a
    > testing install, instead of the D-I syslinux screen I would get a
    > completely white display.


    >From your point of view is this an RC bug ? (I do)


    > I solved this by copying the pxelinux.0 from the testing image to the
    > debian-installer directory. Apparently pxelinux.0 only gets loaded once
    > (which makes sense) and thus the one in the debian-installer dir needs to
    > be compatible with _all_ the images installed below it.
    >
    > One possible solution to this would be to extract the version from
    > pxelinux.0 files of images getting installed, check if that version is
    > higher than the one of the current file in the debian-installer dir and
    > then replace that with the higher version.
    >
    > You could for example use this to get the version:
    > $ strings pxelinux.0 | \
    > sed -rn "/^PXELINUX [.0-9]+/ s/^[^ ]* ([.0-9]+).*/\1/"
    > 3.71


    Do you think it would be a good idea to use :
    tr -c '[rint:] ' '\n'
    instead of "strings", in order to avoid depending on binutils for
    production servers ? (popcon says that binutils is installed on 87% of
    the systems... but the figure for dhcp/tftp enabled servers is probably
    much lower).

    > > > I also have a feature request: support for custom images.
    > > > If I build a netboot image locally, I'd like to be able to add it to
    > > > the menu somehow.
    > > > Main thing is that these cannot be added to the di-n-a sources config
    > > > file as there is no download location for them, so I need some way to
    > > > just extract them into place and get them included in the menus.
    > > >
    > > > I see several options.
    > > >
    > > > 1) I create a custom "top-level" menu file that I specify in the
    > > > dhcpd config and that has as one option to chainload to the di-n-a
    > > > menu. This will work and gives complete freedom but disadvantage is
    > > > an extra menu level and needing to maintain the menu by hand.

    > >
    > > By hand... :-(

    >
    > One problem with this.
    >
    > When I tried that I found that you modify some paths inside downloaded
    > images to make them fit inside your structure. This of course does not
    > happen for custom built images if they are installed by hand.
    >
    > I managed to work around this by using symlinks from within your structure
    > to the custom images, while keeping the original paths inside the images.


    I still have your request to use local images on my TODO list.

    If you install/extract a boot image manually, I suppose that it would
    work if it were extracted at the top, like :
    /var/lib/tftpboot/debian-installer/i386/pxelinux.0


    > I wonder if that might not be a more solid solution also for images that
    > are downloaded by di-n-a.


    I will need to think about it, but the reason why I need to tweak the
    patch is that the image's version isn't included in the paths. So I have
    to replace:
    kernel debian-installer/i386/linux
    with :
    kernel debian-installer/etch/i386/linux
    or
    kernel debian-installer/lenny/i386/linux
    so I can have the two installed simultaneously.

    I must say that I'm much more comfortable with the way I handle elilo's
    menu.


    > In general it's IMO not very nice to change things in "external" sources.


    Generally speaking, the di-n-a shipped is Lenny is based on a script I
    used for myself. So it tweaks existing etch/lenny images.

    I want something robust for Lenny+1 : Not guessing anything; Don't tweak
    configuration files (except boot arguments), consistent architectures
    handling...

    Regards,

    Franklin


    --
    To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  5. Re: di-netboot-assistant - Debian-Installer netboot assistant

    Hello,

    Since I now have an account on Alioth, I was considering to host it
    there.

    Does "collab-maint/di-netboot-assistant.git" seems fine for you ?

    Franklin


    P.S. I am now subscribed to the list.


    --
    To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  6. Re: di-netboot-assistant - Debian-Installer netboot assistant

    On Friday 12 September 2008, Franklin PIAT wrote:
    > > You could for example use this to get the version:
    > > $ strings pxelinux.0 | \
    > > sed -rn "/^PXELINUX [.0-9]+/ s/^[^ ]* ([.0-9]+).*/\1/"
    > > 3.71

    >
    > Do you think it would be a good idea to use :
    > tr -c '[rint:] ' '\n'
    > instead of "strings", in order to avoid depending on binutils for
    > production servers ? (popcon says that binutils is installed on 87% of
    > the systems... but the figure for dhcp/tftp enabled servers is probably
    > much lower).


    Up to you. strings was just the first thing that came to mind for me.
    There may even be smarter ways to do it. I don't know.

    > I still have your request to use local images on my TODO list.


    I'll leave you to play around with it a bit. It would be nice if custom
    images could be assigned a class though (I mean a similar identification
    to e.g. stable) and if multiple such classes could be used.

    > I want something robust for Lenny+1 : Not guessing anything; Don't
    > tweak configuration files (except boot arguments), consistent
    > architectures handling...


    Yes, there's also always the risk that we'll restructure the location
    where images can be found, so having some kind of configuration file for
    that would be nice.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkjKY3kACgkQgm/Kwh6ICoQV3QCgrzGENCRIZEBxJcMK7TMc4Hm2
    MYsAn3DSIEeTQsHP0+b/jccbhK14MMzi
    =oG95
    -----END PGP SIGNATURE-----


  7. Re: di-netboot-assistant - Debian-Installer netboot assistant

    Franklin PIAT writes:

    > I will need to think about it, but the reason why I need to tweak the
    > patch is that the image's version isn't included in the paths. So I have
    > to replace:
    > kernel debian-installer/i386/linux
    > with :
    > kernel debian-installer/etch/i386/linux
    > or
    > kernel debian-installer/lenny/i386/linux
    > so I can have the two installed simultaneously.
    >
    > I must say that I'm much more comfortable with the way I handle elilo's
    > menu.


    kernel lenny/debian-installer/i386/linux

    Would be a solution no?

    --
    O T A V I O S A L V A D O R
    ---------------------------------------------
    E-mail: otavio@debian.org UIN: 5906116
    GNU/Linux User: 239058 GPG ID: 49A5F855
    Home Page: http://otavio.ossystems.com.br
    ---------------------------------------------
    "Microsoft sells you Windows ... Linux gives
    you the whole house."


    --
    To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  8. Re: di-netboot-assistant - Debian-Installer netboot assistant

    On Friday 12 September 2008, Franklin PIAT wrote:
    > Since I now have an account on Alioth, I was considering to host it
    > there.
    >
    > Does "collab-maint/di-netboot-assistant.git" seems fine for you ?


    Seems fine.

    It could also be added to D-I SVN though and even be built as part of
    Debian Installer, as Joey suggested some time ago [1].

    [1] http://lists.debian.org/debian-boot/.../msg00235.html

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkjKaCUACgkQgm/Kwh6ICoTVDQCeJhW5To0uFJKuQhrV0HMtO9Po
    ZUYAoITNCGZABRWTZafwAs/LxDAzF1kK
    =8GIU
    -----END PGP SIGNATURE-----


  9. Re: di-netboot-assistant - Debian-Installer netboot assistant

    On Fri, 2008-09-12 at 15:01 +0200, Frans Pop wrote:
    > On Friday 12 September 2008, Franklin PIAT wrote:
    > > Since I now have an account on Alioth, I was considering to host it
    > > there.
    > >
    > > Does "collab-maint/di-netboot-assistant.git" seems fine for you ?

    >
    > Seems fine.
    >
    > It could also be added to D-I SVN though and even be built as part of
    > Debian Installer, as Joey suggested some time ago [1].


    That would be fine for me too. What should I do / Who should I ask ?

    Franklin


    --
    To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  10. Re: di-netboot-assistant - Debian-Installer netboot assistant

    On Fri, 2008-09-12 at 09:39 -0300, Otavio Salvador wrote:
    > Franklin PIAT writes:
    >
    > > I will need to think about it, but the reason why I need to tweak the
    > > patch is that the image's version isn't included in the paths. So I have
    > > to replace:
    > > kernel debian-installer/i386/linux
    > > with :
    > > kernel debian-installer/etch/i386/linux
    > > or
    > > kernel debian-installer/lenny/i386/linux
    > > so I can have the two installed simultaneously.
    > >
    > > I must say that I'm much more comfortable with the way I handle elilo's
    > > menu.

    >
    > kernel lenny/debian-installer/i386/linux
    >
    > Would be a solution no?


    IIRC :

    That would only work if the DHCP directly points to :
    lenny/debian-installer/i386/pxelinux.0
    Pxelinux.0 would then fetch it's files, relatively to it's it's own
    location (actually, I think it's the NIC' ROM that would do it).

    The problem with di-n-a's top menu, it's that pxelinux.0 must be at the
    top. Therefore configuration files must be rewritten to add "etch"
    somewhere in the path.


    Franklin


    --
    To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  11. Re: di-netboot-assistant - Debian-Installer netboot assistant

    On Friday 12 September 2008, Franklin PIAT wrote:
    > On Fri, 2008-09-12 at 15:01 +0200, Frans Pop wrote:
    > > On Friday 12 September 2008, Franklin PIAT wrote:
    > > > Since I now have an account on Alioth, I was considering to host it
    > > > there.
    > > >
    > > > Does "collab-maint/di-netboot-assistant.git" seems fine for you ?

    > >
    > > Seems fine.
    > >
    > > It could also be added to D-I SVN though and even be built as part of
    > > Debian Installer, as Joey suggested some time ago [1].

    >
    > That would be fine for me too. What should I do / Who should I ask ?


    I've added you to the project, so you should now have commit access to the
    D-I SVN repository. Please use it only to maintain di-n-a for now.
    I have also created a directory "netboot-assistant" immediately below
    trunk. Please add your code there.
    When you do your first upload from SVN we should also create a tag
    directory.

    I suggest we think about including di-n-a in standard D-I uploads after
    Lenny. For now let's just keep it as a separate package.

    Suggestion: add a 'set -e' in your script so it bails out in case of
    unexpected errors instead of blindly continuing.

    Cheers,
    FJP

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkjP+CUACgkQgm/Kwh6ICoQT3wCgy27EOZ69VsGuo+ep9PB41NwS
    O2sAoK4yitdHn4GM0B2jwbzR/xbSga/6
    =Vk3w
    -----END PGP SIGNATURE-----


+ Reply to Thread