Debian Partition during installing - what am I doing wrong?

Help with issues regarding installation of Debian

Debian Partition during installing - what am I doing wrong?

Postby Danielsan » 2019-09-19 21:25

Hi Folks,

I am trying to figuring out why I can't get a manual installation in the same way Debian does automatically, hence, what am I doing wrong?

This is the EFI installation with /HOME separated automatically by the installer:

Image

Everything is clean and lean!


And this is the EFI Installation with my manual partition:

Image

This is when I try to recreate the same partitioning but with different values... Practically when I created /EFI & /BOOT and ecrypted the /SDA3, I used /SDA3 for creating the LVM partition (in order to avoid to encrypt all the LVM logical volumes) and after created the group and the logical volumes the installer sees these volumes as empties disks and it requests to create a new table partition , and everything is a bit messy...

I tried hence to create everything manually with a live disk but the installer doesn't recognize the LVM as well as the encrypted partition, the only thing I thought is when it creates the partitions I might resize those, but I haven't tried it yet. What do you think about it?
User avatar
Danielsan
 
Posts: 541
Joined: 2010-10-10 22:36

Re: Debian Partition during installing - what am I doing wro

Postby p.H » 2019-09-20 11:48

(I cannot see the pictures for now)
Danielsan wrote:I used /SDA3 for creating the LVM partition

I guess you mean you used the encrypted volume sda3_crypt as an LVM physical volume ?

Danielsan wrote:(in order to avoid to encrypt all the LVM logical volumes

I guess you mean to avoid to encrypt each logical volume individually ?
Either way, the logical volumes are encrypted.

Danielsan wrote:after created the group and the logical volumes the installer sees these volumes as empties disks and it requests to create a new table partition

On a logical volume ? A logical volume is not supposed to have a partition table, and IME the Debian installer does neither require or offer to create one. It should offer to use a logical volume in the same way as a partition (as a filesystem, swap...).
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12

Re: Debian Partition during installing - what am I doing wro

Postby Danielsan » 2019-09-20 15:56

I am sorry if I had been inaccurate with the terminologies, however I found easier just deleting all the LVM volumes generated by the installer and then creating the ones you need with the sizes you want!
User avatar
Danielsan
 
Posts: 541
Joined: 2010-10-10 22:36

Re: Debian Partition during installing - what am I doing wro

Postby p.H » 2019-09-20 20:54

I can see the pictures now. Something looks wrong in the second one : each LV seems to belong to a separate VG of the same name.
Danielsan wrote:I found easier just deleting all the LVM volumes generated by the installer and then creating the ones you need with the sizes you want!

Can you describe the exact and full steps ?
Did you delete the existing VG and create a new one ? Or only delete the LVs and created new ones ? With which names ?

PS : as a general advice, do not initially allocate all the space in the VG to the LVs, leave some free space for future unexpected needs. It is easier to extend than reduce.
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12

Re: Debian Partition during installing - what am I doing wro

Postby Danielsan » 2019-09-20 21:16

Regarding the first manual installation those were been my steps:

1) Creating the base partition
primary /dev/sda1 fat32 /EFI
primary /dev/sda2 ext2 /boot
primary /dev/sda3 ext4 not mounted

2) Encrypting /dev/sda3

3) Creating the LVM on /dev/sda3_crypt

4) Creating the logical volume
root
swap
home

5) Creating the file system for each of those; but the installer recognized each logical volumes as empties disks without table partition and requested me to create a new GPT partition for each.


Regarding the other question I did not remove the group the installer created during the installation, and I just deleted the logical volumes and recreated the new ones with my preferences.
User avatar
Danielsan
 
Posts: 541
Joined: 2010-10-10 22:36

Re: Debian Partition during installing - what am I doing wro

Postby p.H » 2019-09-21 08:20

What volume group name did you choose ? Was it "lvm-" ? I'd like to see the output of "Display configuration details" in the LVM management.
After some testing, I could reproduce this behaviour with a VG name ending with a hyphen "-".

The character "-" is used as a separator in the /dev/mapper/$VG-$LV device node form, so hyphens in VG or LV names are doubled ("--") in that form to avoid confusing them with the separator character. For example if the VG name is "lvm-", the root LV device node is /dev/mapper/lvm---root which seems to confuse the partitioner. I suspect that the partitioner extracts the LV and VG names from that form using a flawed method : everything before a single dash is the VG name and everything after a single dash is the LV name. But here there is no single dash, resulting in the whole device name "lvm--root" being used as both the VG and LV names.

