Boot-repair corrupted my QubesOS4.0.3 LUKS partition. unbootable even from rescue mode

Hi team,

So I had an incident recently where I didn’t read a dialog box well enough to understand what it meant, and I accidentally confirmed that boot-repair ( boot-repair / Home / Home )should continue with writing to a partition it couldn’t read (my QubesOS installation on /dev/sda2). Luckily it spat out a log, but it hasn’t really helped. basically it didn’t know what a LUKS partition header looks like… didn’t say what it had done to it. I think it overwrote the MBR, but I have been unable to recover and repair that, nor can I even use rescue mode to repair or even read the /dev/sda2 LUKS partition in question…

However I have been able to decrypt it and look at the files and block devices/qubes using Gnome Disks and Nautilus from a Manjaro install (/dev/sdc1). So my data is intact, and I have taken images of VMs I want to ensure survive this!


Worst warning you’re about to write over your encryption header ever …

boot-repair log:
> boot-repair-4ppa125 [20210224_0517]

============================= Boot Repair Summary ==============================

Error code 12
mount -r /dev/sdd2 /mnt/boot-sav/sdd2

mount -r /dev/sdd2 : Error code 12
Error code 12
mount -r /dev/sdd2 /mnt/boot-sav/sdd2

mount -r /dev/sdd2 : Error code 12

NTFS signature is missing.
Failed to mount ‘/dev/sdd2’: Invalid argument
The device ‘/dev/sdd2’ doesn’t seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
NTFS signature is missing.
Failed to mount ‘/dev/sdd2’: Invalid argument
The device ‘/dev/sdd2’ doesn’t seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
NTFS signature is missing.
Failed to mount ‘/dev/sdd2’: Invalid argument
The device ‘/dev/sdd2’ doesn’t seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
NTFS signature is missing.
Failed to mount ‘/dev/sdd2’: Invalid argument
The device ‘/dev/sdd2’ doesn’t seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

=================== /boot detected. Please check the options.
adding: 20210224_051723/ (stored 0%)
adding: 20210224_051723/sdd2/ (stored 0%)
adding: 20210224_051723/sdd/ (stored 0%)
adding: 20210224_051723/sdd/partition_table.dmp (deflated 35%)
adding: 20210224_051723/sdd/current_mbr.img (deflated 98%)
adding: 20210224_051723/sdb3/ (stored 0%)
adding: 20210224_051723/sdb2/ (stored 0%)
adding: 20210224_051723/sdb1/ (stored 0%)
adding: 20210224_051723/sdb/ (stored 0%)
adding: 20210224_051723/sdb/partition_table.dmp (deflated 43%)
adding: 20210224_051723/sdb/current_mbr.img (deflated 2%)
adding: 20210224_051723/sda1/ (stored 0%)
adding: 20210224_051723/sda/ (stored 0%)
adding: 20210224_051723/sda/partition_table.dmp (deflated 34%)
adding: 20210224_051723/sda/current_mbr.img (deflated 95%)
adding: 20210224_051723/boot-repair.log (deflated 79%)

Advices: _______________________________________________________________________
You may want to retry after mounting your encrypted partitions so that the tool can verify their contents. (EncryptedPrivateDirectory - Community Help Wiki)
Are you sure you want to continue anyway? yes

Recommended repair: ____________________________________________________________

The default repair of the Boot-Repair utility will restore the [(generic mbr)] MBR in sda, and make it boot on sda1.
Additional repair will be performed: unhide-bootmenu-10s win-legacy-basic-fix

Quantity of real Windows: 1

============================== Restore MBR of sda ==============================

dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda

Boot successfully repaired.

You can now reboot your computer.

============================ Boot Info After Repair ============================

=> Syslinux MBR (5.00 and higher) is installed in the MBR of /dev/sda.
=> Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for /boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk search_fs_uuid
---------------------------------------------------------------------------

config script
---------------------------------------------------------------------------
search.fs_uuid 3201f545-d634-4407-88bc-cf68ff38df99 root hd2,msdos1 
set prefix=($root)'/boot/grub'

---------------------------------------------------------------------------

=> Grub2 (v2.00) is installed in the MBR of /dev/sdc and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (cryptouuid/7ca892884d324d398aa6c51275e95b60)/boot/grub. It also
embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 archelp procfs extcmd crypto cryptodisk pbkdf2 afsplitter luks 
gcry_rijndael gcry_sha256 part_msdos biosdisk
---------------------------------------------------------------------------

config script
---------------------------------------------------------------------------
cryptomount -u 7ca892884d324d398aa6c51275e95b60

---------------------------------------------------------------------------

=> Syslinux MBR (5.00 and higher) is installed in the MBR of /dev/sdd.

sda1: __________________________________________________________________________

File system:       ext4
Boot sector type:  -
Boot sector info: 
Operating System:  
Boot files:        /grub2/grub.cfg /grub2/i386-pc/core.img

sda2: __________________________________________________________________________

File system:       crypto_LUKS
Boot sector type:  Unknown
Boot sector info: 

sdb1: __________________________________________________________________________

File system:       vfat
Boot sector type:  Dell Utility: FAT16
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:        /efi/BOOT/fbx64.efi /efi/BOOT/mmx64.efi 
                   /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                   /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg 
                   /DELLBIO.BIN /DELLRMK.BIN /COMMAND.COM

sdb2: __________________________________________________________________________

File system:       ntfs
Boot sector type:  Windows 7/2008: NTFS
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:        /bootmgr /Boot/BCD

sdb3: __________________________________________________________________________

File system:       ntfs
Boot sector type:  Windows 8/2012: NTFS
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  Windows 7
Boot files:        /Windows/System32/winload.exe

sdc1: __________________________________________________________________________

File system:       crypto_LUKS
Boot sector type:  Unknown
Boot sector info: 

sdd1: __________________________________________________________________________

File system:       vfat
Boot sector type:  SYSLINUX 6.03
Boot sector info:  Syslinux looks at sector 32776 of /dev/sdd1 for its 
                   second stage. The integrity check of Syslinux failed. 
                   No errors found in the Boot Parameter Block.
Operating System:  
Boot files:        /boot/grub/grub.cfg /syslinux.cfg 
                   /efi/BOOT/grubx64.efi /ldlinux.sys

sdd2: __________________________________________________________________________

File system:       
Boot sector type:  -
Boot sector info: 

================================ 2 OS detected =================================

OS#1: Windows 7 (boot) on sdb2
OS#2: Windows 7 on sdb3

============================ Architecture/Host Info ============================

CPU architecture: 64-bit
Live-session OS is Ubuntu 64-bit (Boot-Repair-Disk 64bit 20200604, bionic, x86_64)

===================================== UEFI =====================================

This live-session is not in EFI-mode.
EFI in dmesg.
[ 0.014704] ACPI: UEFI 0x000000009F7FC000 000236 (v01 ALWARE ALIENWRE 00000001 ASL 00040000)

f98dff8980e2f542c64ddcc6b6cab59a sda1/qubes/xen-4.8.5-29.fc25.efi
2895d47544fd587b26c7e29be1295c27 sdb1/BOOT/fbx64.efi
dc3c47be2f78a78e5e57d097ae6c5c84 sdb1/BOOT/mmx64.efi
951288adcc81d2d86508f3f18d9753e0 sdb1/ubuntu/grubx64.efi
dc3c47be2f78a78e5e57d097ae6c5c84 sdb1/ubuntu/mmx64.efi
78415fb8fb9b909f8029858113f1335f sdb1/ubuntu/shimx64.efi
78415fb8fb9b909f8029858113f1335f sdb1/BOOT/BOOTX64.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

sda : notGPT, no-BIOSboot, has-noESP, not-usb, not-mmc, no-os, 2048 sectors * 512 bytes
sdb : notGPT, no-BIOSboot, has—ESP, not-usb, not-mmc, has-os, 63 sectors * 512 bytes
sdd : notGPT, no-BIOSboot, has-noESP, usb-disk, not-mmc, no-os, 64 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

sda1 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sdb1 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sdb2 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sdb3 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sdd2 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far

Partitions info (2/3): _________________________________________________________

sda1 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sdb1 : is—ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sdb2 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, bootmgr, is-winboot
sdb3 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, no-bmgr, notwinboot
sdd2 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot

Partitions info (3/3): _________________________________________________________

sda1 : is-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no—usr, part-has-no-fstab, std-grub.d, sda
sdb1 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no—usr, part-has-no-fstab, std-grub.d, sdb
sdb2 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no—usr, part-has-no-fstab, std-grub.d, sdb
sdb3 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no—usr, part-has-no-fstab, std-grub.d, sdb
sdd2 : maybesepboot, no-boot, part-has-no-fstab, not-sep-usr, no—usr, part-has-no-fstab, std-grub.d, sdd

fdisk -l (filtered): ___________________________________________________________

Disk sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk identifier: 0xd71174a2
Boot Start End Sectors Size Id Type
sda1 * 2048 2099199 2097152 1G 83 Linux
sda2 2099200 234440703 232341504 110.8G 83 Linux
Disk sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 0xc51e4c89
Boot Start End Sectors Size Id Type
sdb1 * 63 80324 80262 39.2M 6 FAT16
sdb2 81920 29663231 29581312 14.1G 7 HPFS/NTFS/exFAT
sdb3 29663232 1953521663 1923858432 917.4G 7 HPFS/NTFS/exFAT
Disk sdc: 29.8 GiB, 32017047552 bytes, 62533296 sectors
Disk identifier: 0x8f7b0c28
Boot Start End Sectors Size Id Type
sdc1 * 2048 62524979 62522932 29.8G 83 Linux
Disk sdd: 7.5 GiB, 8004304896 bytes, 15633408 sectors
Disk identifier: 0x029e45d3
Boot Start End Sectors Size Id Type
sdd1 * 64 15633324 15633261 7.5G c W95 FAT32 (LBA)
sdd2 15633325 15633387 63 31.5K ea Rufus alignment
Disk zram0: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram1: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram2: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram3: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram4: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram5: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram6: 2 GiB, 2101575680 bytes, 513080 sectors
Disk zram7: 2 GiB, 2101575680 bytes, 513080 sectors

parted -lm (filtered): _________________________________________________________

sda:120GB:scsi:512:512:msdos:ATA Samsung SSD 850:;
1:1049kB:1075MB:1074MB:ext4::boot;
2:1075MB:120GB:119GB:::;
sdb:1000GB:scsi:512:512:msdos:ATA ST1000LM024 HN-M:;
1:32.3kB:41.1MB:41.1MB:fat16::boot;
2:41.9MB:15.2GB:15.1GB:ntfs::;
3:15.2GB:1000GB:985GB:ntfs::;
sdc:32.0GB:scsi:512:512:msdos:ATA SAMSUNG SSD PM83:;
1:1049kB:32.0GB:32.0GB:::boot;
sdd:8004MB:scsi:512:512:msdos:SanDisk Cruzer Switch:;
1:32.8kB:8004MB:8004MB:fat32::boot, lba;
2:8004MB:8004MB:32.3kB:::;
zram5:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram3:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram1:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram6:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram4:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram2:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram0:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;
zram7:2102MB:unknown:4096:4096:loop:Unknown:;
1:0.00B:2102MB:2102MB:linux-swap(v1)::;

blkid (filtered): ______________________________________________________________

NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 ext4 c5345c67-14d6-4f87-bce6-19b79ed7c3d6 d71174a2-01
└─sda2 crypto_LUKS dfd9d9f7-f5e7-48db-8c1c-5c90b1fb7018 d71174a2-02
sdb
├─sdb1 vfat 5450-4444 c51e4c89-01 DellUtility
├─sdb2 ntfs 6476614A76611DD4 c51e4c89-02 RECOVERY
└─sdb3 ntfs 984263D04263B224 c51e4c89-03 OS
sdc
└─sdc1 crypto_LUKS 7ca89288-4d32-4d39-8aa6-c51275e95b60 8f7b0c28-01
sdd
├─sdd1 vfat B8E8-80D2 029e45d3-01 BOOT-REPAIR
└─sdd2 029e45d3-02
zram0
zram1
zram2
zram3
zram4
zram5
zram6
zram7

df (filtered): _________________________________________________________________

  Avail Use% Mounted on

sda1 766M 15% /mnt/boot-sav/sda1
sdb1 31.2M 20% /mnt/boot-sav/sdb1
sdb2 6G 58% /mnt/boot-sav/sdb2
sdb3 71.4G 92% /mnt/boot-sav/sdb3
sdd1 6.6G 12% /cdrom

Mount options: __________________________________________________________________

sda1 rw,relatime
sdb1 rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
sdb2 rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sdb3 rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sdd1 ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro

======================== sda1/grub2/grub.cfg (filtered) ========================

Qubes, with Xen hypervisor mapper/qubes_dom0-root
Qubes, with Xen 4.8.5-29.fc25 and Linux 5.4.88-1.qubes.x86_64 mapper/qubes_dom0-root
Qubes, with Xen 4.8.5-29.fc25 and Linux 4.19.94-1.pvops.qubes.x86_64 mapper/qubes_dom0-root
Qubes, with Xen 4.8.5-29.fc25.config and Linux 5.4.88-1.qubes.x86_64 mapper/qubes_dom0-root
Qubes, with Xen 4.8.5-29.fc25.config and Linux 4.19.94-1.pvops.qubes.x86_64 mapper/qubes_dom0-root
Qubes, with Xen 4.8 and Linux 5.4.88-1.qubes.x86_64 mapper/qubes_dom0-root
Qubes, with Xen 4.8 and Linux 4.19.94-1.pvops.qubes.x86_64 mapper/qubes_dom0-root

END /etc/grub.d/30_os-prober

==================== sda1: Location of files loaded by Grub ====================

       GiB - GB             File                                 Fragment(s)

0.161163330 = 0.173047808 grub2/grub.cfg 1
0.195011139 = 0.209391616 grub2/i386-pc/core.img 1
0.140052795 = 0.150380544 vmlinuz-4.19.94-1.pvops.qubes.x86_64 1
0.257671356 = 0.276672512 vmlinuz-5.4.88-1.qubes.x86_64 1
0.264549255 = 0.284057600 initramfs-4.19.94-1.pvops.qubes.x86_64.img 2
0.350688934 = 0.376549376 initramfs-5.4.88-1.qubes.x86_64.img 1

===================== sdb1/efi/ubuntu/grub.cfg (filtered) ======================

search.fs_uuid 3201f545-d634-4407-88bc-cf68ff38df99 root hd2,msdos1
set prefix=($root)’/boot/grub’
configfile $prefix/grub.cfg

====================== sdd1/boot/grub/grub.cfg (filtered) ======================

Boot-Repair-Disk session
Boot-Repair-Disk session (failsafe)

========================= sdd1/syslinux.cfg (filtered) =========================

DEFAULT loadconfig

LABEL loadconfig
CONFIG /isolinux/isolinux.cfg
APPEND /isolinux/

==================== sdd1: Location of files loaded by Grub ====================

       GiB - GB             File                                 Fragment(s)
        ?? = ??             boot/grub/grub.cfg                             1

================== sdd1: Location of files loaded by Syslinux ==================

       GiB - GB             File                                 Fragment(s)
        ?? = ??             syslinux.cfg                                   1
        ?? = ??             ldlinux.sys                                    1

======================== Unknown MBRs/Boot Sectors/etc =========================

Unknown BootLoader on sda2

