How can I pass kernel arguments via PXE to an Ubuntu-like OS installer ISO?

7,389

Solution 1

Altering the append with desired parameters definitely won't help from PXELINUX in this setup, as the boot disk has its own ISOLINUX handling the kernel boot.

Two ways to fix this.

The simpler option: extract the ISO, modify the isolinux/isolinux.cfg file's append line with the needed boot arguments, re-pack the ISO. Have PXELINUX chain to the modified ISO.

The more complex (but possibly better, as it removes the chaining) option: instead of using memdisk to boot into the ISO, directly boot in the same way that the ISO's ISOLINUX would be doing.

Edit: clearer steps for booting to the OS within the ISO:

  • Extract the ISO to /tftpboot/quantastore
  • Copy the file preseed/quantastor.seed from the extracted ISO to the web root of an HTTP service running on your PXE server so that it's available at http://172.30.27.5/quantastor.seed
  • Change your pxelinux.cfg/default file to boot directly to the extracted contents of the ISO. Remove the current LABEL QuantaStor and replace with:

    LABEL QuantaStor
      menu label QuantaStor
      kernel quantastor/install/vmlinuz
      append preseed/url=http://172.30.27.5/quantastor.seed locale=en_US.UTF-8 keyboard-configuration/layoutcode=us initrd=quantastor/install/initrd.gz ramdisk_size=16384 nodmraid acpi=off root=/dev/ram vga16fb.modeset=0 rw quiet
    

