• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. pacman366
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Best 2
    • Controversial 0
    • Groups 0

    pacman366

    @pacman366

    3
    Reputation
    2
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    pacman366 Unfollow Follow

    Best posts made by pacman366

    • RE: 20.04 autoinstall

      @londonfog I’ve also gotten autoinstall to work with the following imgargs

      imgargs vmlinuz initrd=initrd root=/dev/ram0 ramdisk_size=1800000 ip=dhcp url=http://172.16.13.3/ubuntu-20.04.1-live-server-amd64.iso net.ifnames=0 autoinstall ds=nocloud-net;s=http://172.16.13.3/2004/ ro
      boot
      

      172.16.13.3 is my fog servers ip address, emphasis on this string

      autoinstall ds=nocloud-net;s=http://172.16.13.3/2004/
      

      That part of the sting tells subiquity were to find the user-data and the meta-data files. http://172.16.13.3/2004/user-data has the yaml containing all the autoinstall parameters, http://172.16.13.3/2004/meta-data is just a blank file. Both files need to exist in order for subiquity to perform an autoinstall. subiquity is also extremely strict about the formatting of the yaml within the user-data file. I found this out when attempting to copy/paste another user-data example from the internet only to crash the live installer. I had to hand write all the parameters in user-data in order for it all to work. this is what my user-data file looks like.

      #cloud-config
      autoinstall:
        interactive-sections:
          - storage
        apt:
          geoip: true
          preserve_sources_list: false
          primary:
          - arches: [amd64, i386]
            uri: http://us.archive.ubuntu.com/ubuntu
          - arches: [default]
            uri: http://ports.ubuntu.com/ubuntu-ports
        identity: {hostname: 69changeme69, password:  PASSWORD HASH,
          realname: companyadmin, username: companyadmin}
        keyboard: {layout: us, toggle: null, variant: ''}
        locale: C
        network:
          ethernets:
            eth0: {dhcp4: true, dhcp-identifier: mac}
          version: 2
        ssh:
          allow-pw: true
          authorized-keys: []
          install-server: true
        packages:
          - ubuntu-desktop
          - landscape-client
          - openjdk-8-jdk
          - libpwquality-tools
          - wpasupplicant
          - python
          - python-dbus
          - python-argparse
        late-commands:
          - | cat <<EOT >> /target/lib/systemd/system/postinstall.service
            [Unit]
            Wants=network-online.target
            [Service]
            Type=oneshot
            ExecStart=/opt/postinstall.sh
            RemainAfterExit=true
            [Install]
            WantedBy=multi-user.target
            EOT
          - systemctl daemon-reload
          - wget http://172.16.13.3/2004/postinstall.sh -P /target/opt/
          - chmod +x /target/opt/postinstall.sh
          - echo 'companyadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/companyadmin
        version: 1
      

      This installs mostly automatic. I have mine set to prompt for partitioning. Hope this helps

      posted in General Problems
      P
      pacman366
    • RE: 20.04 autoinstall

      I wasn’t able to get 20.04 to pxe boot using the traditional nfs methods outlined in these forums. I did get it booting with the new 20.04 approach. I copied ubuntu-20.04-live-server-amd64.iso to /var/www, mounted the iso, copied the kernel and initrd from the iso to /tftpboot/os/ubuntu/Server20.04/ and create the following menu entry using these parameters

      kernel tftp://${fog-ip}/os/ubuntu/Server20.04/vmlinuz
      initrd tftp://${fog-ip}/os/ubuntu/Server20.04/initrd
      imgargs vmlinuz initrd=initrd root=/dev/ram0 ramdisk_size=1800000 ip=dhcp url=http://172.16.13.3/ubuntu-20.04-live-server-amd64.iso ro
      boot
      

      One note when using this method, it only works on systems with >= 4G ram because it loads the whole iso into ram. Otherwise it works pretty well for me. Desktop and Mint variants of 20.04 also boot using this method.

      posted in General Problems
      P
      pacman366

    Latest posts made by pacman366

    • RE: 20.04 autoinstall

      @londonfog I’ve also gotten autoinstall to work with the following imgargs

      imgargs vmlinuz initrd=initrd root=/dev/ram0 ramdisk_size=1800000 ip=dhcp url=http://172.16.13.3/ubuntu-20.04.1-live-server-amd64.iso net.ifnames=0 autoinstall ds=nocloud-net;s=http://172.16.13.3/2004/ ro
      boot
      

      172.16.13.3 is my fog servers ip address, emphasis on this string

      autoinstall ds=nocloud-net;s=http://172.16.13.3/2004/
      

      That part of the sting tells subiquity were to find the user-data and the meta-data files. http://172.16.13.3/2004/user-data has the yaml containing all the autoinstall parameters, http://172.16.13.3/2004/meta-data is just a blank file. Both files need to exist in order for subiquity to perform an autoinstall. subiquity is also extremely strict about the formatting of the yaml within the user-data file. I found this out when attempting to copy/paste another user-data example from the internet only to crash the live installer. I had to hand write all the parameters in user-data in order for it all to work. this is what my user-data file looks like.

      #cloud-config
      autoinstall:
        interactive-sections:
          - storage
        apt:
          geoip: true
          preserve_sources_list: false
          primary:
          - arches: [amd64, i386]
            uri: http://us.archive.ubuntu.com/ubuntu
          - arches: [default]
            uri: http://ports.ubuntu.com/ubuntu-ports
        identity: {hostname: 69changeme69, password:  PASSWORD HASH,
          realname: companyadmin, username: companyadmin}
        keyboard: {layout: us, toggle: null, variant: ''}
        locale: C
        network:
          ethernets:
            eth0: {dhcp4: true, dhcp-identifier: mac}
          version: 2
        ssh:
          allow-pw: true
          authorized-keys: []
          install-server: true
        packages:
          - ubuntu-desktop
          - landscape-client
          - openjdk-8-jdk
          - libpwquality-tools
          - wpasupplicant
          - python
          - python-dbus
          - python-argparse
        late-commands:
          - | cat <<EOT >> /target/lib/systemd/system/postinstall.service
            [Unit]
            Wants=network-online.target
            [Service]
            Type=oneshot
            ExecStart=/opt/postinstall.sh
            RemainAfterExit=true
            [Install]
            WantedBy=multi-user.target
            EOT
          - systemctl daemon-reload
          - wget http://172.16.13.3/2004/postinstall.sh -P /target/opt/
          - chmod +x /target/opt/postinstall.sh
          - echo 'companyadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/companyadmin
        version: 1
      

      This installs mostly automatic. I have mine set to prompt for partitioning. Hope this helps

      posted in General Problems
      P
      pacman366
    • RE: 20.04 autoinstall

      I wasn’t able to get 20.04 to pxe boot using the traditional nfs methods outlined in these forums. I did get it booting with the new 20.04 approach. I copied ubuntu-20.04-live-server-amd64.iso to /var/www, mounted the iso, copied the kernel and initrd from the iso to /tftpboot/os/ubuntu/Server20.04/ and create the following menu entry using these parameters

      kernel tftp://${fog-ip}/os/ubuntu/Server20.04/vmlinuz
      initrd tftp://${fog-ip}/os/ubuntu/Server20.04/initrd
      imgargs vmlinuz initrd=initrd root=/dev/ram0 ramdisk_size=1800000 ip=dhcp url=http://172.16.13.3/ubuntu-20.04-live-server-amd64.iso ro
      boot
      

      One note when using this method, it only works on systems with >= 4G ram because it loads the whole iso into ram. Otherwise it works pretty well for me. Desktop and Mint variants of 20.04 also boot using this method.

      posted in General Problems
      P
      pacman366