Ubuntu 22.04 Installation with UEFI mode

Problem:
I already installed Ubuntu 22.04 with BIOS/Legacy mode.
I want to install Ubuntu 22.04 with UEFI mode.

I tried alot but UEFI templates available on Foreman, but I am unable to install Ubuntu 22.04 with UEFI mode. I already go through the Foreman doc, but I didn’t find much info on UEFI mode installation.
Expected outcome:
Request you to please provide the complete steps alongwith template names which will help me installtion Ubuntu 22.04 using UEFI mode.

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:

** Foreman Version: **

OS: debian
RELEASE: bullseye/sid
FOREMAN: 3.7.1
RUBY: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
PUPPET: 7.28.0

Hi,

There is the storage part of my Ubuntu 22 template which works fine.
The ROOTDEV chain is replace by a early-command.

  storage:
    config:
# Partition table
<%- if @host.pxe_loader.include?('UEFI') -%>
    - { type: disk, path: /dev/ROOTDEV, ptable: gpt, wipe: superblock-recursive, preserve: false, name: '', grub_device: false, id: disk-sda }
    - { type: partition, number: 1, device: disk-sda, size: 512M, wipe: superblock, flag: boot, preserve: false, grub_device: true, id: part-efi }
    - { type: format, fstype: fat32, volume: part-efi, preserve: false, id: format-efi }
    - { type: partition, number: 2, device: disk-sda, size: 2G, wipe: superblock, flag: '', preserve: false, grub_device: false, id: part-boot }
    - { type: format, fstype: ext4, volume: part-boot, preserve: false, id: format-boot }  
    - { type: partition, number: 3, device: disk-sda, size: -1, wipe: superblock, flag: '', preserve: false, grub_device: false, id: part-vg00 }
<% else -%>
    - { type: disk, path: /dev/ROOTDEV, ptable: msdos, wipe: superblock-recursive, preserve: false, name: '', grub_device: true, id: disk-sda }
    - { type: partition, number: 1, device: disk-sda, size: 2G, wipe: superblock, flag: boot, preserve: false, grub_device: false, id: part-boot }
    - { type: format, fstype: ext4, volume: part-boot, preserve: false, id: format-boot }  
    - { type: partition, number: 2, device: disk-sda, size: -1, wipe: superblock, flag: '', preserve: false, grub_device: false, id: part-vg00 }  
<% end -%>
<%- if host_param_true?('crypt') -%>
    - { type: dm_crypt, volume: part-vg00, key: <%= crypt_pass %>, preserve: false, id: dm_crypt-0 }
    - { type: lvm_volgroup, name: vg00, devices: [ dm_crypt-0 ], preserve: false, id: lvm_vg00 }
<% else -%>
    - { type: lvm_volgroup, name: vg00, devices: [ part-vg00 ], preserve: false, id: lvm_vg00 }
<% end -%>
    - { type: lvm_partition, name: system, volgroup: lvm_vg00, size: 32G, wipe: superblock, preserve: false, id: lvm_part-root }
    - { type: format, fstype: ext4, volume: lvm_part-root, preserve: false, id: format-root }
    - { type: lvm_partition, name: var, volgroup: lvm_vg00, size: 10G, wipe: superblock, preserve: false, id: lvm_part-var }
    - { type: format, fstype: ext4, volume: lvm_part-var, preserve: false, id: format-var }
    - { type: lvm_partition, name: swap, volgroup: lvm_vg00, size: 4G, wipe: superblock, preserve: false, id: lvm_part-swap }
    - { type: format, fstype: swap, volume: lvm_part-swap, preserve: false, id: format-swap }
    - { type: lvm_partition, name: nobackup, volgroup: lvm_vg00, size: -1, wipe: superblock, preserve: false, id: lvm_part-nobackup }
    - { type: format, fstype: ext4, volume: lvm_part-nobackup, preserve: false, id: format-nobackup }
