Results 1 to 4 of 4

Thread: Autoinstall - Dual boot with Windows 10

  1. #1
    Join Date
    Nov 2024
    Beans
    2

    Question Autoinstall - Dual boot with Windows 10

    Hi,

    I work for a company using Ubuntu LTS for developers, and we are using LVM and LUKS in a dual boot with Windows 10/11. Up until 22.04, this worked with manual installations, but as of 24.04, due to installer limitation, we are forced to work with autoinstall yaml configuration instead, due to our LVM setup.
    I have been able to get a working LVM/LUKS configuration for pure Ubuntu machines, but when I try to do the same with Windows preinstalled, using preserve - the windows and EFI drives are preserved, but os-prober is not run (I guess since it is deactivated by default), and when activating os-prober after booting into the fresh install, no windows are detected by os-prober.

    How can I make autoinstall turn on os-prober and detect an UEFI installed windows partition?

    I am not able to find any information on how to configure grub/os-prober, or how to correctly preserve windows in any official documentation, nor on google, so I hope someone here are able to help me. Any help would be greatly appreciated.

    My current config looks like the following:

    Code:
      storage:
        config:
          - id: disk-system
            type: disk
            ptable: gpt
            path: /dev/nvme0n1
            preserve: true        
    
          - id: part-efi
            type: partition
            number: 1
            device: disk-system
            size: 100M
            flag: boot
            grub_device: true
            preserve: true
    
          - id: msr-partition
            type: partition
            number: 2
            device: disk-system
            flag: msftres
            size: 16M
            preserve: true
    
          - id: part1
            type: partition
            number: 3
            device: disk-system
            grub_device: false
            size: 125358137856
            preserve: true
    
          - id: part-boot
            type: partition
            number: 4
            device: disk-system
            size: 1G
    
          - id: part-encrypted
            type: partition
            number: 5
            device: disk-system
            size: -1
    
          - id: dm-encrypted
            type: dm_crypt
            volume: part-encrypted
            key: "REDACTED"
    
          - id: vg-linsys
            type: lvm_volgroup
            name: linsys
            devices:
              - dm-encrypted
    
          - id: lv-swap
            type: lvm_partition
            name: swap
            size: 8G
            volgroup: vg-linsys
    
          - id: lv-root
            type: lvm_partition
            name: root
            volgroup: vg-linsys
            size: -1
    
          - id: format-efi
            type: format
            volume: part-efi
            fstype: fat32
    
          - id: format-boot
            type: format
            volume: part-boot
            fstype: ext4
    
          - id: format-root
            type: format
            volume: lv-root
            fstype: ext4
    
          - id: format-swap
            type: format
            volume: lv-swap
            fstype: swap
    
          - id: mount-root
            type: mount
            device: format-root
            path: /
    
          - id: mount-swap
            type: mount
            device: format-swap
            path: none
    
          - id: mount-boot
            type: mount
            device: format-boot
            path: /boot
    
          - id: mount-efi
            type: mount
            device: format-efi
            path: /boot/efi
    Last edited by kaarejens; 3 Weeks Ago at 02:41 PM.

  2. #2
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Autoinstall - Dual boot with Windows 10

    As a double check and to eliminate at least one possible cause - what state is Windows in? Fast Start Up on?

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  3. #3
    Join Date
    Nov 2024
    Beans
    2

    Re: Autoinstall - Dual boot with Windows 10

    Thank you for your quick reply!

    I have not checked this setting, but I assume it is in fast boot-up, as I understand that is the default. I have basically just installed a fresh win10 PRO, made sure bitlocker was disabled, rebooted into live ubuntu 24 and used autoinstall. This has always worked flawlessly doing a manual install with the 22.04 ubuntu LTS, so I have never changed fast boot options previously, to make dual boot work. Could this affect os-probers ability to detect Windows?

    I am looking for the correct way to actually activate os-prober (aside from doing a post-autoinstall sed/awk command on the 30-os-prober file, followed by update-grub or something like that) from within the autoinstall script (or a best practice for how to do this any other way combined with autoinstall), so this is run during install. But I see your point that doing this manually, also not working, would suggest something more is a miss. I just can't understand what.

    I will test your fast startup tip, and see if that makes a difference, but if you or anyone else have made an autoinstall dual boot work, I would really love to see how you did it Any best practices in regard to this topic, would also be greatly appreciated!

    Cheers,
    Kaare

  4. #4
    Join Date
    Jun 2014
    Beans
    7,897

    Re: Autoinstall - Dual boot with Windows 10

    Having fast boot or hibernation on prevents Linux from mounting to access a windows filesystem. It is a simple process to turn off/on as explained at the Microsoft site at the link below.

    https://learn.microsoft.com/en-us/tr...le-hibernation

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •