• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    booting from non-native(dot1q) VLAN

    Scheduled Pinned Locked Moved
    General Problems
    3
    17
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • george1421G
      george1421 Moderator @Gribbly
      last edited by george1421

      @Gribbly said in booting from non-native(dot1q) VLAN:

      I’ll go back to my pxe ubuntu install

      How are you doing this? This method supports vlan tagging? Can you load a custom bzImage (linux kernel) and inits with this method?

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      1 Reply Last reply Reply Quote 0
      • G
        Gribbly
        last edited by

        I am able to load the Ubuntu Installer Kernel, which has VLAN support. Using the Expert configuration, it gives me the ability to configure a VLAN ID.

        george1421G 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @Gribbly
          last edited by

          @Gribbly Well then let me see what I can do. The vlid in question is 2223? This sounds just challenging enough to pique my interest to see if I can do it.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          G 1 Reply Last reply Reply Quote 0
          • G
            Gribbly @george1421
            last edited by

            @george1421

            Yes sir, i’m using VLAN_ID 2223 here.

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Gribbly
              last edited by

              @Gribbly OK let me recompile the FOS kernel and then I’ll load it into by debug environment in the AM. I should know pretty quickly if I can get vlan tagging to work.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              G 1 Reply Last reply Reply Quote 0
              • G
                Gribbly @george1421
                last edited by

                @george1421 Thank you! Please let me know if you need any more info or for me to test anything here!

                george1421G 2 Replies Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Gribbly
                  last edited by george1421

                  @Gribbly Ok I have a working solution on the FOS/linux side. Below is the grub configuration needed to boot FOS from a USB drive. You will need to take this information and integrate it into your environment.

                  The new FOS kernels and inits are bzImageVLAN and vlinit.xz that will be used to boot FOS. Since you don’t have the tight integration with iPXE the grub there are different kernel parameters for different actions that FOG takes. You shall see the examples of these below. The only thing you really have to remember is that when you go to image with FOG using this method you MUST schedule the task first in the web ui before pxe booting the target computer and selecting #1 from the grub menu.

                  set myfogip=192.168.1.50
                  set myimage=/boot/bzImageVLAN
                  set myinits=/boot/vlinit.xz
                  set myloglevel=4
                  set timeout=-1
                  insmod all_video
                  
                  menuentry "1. FOG Image Deploy/Capture" {
                   echo loading the kernel
                   linux  $myimage loglevel=$myloglevel initrd=vlinit.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ boottype=usb consoleblank=0 rootfstype=ext4 vlan=2223
                   echo loading the virtual hard drive
                   initrd $myinits
                   echo booting kernel...
                  }
                  
                  menuentry "2. Perform Full Host Registration and Inventory" {
                   echo loading the kernel
                   linux  $myimage loglevel=$myloglevel initrd=vlinit.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ boottype=usb consoleblank=0 rootfstype=ext4 mode=manreg vlan=2223
                   echo loading the virtual hard drive
                   initrd $myinits
                   echo booting kernel...
                  
                  menuentry "3. Quick Registration and Inventory" {
                   echo loading the kernel
                   linux  $myimage loglevel=$myloglevel initrd=vlinit.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ boottype=usb consoleblank=0 rootfstype=ext4 mode=autoreg vlan=2223
                   echo loading the virtual hard drive
                   initrd $myinits
                   echo booting kernel...
                  }
                  
                  menuentry "4. Client System Information (Compatibility)" {
                   echo loading the kernel
                   linux  $myimage loglevel=$myloglevel initrd=vlinit.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ boottype=usb consoleblank=0 rootfstype=ext4 mode=sysinfo vlan=2223
                   echo loading the virtual hard drive
                   initrd $myinits
                   echo booting kernel...
                  }
                  
                  menuentry "6. FOG Debug Kernel" {
                   echo loading the kernel
                   linux  $myimage loglevel=7 init=/sbin/init root=/dev/ram0 rw ramdisk_size=127000 keymap= boottype=usb consoleblank=0 rootfstype=ext4 mdraid=true isdebug=yes vlan=2223
                   echo loading the virtual hard drive
                   initrd $myinits
                   echo booting kernel...
                  }
                  
                  

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator @Gribbly
                    last edited by

                    @Gribbly Look at the forum chat bubble for a few additional hints.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                    1 Reply Last reply Reply Quote 0
                    • george1421G
                      george1421 Moderator
                      last edited by

                      Ok after a lengthy discussion in chat we have a working solution with the updated bzImageVLAN and the patched vlinit.xz files. Since ipxe WAS getting an ip address in this configuration we could avoid all of the syslinux configuration stuff and just go into FOG and update the kernel and init with the new names, then under kernel args add in vlan=2223. The OP setup a debug task on the FOG server and pxe booted into FOS. FOS picked up the right IP address on the vlan and we are golden. The OP was going to try to image using this setup, but since FOS got the right IP address the reset should be just normal fog stuff.

                      @Developers While this is a fringe (one-off) case, I don’t see any real value in integrating it into the FOG kernels, but I’ll document it here.

                      1. I added the vlan support by Networking support->Networking options-> 802.1Q/802.1ad VLAN Support then recompiled the kernel.
                      2. I unpacked the current inits with the guidance from here: https://wiki.fogproject.org/wiki/index.php/Modifying_the_Init_Image
                      3. I updated the /etc/init.d/S40network startup script by adding
                      # At the top
                      . /usr/share/fog/lib/funcs.sh
                      vlid="$vlan"
                      
                      #then in the ifaces loop
                          echo "Starting $iface interface and waiting for the link to come up"
                      
                          if [ -z "$vlid" ]; then
                              echo -e "auto $iface\niface $iface inet dhcp\n\n" >> /etc/network/interfaces
                          else
                              echo -e "auto $iface\niface $iface inet manual\n\n" >> /etc/network/interfaces
                              echo -e "auto $iface.$vlid\niface $iface.$vlid inet dhcp\n    vlan-raw-device $iface\n\n" >> /etc/network/interfaces
                              echo "Waiting for physical adapter to be ready"
                              /sbin/ip link set $iface up
                              sleep 10
                              echo "Assigning vlan $vlid to interface $iface"
                              vconfig add $iface $vlid
                              iface="$iface.$vlid"
                          fi
                          echo "Brining up network interface $iface"
                          /sbin/ip link set $iface up
                      
                          # Wait till the interface is fully up and ready (spanning tree)
                      
                      1. Then I repacked the inits and sent them with the bzImageVLAN kernel to the OP for testing.

                      With this method I added a new kernel parameter called vlan which sets the proper vlan and brings up that interface. The only caveat with this code is that if there are multiple interfaces that defined VLAN will be created on each interface until it finds one that works.

                      Here is the patched S40network startup script.
                      S40network.txt

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                      1 Reply Last reply Reply Quote 2
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        @george1421 Nice work George!!

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        149

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project