LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-20-2017, 05:44 AM   #1
Chris Watts
LQ Newbie
 
Registered: May 2016
Location: Dorking, Surrey, England
Distribution: Ubuntu 16.04
Posts: 19

Rep: Reputation: Disabled
Accessing files in a partition of a HDD


When my wife's Linux (Dell) laptop died, the backups weren't up to date (yes, I know, sorry). We removed the hard disk and put it in an external case. When we plugged it in to my laptop (Acer Aspire, running Ubuntu 16.04) the disk showed in the File browser, but only what is presumably the root partition, with the GRUB directory, but no /usr or /home and it was rather small. Looking at the disk with fdisk -l and testdisk showed that there was a decent sized partition after the first.
My question is, how can I access the files in this second partition, so that I can transfer them to my backup disk to await the arrival of my wife's new laptop.
 
Old 12-20-2017, 05:57 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,656

Rep: Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454Reputation: 2454
It simply needs mounting.
However, nothing is ever simple. Ubuntu typically encrypts the /home, which is where user files are kept. Run the following from a terminal and post the output
Code:
sudo lsblk -f
 
Old 12-20-2017, 10:23 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX
Posts: 2,321

Rep: Reputation: Disabled
Most likely from a terminal as the (root user or) sudo.

The second partition will likely be sdb2 so just mount it, (just use /mnt), as in
Code:
sudo mount /dev/sdb2 /mnt
you should now see all your files under /mnt.
Code:
ls /mnt
 
Old 12-21-2017, 06:35 AM   #4
Chris Watts
LQ Newbie
 
Registered: May 2016
Location: Dorking, Surrey, England
Distribution: Ubuntu 16.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
Tried to mount, using fatmac's instruction, but got this:

mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

The result of dmesg | tail was:

[14890.746888] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)
[14994.705868] EXT4-fs (sdb2): unable to read superblock
[14994.706308] EXT4-fs (sdb2): unable to read superblock
[14994.706749] EXT4-fs (sdb2): unable to read superblock
[15139.870109] EXT4-fs (sdb2): unable to read superblock
[15139.870545] EXT4-fs (sdb2): unable to read superblock
[15139.870867] EXT4-fs (sdb2): unable to read superblock
[15208.489152] EXT4-fs (sdb2): unable to read superblock
[15208.489550] EXT4-fs (sdb2): unable to read superblock
[15208.489978] EXT4-fs (sdb2): unable to read superblock

Any ideas?
 
Old 12-21-2017, 07:48 AM   #5
Chris Watts
LQ Newbie
 
Registered: May 2016
Location: Dorking, Surrey, England
Distribution: Ubuntu 16.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
I also got round to running lsblk as suggested by syg00. This produced:

NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext4 24c5e559-62c5-4385-9976-9da6329b5bf9 /
├─sda2
└─sda5 swap f9c832d8-a821-4ec0-951a-720f50350733 [SWAP]
sdb
├─sdb1 ext2 3fb4ad76-ab9c-4876-8ae5-5b01756ab98d /media/cwatts/3fb4ad76-ab9c-4876-8ae5-5b01756ab98d
├─sdb2
└─sdb5 LVM2_member hha8K0-OWaH-xwmM-V0j2-KMe4-3FiZ-Stk6rb
sr0

so, having discovered that there was an sdb5 partition, I tried to mount that, giving:

mount: unknown filesystem type 'LVM2_member'
 
Old 12-21-2017, 07:55 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,859

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
The output you posted indicates you are using LVM and the standard mount methods won't. The link below explains the method you need to use, if that doesn't help, just do an online search for 'how to mount LVM partition'.

http://ask.xmodulo.com/mount-lvm-partition-linux.html
 
Old 12-22-2017, 03:32 PM   #7
Chris Watts
LQ Newbie
 
Registered: May 2016
Location: Dorking, Surrey, England
Distribution: Ubuntu 16.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
That looks promising. I got as far as running lvdisplay and the output included the rather discouraging line:

LV Status NOT available

It's getting late now to do complicated stuff, but should I press ahead with this approach tomorrow, or is this telling me to back off?
 
Old 12-22-2017, 03:36 PM   #8
Chris Watts
LQ Newbie
 
Registered: May 2016
Location: Dorking, Surrey, England
Distribution: Ubuntu 16.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
I should have given the whole output:

--- Logical volume ---
LV Path /dev/ubuntu-vg/root
LV Name root
VG Name ubuntu-vg
LV UUID VdOGoa-og69-Swaa-nZUF-z8d9-nz2k-fCwOMi
LV Write Access read/write
LV Creation host, time ubuntu, 2014-11-14 18:19:22 +0000
LV Status NOT available
LV Size 230.90 GiB
Current LE 59110
Segments 1
Allocation inherit
Read ahead sectors auto

--- Logical volume ---
LV Path /dev/ubuntu-vg/swap_1
LV Name swap_1
VG Name ubuntu-vg
LV UUID FIm8y9-R3rc-JWZs-4vCJ-UqiD-dWa2-8wdecI
LV Write Access read/write
LV Creation host, time ubuntu, 2014-11-14 18:19:25 +0000
LV Status NOT available
LV Size 1.74 GiB
Current LE 446
Segments 1
Allocation inherit
Read ahead sectors auto

I assume that it would be the root volume that I should be looking at.
 
Old 12-22-2017, 03:50 PM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,911

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
You just need to activate that volume group.
Code:
vgchange -ay ubuntu-vg
 
Old 12-23-2017, 04:18 AM   #10
Chris Watts
LQ Newbie
 
Registered: May 2016
Location: Dorking, Surrey, England
Distribution: Ubuntu 16.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
What a team! My wife's home directory is now happily sitting on my backup disk. I'll mark this thread solved as soon as I have posted this.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing files from Windows Partition ditto1958 Linux - Newbie 6 08-18-2008 09:10 AM
accessing files on another partition Cinematography Linux - General 4 05-13-2005 04:28 AM
Accessing files from WindowsXP NTFS external firewire hdd... shmegegge Linux - Newbie 19 10-05-2004 06:05 AM
Accessing files on my Windows partition darktalon96 Linux - Newbie 4 01-09-2004 10:23 AM
Accessing files on another partition pyr0ph0r1c Linux - Newbie 21 08-29-2003 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:43 AM.

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