Skip to content

Windows Server 2022 Installation failed #570

@1stNeferpitou

Description

@1stNeferpitou
  • OVH dedicated server
  • UEFI mode
  • CBS ERROR_FILE_NOT_FOUND during oobeSystem
  • Microsoft-Windows-Shell-Setup component fails

tried to install Windows Server 2022 but I faced a lot of problems

`# 1. Mount EFI
mkdir -p /boot/efi
mount /dev/nvme0n1p1 /boot/efi

2. Put .efi file so reinstall script detects EFI partition

apt-get install -y -qq grub-efi-amd64-bin
mkdir -p /boot/efi/EFI/BOOT
cp /usr/lib/grub/x86_64-efi/monolithic/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI

3. Download reinstall script

curl -fsSL https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh -o reinstall.sh

4. Patch rootfs detection bug (OVH rescue has no real / block device)

LINE=$(grep -n 'mapper=$(mount' reinstall.sh | cut -d: -f1)
sed -i "${LINE}s|.*| mapper=/dev/nvme0n1|" reinstall.sh

5. Run install (will prompt for password)

bash reinstall.sh windows
--image-name 'Windows Server 2022 SERVERDATACENTER'
--iso 'https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso'
--lang en-us
--password 'Admin12345'

6. Fix GRUB - copy vmlinuz and initrd to EFI partition

mkdir -p /boot/efi/EFI/reinstall
curl -Lo /boot/efi/EFI/reinstall/reinstall-vmlinuz
http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/vmlinuz-lts
curl -Lo /boot/efi/EFI/reinstall/reinstall-initrd
http://dl-cdn.alpinelinux.org/alpine/v3.23/releases/x86_64/netboot/initramfs-lts

7. Fix grub.cfg paths

sed -i 's|search --no-floppy --file --set=root /reinstall-vmlinuz|set root=(hd1,gpt1)|' /boot/efi/EFI/reinstall/grub.cfg
sed -i 's| /reinstall-vmlinuz | /EFI/reinstall/reinstall-vmlinuz |' /boot/efi/EFI/reinstall/grub.cfg
sed -i 's|initrd /reinstall-initrd|initrd /EFI/reinstall/reinstall-initrd|' /boot/efi/EFI/reinstall/grub.cfg

8. Verify

echo "===== grub.cfg ====="
cat /boot/efi/EFI/reinstall/grub.cfg
echo "===== DONE - Change boot to hard disk in OVH Control Panel then reboot ====="
`
that script works good but since I did the grup manually it doesn't run the script from alpine automatically

installation can't complete

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions