FastNetMon

Saturday, 2 March 2024

How to create bootable USB for Windows 2022 server on Ubuntu 22.04

NB! Sadly this guide below did not work on my system (apparently because it's not very recent system) and I decided to use WoeUSB instead. 

It's very easy to use:

sudo ./woeusb-5.2.4.bash --device ~/Documents/Window/SERVER_EVAL_x64FRE_en-us.iso /dev/sdX

Please note that it will overwrite all data on USB stick.

Example output:

WoeUSB v5.2.4

==============================

Info: Mounting source filesystem...

Info: Wiping all existing partition table and filesystem signatures in /dev/sda...

/dev/sda: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54

/dev/sda: 8 bytes were erased at offset 0x729bffe00 (gpt): 45 46 49 20 50 41 52 54

/dev/sda: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa

/dev/sda: calling ioctl to re-read partition table: Success

Info: Ensure that /dev/sda is really wiped...

Info: Creating new partition table on /dev/sda...

Info: Creating target partition...

Info: Making system realize that partition table has changed...

Info: Wait 3 seconds for block device nodes to populate...

mkfs.fat 4.2 (2021-01-31)

mkfs.fat: Warning: lowercase labels might not work properly on some systems

Info: Mounting target filesystem...

Info: Copying files from source media...

Splitting WIM: 4127 MiB of 4127 MiB (100%) written, part 2 of 24%

Finished splitting "./sources/install.wim"

Info: Installing GRUB bootloader for legacy PC booting support...

Installing for i386-pc platform.

 


Installation finished. No error reported.

Info: Installing custom GRUB config for legacy PC booting...

Info: Done :)

Info: The target device should be bootable now

Info: Unmounting and removing "/tmp/woeusb-source-20240302-155025-Saturday.g0vizR"...

Info: Unmounting and removing "/tmp/woeusb-target-20240302-155025-Saturday.T2VU0b"...

Info: You may now safely detach the target device


As first step format USB stick by creating new GPT partition table on it:


Then create single partition on it using NTFS file system:


Then review changes:

After that you will see that this partition will be mounted in file manager:


After that download ISO image for Wndows 2022 server from official web site and click twice on downloaded ISO and it will be mounted too:

Then select all files from mounted ISO disk to mounted NTFS partition on USB disk:


Wait until finish and unmount it using unmount button on left side:
Please be patient as unmount will take significant time:


Done!