You are not logged in.
Hi,
Could you help me to install Arch, root and home on one encrypted partition + Grub?
Can I have only
sda1 - boot
sda2 - root and home?
I tried in Wiki but it is really difficult for me to set up this kind of configuration.
I'm really appreciate your help.
Last edited by infoslaw (2016-06-24 13:02:13)
Offline
have you seen/tried dm-crypt with LUKS
Last edited by bleach (2013-07-26 13:56:14)
Offline
have you seen/tried dm-crypt with LUKS
I tried LUKS+LVM
I created boot on sda1
and
cryptsetup luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 lvm
here I'm confusing becasue I would like to use root and home on sda2 only...
pvcreate /dev/mapper/lvm
vgcreate MyStorage /dev/mapper/lvm
lvcreate -L 15G MyStorage -n rootvol
lvcreate -L 35G MyStorage -n homevol
lvcreate -L 200G MyStorage -n mediavol
so is it correct...?
pvcreate /dev/mapper/lvm
vgcreate MyStorage /dev/mapper/lvm
lvcreate -L 300G MyStorage -n myhdd (where 300GB all free partition space)
format it:
mkfs.ext4 /dev/mapper/MyStorage-myhdd
again not sure...
mount /dev/MyStorage/myhdd /mnt
mkdir /mnt/home
mount /dev/MyStorage/myhdd /mnt/home
next:
pacstrap /mnt base base-devel
and
genfstab -U -p /mnt | sed 's/rw,relatime,data=ordered/defaults,relatime/' >> /mnt/etc/fstab
arch-chroot /mnt
reginal settings, time, host name
generate initramfs:
mkinitcpio -p linux
changing root password
installing and configuring bootloader:
pacman -S grub-bios
and here I stop with Grub error when:
grub-install --target=i386-pc --recheck /dev/sda
Grub cannot find sda
so cannot also processed last step to modify:
GRUB2 and initcpio so that it will unlock LUKS container on boot
Edit /etc/mkinitcpio.conf, and change HOOKS=" " to include:
....... keymap encrypt lvm2 filesystems..."
Next, edit /etc/default/grub and change the following line to say:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:MyStorage"
Your help highly appreciate.
Last edited by infoslaw (2013-07-26 14:44:30)
Offline
so is it correct...?
pvcreate /dev/mapper/lvm
vgcreate MyStorage /dev/mapper/lvm
lvcreate -L 300G MyStorage -n myhdd (where 300GB all free partition space)format it:
mkfs.ext4 /dev/mapper/MyStorage-myhdd
again not sure...
mount /dev/MyStorage/myhdd /mnt
mkdir /mnt/home
mount /dev/MyStorage/myhdd /mnt/home
That doesn't work, because you can't mount one partition to two diffrent directorys.
You need to create one for root and one for home if you want to seperate them.
lvcreate -L 100GB MyStorage -n root
lvcreate -L 100GB MyStorage -n home
mkfs.ext4 /dev/mapper/MyStorage-root
mkfs.ext4 /dev/mapper/MyStorage-home
mount /dev/mapper/MyStorage-root /mnt
mkdir /mnt/home
mount /dev/mapper/MyStorage-home /mnt/home
i3wm / urxvt / luakit
Offline
if you want root and home
pvcreate /dev/mapper/lvm
vgcreate MyStorage /dev/mapper/lvm
lvcreate -L {your size}G MyStorage -n rootvol
lvcreate -L {your size}G MyStorage -n homevol
mkfs.ext4 /dev/mapper/MyStorage-rootvol
mkfs.ext4 /dev/mapper/MyStorage-homevvol
mount /dev/MyStorage/rootvol /mnt
mkdir /mnt/home
mount /dev/MyStorage/homevol /mnt/home
notice how you mounted /dev/MyStorage/myhdd twice on root and home.
the grub wiki shows what to do with lvm
Offline
You can have two different drive layouts:
1) sda
... sda1 - boot (unencrypted)
... sda2 - LUKS volume
... ... LUKS volume: one filesystem for everything except boot
2) sda
... sda1 - boot (unencrypted)
... sda2 - LUKS volume
... ... LUKS volume - LVM
... ... ... LVM volume 1: root
... ... ... LVM volume 2: home
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
so I must mount 2 partitions 1 for root and 2'nd for home? is it possible to install everything on 1 partition in this case sda2?
sorry but it's confuse me maybe I missing something
what if f.e. I will set up:
lvcreate -L 50G MyStorage -n rootvol
lvcreate -L 250G MyStorage -n homevol
and after 2 years system say that not enough space on root partition? have I any option to enlarge quota?
Offline
You can have two different drive layouts:
1) sda
... sda1 - boot (unencrypted)
... sda2 - LUKS volume
... ... LUKS volume: one filesystem for everything except boot2) sda
... sda1 - boot (unencrypted)
... sda2 - LUKS volume
... ... LUKS volume - LVM
... ... ... LVM volume 1: root
... ... ... LVM volume 2: home
Ad 1. I think that is excellent solution for me. Must read more how to encrypt LUKS method and after install system with home on sda2.
Currently on old machine I have:
sda1 - boot
sda2 - swap
sda3 - root
sda4 - home (crypto-LUKS)
Thanks for help.
Offline
Hi All,
I'm lucky to find this question asked today.
I'm trying to build similar setup as virtualbox guest (which I can later upload to linode). I was successful building such setup for my home computer I'm writing to you from however that was somehow easier because I was not limited to use GRUB (I prefer syslinux).
So my problem is that I have built my virtualbox guest, followed roughly the tutorial found on arch wiki (dm-crypt + luks) and went all way down to booting into my new system. And it remains on "Booting..." forever... I was trying to play around with autodetect option in mkinitcpio HOOKS - no luck. Once I try to boot - it looks like GRUB is not loaded at all. So I have double checked if my sdc have boot flag set - it does (again - I used fdisk to do all partitioning work whereas I'm used to use gdisk so maybe I missed something there... The only thing that differs for my sdc - boot disk - is that I have toggled >>boot<< flag).
So I'm out of ideas..
I would appreciate any help.. Thanks!
I decided to create separate thread as my problem is slightly different.
Last edited by Gregosky (2013-07-26 22:01:38)
Offline
so I must mount 2 partitions 1 for root and 2'nd for home? is it possible to install everything on 1 partition in this case sda2?
sorry but it's confuse me maybe I missing something
what if f.e. I will set up:lvcreate -L 50G MyStorage -n rootvol
lvcreate -L 250G MyStorage -n homevoland after 2 years system say that not enough space on root partition? have I any option to enlarge quota?
Don't allocate more space than you need and then it is easy to grow partitions. Isn't that the point of LVM?
I really think you need to do some more reading before you do this - you seem to have a very hazy idea of what you are setting up. The LVM, LUKS, encryption etc. pages of the wiki have a lot of information. Although parts are out of date, there is still lots of good information and I really encourage you to use it. Right now, you don't seem to have a good sense of either the advantages or disadvantages of the configuration you are considering. And in the end, only you can know what will suit your needs.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I decided to create separate thread as my problem is slightly different.
Don't do this. You have hijacked this thread with a crosspost. Please read the Forum Etiquette.
Offline
Don't do this. You have hijacked this thread with a crosspost. Please read the Forum Etiquette.
I created another post before I have seen your comment - I can't delete question above, should I then delete another thread I created? Thanks.
Offline
infoslaw wrote:so I must mount 2 partitions 1 for root and 2'nd for home? is it possible to install everything on 1 partition in this case sda2?
sorry but it's confuse me maybe I missing something
what if f.e. I will set up:lvcreate -L 50G MyStorage -n rootvol
lvcreate -L 250G MyStorage -n homevoland after 2 years system say that not enough space on root partition? have I any option to enlarge quota?
Don't allocate more space than you need and then it is easy to grow partitions. Isn't that the point of LVM?
I really think you need to do some more reading before you do this - you seem to have a very hazy idea of what you are setting up. The LVM, LUKS, encryption etc. pages of the wiki have a lot of information. Although parts are out of date, there is still lots of good information and I really encourage you to use it. Right now, you don't seem to have a good sense of either the advantages or disadvantages of the configuration you are considering. And in the end, only you can know what will suit your needs.
Thank you very much for your advice. I think that understand bit about it but of course still many to explore in this matter.
I think that don't need to set up logical partitions and more prefer LUKS method which already use for my home folder encryption in my current system.
Offline
jasonwryan wrote:Don't do this. You have hijacked this thread with a crosspost. Please read the Forum Etiquette.
I created another post before I have seen your comment - I can't delete question above, should I then delete another thread I created? Thanks.
No, the other thread is fine.
Offline
this has been solved I choose LUKS to encrypt my /home on sda4
Offline