Installing QubesOS without an external storage medium?

Hello,

I am trying to install QubesOS on a spare laptop without using an external installation medium. I know it is much simpler to just use a usb stick, but I simply do not want to.

I was able to launch the installer iso from a partition on the internal storage, but the anaconda installer refused to allow me to partition the disk that the installer is on. What do I need to do to continue? Can I modify the anaconda installer’s config at runtime to allow it to continue? Do I have to recompile the QubesOS project with some modificiations? Also what should the partitioning scheme look like?

Thanks

P.S. I am mainly writing this due to the line in the install docs that says:

The installation destination cannot be the same as the installation medium. For example, if you’re installing Qubes OS from a USB drive onto a USB drive, they must be two distinct USB drives, and they must both be plugged into your computer at the same time. (Note: This may not apply to advanced users who partition their devices appropriately.)

Well it is hard for qubes to read the files it needs to install itself AFTER overwriting the disk where those files come from :stuck_out_tongue:

I think you can PXE boot it.

Qubes is not great at “there is another OS on this disk”. You can setup a custom partitioning scheme, but that never really worked for me.

If its “I don’t trust this usb stick” → go to any computer store, buy a usb stick and say “hey can you pls dd me this iso onto my new stick”. Then you have a reasonably trustworthy installer that doesn’t come from your possibly considered comporomised old laptop.

As for “iso comes from disk I install to” - you’d need to get a bit more complicated than just dd’ing that iso directly to disk, you’d need to setup grub in a way that it lets you choose if you want to launch the iso or after the installation Qubes.

I wouldn’t say impossible, but utterly impractical.

May I ask why? Depending on what issue you are trying to solve, maybe there is a simpler solution.

1 Like

The main issue is that I am unreasonably stubborn and have already wasted a few hours trying to install without a usb stick.

Ill see if I can setup PXE boot, but the laptop doesnt have an ethernet port so I would have to do PXE over wifi if its at all possible.

Regardless, I’m fine with an utterly impractical solution since the pragmatic solution is to just go borrow a usb stick from someone and be done with it.

2 Likes

I’ve never heared of anyone doing PXE over wifi but I’m pretty sure thats a thing.

I’d honestly just borrow a USB stick. If the only reason for not using one is what you wrote, and not a security thing you are trying to fix or so - go get a USB stick. Rather invest your time into messing with Qubes security itself rather than installing it in the weirdest way possible :wink:

Btw one option would be to have two disks in the computer I just thought.

It is. iPXE supports PXE over WiFi, but it’s somewhat limited in
hardware.
I’ve installed many Qubes over PXE, and it’s relatively simple if you
want to go that route. If you get stuck I could help out.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

I think I have found what is preventing an installation on the same disk (anaconda/pyanaconda/modules/storage/devicetree/model.py at main · rhinstaller/anaconda · GitHub). I can’t see what issue this code is preventing since the referenced bug is not public on the fedora bugzilla, but I suspect that I could ignore it and just manually create the partitions myself.

I would like to test my theory, but I cannot seem to figure out how to modify the file properly. I have tried:

  • modifying the py file (usr/lib64/python3.13/site-packages/pyanaconda/modules/storage/devicetree/model.py) from a seperate tty while the installer is running, but it seems that changes are not picked up by the installer automatically
  • restarting the anaconda service after modifying the py file (with systemctl reload-or-restart), but that breaks the installer with a nasty python error
  • compiling the install iso from source, but gave up after running the builder for 2 hours
  • modifying the py file in the install.img in the install iso directly, but I am not confident in being able to recompress the image and bundle it back into the iso without changing anything else

I think I need to either somehow pause the install process before the anaconda installer is initially started, figure out how to reload the anaconda process so it pics up changes in the filesystem, or use some python specific debugging tooling for modifying the loaded files in the interpreter.

Any advice or insights (aside from telling me to stop being stubborn and just use an external medium) is appreciated.

I know what you mean! :sweat_smile:
I, too, have spent/wasted hours trying to tweak the installer…

Feels like this: “xkcd: Success

1 Like

Try switching to a console and running systemctl restart anaconda.service. If that still doesn’t work:

https://github.com/QubesOS/qubes-issues/issues/8464#issuecomment-1701352534


With manual partitioning, it’s unfortunately very easy to end up with a bad VM storage pool. After installing, check that your default pool (as shown by qubes-prefs) uses a driver (as shown by qvm-pool) that’s either lvm_thin or file-reflink, but not the legacy file driver!

I don’t know offhand how to set things up properly for lvm_thin. For file-reflink, the filesystem hosting the /var/lib/qubes/ directory needs to support reflinks, i.e. it needs to be Btrfs or XFS.

1 Like

I believe that this is a fine qualification for a Qubes user.

You have all my support, although I am unable to make useful suggestions. I have heard that aggressive sharks should be punched on the nose.

1 Like

Thanks for the link, the method described in the github issue works.
I was able to successfully install qubes without having to manually partition anything (just letting the anaconda installer do the partitioning. Post install qvm-pool shows that vm-pool uses lvm_thin and varlibqubes uses file as the driver, which I assume is fine.

2 Likes

This is not a guide or tutorial, only a reference for anyone who wants to try to install QubesOS without using an external storage medium (USB mass storage device, CD-ROM, PXE Server).
This is guaranteed to work only with QubesOS 4.3.1, on my machine, and exactly on Jul 1, 2026.

  • Download and verify the install ISO as described in the docs.
  • Shrink your main partition, and create a new partition big enough to store the install ISO.
  • dd the install ISO to the newly created partition.
  • Restart and boot from the new partition.
  • If you get dropped into the GRUB shell instead of the boot menu you can run:
    set root=(hd0,X); configfile /boot/grub2/grub.cfg where X is partition number of your iso partition (e.g. if you installed on nvme0n1p4, X is 4)
  • In the grub menu select Troubleshooting - verbose boot and Install Qubes OS R4.3.1 and press e to edit the entry (other options may work, but I haven’t tested it)
  • Add the systemd mask parameter to the second line in the entry: module2 /images/pxeboot/vmlinuz inst.repo=hd:LABEL=QUBES-R4-3-1-X86-64 systemd.mask=anaconda.service
  • Boot into the installer, which should pause after some time.
  • Switch to a second TTY using CTRL+ALT+F2 (or CTRL+FN+ALT+F2 for my laptop)
  • Open /usr/lib64/python3.13/site-packages/pyanaconda/modules/storage/devicetree/model.py with a text editor
  • Find and comment out (using #) the following section:
        # Protect also all devices with an iso9660 file system. It will protect
        # NVDIMM devices that can be used only as an installation source anyway
        # (see the bug #1856264).
        protected_with_ancestors.extend(dev for dev in self.devicetree.devices
                                        if dev.format.type == "iso9660")
  • Save, exit, and run cp /usr/lib/systemd/system/anaconda.service /usr/lib/systemd/system/anaconda2.service; systemctl start anaconda2
  • Proceed with the installer as described in the docs (if the installer gui doesn’t show up try switching to TTY6 with CTRL+ALT+F6)

When you get to the storage section, your hard drive should now show up, and the automatic partitioning should let you select which partitions to format.
I didn’t test if you can format the install partition and still install successfully, I just formatted every other partition. If you don’t format the install iso partition you can use it as a recovery partition, or simply format and reclaim it post install.

I really do wonder why anaconda doesn’t let you install on the same drive as the iso, it must be because IBM Red Hat Fedora Project is secretly working for big USB

5 Likes

Yes, if vm-pool is also shown as the default_pool by qubes-prefs. It probably is, since you used automatic partitioning.

1 Like