Discussion:
Pre LUKS and LVM setup
(too old to reply)
Tuxedo
2018-08-31 16:19:06 UTC
Permalink
Hello,

I plan to combine LUKS with LVM on an SSD while dual booting from MBR
Windows and Slackware 64.

According to
http://ftp.slackware.com/pub/slackware/slackware64-14.2/README_CRYPT.TXT
there must be one small partition left unencrypted to contain kernel(s) and
the initrd image needed with encrypted volumes.

README_CRYPT.TXT suggest creating a 100MB partition for this. In case the
above document may be outdated, is this still an OK size?

Doing the initial partitioning using GParted's live media and as the SSD is
blank I do not need to worry about data loss at this stage, so I created new
partitions with GParted's GUI tool.

According to
https://www.intel.com/content/dam/www/public/us/en/documents/technology-briefs/ssd-partition-alignment-tech-brief.pdf (section 3.4) it is recommened
to have some (2MB) free space preceeding, presumably the first partition.

On those notes I made a free preceeding space of 2 MiB.

In the above document it's also recommended to select "align to MiB" (rather
than "align to cylinder") which is an option in GParted's GUI tool.

So now there is a bit over 2MB unallocated preceeding the first partition,
in case it's better for SSD performance.

I then created a new 95 MiB ext4 Primary partition for kernel(s) and the
initrd image.

Thereafter, I created a ntfs space for a Windows installation: 95367 MiB

Finally, I created an Extended partition taking up the remaining space:
1812265 MiB

In GParteds GUI edit menu I selected "Apply all operations" and the screen
thereafter displays the following:

Partition File system label size

unallocated unallocated 2.00 MiB
/dev/nvme0n1p1 ext4 95 MiB
/dev/nvme0n1p2 ntfs windows 93.07 GiB
/dev/nvme0n1p3 extended 1.73 TiB

The logical volumes may best be created by 'lvcreate' as detailed in
README_CRYPT.TXT


While still in GParted's interface, I ran:

***@debian:~$ sudo gdisk /dev/nvme0n1

The result of this was:

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present

*********************************************************

Found invalid GPT and valid MBR: converting to GPT format
in memory: THIS OPERATION ISN POTENTIALLY DESTRUCTIVE!
Exit by typing 'q' if you don't want to convert your
MBR partitions to GPT format!

*********************************************************

I'm not sure what to do here? So I hit 'q' to quit!


The next test I ran was:

***@debian:~$ sudo parted

GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted ...

(parted) align-check opt 1
1 not aligned

(parted) align-check min 1
1 aligned


Are the above results OK to proceed with LUKS and Slackware installation?

Many thanks for any suggestions.

Tuxedo
Pascal Hambourg
2018-08-31 22:12:20 UTC
Permalink
Post by Tuxedo
I plan to combine LUKS with LVM on an SSD while dual booting from MBR
Windows and Slackware 64.
According to
http://ftp.slackware.com/pub/slackware/slackware64-14.2/README_CRYPT.TXT
there must be one small partition left unencrypted to contain kernel(s) and
the initrd image needed with encrypted volumes.
Yes. This is /boot. GRUB 2 is able to deal with an encrypted /boot, but
leaving it unencrypted is easier, and generally it does not contain any
sensitive information.
Post by Tuxedo
README_CRYPT.TXT suggest creating a 100MB partition for this. In case the
above document may be outdated, is this still an OK size?
If you intend to install multiple kernels or a heavyweight boot loader
such as GRUB, you can double that size.
Post by Tuxedo
According to
https://www.intel.com/content/dam/www/public/us/en/documents/technology-briefs/ssd-partition-alignment-tech-brief.pdf (section 3.4) it is recommened
to have some (2MB) free space preceeding, presumably the first partition.
Nonsense. Just align all partitions on proper block size boundaries.
1 MiB is the current default and usually fine.
Post by Tuxedo
GPT fdisk (gdisk) version 1.0.1
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
*********************************************************
Found invalid GPT and valid MBR: converting to GPT format
in memory: THIS OPERATION ISN POTENTIALLY DESTRUCTIVE!
Exit by typing 'q' if you don't want to convert your
MBR partitions to GPT format!
*********************************************************
I'm not sure what to do here?
Do nothing. The partition table is DOS/MBR and gdisk is a GPT-only tool.
Why would you want to use it ?
Tuxedo
2018-09-01 05:50:32 UTC
Permalink
[...]
Post by Pascal Hambourg
Post by Tuxedo
README_CRYPT.TXT suggest creating a 100MB partition for this. In case the
above document may be outdated, is this still an OK size?
If you intend to install multiple kernels or a heavyweight boot loader
such as GRUB, you can double that size.
Thanks for the info. However, I don't plan to use multiple kernels or GRUB.

Lilo does all that's needed on a user-level.
Post by Pascal Hambourg
Post by Tuxedo
According to
https://www.intel.com..../ssd-partition-alignment-tech-brief.pdf
[...]
Post by Pascal Hambourg
Nonsense. Just align all partitions on proper block size boundaries.
1 MiB is the current default and usually fine.
Ok. Thanks for this info too.

[...]
Post by Pascal Hambourg
Post by Tuxedo
*********************************************************
Found invalid GPT and valid MBR: converting to GPT format
in memory: THIS OPERATION ISN POTENTIALLY DESTRUCTIVE!
Exit by typing 'q' if you don't want to convert your
MBR partitions to GPT format!
*********************************************************
I'm not sure what to do here?
Do nothing. The partition table is DOS/MBR and gdisk is a GPT-only tool.
Why would you want to use it ?
That clarifies it. No reason to convert to GPT on my setup.

Tuxedo

Loading...