1

I recently installed a SSD on an old laptop and I kept the previous disk. Now I want to see if I left anything important there, so I put it into a USB to SATA cask and I'm trying to access my data. The OS there is a Debian installation with encrypted home directory using ecryptfs. I tried mounting my Private directory in my current laptop (also Debian) but couldn't, so I'll open another question for that.

What I want to know is how to tell QEMU, either via CLI or using virt-manager, to boot from the first partition on an USB drive, say /dev/sdb1, where the EFI directory of that system was. I've seen posts that deal with booting a USB Live Image created using dd, but I couldn't boot it. For example, when following the instructions here and here I just got a screen stuck at "Booting from Hard Drive...", but nothing else happens.

Should the /dev/sdb1 partition be mounted? Because I've tried it both ways, with the same result.

EDIT: Here's the partition table of the disk:

fdisk -l /dev/sdb
Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: 2115            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 55BB5701-6D3C-4BAC-A3DF-A70D195D1B7A

Device          Start        End    Sectors   Size Type
/dev/sdb1        2048    1050623    1048576   512M EFI System
/dev/sdb2     1050624 1911824383 1910773760 911.1G Linux filesystem
/dev/sdb3  1911824384 1953523711   41699328  19.9G Linux swap

Is this possible? Thanks!

mathbekunkus
  • 337
  • 2
  • 14
  • Besides installing the drive again on a computer, is there a way of telling whether this is what is happening? If I connect it with my USB cask, the OS will read the number of logical sectors from this device, so I do not see how to know if this number changed from the real one. – mathbekunkus Mar 06 '21 at 04:40
  • There are no changes in that regard; I'll post what `fdisk -l` tells me, in any case. – mathbekunkus Mar 06 '21 at 05:05
  • IMO the partition table makes sense and the problem I mentioned does not occur here. – Kamil Maciorowski Mar 06 '21 at 05:09
  • 1
    Normally you do **not** boot from a partition, you boot from the disk: `qemu-system-x86_64 -enable-kvm -drive file=/dev/sdb,format=raw,media=disk` – Artem S. Tashkinov Mar 06 '21 at 09:36
  • @ArtemS.Tashkinov: nope, it is still stuck at "Booting fom disk". – mathbekunkus Mar 06 '21 at 18:09

0 Answers0