00000000 4c 55 4b 53 ba be 00 01 61 65 73 00 00 00 00 00 |LUKS…aes…|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000020 00 00 00 00 00 00 00 00 78 74 73 2d 70 6c 61 69 |…xts-plai|
00000030 6e 36 34 00 00 00 00 00 00 00 00 00 00 00 00 00 |n64…|
00000040 00 00 00 00 00 00 00 00 73 68 61 32 35 36 00 00 |…sha256…|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000060 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00 40 |…@|
00000070 94 73 d5 ce 2b 27 27 8b ea b0 52 f6 45 0c 85 82 |.s…+’’…R.E…|
00000080 66 8c 68 43 23 37 0c 01 eb 5e fc 83 01 ab 57 23 |f.hC#7…^…W#|
00000090 fb e3 f5 b8 3c 26 52 18 2d 0e 8c 2d 7f 24 47 09 |…<&R.-…-.$G.|
000000a0 cc 52 b8 0d 00 01 be 4a 64 66 64 39 64 39 66 37 |.R…Jdfd9d9f7|
000000b0 2d 66 35 65 37 2d 34 38 64 62 2d 38 63 31 63 2d |-f5e7-48db-8c1c-|
000000c0 35 63 39 30 62 31 66 62 37 30 31 38 00 00 00 00 |5c90b1fb7018…|
000000d0 00 ac 71 f3 00 0e 63 3c 97 6e da a3 d7 91 8b 08 |…q…c<.n…|
000000e0 e4 11 65 32 4f b4 49 3f 2e 20 3e c7 49 d7 47 a3 |…e2O.I?. >.I.G.|
000000f0 62 67 46 e4 bb 2f a4 72 00 00 00 08 00 00 0f a0 |bgF…/.r…|
00000100 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000120 00 00 00 00 00 00 00 00 00 00 02 00 00 00 0f a0 |…|
00000130 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000150 00 00 00 00 00 00 00 00 00 00 03 f8 00 00 0f a0 |…|
00000160 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000180 00 00 00 00 00 00 00 00 00 00 05 f0 00 00 0f a0 |…|
00000190 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001b0 00 00 00 00 00 00 00 00 00 00 07 e8 00 00 0f a0 |…|
000001c0 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001e0 00 00 00 00 00 00 00 00 00 00 09 e0 00 00 0f a0 |…|
000001f0 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000200

Unknown BootLoader on sdc1

00000000 4c 55 4b 53 ba be 00 01 61 65 73 00 00 00 00 00 |LUKS…aes…|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000020 00 00 00 00 00 00 00 00 78 74 73 2d 70 6c 61 69 |…xts-plai|
00000030 6e 36 34 00 00 00 00 00 00 00 00 00 00 00 00 00 |n64…|
00000040 00 00 00 00 00 00 00 00 73 68 61 32 35 36 00 00 |…sha256…|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000060 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00 40 |…@|
00000070 3d 57 ab 40 3a 8d 41 5b d8 68 cc 4f 3c da 51 da |=W.@:.A[.h.O<.Q.|
00000080 46 54 3f 90 fb 77 4c 0d 1b c4 a6 24 e6 bd ce 7b |FT?..wL…...{| 00000090 2d 71 34 7f 41 ae db c8 46 5c d3 64 a6 30 71 65 |-q4.A...F\.d.0qe| 000000a0 f5 83 82 a2 00 01 62 14 37 63 61 38 39 32 38 38 |......b.7ca89288| 000000b0 2d 34 64 33 32 2d 34 64 33 39 2d 38 61 61 36 2d |-4d32-4d39-8aa6-| 000000c0 63 35 31 32 37 35 65 39 35 62 36 30 00 00 00 00 |c51275e95b60....| 000000d0 00 ac 71 f3 00 09 a1 fa f5 8a c6 a4 a2 2e 79 5c |..q...........y\| 000000e0 e4 53 0e a1 bb db 14 8e 01 a9 ad 94 75 d7 97 f9 |.S..........u...| 000000f0 a1 b4 24 a3 fb 73 d8 ff 00 00 00 08 00 00 0f a0 |..…s…|
00000100 00 ac 71 f3 00 05 d2 88 49 e8 b3 27 77 84 26 ca |…q…I…'w.&.|
00000110 29 77 73 5d 8b a0 b8 00 2d 6a 9a e3 f4 48 48 6c |)ws]…-j…HHl|
00000120 3c 51 a0 9b f7 67 00 67 00 00 02 00 00 00 0f a0 |<Q…g.g…|
00000130 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000150 00 00 00 00 00 00 00 00 00 00 03 f8 00 00 0f a0 |…|
00000160 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000180 00 00 00 00 00 00 00 00 00 00 05 f0 00 00 0f a0 |…|
00000190 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001b0 00 00 00 00 00 00 00 00 00 00 07 e8 00 00 0f a0 |…|
000001c0 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |…|
000001e0 00 00 00 00 00 00 00 00 00 00 09 e0 00 00 0f a0 |…|
000001f0 00 00 de ad 00 00 00 00 00 00 00 00 00 00 00 00 |…|
00000200

