Dual boot using a single drive on Windows

Hi, can anyone tell me how I can achieve this?

I am running a Windows 11 desktop and I wish to make a partition of my single SSD a bootable OpenWRT. I am unable to use external storage media of any kind.

I assume your Windows 11 does secure boot?

No, it is currently disabled.

I assume you're familiar with disk partitioning tools?

Somewhat familiar.

I found this Dual boot how? (X86, Windows - OpenWrt) - #19 by DelroyTaylor . However, in order to follow these steps, I need at least two USB storage media.

It's way safer to boot Openwrt off a flash drive, since you're not messing with the Win install.
There's no performance penalty, except perhaps a slightly longer boot sequence.

You not being to share media from OpenWRT isn't related to the install issue.

You could put your media on the same storage as Openwrt.

Hi, as mentioned, I am not allowed any external storage media.

Technically, storage media <> boot media.

You need to reduce the size of one of the Win partitions on the SSD, to be able to fit Openwrt.
Pretty sure it isn't very easy to do while running Windows.
Pull the drive and make it readable on some other piece of hw.

Btw, if the device belongs to your employer, it's a great way to get fired.

Following @frollic's message, if you are not allowed an external storage, I'm pretty sure you are not allowed to change partition layout on the main disk, and so create a partition for OpenWrt. If you work in a secure environment (i.e. as a non admin user), it's precisely to avoid simple user to perform hazardous behaviours. Conclusion : find another device to test OpenWrt.

There's also Win BitLocker, if it's enabled you won't be able to reduce the partition (content) it encrypted, unless you have the key.

First, is GPT the partition scheme of the SSD? If not, there is no easy way forward without external boot device.

If it is GPT: Assuming that the SSD drive doesn't have any unallocated space (which is normally the case), adding a partition to it would require to shrink or delete another partition. Shrinking the OS partition while the OS is booted is nearly impossible. If the drive has some service partitions (e.g. a partition which has some OEM stuff on it), you could try to shrink or remove such partition. Otherwise there is no way forward. Removing such partition may result in issues in the long term, of course.

You could boot into Windows Recovery Environment and try to shrink the OS partition from it - possible but there is a risk of breaking the OS.

If you manage to create some unallocated space on the SSD, it would become possible to use it for OpenWrt (but the details of how to do that will need to be figured out).

Regardless, IMO it will be much easier and safer for you to use OpenWrt in a virtual machine running on top of Windows.

Edit: if you really want to try and make your dual-boot idea work, you could technically take out the SSD, connect it to another computer and use that other computer to re-partition the drive and to install OpenWrt into the freed up space. I'll just say in advance that re-partitioning is not fail-safe and it may break your OS and/or your data, even if you do it correctly, more so if you don't.

Or run OpenWrt virtually (if allowed).

What would be the point behind dual-booting OpenWrt to begin with?

Don't get me wrong, I understand dual-booting with a general purpose/ desktop linux, but I don't see any sensible use case for dual-booting OpenWrt (at least not with Windows). Even less so, if you are under strict administrative regulations and restrictions from your employer. By the very nature of it, OpenWrt is a router OS, you will need a different network setup for it, than you'd want for Windows (wan <> lan) - there simply is no smooth path to boot the other OS, without messing up the network and physically changing the cabling, each time. ...and if you are already prohibited from using removable media, I don't see how this should play out.

So what do you actually want to use OpenWrt for? Maybe (surely) there are better approaches to meet your requirements, ranging from virtualization to spending a few bucks on a (second hand?) plastic router - or requesting a decomissioned low-end PC from IT which you are allowed to reinstall with OpenWrt permanently.