Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-29-2017, 03:05 PM   #1
LQ Newbie
Registered: Jun 2017
Posts: 1

Rep: Reputation: Disabled
Trying to recover data from encrypted Ubuntu, having trouble mounting unocked partition

I accidentally deleted a kernel file from the /boot partition of my encrypted Ubuntu system. Full disk encryption, no separate /home partition. Re-installing the kernel has turned out to be a dead end (none of the threads I found on google have worked for me). So no I'm just trying to access the /home folder to recover a few files. I'm using Ubuntu live USB 16.04.

I am able to unlock the partition with the
cryptsetup luksOpen /dev/sda3 recover
But when I run
ls /dev/mapper
it does not show the ubuntu--vg-root volume group, it only shows "recover" which I think is just the container. All the guides I read say to mount /dev/mapper/ubuntu--vg-root, but this volume group never shows up when I unlock the partition. Any way around this?
Old 06-29-2017, 04:01 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Did you try running vgscan after unlocking the partition?
Old 06-29-2017, 04:08 PM   #3
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 4,740

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
With the partition unlocked, you need to run "lvs" (as root) to scan for the logical volumes, and then "vgchange -ay ubuntu-vg" to activate the LVs in that volume group. Note that there is just a single "-" in "ubuntu-vg". The "--" you see in /dev/mapper is just the way a literal "-" in the VG name is represented there since a single "-" is the separator between the VG name and the LV name.

[EDIT] Yes, "vgscan" (and several other commands that cause a scan) will also work in place of "lvs". You'll still need the "vgchange -ay ...".

Last edited by rknichols; 06-29-2017 at 04:15 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Recover Data From An Encrypted Harddisk On Boot Failure With Ubuntu 14.04 LXer Syndicated Linux News 0 08-27-2014 11:10 AM
[SOLVED] URGENT - How to recover an encrypted partition? Need Help PuffDaddy Linux - General 3 01-31-2013 07:03 PM
[SOLVED] Want to recover data from Encrypted partition (created by EXT3 Ubuntu 10.04) shikhar623 Linux - Newbie 34 10-21-2010 07:40 PM
Recover data on ext3 partition on Ubuntu IMNOboist Linux - Hardware 1 04-26-2009 08:48 AM
Recover encrypted LUKS partition itinlopez Linux - General 3 11-30-2008 02:20 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration