Score:0

Deleted Menu Entries in Grub, ubuntu 20.04, cannot access hard encrypted hard drive

ph flag

I made a mistake when I deleted menu entries in grub and I cannot access my encrypted hard drive any more. There is a lot of medical data that i need to retrieve.

I need help with step by step instruction to try and rectify this silly mistake.

When i turn on the laptop, i get the grub command line screen; i get the option of ubuntu, then advanced ubuntu settings then uefi settings. When i select advanced ubuntu settings it only shows 1 kernel which is 5.13.0-27. When this is selected the computer just hangs there with the asus logo and that's it.

I've had a quick look at rEFInd but i'm a little confused by it and i don't know how to apply it. On the affected hard drive i'm only able to access a small partition of 763mgs which shows the links to some old kernels.

How can i rectify this?

oldfred avatar
cn flag
If data is important, you must have good backups. Particularly if encrypted as many posts with users who have issues with encryption and lost current install. https://superuser.com/questions/1536669/grub-bootloader-with-root-luks-encryption-only-grub-shell & https://askubuntu.com/questions/63594/mount-encrypted-volumes-from-command-line & Boot-Repair Mount encrypted partition, update-initramfs missing partition on boot error, /etc/crypttab setting https://unix.stackexchange.com/questions/677381/lost-boot-option-debian-after-switching-between-uefi-and-legacy
StevenW avatar
ph flag
I successfully removed the encryption using udisksctl. I can now access the data on the hard drive but what is the fastest way of determining what is missing or needed?
oldfred avatar
cn flag
Best if we can see the details of your install. Please copy & paste the pastebin link to the Bootinfo summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO https://help.ubuntu.com/community/Boot-Repaircat
StevenW avatar
ph flag
https://paste.ubuntu.com/p/73xNR4jRzP/ Not sure if that's been done correctly and it's important to know that right now I'm in 'try ubuntu' mode from live usb.
oldfred avatar
cn flag
If encrypted, you need to decrypt install before running Boot-Repair's report.
StevenW avatar
ph flag
i used udiskctl to unlock the hd. i just re installed and ran boot repair and it has generated an interesting text file. I will run it again and post the link
StevenW avatar
ph flag
https://paste.ubuntu.com/p/fGNQh6t6hP/ this is what i got. I hope it helps
StevenW avatar
ph flag
This may also help to resolve my problem. In the advanced boot menu only 1 of the 3 kernels is present. 5.13.0-27-29 and the corresponding recovery kernel. Neither of them load up. Please forgive what may appear to be silly questions as my knowledge of linux/ubuntu isn't great.
oldfred avatar
cn flag
Report looks ok. What brand/model system? Some only want to boot a "Windows Boot Manager" UEFI entry. We can make that description boot Ubuntu if that is issue. But if grub menu showing it is something else. Recovery mode does not work either? Do you get any messages on screen?
StevenW avatar
ph flag
not that i can recall, the screen just hangs there and i don't get to the stage where i have to enter the pass phrase. Last night I figured that if i could re install grub onto the efi partition, the problem would be solved but when i tried to install grub onto the efi partition i kept getting 'cannot find etc fstab' message. It's really frustrating.
StevenW avatar
ph flag
I also got another message at one point...something about being unable to locate path to cow. My system is asus 552e laptop amd 64.
oldfred avatar
cn flag
If you have encrypted LVM, you have to decrypt your install, so Boot-Repair can find fstab which is in the encrypted part of your system. The COW is copy on write or your live installer. So command was trying to update the live installer, not your install. You have to mount install to install grub manually. Example: chroot with UEFI, LVM, encryption on NVMe drive https://ubuntuforums.org/showthread.php?t=2349833&p=13602088#post13602088
StevenW avatar
ph flag
made a complete hash of that. I ended up with 2 grub menus and grub couldn't find vgubuntu where all the files are kept. I've accepted the loss of all data and did a fresh install.
oldfred avatar
cn flag
With encrypted installs, you need to have a good backup procedure. Many questions/posts on encrypted issues, both system and user created. So backups critical. https://ubuntuforums.org/showthread.php?t=2456011 & https://ubuntuforums.org/showthread.php?t=2465035&page=2&p=14049979#post14049979 & https://askubuntu.com/questions/569679/whats-a-good-back-up-strategy-for-1-desktop-pc & http://askubuntu.com/questions/545655/backup-your-home-directory-with-rsync-and-skip-useless-folders
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.