=============================== StdErr Messages ================================

File descriptor 63 (pipe:[116879]) leaked on lvs invocation. Parent PID 8356: /bin/bash

QubesOSv4.0.3-ubuntu-boot-repair-disk-Destroyer-log.log (23.5 KB)

Does anyone have a clue where to start? Closest bit of documentation I can find has been this, but it’s not quite my problem…
QubesOS: Mount and Decrypt Qubes Partition from Outside Qubes

well if you’re data is fine then great you should allways have a backup

years a go i had a similar issue
i remember that well ubuntu’s boot repair tool did jack shit for me
my prbolem was a it more complex then that and required the full recovery of a corrupted partition table basically

ther’es a nice tools for it called

testdisk

very powerfull simple and useful but at times can be horrifically slow

very simple to use lots of docu

try using that

it took hours but i completely recovered my pc… obviously slightly different of a situation but still
a powerful tool to recover data partition tables and boot sectors and alike

compared to the bs you might find when simply googleing like the ubuntu tool i
mentioned did jack shit…
it’s like trying to use Windows automatic problem solver… sure some times it’ll by chance work and do something useful but for the most part
don’t waste you’re time on those tools and… you’ll just waste hours of you’re life

seriously man… the heavy artillery is best
even if it’s slow
if it’s a hhd we’re talking about then you should maybe try using you’re backup image on another drive to play around and maybe find the issue and solve it faster…

(always have a backup much easier then to recover)

1 Like

hmmm… i think I tried TestDisk in Partition Magic (08-2020) already, but just in case I’m going to give it a show now… right after dd finishes…

cheers guy, i’ll let you know momentarily.

So after many attempts from many angles, no. TestDisk wasn’t going to work… I needed a LUKS repair tool… no normal bootloader repair/disk partition repair handles LUKS properly even if it says it does.

After corrupting the partition further to the point of partition boundaries unexpectedly changing from TestDisk’s most basic manipulations, it was unable to be decrypted at all.

I did also try the QubesOS installer and manually partition. Couldn’t recognise or recover via that method either. However this was after trying TestDisk so who knows what was possible.?

Clearly I was just mashing buttons doing this, not recommended for real data recovery. But I’d only had Q-OS installed for 2 weeks prior to this and I have cloud and portable HDD backups… so i wasn’t worried bar some of the code i’d already poured myself into, whch I’ve rescued :slight_smile:

As I said above, I have managed to recover the important qubes beforehand and this has allowed me to start over… as this is an important aspect to Qubes, the security relies in planning ahead how you will achieve the task at hand. the efficacy of the system is defined by our planning skills more than usual!

WARNING TO USERS:
QubesOS and LUKS is sensitive to disk and boot tools… don’t use them around your drives Qubes is installed on and backup regularly!
testdisk.log (31.3 KB)

2 Likes