VM Debian 9 lost bootable device after apt update

Jul 1, 2021
6
0
1
36
Good afternoon all,

I have had a problem this morning with one of my vm's and I would like to know if anyone has had the same problem and been able to solve it.

I have a vm configured in sata and was created on an old version of proxmox (i think a version 5). It has been running fine untill this morning when i did a apt upgrade on the server and rebooted. On reboot we just get the error "not a bootable disk".

I have tried restoring one of our backups but with the same problem.

The proxmox is updated to the latest version 6.4-9.

I have tried running recovery mode in debian live cd but only to find that it can not find the hard drive.

Any ideas why this has happened and how to solve it?
 
Can you post your VM config? (qm config <vmid>)

I suspect what happened is that you require multiple disks for booting, which in newer versions of PVE you have to *all* set as bootable. To do so, go to "Options" and open the "Boot Order" menu, in which you have to select the checkmark for all disks required for booting.
 
Good afternoon,

The config is:

root@pvetest:~# qm config 100
bootdisk: sata0
cores: 6
ide2: none,media=cdrom
memory: 16384
name: vm-unifi
net0: virtio=BA:DB:AA:EA:4E:70,bridge=vmbr0
numa: 0
ostype: l26
sata0: local-lvm:vm-100-disk-0,size=60G
scsihw: virtio-scsi-pci
smbios1: uuid=50bdf71f-d988-47f1-a1b1-d47194285107
sockets: 1

In boot order i have all devices selected that are available.

bootorder.PNG
 
Hm, this should work fine then. Just to confirm, could you try removing the 'sata0' disk from boot order, clicking "OK" and then adding it back? That should change the config to use the new format as well.

I have tried running recovery mode in debian live cd but only to find that it can not find the hard drive.
"Cannot find the harddrive" as in: it doesn't show up at all - or you don't see any data on it?
 
I have tried to remove it and then add it again and just get the same error:

boot.PNG


If i boot a live cd with a tool like gparted, it can see the hard drive of 60Gb but it has no partitions and no data....
 
This looks more like data/storage corruption than a VM issue... The drive should be available on the host at /dev/mapper/pve-vm--100--disk--0, maybe see if there's any data in there? Did you maybe upgrade/change any storage parts you are using during the upgrade? Did it work before, did the guest always cleanly reboot and shutdown? Also, check your logs with 'journalctl -e' and potentially post them if you find anything worrying.
 
If i do a partition recovery it seems to find the partition and shows data but for some reason will not recover correctly to boot.

I just did a simple apt upgrade on the system and rebooted, no problems in the past or incorrect shutdowns...

Can you recommend and tools to recover the partitions and installation?
 
Hi, solved!

I have used TestDisk to repair the partition table and then boot-repair-disk to repair the start-up and it is booting correctly now.

Many thanks for your help, if anyone reads this and need help in the future please let me know.
 
Hi, solved!

I have used TestDisk to repair the partition table and then boot-repair-disk to repair the start-up and it is booting correctly now.

Many thanks for your help, if anyone reads this and need help in the future please let me know.
hi @dani.hill,

I'm having the same issue, but I can't get TestDisk to repair the partition. I was following this article https://unix.stackexchange.com/ques...ble-disk-after-upgrade-from-promox-6-x-to-7-x but its not showing me Recommended Repair option.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!