# Mount points
<%- if @host.pxe_loader.include?('UEFI') -%>
    - { path: /boot/efi, device: format-efi, type: mount, id: mount-efi }
<% end -%>
    - { path: /, device: format-root, type: mount, id: mount-root }
    - { path: /boot, device: format-boot, type: mount, id: mount-boot }
    - { path: /var, device: format-var, type: mount, id: mount-var }
    - { path: '', device: format-swap, type: mount, id: mount-swap }
    - { path: /nobackup, device: format-nobackup, type: mount, id: mount-nobackup }  

Regards
JF

1 Like

Hi Jean-Francois,

is there a way to debug the subiquity (or what it’s called) installer?

I have the following:

storage:
  config:
  - { type: disk, path: /dev/sda, ptable: gpt, wipe: superblock-recursive, preserve: false, name: '', grub_device: false, id: disk-sda }
  - { type: partition, number: 1, device: disk-sda, size: 512M, wipe: superblock, flag: boot, preserve: false, grub_device: true, id: part-efi }
  - { type: format, fstype: fat32, volume: part-efi, preserve: false, id: format-efi }
  - { type: partition, number: 2, device: disk-sda, size: 2G, wipe: superblock, flag: '', preserve: false, grub_device: false, id: part-boot }
  - { type: format, fstype: ext4, volume: part-boot, preserve: false, id: format-boot }  
  - { type: partition, number: 3, device: disk-sda, size: -1, wipe: superblock, flag: '', preserve: false, grub_device: false, id: part-system }
  - { type: lvm_volgroup, name: system, devices: [ part-system ], preserve: false, id: lvm_system }
#  
  - { type: lvm_partition, name: system, volgroup: lvm_system, size: 10G, wipe: superblock, preserve: false, id: lvm_root }
  - { type: format, fstype: ext4, volume: lvm-root, preserve: false, id: format-root } 
  #
  - { type: lvm_partition, name: var, volgroup: lvm_system, size: 5G, wipe: superblock, preserve: false, id: lvm_var }
  - { type: format, fstype: ext4, volume: lvm-var, preserve: false, id: format-var }
  #
  - { type: lvm_partition, name: var_log, volgroup: lvm_system, size: 5G, wipe: superblock, preserve: false, id: lvm_var_log }
  - { type: format, fstype: ext4, volume: lvm-var-log, preserve: false, id: format-var-log }
  #
  - { type: lvm_partition, name: swap, volgroup: lvm_system, size: 4G, wipe: superblock, preserve: false, id: lvm_swap }
  - { type: format, fstype: swap, volume: lvm_swap, preserve: false, id: format-swap }
  #
  - { path: /boot/efi, device: format-efi, type: mount, id: mount-efi }
  #
  - { path: /, device: format-root, type: mount, id: mount-root }
  - { path: /boot, device: format-boot, type: mount, id: mount-boot }
  - { path: /var, device: format-var, type: mount, id: mount-var }
  - { path: /var/log, device: format-var-log, type: mount, id: mount-var-log }
  - { path: '', device: format-swap, type: mount, id: mount-swap }

and of course it does not work.
However, the installer log does not really give a clue why it does not work.

Hi,
It’s not easy to debug with subiquity.
If the installer goes back to graphical interactive install, you can open a terminal and control what was done. If there is already a /autoinstall.yml and if partitioning was done.

Regard,
JF

It has reminded me again just why I hate Ubuntu.

Anyway, there were apparently subtle naming inconsistencies that apparently threw off the installer and led it to just discard the whole thing.

Did you get this working?

I’ve followed the documentation multiple times and had others check my work. AFAIK I have implemented everything correctly but I just get an error saying that my foreman server is a bad address.

Really disappointing that something vanilla is so hard to get working.

The proxy needs to be in the trusted proxies list.

(I have proxies separated from the main foreman server)

And the file really needs to be a-ok.