LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-01-2018, 08:55 AM   #46
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957

The lost+found directory is in that same filesystem, at the same level where you see the home directory. If you have that filesystem mounted on /media/xxx, then it would be /media/xxx/lost+found.

A separate /home is a common configuration, but never by default AFAIK. I don't think you actually used a totally default configuration, though, since LVM and encryption are options that have to be specifically selected in the Ubuntu installer. You wouldn't get a separate /home, though, without selecting "Something else" in the storage allocator and manually configuring partitions or LVs.
 
Old 10-01-2018, 10:04 AM   #47
LUKShelp
LQ Newbie
 
Registered: Sep 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
Well, yeah, default except for the full-disk encryption.

I'll try and see if my other cloned disk yields anything.

So on my other disk I ran "sudo vgs" again, and it again complains that "Device /dev/mapper/myfs" is smaller than the PV size. I repartitioned, and there's only 1MB left before the encrypted partition, could this be what's causing the problem? When I try to include that 1MB, it's no longer an encrypted partition.

Last edited by LUKShelp; 10-01-2018 at 11:25 AM.
 
Old 10-01-2018, 05:07 PM   #48
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by LUKShelp View Post
I repartitioned, and there's only 1MB left before the encrypted partition, could this be what's causing the problem? When I try to include that 1MB, it's no longer an encrypted partition.
The partition must start at the exact sector with the LUKS header. I noticed that when one asks for encryption + LVM, the Ubuntu installer actually creates an extended partition and creates a logical partition (partition 5) for the LUKS volume. Satisfying alignment constraints requires a small space ahead of that logical partition. Making that partrition a primary partition would mean that your recovered system might not boot (or might boot just fine -- depends on how the volumes are referenced), but in no way should affect the content of that filesystem.
 
Old 10-02-2018, 08:47 AM   #49
LUKShelp
LQ Newbie
 
Registered: Sep 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
Ok, got it.

So I just re-did everything again, deleted partitions, recreate, etc. luksOpen'ed the partition and tried to run "fsck" on "/dev/mapper/ubuntu--gnome--vg-root" and came back with this:

Code:
ubuntu-mate@ubuntu-mate:~/d$ sudo fsck /dev/mapper/ubuntu--gnome--vg-root
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: Input/output error while trying to open /dev/mapper/ubuntu--gnome--vg-root

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

ubuntu-mate@ubuntu-mate:~/d$
Ok, nevermind. I rebooted and ran it again and came out with:

Code:
ubuntu-mate@ubuntu-mate:~$ sudo fsck -fy /dev/mapper/ubuntu--gnome--vg-root
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/ubuntu--gnome--vg-root: 330558/6807552 files (0.3% non-contiguous), 3948345/27209728 blocks
Damnit... I mounted it and again, nothing in the /home directory. Is this just a complete loss?

Last edited by LUKShelp; 10-02-2018 at 09:30 AM.
 
Old 10-02-2018, 09:29 AM   #50
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by LUKShelp View Post
Code:
ubuntu-mate@ubuntu-mate:~/d$ sudo fsck /dev/mapper/ubuntu--gnome--vg-root
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: Input/output error while trying to open /dev/mapper/ubuntu--gnome--vg-root
Was that with the enlarged (245276672 sectors) partition? What do vgs and lvs report now?
 
Old 10-09-2018, 05:18 AM   #51
LUKShelp
LQ Newbie
 
Registered: Sep 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
I do not think it was with the enlarged partition, as it has always started at sector 1001472 to the end, but maybe it was. In either case it was from the beginning of the LUKS partition to the end.

I saw that in some earlier posts it says to run "fsck" on /dev/mapper/myfs, is this not correct? Because I'm getting "Bad magic-number in superblock", but that might be because as explained earlier it is a LUKS partition.

For some reason when I type "sudo vgs/lvs" nothing happens. Maybe just something wrong with this boot-up of the live-cd?

I'm trying this on my second USB drive, which I ran "luksOpen" on, however I'm just getting "myfs" and not "ubuntu--gnome--vg-root". Why is this? Can I still mount this partition? In gnome-disks I see that it is unlocked, but I have no idea on how to mount it.

Last edited by LUKShelp; 10-09-2018 at 05:21 AM.
 
Old 10-09-2018, 08:05 AM   #52
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by LUKShelp View Post
For some reason when I type "sudo vgs/lvs" nothing happens. Maybe just something wrong with this boot-up of the live-cd?

I'm trying this on my second USB drive, which I ran "luksOpen" on, however I'm just getting "myfs" and not "ubuntu--gnome--vg-root". Why is this? Can I still mount this partition?
The next layer under "myfs" is the LVM physical volume. You have to get that recognized before you can see the filesystem within it. Again, the output from "lsblk -f" should show that myfs is an LVM2 volume. Depending on how your live CD is set up, you might have to run vgscan, possibly with the "--mknodes" and "--cache" options to get the system to discover the LVM volume. You should then see output from vgs.
 
  


Reply


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
[SOLVED] Recovering a deleted partition table of a LUKS encrypted flash drive b92kvmomim Linux - Newbie 11 05-18-2017 09:35 AM
[SOLVED] Moving LUKS-encrypted USB-disk to new machine Yalla-One Linux - Software 4 12-28-2016 02:16 PM
Adding a second disk to lum luks encrypted setup? chytraeus Slackware 3 05-15-2016 11:44 PM
Recovering deleted file from a LUKS encrypted partition knowing its passhprase Karimo Linux - Security 2 05-28-2012 03:48 PM
[SOLVED] Automount LUKS encrypted USB disk as regular user gargamel Slackware 11 10-31-2009 05:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 PM.

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