Windows Fails to Boot After Installing Ubuntu Using autoinstall.yaml

I’m facing an issue where Windows 11 stops booting after I install Ubuntu using an autoinstall.yaml file. Despite configuring the file to preserve the Windows partitions, each time I use it for installation, Windows becomes unbootable. Here’s the content of my autoinstall.yaml:

#cloud-config
autoinstall:
  version: 1
  locale: en_US
  storage:
    grub:
      reorder_uefi: False
    config:
      - type: disk                   # Always install OS on our largest SSD disk
        match:
          size: largest              # Select the largest available SSD
          ssd: true
        id: os-drive
        ptable: gpt
        preserve: true
        name: ''
        grub_device: false
      - type: partition              # Preserve an EFI partition /boot/efi
        number: 1
        id: efi-partition
        device: os-drive
        size: 100M
        flag: boot
        grub_device: true            # This is the primary boot device
        preserve: true
      - type: format                 # Format the EFI partition with FAT32
        id: efi-format
        volume: efi-partition
        fstype: fat32
        label: ESP
        preserve: true
      - path: /boot/efi              # Mount the EFI partition
        device: efi-format
        type: mount
        id: mount-efi
      - type: partition              # Preserve the existing Microsoft Reserved Partition
        number: 2                     # Partition number for MSR (assuming it's the second partition)
        id: msr-partition
        device: os-drive
        flag: msftres                # Flag to indicate it's a Microsoft Reserved Partition
        preserve: true
        size: 16M
      - type: partition              # NTFS
        number: 3
        id: part1
        device: os-drive
        size: 319325M
        grub_device: false
        preserve: true
      - type: partition              # Create a BOOT partition /boot
        number: 4
        id: boot-partition
        device: os-drive
        size: 1G
        grub_device: false
        preserve: false
      - type: format                 # Format the BOOT partition with ext4
        id: boot-format
        volume: boot-partition
        fstype: ext4
        label: BOOT
        preserve: false
      - path: /boot                  # Mount the BOOT partition
        device: boot-format
        type: mount
        id: mount-boot
      - type: partition              # Create an LVM partition (PV)
        number: 5
        id: lvm-partition
        device: os-drive
        size: -1                     # Use all remaining space for LVM
        grub_device: false
        preserve: false
      - type: dm_crypt
        preserve: false
        volume: lvm-partition
        id: dm_crypt-0
        key: "key"
        dm_name: crypto
      - type: lvm_volgroup
        preserve: false
        id: lvm_volgroup-0
        devices:
          - dm_crypt-0
        name: system
      - name: root                   # Create LVM Logical Volume (root)
        preserve: false
        volgroup: lvm_volgroup-0
        size: 16G
        wipe: superblock
        type: lvm_partition
        id: lvm_partition-root
      - fstype: xfs 
        preserve: false
        volume: lvm_partition-root
        type: format
        id: format-root
      - path: /                      # Mount the root LV
        device: format-root
        type: mount
        id: mount-root
      - name: home                   # Create LVM Logical Volume (home)
        volgroup: lvm_volgroup-0     # Using the same volume group as the root
        size: -1                     # Use all remaining space in the volume group
        wipe: superblock             # Ensure the volume is clean before use
        preserve: false
        type: lvm_partition
        id: lvm_partition-home
      - fstype: xfs
        volume: lvm_partition-home
        preserve: false
        type: format
        id: format-home
      - path: /home                  # Mount the home LV
        device: format-home
        type: mount
        id: mount-home
    swap:
      swap: 4G                        # Allocate 4 GB for swap space

  # Installs the default ubuntu-desktop packages.
  # You can add additional packages if required.
  packages:
    - ubuntu-desktop

  # Sets up SSH server and authorizes a key for remote access.
  ssh:
    install-server: true
    authorized-keys: 
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIXzBWhyNmrpXT9yN+RgAyS1mQ6tapm3G80Znp2Q9I6oAVNrKOB5BVazb7X3e7atNMXQgm6QQYsMZzoii+DSHgrmgHQ160vihtsvwmFFRxHb8fsmo0+9cH/lMoDhxWIk+Q9bLe+bqcGxAywD3EO1qgytUcmTOPjFIDyuU+cngb9TWvhJosZaZ0J8CwfzlJAYyItD0IP7fTqlUl079UU3lkU19DC3ocX+nx0q0glofnhCeSTll12H+BuPTMcPW9AKezkk8rgHlT0F8awGXmUfDj2tBFcCPrS1uyAJILU5iLKTc1oeELsIZFeUuSDNu2px+L8EKbhcnGWnbu3j5BSbHX [email protected]

  # User setup
  identity:
    username: nox
    password: $6$Jd6zyTUa/TGBXgtd$cOJ8pWsZxaKDU1SAo6qX32AMtH3WRIBTqIEbBvAmJGcQ7i.kmr5IkMUuuclWjpNVw9jmkUJfaLhe0j3m1TNeE/
    hostname: nox-home-laptop

  late-commands:
    # Configures GRUB for a quiet splash screen on boot.
    - curtin in-target -- sed -i /etc/default/grub -e 's/GRUB_CMDLINE_LINUX_DEFAULT=".*/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/'
    - curtin in-target -- update-grub
    

I’m wondering if anyone else has encountered this problem and how you resolved it. Specifically, I need to know:

  • Any common mistakes in the configuration that might affect the Windows boot loader.
  • Tips for ensuring that the GRUB and Windows Boot Manager can coexist without issues.

Any advice or guidance would be greatly appreciated!

Additionally, here is the output of lsblk which shows the current partition layout on my system:

ox@nox-home-laptop:~$ lsblk -f
NAME              FSTYPE      FSVER    LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
loop0             squashfs    4.0                                                         0   100% /snap/bare/5
loop1             squashfs    4.0                                                         0   100% /snap/core22/1380
loop2             squashfs    4.0                                                         0   100% /snap/firefox/4173
loop3             squashfs    4.0                                                         0   100% /snap/firmware-updater/127
loop4             squashfs    4.0                                                         0   100% /snap/gnome-42-2204/176
loop5             squashfs    4.0                                                         0   100% /snap/snap-store/1124
loop6             squashfs    4.0                                                         0   100% /snap/gtk-common-themes/1535
loop7             squashfs    4.0                                                         0   100% /snap/snapd/21465
loop8             squashfs    4.0                                                         0   100% /snap/snapd-desktop-integration/157
nvme0n1                                                                                            
├─nvme0n1p1       vfat        FAT32          2C42-63E8                                63.6M    34% /boot/efi
├─nvme0n1p2       ext4        1.0      BOOT  fc32e31d-d5f7-4274-b042-d5c43cb2ffa4                  
├─nvme0n1p3       ntfs                       E0822C78822C5576                                      
├─nvme0n1p4       ext4        1.0      BOOT  f45bcb02-c9a5-4702-ba9e-b78afe7a80b9    805.4M    10% /boot
└─nvme0n1p5       crypto_LUKS 2              0c1c84b3-3d41-49d2-b60f-ac06d0802ab6                  
  └─crypto        LVM2_member LVM2 001       QHzgdx-09hy-C1bz-QXwh-FJ5k-oHKX-u1zNxq                
    ├─system-root xfs                        9c32585f-fc83-44f3-88ab-bb61dd613006     10.2G    36% /var/snap/firefox/common/host-hunspell
    │                                                                                              /
    └─system-home xfs                        4f1b56b2-6b44-4592-8b00-3996f3d7abbc    612.5G     2% /home
nox@nox-home-laptop:~$ 

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật