You are not logged in.

#1 2012-06-18 15:00:04

angelfalls
Member
Registered: 2012-03-26
Posts: 139

[SOLVED]recovery data when(archlinux + luks + lvm + gpt + grub2)broken

I have three partition:
+) 32MB Bios partition
+) 512M Linux System (for boot partition)
+) rest of disk (lvm partition) (root + usr + usr/local + home + tmp..)
I installed lvm on luks follow tuts's wiki of archlinux. I have a Scenario: i brings my HDD to install to a new architectural hardware and i want data in lvm partition (partically home partition) was'nt lost without backup data to a another HDD. sr for my bad english. sad. thanks for rep.

Last edited by angelfalls (2012-06-21 17:30:04)

Offline

#2 2012-06-21 15:33:56

darkreaper476
Member
Registered: 2010-05-17
Posts: 102

Re: [SOLVED]recovery data when(archlinux + luks + lvm + gpt + grub2)broken

You can easily boot up another (boot from disc) linux distro mount your partition and copy everything to a flash drive or if you only want to use your Arch disc,

boot up using your Arch disc wait until the live distro is loaded, instead of using that terminal in front of you to install arch, use it to back up everything.

(this is how I do it)
1. You need make 2 directories for mount points, I usually put them in /media. su if not already.  "mkdir /media/harddrive" for the partition with the files you want to back up "mkdir /media/flashdrive" (you can name them what ever you want)

2. Type "fdisk -l" to list your partitions, you will have to decided which one is the right partition by looking at the size or file type. Once you know the right partition your stuff is on, lets say its
/dev/sda3 then type "mount /dev/sda3 /media/harddrive"  now your drive is mounted. You can cd to it or "ls /media/harddrive" to make sure your files are there.

3. You have to do the same thing for your flash drive or what ever you want to use for a back device. EG "mount /dev/sdb2 /media/flashdrive"

4. Now that your drives are mounted in the live session you can cp all your files from /harddrive to /flashdrive : "cp -r /media/harddirve/home/*user* /media/flashdrive"   use "-r" to copy entire folder, that command will copy your home folder onto your flash drive.

Hope this helps. if all else fail just pop in a simpler live distro like.... eh.. UbUnTu or somthing if you need a GUI.

let us know if it worked.

BTW copying things this way as root has givin me some pretty annoying permission issues on the new system with my old files.. i fixed them up but just forewarning, it may or may not happen to you. any one elses take on this would be appreciated.

Last edited by darkreaper476 (2012-06-21 15:37:40)

Offline

#3 2012-06-21 17:37:42

angelfalls
Member
Registered: 2012-03-26
Posts: 139

Re: [SOLVED]recovery data when(archlinux + luks + lvm + gpt + grub2)broken

OK i solved it! follow these steps:
1. boot from liveCD
2. open luks ( cryptdevice luksOpen /dev/sda3 pentest)
3. active volume group ( vgchange -a y arch), arch is my VG
4. format almost partiton if need except home partiton (it contains my data) ex: mkfs.ext4 /dev/arch/root; mkswap /dev/arch/swap ....
5. run script /arch/setup
        rc.conf : lvm = yes
        mkinitcpio.conf : MODULES='ext4'  and HOOK = (...encrypt lvm2 usr filesystem...)
6. chroot (see wiki)
7. install grub2 (wiki)
8. generate image : grub-install and grub-mkconfig
9. mkinitcpio -p linux

BTW i hates GUI :lol

Offline

#4 2012-06-22 05:44:08

darkreaper476
Member
Registered: 2010-05-17
Posts: 102

Re: [SOLVED]recovery data when(archlinux + luks + lvm + gpt + grub2)broken

and here I am thinking I'm getting better with Arch XD :drools at skills:  LOL

Offline

Board footer

Powered by FluxBB