[ HELP ] Qubes wont show up at BIOS

Hello everyone! So long story short i was running Qubes off an HDD and since it was painfully slow i wanted to update to an SSD so i cloned my drive using Macrium Reflect however after opening up my laptop to install the new disk neither disk is recognized as bootable in the BIOS before installing Qubes on that HDD i was running it off a USB disk until i got the hang of it if i unplugged that USB and plugged it back in i had the same issue and i had to go though reinstalling the OS in order for it to show up in the BIOS however this time the difference is that i had files on that HDD that i would like to keep. Is there any way to get back into Qubes? Or access my files? All comments are highly appreciated.

I donā€™t know if any of this helps but Windows 10 ( installed on a seperate disk ) boots up just fine. My laptop is an MSI GT75

( i knew that Qubes had a built in backup utility but i wanted to save my dom0 settings too without having to reconfigure everything again )

I donā€™t know Macrium Reflect, I use dd to clone partitions, so I dunno if what I say will work for you (it should I guess).

When cloning a disk, it clones everything, including all UUIDā€™s and LUKS-idā€™s stored in files. When you boot dom0, it will look into /etc/fstab and /etc/crypttab to look for, and use the right idā€™s for your disks/partitions (PVā€™s)/Volume Groups/Logical Volumes.
Maybe Macrium Reflect is different, but when you clone using dd then on boot your qubes will look for your SSD id numbers, but only finds your HDD id numbers so it will wrongfully try to access your HDD, so thatā€™s something for you to look into.

But that not the reason why neither disk is recognized as bootable in the BIOS. Thatā€™s probably because /boot partition (or EFI (/boot/efi) partition) is corrupt (or not plugged in (usb?))

What I would suggest is:

  • find yourself a linux live usb (I like xUbuntu LiveUSB)
  • (optional) boot ā€œto ramā€
    When you see the boot EFI menu, press [e]

    then add the text ā€˜toramā€™ as shown here:

    now press [F10] to boot
    Remove LiveUSB when booted
  • install boot-repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

When thatā€™s done, what you need is:

  • a /boot partition (they recomend 1Gb, but it doesnā€™t need to be that size)
  • (optionally) an EFI partiton

in a terminal:

sudo gparted

format your boot partition as ext4, and your efi partition as fat32/efi (or fat16/efi)
[edit] oh, if you need fat16, you will have to install mtools => sudo apt-get install mtools
If you donā€™t have an efi partition, I think you need to format the boot partition as fat32/efi (not sure)
put flags ā€˜efiā€™ and ā€˜bootā€™ on the efi partition
close gparted when done

cd /media/xubuntu
mkdir boot
mkdir boot/efi
sudo mount /dev/sda2 boot/ #replace ā€˜sda2ā€™ with your boot partition
sudo mount /dev/sda1 boot/efi/ #replace ā€˜sda1ā€™ with your efi partition

this is from memoryā€¦ you may have to add ā€˜sudoā€™ in front of some commands

Now before you continue turn off auto-mounting of removable disks and media, otherwise all your logical volumes will start mounting after the next step. so open the menu bar and type ā€œmediaā€ and you will see something like ā€˜removable disks and mediaā€™


=> turn off everything

open a file-manager and access your encrypted LUKS partition. It will ask password

If you did the above on your HDD, then you can now run boot-repair (as root)

sudo boot-repair

go to ā€˜advancedā€™ tab and make sure:

  • boot partition is sda2 # or whatever it is in your case
  • efi partition is sda1
  • place boot flag on sda1
  • select the right qubes-os to boot
    dang what else was thereā€¦ (I did this like half an hour ago to fix my qubes-osā€¦ donā€™t remember :-s)
    Check all settings

When thatā€™s done you should be able to boot from your HDD again which gives you the opportunity to make backups.

If you did the above on your SDD, then you first have to change some details before running boot-repair

  • check your UUIDā€™s

sudo blkid

if the list is long and unreadable

sudo blkid | grep /dev/s

(sddā€™s and (I think) hddā€™s are listed as /dev/sdx, so that should list them. For nvmeā€™s do ā€˜grep /dev/nā€™)

  • check all IDā€™s and entries in /etc/fstab and /etc/crypttab

sudo mousepad /etc/fstab # mousepad or gedit or nano or ā€¦
sudo mousepad /etc/crypttab

in my caseā€¦ the LUKS-id is similar to the UUIDā€™s:
my /etc/crypttab :

luks-53ed...5e28 UUID=53ed...5e28 none
luks-0b7c...07e0 UUID=0b7c...07e0 none
luks-5e4a...5b74 UUID=5e4a...5b74 none

You may want to replace your HDD idā€™s with your SSD idā€™s there.

Now if somehow the output of sudo blkid | grep /dev/s tells you that the idā€™s of your SSD and HDD are identical (cloning?), then that may give problems when booting if both are connected at the same timeā€¦ in that case you may want to physically remove your HDD

Try to get your back-ups, and have fun! :smiley:

3 Likes

WOW! First of all thank you very much for taking the time to write such a lengthy and detailed comment in order to help me iā€™ve gotten all the way though to run boot-repair but i got this error message " Please enable a repository containing the [grub-efi-amd64-signed] packages in the software sources of Qubes 4.0 (R4.0) (mapper/qubes_dom0-root). Then try again. " Any ideas?

Edit : Everything else seems correct and my files are right where i left them

Weā€™re all in this together, so youā€™re welcome!
Iā€™ve had help from all kinds of friendly beings, like one time I was riding my bicycle in Scotland and had an accident. A local brought me to the only car mechanic in a 100km radius. After he preliminary fixed my bike, good enough to ride a the bicycle shop few days away, I asked ā€œwhat do I owe you?ā€ He said: ā€œjust pass it on to someone elseā€, so thatā€™s just what I do :smiley:
A small effort for you might be a huge help to someone elseā€¦

have you googled https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/?q=grub-efi-amd64-signed+repository ?

Here I read: [ Re: grub-efi-amd64-signed failure, Installer Crashed

Post by schnisha95 Ā» Mon Mar 13, 2017 2:52 pm

I got it to work by installing when not connected to the internet. Thanks daret for the suggestion and thanks fabien for the tips. I appreciate it!]([SOLVED] grub-efi-amd64-signed failure, Installer Crashed - Linux Mint Forums)

Now that you can access themā€¦ you did take a backupā€¦ right? :slight_smile:

Have fun!
A point of attention within an infinite state of consciousness having an experience

Unfortunately in todayā€™s society people like the person that gave you a ride to that mechanic that mechanic himself and you are far and few in between takes me a minute or two to remember a memory of someone being nice to me , let alone a stranger.

I did backup everything important from that point onward the ideal scenario for me would be to boot up into the OS even for the last time to backup everything using the built in utility so i could reinstall Qubes on that SSD so it would show up as a boot option.

The error i got if i tried to run boot repair while not connected to the internet was. " No internet connection detected. Please connect internet. Then try again. "

" Please enable a repository containing the [grub-efi-amd64-signed] packages in the software sources of Qubes 4.0 (R4.0) (mapper/qubes_dom0-root). Then try again. " I just donā€™t know where to find that repo or where to put itā€¦