How to edit BOOTX64.cfg to install Qubes OS. Screen freezes before Install Menu UEFI

So I have a new Lenovo Legion 5 laptop UEFI with nvidia. When I run the Qubes iso from a flash drive it freezes during boot before getting to the install menu. On the website it says to edit the BOOTX64.cfg file in the iso and comment out 2 lines. Now these files are read only and cannot be edited. I am using Linux debian. I tried following the directions on the website with no success. Don’t know if I am doing something wrong or what. I have been able to extract the files and edit them that way. However, when I recreate the ISO it looses its partition table and is unbootable. I dont know what to do. Anyone who has had the same issue that I have and can give me detailed steps on how to do so, either on linux or Windows, I would greatly appreciate it. I am willing to cash app anyone $10 who can solve my problem. Is this what I am supposed to be trying to do enable for it not to freeze at boot up

you need root permission to be able to do that
if you still can’t do it, download 700mb win pe and try on it (linux permission is useless on windows)

me too (mostly)

that can be a problem

@Joeneedshelp because you respond too slow so here step by step

  • how large is you usb
    if >8gb = use different one
    if <8gb = next
  • prepare
    1. connect the usb
    2. mount EFI partition (small second partition available on the disk)
    3. switch to root (there many way to do this)
      • su
      • sudo su -
      • sudo -s
      • sudo (the command)
      • and more
    4. use (nano, vi, vim, neovim, emacs, any graphical text editor run as root, etc) to edit EFI/BOOT/BOOTX64.cfg (depend on mount point
      if mount with graphical tool (fm) /media/ (some folder)
      if mount with cli tool /mnt/ (some folder)

Removing noexitboot and mapbs

  • edit


# noexitboot=1
# mapbs=1

  • install as normal but don’t reboot when prompted
  • Ctrl+Alt+F2 to swich to tty2
  • use (nano, vi, etc) to edit /mnt/sysimage/boot/efi/EFI/qubes/xen.cfg
    • check to see if noexitboot and mapbs lines are not present
  • Ctrl+Alt+F6 to swich back tty6
  • Continue as normal
    if it doesn’t work

Changing options=console= parameter to none

  • edit


  • install as normal
    if it still don’t work
1. use a hammer to brake your laptop

ok, that a joke, don’t do that

Disable EFI runtime services (this work for my pc)

  • edit






# noexitboot=1
# mapbs=1
  • continue until you receive a warning about being unable to create the EFI boot entry
  • click continue but don’t reboot
  • Ctrl+Alt+F2 to swich to tty2
  • use (nano, vi, etc) to edit /mnt/sysimage/boot/efi/EFI/qubes/xen.cfg
    • add efi=no-rs option to the end of the options= line
    • execute
cp -R /mnt/sysimage/boot/efi/EFI/qubes /mnt/sysimage/boot/efi/EFI/BOOT
mv /mnt/sysimage/boot/efi/EFI/BOOT/xen-*.efi /mnt/sysimage/boot/efi/EFI/BOOT/BOOTX64.efi
mv /mnt/sysimage/boot/efi/EFI/BOOT/xen.cfg /mnt/sysimage/boot/efi/EFI/BOOT/BOOTX64.cfg
  • Ctrl+Alt+F6 to swich back tty6
  • reboot and continue
there maybe boot device not recognized after installing
cp -r /boot/efi/EFI/qubes/. /boot/efi/EFI/BOOT
mv /boot/efi/EFI/BOOT/xen.cfg /boot/efi/EFI/BOOT/BOOTX64.cfg
cp /boot/efi/EFI/qubes/xen-*.efi /boot/efi/EFI/qubes/xen.efi
cp /boot/efi/EFI/qubes/xen-*.efi /boot/efi/EFI/BOOT/BOOTX64.efi


  • contents of /boot/efi/EFI/BOOT should be identical to /boot/efi/EFI/qubes
  • replace xen-*.efi to the correct file

i’m so tired

1 Like

what’s your legion 5 spec ? how you create media installation ?

Sorry, Ive been a little busy so I really only will check messages once a day on here. I will try doing with with root permissions, but doesnt sudo do the same thing. That is how I have been trying it and it has not worked.
I know I asked for step by step, but I am not a linux pro so I only know the basic linux commands. Looks like I was doing it right just didnt try it under root if that makes a difference just tried sudoing.

I have a Lenovo Legion 5 Intel i7-10750H (12) @ 5.000GHz GPU: NVIDIA GeForce GTX 1660 Ti Mobil. Any other suggestions as to how I should go about this. If I can get it to work using root I will let you guys know, but probably wont try it till tomorrow.

does you see any text splashes when booting, if no that can possible be the nvidia card doesn’t comp. with qubes

It’s same model.

you only need to focus on this two things :

  • BIOS = legacy + discrete only gpu.
  • UEFI = uefi + hybrid or discrete (just use hybrid mode, save battery)

based on your post, you mention uefi, are you sure you choose the uefi boot?

Sorry ive been away for a day or two. So you have the same model? I dont need to worry about editing the file?? If so this is what happens when I try to edit it from root. I mount the second partition edit the file save and it saves the file. However, when I open the USB from the file manager and open BOOTX64.cfg no changes have been saved, so I dont understand it cause then when I remount it and check through the terminal it is still saved.

If i dont have to edit the file then below?
So you are saying just to put BIOS into legacy and put GPU into discrete only? Is that hard or is it a setting in the BIOS? You said focus on two things but if I am booting from legacy then I do not have to worry about what you said in UEFI right? If putting the GPU in discrete only is not a setting in the BIOS, if you could list instructions I would appreciate it. I can try it again with changing the GPU settings once I hear back from you. Thanks for the help. What happens is the OS begins to boot in text mode and half way through it freezes up. Could be the GPU issue IDK.

I flashed the USB drive using Etcher

Just forget whatever you have read in another topics, you don’t need to configure / edit any files.

yea it would work. if you use legacy + hybrid mode (in this case you use iGPU) it will freeze, black screen, etc.

in bios settings. fn + f2 change to discrete only if you run with legacy.

contrary, uefi works fine with both hybrid / discrete only mode.

it happen when you run legacy + hybrid mode, i’m very sure.

or you can disable Legacy support in bios settings, so your pc would always run in UEFI + hybrid mode (less power).

Ok, so I went in and enabled Legacy support and put graphics in discrete only and this time it only gave me a blank black screen as opposed to a bunch of text scrolling then freezing like it used to. I did not see any option anywhere for hybrid? or is that just when you have it in UEFI. Am i missing something or did I have it right. The only two things I changed was EFI to legacy support and graphics to discrete only. I think USB is in legacy as well if that is an option.?? Any thoughts

i flashed it to usb through etcher. should i try doing it through DD? Do you know the commands if i know where the drive is mounted?

Hey so looks like I got it. The install menu appeared when I booted. I must have just had a couple of corrupt ISO’s. Have not tried to install yet but its looking good so far. Thanks for replying ya did it!

yes, and for better performance you should use 4.1

Got it installed! Seems to be working fine. I am currently on it. Now I just need to learn how everything works. Appreciate the help.

Hey!! I am having the exact same problem. Can you tell me exactly what you did to get it working? There is a lot on this page and I am having trouble understanding some of it. So glad I finally found a potential answer, I have been searching for weeks. Thank you so much!! (:

Can you explain what happened to fix this problem? Thanks! (:

You should create a new topic, explain your machine spec / laptop type, what qubes version you use, your problem, and what have you done.