Why the partitioner considers the logical volumes with such device names as whole disks which must be partitioned is still a mystery to me.

Bottom line : avoid hyphens in VG and LV names. You can use periods "." or underscores "_" instead.
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12

Re: Debian Partition during installing - what am I doing wro

Postby Danielsan » 2019-09-27 19:43

p.H wrote:What volume group name did you choose ? Was it "lvm-" ? I'd like to see the output of "Display configuration details" in the LVM management.
After some testing, I could reproduce this behaviour with a VG name ending with a hyphen "-".


Yes it was, because I like this output [name]--[name]; however the last test I did I used a normal name:

Automatic partitioning:
Image

The manual partitioning where I just removed the logical volumes and created the new ones within the same group:
Image

It is important to mention that I used a virtual machine with a virtual ssd as well a virtual uefi system.

The slides are in Italian because I realized a fresh installation guide for my brother that lives far away from me...
User avatar
Danielsan
 
Posts: 541
Joined: 2010-10-10 22:36

Re: Debian Partition during installing - what am I doing wro

Postby Danielsan » 2019-09-27 20:23

Let me also add something spicy...

The Debian installer is pretty handy when you have to do a fresh installation while is a total disaster when you have to reinstall on top an existent encrypted installation (LUKS + LVM). The installer simply doesn't see the encrypted partitions and will consider your encrypted partitions as empty space; I guess with Calamares you should be able to reinstall Debian on an encrypted partition but I haven't checked this out yet.

In regard of this I recently opened a wishlist bug, requesting the feature to re-install Debian on an existing installation, in one partition, without overwriting the home folder. Ubuntu and other *buntu derivates already do that, MacOS have been doing it for at least 10 years. For a dekstop installation doesn't make sense, anymore, partitioning the disk if you can reinstall without overwrite the home. In the last years I stopped to create separated partitions because I have never found the right balance and I ended up to have the root too small for my needs; hence instead of assign 100GB of root I decided to put everything in root and if I would need to reinstall the system I will backup my home folder...

Unfortunately the maintainer replied to me in a predictable way, instead of seeing the opportunity to improve Debian, he just cut out further elaborations with a trivial comment...
User avatar
Danielsan
 
Posts: 541
Joined: 2010-10-10 22:36

Re: Debian Partition during installing - what am I doing wro

Postby p.H » 2019-10-02 13:43

Danielsan wrote:In regard of this I recently opened a wishlist bug, requesting the feature to re-install Debian on an existing installation, in one partition, without overwriting the home folder.

This has nothing to do with the well known inability of the Debian installer partitioning tool to open and use an existing encrypted volume.
Nothing prevents you from deleting everything but /home before the re-installation.

Danielsan wrote: I stopped to create separated partitions because I have never found the right balance and I ended up to have the root too small for my needs

This is one reason to use LVM (with manual partitioning ; LVM with guided partitioning is mostly useless). Don't allocate all the available space during installation and grow logical volumes as needed.
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12

Re: Debian Partition during installing - what am I doing wro

Postby Danielsan » 2019-10-02 19:08

p.H wrote: This has nothing to do with the well known inability of the Debian installer partitioning tool to open and use an existing encrypted volume.
Nothing prevents you from deleting everything but /home before the re-installation.


Since I have been using the encryption from this last years I hasn't aware about this specific D-I limitation; and I have not idea how you can reinstall without overwrite /home when you have everything inside one partition in / .


p.H wrote: This is one reason to use LVM (with manual partitioning ; LVM with guided partitioning is mostly useless). Don't allocate all the available space during installation and grow logical volumes as needed.


This seems a good a strategy.
User avatar
Danielsan
 
Posts: 541
Joined: 2010-10-10 22:36

Re: Debian Partition during installing - what am I doing wro

Postby p.H » 2019-10-03 08:22

Danielsan wrote:I have not idea how you can reinstall without overwrite /home when you have everything inside one partition in /

In a shell, mount the filesystem on /mnt.
Delete everything but /mnt/home in /mnt.
Unmount the partition.
In the installer partitioning tool, select the partition for use as / and keep data (do not format).
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12


Return to Installation

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable