LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-17-2016, 12:46 PM   #1
Mi82
Member
 
Registered: Nov 2015
Posts: 53

Rep: Reputation: Disabled
How to access data on corrupted installation


So I have had some sort of corruption hit my HD running Debian Wheezy installation with whole disk encryption. What do I need to do to access the data from a LiveCD? I tried mounting the HD using a Debian-lxde LiveCD but it wouldn't mount after requesting the password. I still am able to boot the crippled HD, but it only allows a few operations before crashing the system (e2fsck comes back clean each time) and this does not leave enough time to copy much. How should I proceed?
 
Old 03-18-2016, 02:09 AM   #2
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Do you have some free space left on the HD? If yes, you could put a small distro in there and get access to your Debian on the other partition.
 
Old 03-18-2016, 10:56 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
The Debian-lxde LiveCD doesn't seem to include cryptstup, which is needed to unlock the encrypted volume. I suggest you download SystemRescueCD and use that to access your disk. Sample session with an encrypted Debian Wheezy install on /dev/sdb:
Code:
root@sysresccd /root % blkid
/dev/loop0: TYPE="squashfs" 
/dev/loop1: UUID="df7879ce-c31c-418c-ade4-2b2a4135c735" TYPE="ext3" 
/dev/sda1: LABEL="resccd-bs" UUID="a7765963-1e30-4e37-94cd-3f4c1edb836d" TYPE="ext3" PARTUUID="90b22297-01" 
/dev/sdb1: UUID="2f6ad1e8-6683-40d7-bb47-70ad479a06a6" TYPE="ext2" PARTUUID="00028b2f-01" 
/dev/sdb5: UUID="606de3d1-bb0d-4d63-999b-ecb8158a9662" TYPE="crypto_LUKS" PARTUUID="00028b2f-05" 
/dev/sr0: UUID="2016-03-11-21-15-28-00" LABEL="sysresccd-4.5.2-mod" TYPE="iso9660" 
root@sysresccd /root % cryptsetup luksOpen /dev/sdb5 myStuff
Enter passphrase for /dev/sdb5: 
root@sysresccd /root % pvs
  PV                              VG       Fmt  Attr PSize  PFree
  /dev/disk/by-id/dm-name-myStuff debian-7 lvm2 a--  19.75g    0 
root@sysresccd /root % lvs      
  LV     VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   debian-7 -wi-a-----  18.90g                                                    
  swap_1 debian-7 -wi-a----- 872.00m                                                    
root@sysresccd /root % mkdir /mnt/tmp
root@sysresccd /root % mount -r /dev/debian-7/root /mnt/tmp
root@sysresccd /root % ls /mnt/tmp
bin   etc         lib         media  proc  sbin     sys  var
boot  home        lib64       mnt    root  selinux  tmp  vmlinuz
dev   initrd.img  lost+found  opt    run   srv      usr
root@sysresccd /root %

Last edited by rknichols; 03-18-2016 at 10:57 AM.
 
  


Reply



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
How to rescue data from corrupted encrypted hdd? iwtbf Linux - Software 4 03-17-2016 05:12 PM
How to recover data from a corrupted external HD? sagar1karuna Linux - Newbie 1 10-22-2011 10:33 AM
RAID5 data rebuilding by mdadm results in corrupted data! rtyagi Linux - Newbie 0 03-26-2008 01:59 AM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 09:55 AM
access data from redhat installation campcarbondale Fedora 2 01-28-2006 12:30 PM

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

All times are GMT -5. The time now is 02:34 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
Open Source Consulting | Domain Registration