You are not logged in.
Pages: 1
Hi,
I want to install an encrypted Arch Linux. The partition should be encrypted with LUKS and inside there should be LVM with /home / etc.
In the Wiki it says I should use partition type 'Linux LUKS'. That is available in gdisk but if I look at it with fdisk afterwards it says 'unknown type'.
In other guides it says I should use partition type 'Linux LVM' which is available in both gdisk and fdisk.
From logic I think I should pick 'Linux LUKS' since the LVM is inside of that...
What's correct here?
Thanks in advance.
Offline
Did you read the Wiki article that describes your exact scenario: https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS?
If so, where does it say to use "partition type" of Linux LUKS? The only mention on that page to 'Linux LUKS' is the name
Offline
Yes I read through the whole article.
Here it says partition type Linux LUKS:
# gdisk -l /dev/sda
...
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02 BIOS boot partition
2 4096 1130495 550.0 MiB EF00 EFI System
3 1130496 68239360 32.0 GiB 8309 Linux LUKS
and for example in this video: https://www.youtube.com/watch?v=Lq4cbp5AOZM
it says Linux LVM.
Last edited by SpeedCola (2020-05-28 18:33:40)
Offline
OK - so following the Wiki instructions, which command fails or produces a different output than posted in the article? Post your exact command and its actual output in code tags, please.
Also: Word of caution: don't use anything other than the Wiki when configuring/installing your system, especially not YT videos. You risk getting your post closed and binned.
Offline
What do you mean by commands?
I just want to know if the partition type should be 'Linux LUKS' or 'Linux LVM'.
I do that with either gdisk or fdisk:
t -> then enter the type.
If I follow the wiki strict it says 'Linux LUKS' but that isn't available in fdisk. There is only 'Linux LVM'.
In gdisk there are both.
That's why I'm confused.
Last edited by SpeedCola (2020-05-28 19:02:47)
Offline
What I mean by commands is: if you are following the Wiki, you must be entering commands. Where exactly are you in your setup: "Preparing the disk", "Preparing the logical volumes", etc. If so, there are commands documented there that you have to execute. Which one fails or produces an output different from what is documented?
Offline
There is no special command documented. It says only 'Create a partition which will later contain the encrypted container. '
(Under Preparing the disks)
Offline
The important types are the boot related ones (bios grub and/or efi). Those you have to get right, the others essentially don't matter.
For filesystems, raid, lvm, luks etc. Linux doesn't really care about partition types. Pick any type that Windows knows to leave well alone (if you dual boot or any possibility that the HDD will ever be attached to a Microsoft ecosystem).
It's also easy to change these types anytime. No worries about doing something wrong, it pretty much has no effect at all.
Offline
Okay that was a helpful answer. Thank you.
Guess I'll leave it on the default 'Linux Filesystem' then?
But why are there like 127389 partition types if most of them doesn't matter anyway?
Offline
But why are there like 127389 partition types if most of them doesn't matter anyway?
There's more than one bootloader and more than one OS out there, some of them care about the types and new ones might appear in the future, making new partition types necessary.
And then it's either invent a new partition type for the existing partition table standard, or... invent a new partition table format.
GPT added a lot of partition types (and more can be added in future) in hopes that it'll be something for everyone. We might still be using GPT partition table 2, 3, 4 decades later, or maybe not, who knows.
For now, in Linux, the main reason to set them properly is... to help the human sysadmin understand the partition layout better, helps avoid making mistakes.
Last edited by frostschutz (2020-05-28 19:55:29)
Offline
Guess I'll leave it on the default 'Linux Filesystem' then?
Yes.
Just as a tip for the future - when you post questions like this here, just state exactly where you are in the Wiki, for example: "In the XYZ page, section "Preparing the disk", it states "Create a partition which will later contain the encrypted container", but doesn't specify exactly what type - does it matter"? You likely get a prompt, direct response, either something like "Wiki is wrong, it should be ABC, or "no, doesn't matter", or "just try it and see".
The reason is that quite a disturbing amount of posts here are from people that are not following the Wiki, which makes it difficult to 'sync up' and to try to see what exactly they're doing.
Offline
Hi SpeedCola,
Life is pretty awe-inducing sometimes: just a week away from your post, I am myself going through the exact same discoveries and indecisions as I am trying to plan a new LVM-on-LUKS install compliant with the Boot Loader and Discoverable Partitions specifications. After a few hours searching I find it difficult to decide on which Partition Type UUID and names to use for both the boot/efi and LUKS partitions. For the former we now have the choice between:
fdisk's "Linux Extended Boot", matching what systemd's specs call "Extended Boot Loader Partition or XBOOTLDR partition for short"
gdisk's equivalent, "Freedesktop $BOOT" (quite cryptic for those non-privy with the former freedesktop home of the specs, proposed to be renamed "XBOOTLDR partition")
the more traditional "EFI System".
While for the latter (which your question was mostly concerned with) we now have:
gdisk "Linux LUKS", in support of which Wikipedia has some references and most notably this 2014 thread from dm-crypt mailing list where gdisk's author chime in to explain how GPT type code GUIDs are defined and how libparted also has a role in all that
the older, more common "Linux Filesystem" or "Linux LVM"
the new Linux Root (x86-64)/Home/Server Data etc. from the Discoverable partition spec and listed e.g. here.
All that knowing that within the LUKS-encrypted LVM physical device there might be several LV-backed virtual partitions for different OS roots, homes etc. I find it a bit ironic when you know that one of the main use cases aimed at by the specs was to ease Linux multibooting
To be sure, blkid doesn't let it itself be fooled by all this partition type code trickery and infers it directly from the magic numbers written by the various stack layers. But still, using the wrong partition type can have some unexpected and dire consequence, so although the argument of "Linux doesn't care for partition type" is made there as well as here we see that some applications actually do make use of this information, and that's why we have to pay at least some attention to how it is set.
For now I'll go with the Extended Bootloader and Linux LVM codes and see how it goes I guess.
Cheers!
Last edited by Neitsab (2020-06-06 15:13:52)
Offline
Pages: 1