Score:0

How to recover from an empty /boot (20.04.3 lts)

br flag

I have some servers (hosted at gcp so attaching an iso and running commands isn't an option) that appear to have died because /boot was emptied and they rebooted. I've tried copying kernel files over from another ubuntu install with no luck; i'm pretty sure i'm looking for vmlinuz-5.4.0-72-generic; where would i find that on the web? if i add it to /boot and symlink vmlinuz in / will that likely solve it?

Nmath avatar
ng flag
Can you provide more details about what exactly happened, how the problem manifests, and what level of access you have to the device?
Talios avatar
br flag
The servers rebooted over the weekend and stick at the bios "booting from drive X" I can detach the drives from the servers and attach them to other servers to modify files etc But cannot attach iso's to them due to how GCP is setup. Upon investigating I found that the /boot directory on all of them is empty, and /vmlinuz is symlinked to a nonexistant /boot/vmlinuz-5.4.0-72-generic
Nmath avatar
ng flag
Do you have physical access? Can you access a recovery root shell prompt?
Talios avatar
br flag
no; since they're google cloud platform virtual machines there's no way to access that without first booting in the OS. As mentioned I can detach the drives; mount them to other VM's as non boot disks and modify the files on them/run commands on the partitions that way but that's it.
Nmath avatar
ng flag
Can you contact support or restore from a backup or snapshot? A VPS is not going to boot the same way as Ubuntu installed on bare metal. If you've copied the `/boot` from another identical VPS and it doesn't work I don't know what else to suggest. Perhaps the problem is more or different than what you've found so far. In any case, if you don't have physical access, can't get to a root shell prompt, and can't run a live session, you don't really have many options except to restore from backups or reinstall.
Talios avatar
br flag
alas our backup window for these is two weeks; and it looks like whatever cleared out /boot did so more than two weeks ago and it's just rearing it's ugly head now that they've rebooted...I'm in the process of slowly exporting one of the images in the hopes I can get into recovery console if i load the image into vmware locally...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.