LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-16-2010, 04:33 PM   #1
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Rep: Reputation: 15
LVM groups issue


Hi..im trying to install my debian again . in this time im want to encrypt it.. using LVM and later LUks..

my question is, how i do that?
:-)

im in instalation process. AND I WANT TO CREATE A GROUP LMV AND LATER PARTION THE CONTAINER..how i do that?
 
Old 05-16-2010, 11:35 PM   #2
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
Now ..i think i fucked my hard drive....... it wont let me install anything!!..

i created a LVM group ..and after that i used encryption...
now it wont let me do anything..
 
Old 05-16-2010, 11:47 PM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,608

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Hi,

I am not familiar with the debian installer. Does it recognize logical volumes and/or encrypted partitions?
Please also provide the steps that you took to create the logical volume and the encryption. Also post your hard disk layout that you want to use for lvm, e.g. do you want lvm to span over multiple partitions/harddisks etc.

I hope you backed up your data before creating a logical volume and encrypted it. Otherwise it might be lost.
 
Old 05-17-2010, 12:27 AM   #4
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
Well, look what i did.
a) i first tried to do the lvm groups,, i didnt find the way..but i found out that using the partitions as lvm appeare a lvm mamager, there i created the group. I named it nacho.
when i try to continue with the installation said:
"Is not possible coz the nacho group is busy"


more problems i found:
since i use lvm to my partion the mount point of then vanished, so if i have /boo=100mb ,
now i got a 100mb lvm,

and when i try : finish and apply the changes to the disk said: not root partition.
the funny thing is that at the end i got mad and try the guided partitioning and i selected lvm encrypt .. it formatted the disk and ask me for a passphase (20 caracters), but i didnt work..

and now i cannot do anything on the disk..


im really confuse.. but im trying my best to get into lvm and encrypt my data.
 
Old 05-17-2010, 12:55 AM   #5
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
Damn! i found out a web side http://www.redhat.com/docs/manuals/l...de/ch-lvm.html with the info i needed before.

uff.. i know where my problem was i had to follow:



a-Create physical volumes from the hard drives.


b-Create volume groups from the physical volumes.


c-Create logical volumes from the volume groups and assign the logical volumes mount points.

now what should i do.. how do i undu everything?
 
Old 05-17-2010, 01:02 AM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,608

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Quote:
the funny thing is that at the end i got mad and try the guided partitioning and i selected lvm encrypt .. it formatted the disk and ask me for a passphase (20 caracters), but i didnt work..

and now i cannot do anything on the disk..
what do you mean by 'it didn't work'? Did it not accept the passphrase? Did it not perform the installation, etc ...
Which partitioning scheme did you choose? The installer should have taken care of creating encrypted LVM automatically. What was the error message?
You need to provide more info.
[EDIT]
Just saw your new post. Yes, this is the normal way of setting up a LVM partition. But it might be best to let the installer figure it out if you are not familiar with that. Before you restart, think about your harddisk layout. If you want to keep it as simple as possible you first create an encrypted partition and then create your logical volumes inside that partition. Don't forget to also create an unencrypted /boot partition (appr. 500MB). This approach has the advantage that you only have to decrypt one partition when booting.

Last edited by crts; 05-17-2010 at 01:11 AM.
 
Old 05-17-2010, 02:31 AM   #7
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
OK, sorry i dint do it before.

I have a 400gb hard drive, i want to have 3 partitions /boot=200mb,/=50gb,/home=the rest
i also want to my lvm groups and after that LUCKS them.

how did i procceded:

1-partitioning
a)manual
b)i create a physical lvm (i use the whole disk for that, question: is that correct?)
c)i asign it as primary
d)after that appeared the "CONFIGURE LOGICAL VOLUME MANAGER"
i go there and created the lvm groups.
e)ask me a name.
f)so i selected the devices for the new volume group,(since i only made one lvm partition i select the only i have(its that correct?)
g)after that i create the logical volumes, i made two since i read that i cannot use LVM with the /boot .

all fine till there i select the mount point..and the filesystem for my logical volumes , i try lvm encryp but the mount point desappered so i choose xfs(that's ok?)

so i click on "FINISH PARTITIONING AND WRITE CHANGES TO DISK"
AND AFTER THAT THE ERROR:

Install the base system

Base system installation error

the debootstrap program exited with an error (return value 1)

check /var/log/syslog or see virtual consol 4 for the details
 
Old 05-17-2010, 03:56 AM   #8
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,608

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Reverse the order of lvm and encryption.
I assume your install drive is sda. So try it this way:
1.) Create two partitions, the first one is /dev/sda1 and will be your /boot partition (~200MB in size). The second one will be /dev/sda2 and will take up all the rest of your HDD, since you want to use the complete disk for your system.

2.) Encrypt /dev/sda2. Choose a strong passphrase that you can also easily remember. Do not encrypt /dev/sda1.

3.) Set up your LVM inside the encrypted partition. Since you do this with an installer I assume that it will be automatically recognized.
4.) create physical device /dev/mapper/<encrypted-partition> (I am not sure how the encrypted partition will look like in the installer, but it probably won't be sda2. Creating the physical device on sda2 would destroy the encryption at this point).
5.) create volume group <volgroupname>
6.) add the physical device to the volume group <volgroupname>.
7.) Now create logical volumes such as /,/home etc. Also create swap as logical volume.
8.) continue with the installation and choose instead of partition the logical volumes. Except for /boot. The /boot partition must be unencrypted sda1.

Hope this helps.

Last edited by crts; 05-17-2010 at 01:19 PM.
 
Old 05-17-2010, 10:56 AM   #9
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
The seems to be a problem..

The thing is that when i first create the 200mb (which file-system i should use?)

note: the configure the logical volume manager, only appeare when i create a physical volume for lvm.
and you said before i should encrypt the second partition(the one i gave the rest of the disk)

and since i have to create a physical volume for lvm i wont have the option to create a group first and after a logical volume inside the hda2 that i first encrypted.

here when i dont have partitions
Click image for larger version

Name:	no partition.png
Views:	9
Size:	46.0 KB
ID:	3592


when i encrypt the second partition
Click image for larger version

Name:	encrypted-partition-fixed.PNG
Views:	10
Size:	56.0 KB
ID:	3590

Click image for larger version

Name:	partman_choose_partition_4-modified.PNG
Views:	10
Size:	53.8 KB
ID:	3591
 
Old 05-17-2010, 11:07 AM   #10
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
I forgot to add this:

Which filesyste to use?


Click image for larger version

Name:	partman-target_choose_method_0-modified.PNG
Views:	7
Size:	51.2 KB
ID:	3594
 
Old 05-17-2010, 01:28 PM   #11
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,608

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
For the /boot partition I used ext2 but you could also a journalling file system if you like. I just do not think that this is necessary for /boot.

When you choose 'physical volume for encryption' for device sda2 this should take care of steps 2.) to 4.). Notice that I edited step 3.) of my previous post to say 'LVM' instead of 'logical volume' which might be misunderstood at that point. Mistake on my part. After you choose 'physical volume for encryption' you should be able to configure a volume group and logical volumes inside that partition.

BTW, does debian have a liveCD? And can you install directly from that CD while in live-mode? Just asking because if so, then there might be an alternative way to install as described here:
http://eubolist.wordpress.com/2010/0...using-live-cd/

This is how I set up my encrypted system. It should be adaptable for debian, too.
 
Old 05-17-2010, 04:21 PM   #12
criacuervo
Member
 
Registered: Dec 2008
Location: Herrera
Distribution: Debian GNU/Linux 5.0
Posts: 74

Original Poster
Rep: Reputation: 15
looks at this.. i fanily did somethig.. YOU THINK THIS IS WIERD.. MAN. I WANT TO CHANGE MY PASSPHRASE HOW I DO THAT?

geoX:/home/criacuervo# fdisk -l

Disk /dev/hda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0009213d

Device Boot Start End Blocks Id System
/dev/hda1 1 12 96358+ 83 Linux
/dev/hda2 13 48641 390612442+ 83 Linux

Disk /dev/dm-0: 399.9 GB, 399986088448 bytes
255 heads, 63 sectors/track, 48628 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table
 
Old 05-17-2010, 09:16 PM   #13
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,608

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Hi,

I downloaded the netinstaller for debian and ran it on a virtual machine. For your needs the autoinstall should be sufficient.
Choose this option and just go with the defaults.
Click image for larger version

Name:	step 1.png
Views:	7
Size:	17.9 KB
ID:	3602

However, formating your harddrive will probably take a day or so because all the data will be erased. And this takes some time with a 400GB HDD.
 
  


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
When to use multiple LVM Volume Groups koenigj3 Linux - Newbie 11 02-04-2010 07:20 PM
LVM snapshot between different Groups Ammad Linux - General 3 01-04-2009 09:02 AM
shutting down LVM volume groups aztek Debian 2 06-02-2006 10:58 PM
Can I delete LVM Volume Groups? second_existence Linux - Newbie 1 01-24-2006 11:20 PM
Activating LVM Volume Groups at startup TomF Linux - Newbie 0 05-05-2004 06:05 PM


All times are GMT -5. The time now is 06:29 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