This should get a successful install for the most part, but the commands that QuantaStor runs at the end of the install will fail since they're looking directly for /cdrom. From the quantastor.seed file:

 d-i preseed/late_command string mkdir -p /target/lib/plymouth/themes/quantastor; \
 chroot /target echo "creating package dirs, setting up splash screens" >> /var/log/qs_install.log; \
 mkdir /target/qs-pkgs; \
 mkdir -p /target/qs-pkgs/drivers; \
 mkdir -p /target/opt/osnexus/quantastor/raid-tools; \
 cp /cdrom/finisher/raid-tools/* /target/opt/osnexus/quantastor/raid-tools; \
 cp /cdrom/finisher/deb/*.deb /target/qs-pkgs; \
 cp /cdrom/finisher/qs_preseed.sh /target/qs-pkgs; \
 cp /cdrom/finisher/drivers/* /target/qs-pkgs/drivers; \
 cp /cdrom/finisher/splash/* /target/lib/plymouth/themes/quantastor; \
 cp /cdrom/finisher/osnexus.gpg /target/qs-pkgs; \
 cp /cdrom/finisher/osnexus.list /target/etc/apt/sources.list.d/osnexus.list; \
 cp /cdrom/finisher/rc.local /target/etc/rc.local; \
 cp /cdrom/finisher/qs_runonce.sh /target/etc/qs_runonce.sh; \
 chroot /target /qs-pkgs/qs_preseed.sh

Probably just run that stuff manually after the install completes the first time around (removing the /target stuff) - if it's working other that that, we can adapt these commands to put their stuff in place without depending on the CD being in the drive.

Solution 2

Type it "blind"?

Hit Enter as soon as the (garbled) language selection appears, since it times out quickly.

Then tap F6, Esc, type in vga16fb.modeset=0 and press Enter.

You were probably missing the need to hit Esc right after F6.

Share:
7,389

Related videos on Youtube

ewwhite
Author by

ewwhite

Updated on September 18, 2022

Comments

  • ewwhite
    ewwhite almost 2 years

    I'm in a tough situation in which I need to perform a remote installation of a QuantaStor (Ubuntu-based - hiss) appliance onto hardware with limited out-of-band access functionality.

    The target system is an HP ProLiant DL180 G6 server, which has a fully-licensed Lights-Out LO100i remote KVM. This is a big step down from the ILO3 or ILO4 management processors. The challenge with this hardware is that the LO100i's virtual media functions are not reliable. As Java releases have progressed, this ILO has become less useful. Right now, I cannot get the system to boot via the remote media, even though this function worked well in the past.

    So my next step was to attempt to PXE boot this server using the QuantaStor ISO image. Oddly, there are a number of conflicting accounts of how one can PXE boot an ISO image directly without chaining boot loaders, etc. After some experimentation, I found that I could boot an ISO using memdisk through the PXE server. I control the DNS and DHCP in this environment, so I went the standard route of modifying the /etc/dhcpd.conf configuration file to reflect:

    # Begin temporary PXE boot
    allow booting;
    allow bootp;
    option option-128 code 128 = string;
    option option-129 code 129 = text;
    next-server 172.30.27.5;
    filename "/pxelinux.0";
    # End temporary PXE boot
    

    For my PXE config, I set /tftpboot/pxelinux.cfg/default to:

    default menu.c32
    prompt 0
    timeout 300
    ONTIMEOUT local
    
    MENU TITLE PXE Menu
    
    LABEL QuantaStor
            MENU LABEL QuantaStor
            KERNEL memdisk
            APPEND iso initrd=images/osn_quantastor_v3.8.2.5441.iso raw
    

    Together, these features allowed me to get the system to begin booting the ISO. Unfortunately, the remote KVM's console produced the following garbled video output:

    enter image description here

    The appliance's installation screen should look like this:

    enter image description here

    Several reboots and after some basic research, I discovered that the LO100 remote KVM shares this framebuffer symptom with some Supermicro IPMI boards. The workaround is to pass vga16fb.modeset=0 to the boot arguments. This is unique to Ubuntu (sigh).

    How can I get this statement into the argument line of the PXE-booted ISO?

    Where should I add the statement?

    Attempts to do so in the "APPEND" line of the /tftpboot/pxelinux.cfg/default don't seem to help. The Ubuntu hints suggest adding the line by pressing F6 at the ISO boot screen. My remote KVM is garbled by that point, and I'm not able to add it manually.

    Any ideas?


    Update:

    I extracted the ISO and modified the isolinux.cfg file to change the installer's frame buffer support on the kernel APPEND line. The system boots and the installer appears to work... except I now receive an error about the CDROM. I'm assuming my PXE method is incorrect.

    What is the proper way to use an ISO over PXE in this context?

    enter image description here

  • ewwhite
    ewwhite over 10 years
    I tried to match the timing here and do this along with a working install. I somehow ended up at a Busybox prompt on the installer side. The key sequence seems to have been close, but the screen is so garbled that I can't tell what's going on. I may be getting a different message/menu here than what's appearing on a healthy installation.
  • Michael Hampton
    Michael Hampton over 10 years
    I downloaded that very ISO and tried it myself in order to write this answer. So you've definitely got something very strange going on.
  • ewwhite
    ewwhite over 10 years
    I can almost make out some of the menus, as I can clearly see a box with an "OK" and possibly another dialog with a "Back" and "Next". Nothing seems to progress, though. I'm amazed at the messiness of this on the hardware and OS sides.
  • Michael Hampton
    Michael Hampton over 10 years
    That's standard Ubuntu. They don't care much for making the console work on even a wide variety of hardware, let alone a wide variety of server hardware; it's done this sort of thing for years.
  • ewwhite
    ewwhite over 10 years
    Hmmm, I'm not sure how to convert a preseed installation from CDROM to URL-based. That's what I'm running into at the moment. I'm tempted to rework the ISO.
  • ravi yarlagadda
    ravi yarlagadda over 10 years
    @ewwhite Just need to host the preseed file on an HTTP server (preseed/quantastor.seed in the ISO) and point to it with preseed/url in your append line in PXELINUX (after pointing to the kernel and initrd files from the ISO that are now in your TFTP root). But fiddling with the one file in the ISO is a lot simpler.
  • ravi yarlagadda
    ravi yarlagadda over 10 years
    @ewwhite Oh, nevermind, saw your update. Might be that the memdisk method won't work right for this installer.. I guess maybe try fiddling with the direct boot method.
  • ewwhite
    ewwhite over 10 years
    Any idea on how to properly PXEboot an ISO?
  • ravi yarlagadda
    ravi yarlagadda over 10 years
    @ewwhite See edit, let's give that a try and see where it gets us..
  • ewwhite
    ewwhite over 10 years
    Thanks. I had to give up and have someone go to the server with a proper CDROM drive and step through the installation the normal way. Defeat, but I've never had an installation be this much of a hassle.
  • ewwhite
    ewwhite over 10 years
    So, are you saying Ubuntu is bad news?