├── images ├── Windows_UsbDisk.png ├── Linux_BootPartition.png ├── Linux_NewPartition.png ├── Linux_UsbPartitions.png ├── Linux_LinuxPartition.png ├── Linux_NewGPTPartition.png ├── Windows_DiskManagment.png ├── Windows_UsbPartitions.png ├── Linux_UnallocatedSpace.png ├── Linux_WindowsPartition.png ├── Windows_BootVolumeFormat.png ├── Windows_BootVolumeSize.png ├── Windows_LinuxVolumeSize.png ├── Windows_NewSimpleVolume.png ├── Linux_CreatePartitionTable.png ├── Windows_LinuxVolumeFormat.png ├── Windows_WindowsVolumeSize.png ├── Linux_ApplyPartitionChanges.png ├── Windows_BootVolumeFormatPopup.png ├── Windows_WindowsVolumeFormat.png └── Windows_UnixLineEndingInNotepad.png ├── grub.cfg ├── grub.cfg.for_windows_users └── readme.md /images/Windows_UsbDisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_UsbDisk.png -------------------------------------------------------------------------------- /images/Linux_BootPartition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_BootPartition.png -------------------------------------------------------------------------------- /images/Linux_NewPartition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_NewPartition.png -------------------------------------------------------------------------------- /images/Linux_UsbPartitions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_UsbPartitions.png -------------------------------------------------------------------------------- /images/Linux_LinuxPartition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_LinuxPartition.png -------------------------------------------------------------------------------- /images/Linux_NewGPTPartition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_NewGPTPartition.png -------------------------------------------------------------------------------- /images/Windows_DiskManagment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_DiskManagment.png -------------------------------------------------------------------------------- /images/Windows_UsbPartitions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_UsbPartitions.png -------------------------------------------------------------------------------- /images/Linux_UnallocatedSpace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_UnallocatedSpace.png -------------------------------------------------------------------------------- /images/Linux_WindowsPartition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_WindowsPartition.png -------------------------------------------------------------------------------- /images/Windows_BootVolumeFormat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_BootVolumeFormat.png -------------------------------------------------------------------------------- /images/Windows_BootVolumeSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_BootVolumeSize.png -------------------------------------------------------------------------------- /images/Windows_LinuxVolumeSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_LinuxVolumeSize.png -------------------------------------------------------------------------------- /images/Windows_NewSimpleVolume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_NewSimpleVolume.png -------------------------------------------------------------------------------- /images/Linux_CreatePartitionTable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_CreatePartitionTable.png -------------------------------------------------------------------------------- /images/Windows_LinuxVolumeFormat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_LinuxVolumeFormat.png -------------------------------------------------------------------------------- /images/Windows_WindowsVolumeSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_WindowsVolumeSize.png -------------------------------------------------------------------------------- /images/Linux_ApplyPartitionChanges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Linux_ApplyPartitionChanges.png -------------------------------------------------------------------------------- /images/Windows_BootVolumeFormatPopup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_BootVolumeFormatPopup.png -------------------------------------------------------------------------------- /images/Windows_WindowsVolumeFormat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_WindowsVolumeFormat.png -------------------------------------------------------------------------------- /images/Windows_UnixLineEndingInNotepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gk-devhub/usb_multiboot_pendrive/HEAD/images/Windows_UnixLineEndingInNotepad.png -------------------------------------------------------------------------------- /grub.cfg: -------------------------------------------------------------------------------- 1 | loadfont unicode 2 | 3 | set default="0" 4 | set timeout=-1 5 | 6 | set color_normal=light-gray/black 7 | set color_highlight=green/black 8 | set menu_color_normal=white/black 9 | set menu_color_highlight=black/light-gray 10 | 11 | if background_color 0,0,0; then 12 | clear 13 | fi 14 | 15 | # USB pendrive GPT partitions: BOOT, Windows, Linux 16 | regexp --set usb_pendrive "^(.*?),gpt1" $root 17 | 18 | set boot_partition=$root # ="$usb_pendrive,gpt1" 19 | set windows_partition="$usb_pendrive,gpt2" 20 | set linux_partition="$usb_pendrive,gpt3" 21 | 22 | 23 | menuentry 'Try or Install Ubuntu MATE 24.04' { 24 | 25 | set root=$linux_partition 26 | set isofile="/boot/iso/ubuntu-mate-24.04.2-desktop-amd64.iso" 27 | loopback loop ($root)$isofile 28 | linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=$isofile 29 | initrd (loop)/casper/initrd 30 | } 31 | 32 | menuentry 'Install Windows 11' { 33 | 34 | insmod ntfs 35 | set root=$windows_partition 36 | chainloader /efi/boot/bootx64.efi 37 | } 38 | 39 | menuentry 'Clonezilla' { 40 | 41 | set root=$linux_partition 42 | set isofile="/boot/iso/clonezilla-live-20241010-oracular-amd64.iso" 43 | loopback loop ($root)$isofile 44 | linux (loop)/live/vmlinuz boot=live username=user components noswap noprompt vga=788 keyboard-layouts=en ip=dhcp toram=filesystem.squashfs findiso=$isofile 45 | initrd (loop)/live/initrd.img 46 | } 47 | 48 | -------------------------------------------------------------------------------- /grub.cfg.for_windows_users: -------------------------------------------------------------------------------- 1 | loadfont unicode 2 | 3 | set default="0" 4 | set timeout=-1 5 | 6 | set color_normal=light-gray/black 7 | set color_highlight=green/black 8 | set menu_color_normal=white/black 9 | set menu_color_highlight=black/light-gray 10 | 11 | if background_color 0,0,0; then 12 | clear 13 | fi 14 | 15 | # USB pendrive GPT partitions: BOOT, Windows, Linux 16 | regexp --set usb_pendrive "^(.*?),gpt1" $root 17 | 18 | set boot_partition=$root # ="$usb_pendrive,gpt1" 19 | set windows_partition="$usb_pendrive,gpt2" 20 | set linux_partition="$usb_pendrive,gpt3" 21 | 22 | 23 | menuentry 'Try or Install Ubuntu MATE 24.04' { 24 | 25 | insmod ntfs 26 | set root=$linux_partition 27 | set isofile="/boot/iso/ubuntu-mate-24.04.2-desktop-amd64.iso" 28 | loopback loop ($root)$isofile 29 | linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=$isofile 30 | initrd (loop)/casper/initrd 31 | } 32 | 33 | menuentry 'Install Windows 11' { 34 | 35 | insmod ntfs 36 | set root=$windows_partition 37 | chainloader /efi/boot/bootx64.efi 38 | } 39 | 40 | menuentry 'Clonezilla' { 41 | 42 | insmod ntfs 43 | set root=$linux_partition 44 | set isofile="/boot/iso/clonezilla-live-20241010-oracular-amd64.iso" 45 | loopback loop ($root)$isofile 46 | linux (loop)/live/vmlinuz boot=live username=user components noswap noprompt vga=788 keyboard-layouts=en ip=dhcp toram=filesystem.squashfs findiso=$isofile 47 | initrd (loop)/live/initrd.img 48 | } 49 | 50 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Windows and Linux multi-boot USB installer setup without using Ventoy 2 | 3 | The purpose of this document and method is to show you how you can easily create a **dual- or multi-boot Windows/Linux USB pendrive** so that you can run the Windows 11 installer and one or more Linux installer/live-boot iso's from the same USB stick. 4 | 5 | So if you have security concerns about some other multi-boot methods (e.g. Ventoy), or you're just interested in a **quick and easy multi-boot installer setup without using any 3rd-party tools**, then you're in the right place. 6 | 7 | **The method explained here is VERIFIABLY CLEAN (so there are no potential security concerns) as it uses no 3rd-party tools or binary blobs**. All executables are coming directly from the official Linux and Windows installer iso's. No 3rd party executables. 8 | 9 | If you're an experienced/advanced Linux or Windows user (e.g. a sysadmin or sysdev), then you can just jump right in and start with the [Method overview](#method-overview) section (which is the short version) to see a quick overview of the steps needed to set up the multi-boot usb stick. 10 | 11 | ## Table of Contents 12 | - [Introduction](#introduction) 13 | - [Method overview](#method-overview) 14 | - [Setup instructions for Linux users](#setup-for-linux-users) 15 | - [Setup instructions for Windows users](#setup-for-windows-users) 16 | 17 | 18 | ## Introduction 19 | 20 | The primary purpose of this document and method is to show you how you can easily create a **dual- or multi-boot Windows/Linux USB pendrive** so that you can run the Windows 11 installer and one or more Linux installer/live-boot iso's from the same USB stick. 21 | 22 | This method **supports the "1 Windows installer + Multiple Linux installer/live-boot iso's" use case**. 23 | 24 | Our focus with this method is to support the current (2025) everyday use cases in the context of Windows 11 and Linux and hence **UEFI and Secure Boot are supported**, while **legacy MBR boot is NOT supported by this method**. 25 | 26 | Also note that **this method only supports 1 Windows installer per USB pendrive** as the Windows 11 installer is run from its own partition and not from its iso directly. 27 | 28 | But this "**1 Windows installer + Multiple Linux installer/live-boot iso's**" method is general enough to cover most of the everyday use cases that everyday Linux and Windows users are likely to come across. 29 | 30 | (More advanced users can, of course, extend this method by using e.g. Clonezilla-based partitioning and reimaging methods to cover their more specialised use cases. But these advanced methods are not discussed here. (See Windows Sysprep, Clonezilla and related topics for details.) Nevertheless we're gonna add a Clonezilla live-boot option to our USB pendrive just in case you wanna go down this route and store OS (e.g. Windows) images locally on the pendrive (and restore them by using a local Clonezilla boot instead of a PXE boot) or just use Clonezilla for remote OS cloning as usual.) 31 | 32 | There are **several methods of creating single- or multi-boot USB pendrives** that vary in generality and hence in what use cases they cover and support. 33 | 34 | To see where the method explained here fits into the bigger picture, let's just quickly summarise the relevant bootable USB creation methods. 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
Windows
boot
Linux
boot
MethodLimitations
1e.g. Rufus, Etcher, Startup Disk CreatorOnly 1 OS installer per USB stick
1e.g. Rufus, Etcher, Startup Disk CreatorOnly 1 OS installer per USB stick
multiGLIMOnly supports Linux. It doesn't support iso's larger than 4 GB
1multiThis methodOnly 1 Windows installer per USB stick. (But it can be extended to support multiple Windows OS images by using e.g. local Clonezilla OS images. But this advanced topic is not discussed here.)
multimultiVentoySecurity concerns because of binary blobs. See this issue
62 |
63 | Methods lower in the above table are, of course, functionally more general than previous methods higher in the table and hence they also support the use cases of methods higher in the table. 64 | 65 |
66 | 67 | So their order of generality is 68 | 69 | Ventoy (multi - multi) > **This method (1 - multi)** > GLIM (0 - multi) > Rufus (1) 70 | 71 | So this Windows-Linux multi-boot installer solution sits between Ventoy (multi-multi boot) and Linux-multiboot solutions because on top of supporting Linux-multiboot it also supports booting a Windows installer. 72 | 73 | This "**1 Windows installer + Multiple Linux installer/live-boot iso's on a USB stick**" is the general use case that most people are interested in as this is the most revelant use case that people are likely to come across in everyday life (especially Linux users or sysadmins). 74 | 75 | And the method explained here provides a solution for this exact use case. 76 | 77 | What are the **advantages of this method** over the other methods (including Ventoy)?: 78 | 79 | 1. **It doesn't require any special tools** (e.g. Rufus, Etcher, Startup Disk Creator) 80 | 81 | Both Linux and Windows have the built-in tools needed to use this method. 82 | 83 | Hence both Linux and Windows users can easily create the multi-boot usb stick. 84 | 85 | So if you don't have access to iso burning tools like Rufus or Etcher, or you don't wanna use them because you want a multi-boot usb pendrive, then no problem, you can just simply use this method instead to set up the multi-boot usb stick in no time. 86 | 87 | 2. **Both Linux and Windows users can use this method**. And it's very easy to setup and use 88 | 89 | 3. There are **NO SECURITY CONCERNS** whatsoever as this method is **COMPLETELY TRANSPARENT and IT DOES NOT USE ANY 3RD-PARTY TOOLS, BINARY BLOBS OR MODIFIED EXECUTABLES**. 90 | 91 | **All executables are coming directly from the OFFICIAL LINUX AND WINDOWS INSTALLER ISO'S. No 3rd-party executables.** 92 | 93 | 4. Hence this method is fully (and easily) auditable from a security point of view. And it's COMPLETELY and **VERIFIABLY CLEAN**. 94 | 95 | So you can be sure that it does exactly what it says on the tin without your security being potentially compromised. So if you have security concerns about other multi-boot methods (e.g. Ventoy), then you can use this method instead because it's **verifiably clean** and it covers most of the everyday use cases. 96 | 97 | 98 | The only conceptual differences between this method and Ventoy are that 99 | 100 | 1. This method only supports **1 Windows installer on the USB stick** 101 | 102 | 2. The Windows installer needs to be set up on a separate partition and it doesn't boot directly from the Windows installer iso 103 | 104 | 3. It only supports UEFI and Secure Boot. Legacy MBR boot is not supported. (Because Windows 11 doesn't support legacy MBR boot.) 105 | 106 | 107 | But other than that it's functionally the same as Ventoy as you can boot multiple linux iso's. Just like in the case of Ventoy. 108 | 109 | So **this method uses 1 Windows installer partition + supports multiple Linux installer/live-boot iso's**. 110 | 111 |
112 | 113 | 114 | ## Method overview 115 | 116 | In our example setup, we're gonna create a **triple-boot usb pendrive** with 117 | 118 | 1. Ubuntu MATE 24.04 119 | 2. Windows 11 120 | 3. Clonezilla 121 | 122 |
as this is a **typical minimalist setup** that is useful for everyday use by a typical Linux user. 123 | 124 | (Of course, you can replace the above Linux option with your favourite Linux distro.) 125 | 126 | The Ubuntu option is the official live-boot OS installer, which allows you to **try and/or install Ubuntu**. 127 | 128 | So if you're a Windows user, you can just simply and safely use this boot option to try Ubuntu on your machine without actually installing it. 129 | 130 | The **Windows 11** option is an **OS installer**, so it's gonna **install Windows 11**. 131 | 132 | And the Clonezilla option is just a **usual Clonezilla live-boot and not an installer** just so that you (more advanced users) can do usual clonezilla stuff like disk/partition backups, reimaging or cloning. 133 | 134 | If you need more Linux distros on the usb stick, you can just chuck them on there as iso's and hook them up to the boot menu very easily. (See below.) 135 | 136 | Conceptually the setup of this usb multi-boot is very simple: 137 | 138 | 1. We have to **partition** the usb pendrive using **GPT** because of the UEFI boot 139 | 140 | 2. Create **3 GPT partitions** (called **"BOOT" (1 GB, FAT32), "Windows" (8 GB, NTFS), "Linux" (the remaining GB, ext4 or NTFS** depending on whether you're a Linux or Windows user)) for the various components 141 | 142 | Linux users: Format the Linux partition as ext4 143 | 144 | Windows users: Format the Linux partition as NTFS 145 | 146 | 3. Copy the **Ubuntu bootloader "boot" and "EFI" folders** from the ubuntu iso to the UEFI BOOT partition of the usb stick 147 | 148 | /boot/ -> /boot/ 149 | 150 | /EFI/ -> /EFI/ 151 | 152 | 4. Copy the **Windows 11 installer files** from the Windows iso to the Windows partition 153 | 154 | /* -> / 155 | 156 | 5. Copy the Ubuntu and Clonezilla iso's into the **/boot/iso/ folder** on the Linux partition 157 | 158 | /boot/iso/ubuntu-mate-24.04.2-desktop-amd64.iso 159 | 160 | /boot/iso/clonezilla-live-20241010-oracular-amd64.iso 161 | 162 | 6. Overwrite grub.cfg on the BOOT partition with **grub.cfg from this repo** 163 | 164 | Linux users: /grub.cfg -> /boot/grub/grub.cfg 165 | 166 | Windows users: /grub.cfg.for_windows_users -> /boot/grub/grub.cfg 167 | 168 | 7. **Adjust grub.cfg**, if needed, to support the Linux distro(s) that you're trying to boot 169 | 170 | And to match the names of the latest Ubuntu, Windows 11 and Clonezilla iso's that you downloaded. 171 | 172 |
173 | 174 | So if you're an experienced/advanced Linux or Windows user (e.g. a sysadmin or a sysdev), then you can just jump right in and use the above steps to set up the multi-boot usb stick. 175 | 176 | However, for less experienced users I provided the following 2 sections that go through the setup process in detail in both cases. 177 | 178 | To use the above triple-boot setup, **you will need an at least 16 GB USB pendrive**. Of course, if you wanna add more Linux distro iso's to the mix, then you will need more space. (The USB pendrive used for the example setup below just happened to be 64 GB.) 179 | 180 | The following **official installer and live-boot iso's** were used for this example setup: 181 | 182 | 1. Ubuntu MATE 24.04 (LTS) 183 | 184 | ubuntu-mate-24.04.2-desktop-amd64.iso 185 | 186 | SHA256: ec1399cf90678c29ee1f80055826b21a3d90f59d50d154e5ea70b1931ce909c9 187 | SHA1: 93c7a01541a242fe9fec7dc96086ba3c0aa4f48e 188 | Size: 4.3 GB (4,301,398,016 bytes) 189 | 190 | 2. Windows 11 191 | 192 | Win11_24H2_EnglishInternational_x64.iso 193 | 194 | SHA256: d5a4c97c3e835c43b1b9a31933327c001766ce314608ba912f2fffc876044309 195 | SHA1: 1df19b01b5a6245640fcceaf6fbcdf3e03bc32b8 196 | Size: 5.8 GB (5,832,091,648 bytes) 197 | 198 | 3. Clonezilla 199 | 200 | clonezilla-live-20241010-oracular-amd64.iso 201 | 202 | SHA256: 783d564489f6b780167cbb11f7026f4a9c32d4c4372ce6254e5b0e4e60cb44dc 203 | SHA1: 3df5e1914ae50b8f7c3f231ddd7fa1f41b758efa 204 | Size: 546 MB (545,259,520 bytes) 205 | 206 |
207 | 208 | 209 | ## Setup instructions for Linux users 210 | 211 | 1. We have to **partition** the usb pendrive using **GPT** because of the UEFI boot 212 | 213 | **Use gparted to delete all the partitions** (if any) from your USB pendrive so that **all disk space becomes unallocated** like this 214 | 215 | ![alt text](images/Linux_UnallocatedSpace.png) 216 | 217 | Then **partition** the USB stick using **GPT** partitioning (instead of MBR). 218 | 219 | Device -> **Create Partition Table** 220 | 221 | ![alt text](images/Linux_CreatePartitionTable.png) 222 | 223 | and then select "**gpt**" as the partition type 224 | 225 | ![alt text](images/Linux_NewGPTPartition.png) 226 | 227 | 228 | 2. Create **3 GPT partitions** (called **"BOOT" (1 GB, FAT32), "Windows" (8 GB, NTFS), "Linux" (the remaining GB, ext4)**) for the various components 229 | 230 | Partition 1: **"BOOT", 1 GB (1024 MB), FAT32** 231 | 232 | Create a new GPT partition: Right click on the unallocated space and select **"New"** 233 | 234 | ![alt text](images/Linux_NewPartition.png) 235 | 236 | And then specify the following parameters: **"BOOT", 1 GB (1024 MB), FAT32** 237 | 238 | ![alt text](images/Linux_BootPartition.png) 239 | 240 | Partition 2: **"Windows", 8 GB (8192 MB), NTFS** 241 | 242 | ![alt text](images/Linux_WindowsPartition.png) 243 | 244 | (Currently the size of the Windows 11 installer iso (Win11_24H2_EnglishInternational_x64.iso) is about 6 GB. So we allocate 8 GB to this partition just in case future Windows 11 installer versions have increased iso sizes. So if you later wanna upgrade your usb stick to the latest Windows 11 installer version, then you won't have to repartition the pendrive.) 245 | 246 | Partition 3: **"Linux", the remaining GB, ext4** 247 | 248 | ![alt text](images/Linux_LinuxPartition.png) 249 | 250 | You have to **click on the green checkmark icon** for your changes to be applied to the pendrive 251 | 252 | ![alt text](images/Linux_ApplyPartitionChanges.png) 253 | 254 | After partitioning, the USB pendrive should look like this 255 | 256 | ![alt text](images/Linux_UsbPartitions.png) 257 | 258 | 3. Copy the **Ubuntu bootloader "boot" and "EFI" folders** from the ubuntu iso to the UEFI BOOT partition of the usb stick 259 | 260 | Download the Ubuntu MATE 24.04.2 installer iso from the Ubuntu website:
261 | https://cdimage.ubuntu.com/ubuntu-mate/releases/noble/release/ubuntu-mate-24.04.2-desktop-amd64.iso 262 | 263 | 264 | Mount the downloaded iso: Right click on the iso -> Open With -> Disk Image Mounter 265 | 266 | **Copy the Ubuntu bootloader "boot" and "EFI" folders** from the ubuntu iso to the UEFI BOOT partition of the usb stick 267 | 268 | /boot/ -> /boot/ 269 | 270 | /EFI/ -> /EFI/ 271 | 272 | Unmount the iso. 273 | 274 | 4. Copy the **Windows 11 installer files** from the Windows iso to the Windows partition 275 | 276 | Download the latest Windows 11 installer iso from the Microsoft website:
277 | https://www.microsoft.com/en-us/software-download/windows11 278 | 279 | Mount the iso: Right click on the iso -> Open With -> Disk Image Mounter 280 | 281 | Copy the Windows 11 installer files from the Windows iso to the Windows partition 282 | 283 | /* -> / 284 | 285 | **Just simply copy ALL files and directories from the Windows 11 iso** to the "Windows" partition on the USB stick. 286 | 287 | Unmount the iso. 288 | 289 | 5. Copy the Ubuntu and Clonezilla iso's into the **/boot/iso/ folder** on the Linux partition 290 | 291 | Download Clonezilla from the Clonezilla website:
292 | 293 | https://clonezilla.org/downloads/download.php?branch=alternative 294 | 295 | By default, the Linux partition of the usb pendrive gets mounted as root by Ubuntu under 296 | 297 | /media/$USER/Linux 298 | 299 | which means that, by default, you can't write to it. So first you have to change the ownership of the mount point to you to enable you to write to this partition. 300 | 301 | sudo chown $USER:$USER /media/$USER/Linux 302 | 303 | Now you should be able to create the /boot/iso/ folder and copy files into it. 304 | 305 | Create the 306 | 307 | /boot/iso/ 308 | 309 | folder on the Linux partition. 310 | 311 | Copy the Ubuntu and Clonezilla iso's into the /boot/iso/ folder on the Linux partition 312 | 313 | /boot/iso/ubuntu-mate-24.04.2-desktop-amd64.iso 314 | 315 | /boot/iso/clonezilla-live-20241010-oracular-amd64.iso 316 | 317 | 6. Overwrite grub.cfg on the BOOT partition with **grub.cfg from this repo** 318 | 319 | /grub.cfg -> /boot/grub/grub.cfg 320 | 321 | 322 | 323 | 7. **Adjust grub.cfg**, if needed, to support the Linux distro(s) that you're trying to boot 324 | 325 | The Linux boot menu item definitions look like this in grub.cfg 326 | 327 | menuentry 'Try or Install Ubuntu MATE 24.04' { 328 | 329 | set root=$linux_partition 330 | set isofile="/boot/iso/ubuntu-mate-24.04.2-desktop-amd64.iso" 331 | loopback loop ($root)$isofile 332 | linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=$isofile 333 | initrd (loop)/casper/initrd 334 | } 335 | 336 | menuentry 'Clonezilla' { 337 | 338 | set root=$linux_partition 339 | set isofile="/boot/iso/clonezilla-live-20241010-oracular-amd64.iso" 340 | loopback loop ($root)$isofile 341 | linux (loop)/live/vmlinuz boot=live username=user components noswap noprompt vga=788 keyboard-layouts=en ip=dhcp toram=filesystem.squashfs findiso=$isofile 342 | initrd (loop)/live/initrd.img 343 | } 344 | 345 | 346 | So if the names of the latest Ubuntu and Clonezilla iso's that you downloaded don't match the iso filenames in grub.cfg, then you have to update grub.cfg accordingly. 347 | 348 | Also if you wanna use e.g. the UK keyboard layout in Clonezilla instead of the default US keyboard layout, then just add 349 | 350 | locales=en_GB.UTF-8 351 | 352 | to the Clonezilla kernel parameter list 353 | 354 | ... keyboard-layouts=en locales=en_GB.UTF-8 ip=dhcp ... 355 | 356 | And if you want to use a non-English keyboard layout, then just remove 357 | 358 | keyboard-layouts=en 359 | 360 | from the Clonezilla kernel parameter list, and then Clonezilla will ask you to select a language and keyboard layout when it boots up. 361 | 362 | **You can also replace the above entries with your favourite Linux distro.** 363 | 364 | But **note that each distro has its own expected live-boot kernel parameter list**, so you actually have to do a little bit of googling to find out what live-boot kernel parameters your distro is expecting. 365 | 366 | E.g. the Ubuntu installer uses Casper as its live boot, so you have to specify "boot=casper" 367 | 368 | linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=$isofile 369 | 370 | and the corresponding Casper squashfs file. 371 | 372 | While Clonezilla needs this parameter to be "boot=live" and its kernel parameter line and initrd line are completely different 373 | 374 | linux (loop)/live/vmlinuz boot=live username=user components noswap noprompt vga=788 keyboard-layouts=en locales=en_US.UTF-8 ip=dhcp toram=filesystem.squashfs findiso=$isofile 375 | 376 | So basically **DO NOT assume anything about how the "linux" and "initrd" lines should look like for your distro. Just simply google the correct live-boot parameters for your distro.** 377 | 378 | But the various variants of the same core distro (e.g. Ubuntu desktop variants and their installers) should work with the same settings. So **all Ubuntu desktop variants should work with the above parameters.** 379 | 380 | And, of course, you can also easily add extra Linux boot entries by simply copy-and-pasting one of the above Linux boot entries and adjusting them to match the requirements of your Linux distro. 381 | 382 | (Note that because of the lack of free time, I won't be able to provide tech support. So the above info is provided "as is", and you're gonna have to google the correct live-boot kernel parameters for your distro.) 383 | 384 |
385 | 386 | 387 | ## Setup instructions for Windows users 388 | 389 | This setup assumes that you're using either Windows 10 or 11 (or later). Earlier Windows versions are not supported. The steps explained here were tested on Windows 11. But they should work on Windows 10 as well. 390 | 391 | 1. We have to **partition** the usb pendrive using **GPT** because of the UEFI boot 392 | 393 | USB pendrives typically come formatted either as FAT32 or NTFS using MBR partitioning. 394 | 395 | But **we need GPT partitioning for our UEFI setup**, so we need to covert our USB pendrive to GPT partitioning. 396 | 397 | So fire up the Windows disk manager: Right click on the Windows start menu icon -> **Disk Management** 398 | 399 | ![alt text](images/Windows_DiskManagment.png) 400 | 401 | **Find your USB pendrive** in the disk manager. In this particular case, it's a 64 GB USB pendrive. 402 | 403 | ![alt text](images/Windows_UsbDisk.png) 404 | 405 | Also **take note of the DISK NUMBER of the usb pendrive: 4 in this particular case (Disk 4)**. 406 | 407 | We can't change the type of partitioning to GPT from the Windows 11 GUI, so we have to **run a "Command Prompt" as Administrator** and then run the utility **diskpart** 408 | 409 | diskpart 410 | 411 | List the disks by using 412 | 413 | list disk 414 | 415 | and **confirm that "Disk N", where N is your USB pendrive's disk number, has the same size (~57 GB) that you saw in the disk manager, and hence that you're looking at your USB pendrive.** 416 | 417 | If confirmed that it's the same disk, then select this disk by using 418 | 419 | select disk N 420 | 421 | where N is the disk number of your USB pendrive. (4 in this particular example.) 422 | 423 | And then convert it to GPT 424 | 425 | convert gpt 426 | 427 | Exit diskpart 428 | 429 | exit 430 | 431 | Now our USB pendrive uses GPT. So go back to the disk manager GUI. 432 | 433 | 2. Create **3 GPT partitions** (called **"BOOT" (1 GB, FAT32), "Windows" (8 GB, NTFS), "Linux" (the remaining GB, NTFS)**) for the various components 434 | 435 | Partition 1: **"BOOT", 1 GB (1024 MB), FAT32** 436 | 437 | Right click on the unallocated space on the USB pendrive and select "**New Simple Volume...**" 438 | 439 | ![alt text](images/Windows_NewSimpleVolume.png) 440 | 441 | Set size: **1024 MB** (1 GB) 442 | 443 | ![alt text](images/Windows_BootVolumeSize.png) 444 | 445 | File system: **FAT32**. Volume label: **BOOT** 446 | 447 | ![alt text](images/Windows_BootVolumeFormat.png) 448 | 449 | If Windows pops up another window durig formatting, then choose the same paramters: **Capacity: 1 GB, File System: FAT32, Volume Label: BOOT** 450 | 451 | ![alt text](images/Windows_BootVolumeFormatPopup.png) 452 | 453 | Partition 2: **"Windows", 8 GB (8192 MB), NTFS** 454 | 455 | ![alt text](images/Windows_WindowsVolumeSize.png) 456 | 457 | ![alt text](images/Windows_WindowsVolumeFormat.png) 458 | 459 | Partition 3: **"Linux", the remaining GB, NTFS** 460 | 461 | ![alt text](images/Windows_LinuxVolumeSize.png) 462 | 463 | ![alt text](images/Windows_LinuxVolumeFormat.png) 464 | 465 | After partitioning, the USB pendrive should look like this 466 | 467 | ![alt text](images/Windows_UsbPartitions.png) 468 | 469 | 470 | 471 | 3. Copy the **Ubuntu bootloader "boot" and "EFI" folders** from the ubuntu iso to the UEFI BOOT partition of the usb stick 472 | 473 | Download the Ubuntu MATE 24.04.2 installer iso from the Ubuntu website:
474 | https://cdimage.ubuntu.com/ubuntu-mate/releases/noble/release/ubuntu-mate-24.04.2-desktop-amd64.iso 475 | 476 | 477 | Mount the downloaded iso: Right click on the iso -> Mount 478 | 479 | **Copy the Ubuntu bootloader "boot" and "EFI" folders** from the ubuntu iso to the UEFI BOOT partition of the usb stick 480 | 481 | \boot\ -> \boot\ 482 | 483 | \EFI\ -> \EFI\ 484 | 485 | Unmount the iso. 486 | 487 | 4. Copy the **Windows 11 installer files** from the Windows iso to the Windows partition 488 | 489 | Download the latest Windows 11 installer iso from the Microsoft website:
490 | https://www.microsoft.com/en-us/software-download/windows11 491 | 492 | Mount the iso: Right click on the iso -> Mount 493 | 494 | Copy the Windows 11 installer files from the Windows iso to the Windows partition 495 | 496 | \* -> \ 497 | 498 | **Just simply copy ALL files and directories from the Windows 11 iso** to the "Windows" partition on the USB stick. 499 | 500 | Unmount the iso. 501 | 502 | 5. Copy the Ubuntu and Clonezilla iso's into the **\boot\iso\ folder** on the Linux partition 503 | 504 | Download Clonezilla from the Clonezilla website:
505 | 506 | https://clonezilla.org/downloads/download.php?branch=alternative 507 | 508 | Create the 509 | 510 | \boot\iso\ 511 | 512 | folder on the "Linux" partition. 513 | 514 | Copy the Ubuntu and Clonezilla iso's into the \boot\iso\ folder on the Linux partition 515 | 516 | \boot\iso\ubuntu-mate-24.04.2-desktop-amd64.iso 517 | 518 | \boot\iso\clonezilla-live-20241010-oracular-amd64.iso 519 | 520 | 6. Overwrite grub.cfg on the BOOT partition with **grub.cfg.for_windows_users from this repo** 521 | 522 | \grub.cfg.for_windows_users -> \boot\grub\grub.cfg 523 | 524 | 7. **Adjust grub.cfg**, if needed, to support the Linux distro(s) that you're trying to boot 525 | 526 | Read the [grub config adjustment](#grub-config-adjustment) section of the Linux setup (above in the previous section) for futher info about how you should adjust your grub.cfg file to match your downloaded iso files and the Linux distros that you wanna boot. 527 | 528 | But while you're editing grub.cfg, just **make sure that your text editor (e.g. Notepad) preserves the Linux line endings (LF)** (instead of converting the file to Windows line endings (CRLF)). **If you're using Windows Notepad, then make sure that it says "Unix (LF)" in its status bar** like this when you're editing grub.cfg 529 | 530 | ![alt text](images/Windows_UnixLineEndingInNotepad.png) 531 | 532 | More sophisticated text editors like Notepad++ or VS Code automatically preserve the Linux line endings. And so does Notepad in Windows 11. However, some older Notepad versions from Windows 10 don't. So just check the status bar just to make sure that the Linux line endings are preserved. --------------------------------------------------------------------------------