Talk:Dm-crypt/Encrypting an entire system
LUKS on LVM /tmp example
I don't think the example config for /tmp is correct. It uses tmpfs, which completely bypasses the physical disks (other than swap), making the whole endeavor pointless. The proper solution seems to be to use the 'tmp' option in /etc/crypttab--I just set this up, and it seems to be working. It automatically creates a new ext2 filesystem with a random key on each boot. I'd update the article, but the crypttab syntax it uses doesn't even match mine, and I don't know how to translate to the new syntax. TravisE (talk) 10:27, 11 March 2014 (UTC)
- You probably use in crypttab "tmp=ext2" as option? I'd say you are right anyway (and the example still works but wastes the reserved lv diskspace). Feel free to edit right away if you clarified or post the settings you use here and we adapt them. --Indigo (talk) 20:06, 11 March 2014 (UTC)
- I updated syntax: [1]
- I still left the lv for it. Question to answer before removing it would be where /tmp swaps to, if required. Do you know that?
- --Indigo (talk) 22:45, 25 March 2014 (UTC)
Full disk encryption with LUKS (encrypted LVM with swap and root)
I wasnt able to find what I need on the wiki, but this guide got me there. I hope the arch wiki could summarize step by step as this guide does. https://www.loganmarchione.com/2014/11/arch-linux-encrypted-lvm-hardware-2/
Voukait (talk) 04:13, 6 May 2016 (UTC)
- Wow, that's a thorough guide indeed. Nice to see someone reused the ASCII partition layout diagram (I think Kynikos sketched this LVM one:). It also links to our instructions in a number of places, which makes me wonder if the author keeps it updated in case links change. Anyhow, very thorough, yes. --Indigo (talk) 09:59, 6 May 2016 (UTC)
- I don't remember who originally sketched that particular diagram, but everything's published under GFDL :)
- To give an answer to Voukait, we don't keep step-by-step guides like that in this wiki, as they are too difficult to maintain because too many pages would duplicate content and should be continuously kept in sync.
- I think a good way of getting a first grasp on some topic is indeed to go and read "aggregated" information for a specific use case on some external sites/blogs, and then come to the ArchWiki to read more up-to-date information that can be more easily adapted to other scenarios.
- Anyway we should really find a place in this article where to list external links like that.
- — Kynikos (talk) 05:03, 7 May 2016 (UTC)
- Yes, why not use a regular Dm-crypt/Encrypting an entire system#See also section and use the description. For example
- Loganmarchione blog - elaborate step-by-step guide to install #LVM on LUKS (dated: 2014/11)
- Other possibilities? --Indigo (talk) 09:50, 7 May 2016 (UTC)
- Yes, why not use a regular Dm-crypt/Encrypting an entire system#See also section and use the description. For example
- Actually another possibility would be to simply use dm-crypt#See also. For example
- Loganmarchione blog - elaborate step-by-step guide referencing Dm-crypt/Encrypting an entire system#LVM on LUKS (dated: 2014/11)
- If it gets many links, they could be grouped. --Indigo (talk) 13:16, 7 May 2016 (UTC)
- Actually another possibility would be to simply use dm-crypt#See also. For example
- I agree we can use dm-crypt#See also for the moment, I'll let you implement your idea, or Voukait who pointed out the link :) — Kynikos (talk) 04:06, 8 May 2016 (UTC)
Rename volume group to be more consistent with device naming
I propose renaming 'MyVol' to 'volumegroup' (or something similar) to improve consistency with the device names (which are all lower case), and make the example more meaningful. —This unsigned comment is by Terry tibbles (talk) 08:13, 16 April 2018. Please sign your posts with ~~~~!
- I'm not against renaming it, but "volumegroup" is too generic. Also the use of uppercase letters gives a hint to the reader that using them is allowed. -- nl6720 (talk) 08:32, 16 April 2018 (UTC)
- What would your suggestion be? Mine would be the 'volgroup-cryptroot' layout, to keep it as close as possible to the existing examples. Terry tibbles (talk) 08:21, 18 April 2018 (UTC)
- I think it needs to change, as I've done this several times and still find it confusing. If you imagine that someone has several volume groups, it doesn't scale well (MyVol, MyVol1), and also the mix of capital and lower case letters is difficult to read. I think a system with 'vol_group-root_crypt' for encrypted devices and 'root' for the decrypted partition would be preferable. Terry tibbles (talk) 09:25, 18 April 2018 (UTC)
- I'm not going to argue with you. That's my suggestion for improving the documentation, and making it more consistent and user-friendly. Terry tibbles (talk) 06:37, 19 April 2018 (UTC)
- 'vol_group' does not scale any better than 'MyVol'. Is there really a major difference between 'vol_group1' and 'MyVol1'? Also shouldn't the LVM names be distinguished from physical device names like sda1? One is virtual the other physical. What exactly is confusing about 'MyVol'? It's just a placeholder for what you name the volume group. Lastly, different examples use different names or pseudo-variables. Is there really a need to have the entire page consistent beyond each example? Most users will pick one example and the partitioning scheme is clearly defined at the beginning of each example. The names chosen seem trivial as they all represent the same concept of virtual groups and logical volumes. -- Wincraft71 (talk) 10:58, 19 April 2018 (UTC)
- I think more important than the spelling here is that 'MyVol' is misleading because it's supposed to be an example name for a volume group, not a volume, so it should be at least 'MyVolGroup', 'MyVGroup' or 'MyGroup'.
- Regarding the spelling though, I prefer the CamelCase version because then it's easier to tell group and volume apart in the /dev/mapper/group-volume path.
- -- Kynikos (talk) 15:57, 20 April 2018 (UTC)
- "MyGroup" sounds good. Perhaps even "VolGroup"? The Camel casing would imply that you are free to rename it as you please and this can also be explicitly stated. -- Wincraft71 (talk) 16:45, 20 April 2018 (UTC)
- Right, LVM is linked within this page and that would be a more proper place. 'VolGroup00' is another idea. -- Wincraft71 (talk) 19:08, 20 April 2018 (UTC)
- So I've replaced all the examples with "MyVolGroup".
- The other articles mentioning LVM use all kinds of example names, but at least they do have "group", "vg", or even just a "g", enough to remind that it's a volume group, not a volume, so I don't see the need to update them, does anyone?
- -- Kynikos (talk) 07:12, 21 April 2018 (UTC)
- It looks good. Terry may have implied both articles using the same name when he was referring to "consistency". It is an optional possibility, but LVM could be edited to use "MyVolGroup" for all volume group names. And also editing LVM#Create volume group to say something like "See lvm(8) for a list of valid characters for Volume Group names." -- Wincraft71 (talk) 18:04, 21 April 2018 (UTC)
Why the ASCII diagrams?
Why do you people make those ASCII diagrams for this page? Would using those nice Unicode symbols (╠═╬═╣║) not be better? And using MediaWiki tables even better?
BTW, here's a nice Web site which can generate all of those formats of table descriptions: https://www.tablesgenerator.com/mediawiki_tables Neven (talk) 13:04, 6 January 2019 (UTC)
- Some diagrams on this page have multiple different vertical alignments in the same cell. Good luck realizing that with HTML. Also we prefer our wikicode to be editable without external tools and mutlirows / multicols are very cumbersome to work with by hand. --Larivact (talk) 19:50, 7 January 2019 (UTC)
Regarding the attempted fixing of ASCII table alignment failure: I realize that your revertion of my fixes (conditionally speaking) aligned the rows assuming a fixed-width typeface, but on Chromium 71.0.3578.98 (and whatever versions of relevant libraries), a proportional typeface is used. Namely, "ef" takes up the same space as " " does, I think. I think the correct term for that is "ligature".
Anyway, I think this just shows those character-based tables should be abandoned in favor of using MediaWiki tables. Neven (talk) 18:02, 7 January 2019 (UTC)
- Your fonts must be misconfigured it looks fine in my Chromium. Do the following lines have the same length for you?
ffffffffff WWWWWWWWWW
- The 10 'f' characters are combined into 5 pairs of ligatured "ff", one ligature takes takes as much space as one 'W'. So the 10 'f' characters take as much space and line up with 5 'W' characters.
- That tryit text you linked is monospace except that "fi" in "fixed" are joined in a ligature. Neven (talk) 21:43, 7 January 2019 (UTC)
- Here is a Archlinux BBS thread which explains the issue if anybody is curious: [3], I also have "Nimbus Mono PS" as the default monospace font, and it supports ligatures.
- This explains how to try to disable the ligatures: Font_configuration/Examples#Disable_ligatures_for_monospaced_fonts
- Even if it is possible to configure Chromium to disable ligatures (have not checked), I still think this is a big argument against using ASCII art in the wiki. Neven (talk) 22:35, 7 January 2019 (UTC)
- AFAIK we used the current ASCII form, because the same format was used in related (LVM,RAID) articles and was the default output of http://asciiflow.com/ at the same time.
- When trying alternatives a good way to check accessibility is if you try that your example, e.g.
elinks https://wiki.archlinux.org/index.php/Talk:Dm-crypt/Encrypting_an_entire_system#Why_the_ASCII_diagrams?
- looks like an improvement to the existing
elinks https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Preparing_the_disk
- Consider users install purely in TTY & elinks is included in the ISO.
- --Indigo (talk) 17:36, 11 January 2019 (UTC)
- I don't think we should switch to Unicode just for the sake of using fancy symbols. With Unicode characters there is a greater chance that they are not supported by a font or break the monospace grid in a browser. Unicode is alright if ASCII is not expressive enough (e.g. the diagrams in Disk encryption) but in this article we just have tables for which
+-|
suffice. --Larivact (talk) 06:06, 13 January 2019 (UTC)
- I don't think we should switch to Unicode just for the sake of using fancy symbols. With Unicode characters there is a greater chance that they are not supported by a font or break the monospace grid in a browser. Unicode is alright if ASCII is not expressive enough (e.g. the diagrams in Disk encryption) but in this article we just have tables for which
- I agree. Of course, it is nice to use the available means to present the content well, but keep in mind to balance readability gains with the extra effort to create/maintain. Neven, if you want to propose Unicode-border tables generally, Help_talk:Style would be the place for that (along with tools to mention in Help:Style#Non-pertinent content). Ok? --Indigo (talk) 15:42, 19 January 2019 (UTC)
- I disabled common ligatures in Template:Text art. This fixes the issue with Nimbus Mono PS and other monospace fonts with ligatures. -- nl6720 (talk) 08:58, 27 January 2019 (UTC)
Using UUIDs for device maps?
What is the point of using UUIDs to access device mapper devices (e.g., LVM)? Seems unnecessary. Neven (talk) 14:53, 6 January 2019 (UTC)
- The only useless use of UUID I can find is the
cryptdevice
in dm-crypt/Encrypting an entire system#Configuring_the_boot_loader_3 (in the LUKS on LVM scenario). That one was changed in Special:Diff/551821, presumably to be consistent with therd.luks
kernel parameters, which have the stupid limitation of only supporting UUIDs. -- nl6720 (talk) 16:20, 6 January 2019 (UTC)
- +1 to keeping it due to
rd.luks
example. Also, some years prior to sd-encrypt a lot of users of multiple DMs (e.g. raid/lvm or dm-crypt/lvm <--culprit;) had race conditions on device activation at boot. Sometime the links to Persistent block device naming were added, but the nomenclatura kept to keep it readable for the examples. --Indigo (talk) 18:11, 11 January 2019 (UTC) - Btw, FS#60907 for sd-encrypt is similar in effect to what happened back then with encrypt. Odd. --Indigo (talk) 18:53, 12 January 2019 (UTC)
- +1 to keeping it due to
Can we rename "Plain dm-crypt" to "LVM on plain dm-crypt"
This is because I want to add "GPT on plain dm-crypt". Note that this proposal is different from the change from before because of the explicit "plain" in the section title. Neven (talk) 01:20, 17 January 2019 (UTC)
- I see, can you make a very quick draft to understand better what you're proposing? What are advantages and disadvantages compared to the LVM method? If there isn't much difference perhaps it would be better to just add it as a variation Tip in the plain dm-crypt scenario? -- Kynikos (talk) 16:31, 18 January 2019 (UTC)
- The essential differences of using GPT instead of LVM are:
- * Advantage: No need for userspace daemons (besides possibly udev, which is running constantly on almost all Archlinux machines anyways, I presume). Speculation: this means faster bootup.
- * Disadvantage: There is currently no support for detecting and mapping GPT partitions that reside on device maps, like there is for LVM volumes. Thus the user would need to set up an Udev rule or just a command in a mkinitcpio hook to detect and map the GPT partitions as device mapper maps. Kpartx or partprobe can be used for that. (An alternative to using device mapper would be to use losetup to access the partitions as loopback devices, but I think that would be less performant.)
- After reading the relevant mailing list thread, I came to the conclusion that the 'encrypted GPT use case' targets situation when 1) plain dm-crypt is desired for deniable encryption reasoning and LUKS header is avoided (note, this could be partially archived by detached LUKS header, personally I like plain dm-crypt, but many will object that deniable encryption of 500+GB space is nonsense) 2) user wants to encrypt several 'partitions' (in abstract sense) at once (without having 3+ separate partitions with different passwords) but does not want to use LVM for some reason (if LVM is avoided because of additional layer costs - this argument is weak, because what is the evidence that these costs are significant? how much does LVM reduce IO read/write? how much does it slow boot? If not costs, then what is the reason which makes LVM an unaccepted alternative?) 3) user wants to use filesystem which does not support 'logical' partitions, like btrfs, OR, if such system cannot have swap space. For example, a user wanting only ext4 partitions, or user wanting both btrfs AND swap partition (for example, he likes compiling Chrome browser). I may be wrong here, but propose that such type of information should be included. --Mxfm (talk) 12:47, 19 January 2019 (UTC)
- The "partition table on plain dm-crypt or LUKS" scenario would involve modifying/creating mkinitcpio hooks. As such I do not think it could be placed in dm-crypt/Encrypting an entire system. The only place for such a setup would be the same place where the "Encrypted system using a detached LUKS header" scenario is - dm-crypt/Specialties (aka dm-crypt/Weird and unusual setups). -- nl6720 (talk) 12:58, 19 January 2019 (UTC)
- Why would mkinitcpio hooks cut be the cut off point for what makes it in dm-crypt/Encrypting an entire system? That makes no sense. This proposed section would logically appear right beside the current "Plain dm-crypt" section, because it also uses "Plain dm-crypt", unlike the rest of the page which uses LUKS. Neven (talk) 13:15, 19 January 2019 (UTC)
- None of the other scenarios in dm-crypt/Encrypting an entire system require creating custom hooks. I don't think we should add such complex setups to this page. Regardless of that, I support renaming the "Plain dm-crypt" scenario to "LVM on plain dm-crypt" -- nl6720 (talk) 13:44, 19 January 2019 (UTC)
- It might be, but I guess that depends on how complex it is. If the hook or udev rule could be packaged (even in AUR), then that would be even better. To clarify, I'm not trying to dissuade you, but without a ready draft it's hard for me to evaluate the scenario. -- nl6720 (talk) 14:01, 19 January 2019 (UTC)
- If you look over the different scenarios on this scenario page, you won't find custom hooks/udev rules/etc. for now, because (1) they are meant as installation examples with the tools on the ISO, i.e. to keep focus. (2) Maintainability of non-standard tools/hooks is a general issue.
- @Neven: reduction to one flash drive is mentioned in the first tip already. I'm against explicitly using a single flash, because it contravenes reasons to use plain dm-crypt in the first place. Remember boot loader configuration in the example gives away the location of a key-file, hence, if you have it on one flash ..
- I'm +1 to nl6720's suggestion to add the custom hooks to a new subsection in dm-crypt/Specialties; there is more room to explain pros&cons of your new kpartx method. (mod note seems useful to continue this branch at the end of the next branch) --Indigo (talk) 14:42, 19 January 2019 (UTC)
- I see this is an interesting exercise, but without a clear technical definition of its benefits (which should have greater extent than other variations such as detached headers), its use cases would practically overlap those for the traditional LVM method, also in lack of scientific benchmarks that prove a noticeable performance improvement, so +1 to add this to the Specialties page and link to it from a Tip as a variation to the plain dm-crypt scenario.
- Even if this method was considered distinct enough to be given a separate scenario (which I repeat I'm against at the moment), I think the hook should still be put in /Specialties and linked from the scenario.
- -- Kynikos (talk) 06:40, 20 January 2019 (UTC)
Maybe it would be even better to replace "dm-crypt" with "encryption" in the title, or maybe something like "LVM/GPT behind a ciphertext" would be even better. That is because dm-crypt is not a format, but rather just a method in the kernel of doing encryption without any header or metadata. Neven (talk) 10:18, 17 January 2019 (UTC)
- "Plain dm-crypt" is an expression that is used all over cryptsetup(8), maybe you're kind of right in ideal terms, but often technical jargon relies on conventional idioms that, despite not being literally correct, do a better job at conveying the intended meanings because of their widespread traditional usage, compared to perhaps more accurate but less recognized/able phrasings. -- Kynikos (talk) 16:31, 18 January 2019 (UTC)
- Now that I think about it, I only thought of this because I forgot that this page was about dm-crypt instead of about disk encryption in general. So, the parent paragraph can just be ignored. Neven (talk) 23:57, 18 January 2019 (UTC)
- Can you explain your proposal better? What exactly you want to change? Without clarifications, your proposal is controversial, because you essentially propose rename 'plain dm-crypt' to 'LVM on plain dm-crypt' which is obviously false. These are two different use cases and hiding one of them behind the other is incorrect. For example, I use plain dm-crypt, but do not use LVM. If you propose to rename entire page, than it seems uresonable, because in current form the page does not contain information only about LVM, it has sections regarding encrypted boot and swap. If you propose to rename specific section 'Plain dm-crypt', then it is also incorrect because that section has nothing to do with LVM. It looks like you have implicit assumption (from your experience) that there are only two use cases - LVM on plain dm-crypt and GPT on plain dm-crypt (and there is no plain dm-crypt without LVM/GPT use case). Contrary to this view, in my opinion the situation is completely different. The majority use cases are LUKS (possibly with LVM) and plain dm-crypt (possibly with LVM). The encrypted GPT use case is a new one which was covered in recent mailing list thread and could be supported in future. --Mxfm (talk) 12:25, 19 January 2019 (UTC)
- You are being kind of confusing here with your expression, so it seems to me that you are saying a lot of irrelevant or obviously false stuff, but I will try to respond anyway:
- I am proposing to rename the "Plain dm-crypt" section, not the entire page.
- The section in question is about LVM on plain dm-crypt, thus the proposed name. I can not fathom why would you say it is not about LVM.
- I did not understand the stuff at the end at all. Neven (talk) 13:11, 19 January 2019 (UTC)
- You are being kind of confusing here with your expression, so it seems to me that you are saying a lot of irrelevant or obviously false stuff, but I will try to respond anyway:
- I think Mxfm simply overread that you already dismissed the rename idea, and at the end Mxfm gave a first-hand example of why we can't feature full-length example scenarios for all possibilities.
- Still, to me it is out of question that we should find a place where your approach can be explained adequately & currently I think the above suggestion to add to dm-crypt/Specialties and crosslinking it is best. Once that part is in place and linked to the existing plain dm-crypt example in this page, it is easier to decide if it makes sense to add a totally new scenario for it, or crosslinking from/to the plain dm-crypt scenario suffices. Thoughts? --Indigo (talk) 14:42, 19 January 2019 (UTC)
Security Issue with Grub Keyfile
As-is, the Avoiding having to enter the passphrase twice section may leave /boot
world-readable. (Note my installation -- maybe because of systemd-boot -- does not have a world-readable /boot
, but a simple fresh grub & LUKS installation does.) In those cases, this means an unprivileged user can extract the initramfs, which has the keyfile in it. It doesn't matter that it extracts having 000
permissions, because it is owned by the extracting user. I propose adding to the section a recommendation to chmod 700 /boot
, and add a warning phrased: "If /boot
is left world-readable, an unprivileged user can access the keyfile within the initramfs." Note I talked privately with a security team member asking how to proceed on this, and he recommended posting here. Jamespharvey20 (talk) 08:08, 24 June 2019 (UTC)
- Hi, thanks for bringing this up, for the moment I've made a temporary fix.
- This problem descends from [4] and [5].
- The security issue that you describe has always been warned against in the linked Dm-crypt/Device encryption#With a keyfile embedded in the initramfs section, however the
chmod 600 /boot/initramfs-linux*
command was not duplicated in the new section, hence the problem. - I really think that Dm-crypt/Encrypting an entire system#Avoiding having to enter the passphrase twice should be merged back into Dm-crypt/Device encryption#With a keyfile embedded in the initramfs, and mostly just a link to it should be left.
- About suggesting to
chmod 700 /boot
, as an alternative tochmod 600 /boot/initramfs-linux*
(or a redundant measure), sounds good to me. - -- Kynikos (talk) 17:16, 25 June 2019 (UTC)
- Ahh, I see. I agree about the merge, and listing both permission changes as alternatives/redundancies. Jamespharvey20 (talk) 02:49, 26 June 2019 (UTC)
- Oops, I guess I missed the part about permissions when I rewrote the section.
- I'm not particularly opposed to merging the sections, but I thought content duplication in dm-crypt/Encrypting an entire system was to be expected.
- -- nl6720 (talk) 07:52, 26 June 2019 (UTC)
- Don't worry nl6720, missing one thing every hundreds of outstanding edits won't ruin your average :P
- About duplication here, it's hard to define its boundaries, maybe we can say that this page is only meant to show how to use the various essential tools (whose detailed usage is explained in other articles) together to bring a system from zero to just booting into the desired configuration (and still as an integration to the Installation guide).
- I think ideally post-first-boot extras, even if extremely recommended like the security fix above, should be generalized in other pages, although definitely linked to from here.
- This definition may bind Dm-crypt/Encrypting an entire system#Encrypting logical volume /home and Dm-crypt/Encrypting an entire system#Post-installation to the same destiny as Dm-crypt/Encrypting an entire system#Avoiding having to enter the passphrase twice.
- -- Kynikos (talk) 16:20, 26 June 2019 (UTC)
chmod 000 /root/cryptlvm.keyfile
Does 000 bring any extra securtity over 600 ?
Ua4000 (talk) 15:47, 10 March 2020 (UTC)
plain dm-crypt preparing the boot partition
In [6] is said "Create a filesystem on the partition intended for /boot, if it is not already formatted as vfat:" but below uses `mkfs.ext4` instead of formating to vfat, is it a typo? Jyeno (talk) 02:07, 14 December 2019 (UTC)
- The original paragraph was:
- "We choose a non-journalling file system to preserve the flash memory of the
/boot
partition, if not already formatted as vfat:"
- "We choose a non-journalling file system to preserve the flash memory of the
- [7] changed it to the current state.
- I'd say it's ok to just use ext4 there and leave it to the user to choose a non-journaling alternative if needed, so I've removed the remaining vfat mention.
- -- Kynikos (talk) 04:02, 14 December 2019 (UTC)
Link to GRUB decryption notes
An addition regarding the speed of decryption in GRUB (in the case of an encrypted /boot) was recently deemed out of scope and moved to here. While I agree that this is indeed far from the basic overview of system encryption the page wants to convey, I think there are several people running into this problem. An online search would of couse help, but if we're explaining the installation of GRUB here anyway, should we at least link to it in some sort of note? I will note that the underlying problem is not one of grub, but of decryption within any bootloader, and will come up mainly in this context. Logolive (talk) 19:52, 31 August 2020 (UTC)
Complete guide of Btrfs on LUKS full disk encryption
Hi,
I've written a complete guide of installing Archlinux on Btrfs on LUKS. The current guide does not use swapfile, which adds the complexity of creating another partition and formatting it with LUKS.
It might be helpful to rewrite the current guide with this in mind.
S0x9v (talk) 13:40, 4 December 2020 (UTC)
Encrypted boot partition (GRUB)
The Disk layout in example is confusing, correct me if I'm wrong but I don't see any case where both an unencrypted BIOS boot partition AND an unencrypted EFI partition is needed. Maybe change it to have just sda1 (with Bios boot OR EFI partitions) and sda2 (luks + lvm) ?
—This unsigned comment is by Peapy (talk) 19:27, 8 January 2021. Please sign your posts with ~~~~!
--- kmille (Sat Dec 11 11:37:57 PM CET 2021): I think you are right. In addition, the `BIOS boot partition` (I'm not sure about the EFI stuff) should be `encrypted` and not `unencrypted`. That's the goal of "Encrypted boot partition (GRUB)" or do I miss something here?
- The BIOS boot partition is not
/boot
. It is a partition where GRUB stores its bloat for BIOS booting from a GPT partitioned disk (on MBR partitioned disks it uses the post-MBR gap). None of the BIOS boot partition, EFI system partition or the post-MBR gap can be encrypted (except with SED, but that's out of scope here). - As for having both the BIOS boot partition and the EFI system partition on the same disk, yes that should not be very common. A use case for it would be Arch Linux on a removable medium.
- -- nl6720 (talk) 16:20, 12 December 2021 (UTC)
Example for installing Arch Linux with full disk encryption (root and /boot), btrfs, UEFI on an SSD
I [collected all necessary steps] from the various wiki pages needed to install with full disk encryption on btrfs (no LVM). Would it be useful to link to this example in the section [Btrfs subvolumes with swap], which is the section I based my installation on? Thawn (talk) 09:56, 4 October 2021 (UTC)
- Linking a unsupported guide that's outside the wiki would not be appropriate. But that doesn't mean that you can't improve dm-crypt/Encrypting an entire system#Btrfs subvolumes with swap. Currently the scenario is lacking in actual content. IMHO, many of the "follow link-here" could be replaced with exact commands. -- nl6720 (talk) 06:38, 6 October 2021 (UTC)
- The dm-crypt/Encrypting an entire system#Btrfs subvolumes with swap section is rather weird, because it tries to cover both dm-crypt and a specific file system setup. Since this page is about dm-crypt, only the former part should be covered here, but it already collects topics that are described elsewhere. The latter part is flagged for merging with Btrfs. — Lahwaacz (talk) 05:48, 12 October 2021 (UTC)
- Thank you for the suggestion to merge the btrfs parts with Btrfs. I agree, that Btrfs could actually benefit from some of the detailed information presented here. However, please note that all other sections on this page also contain information on how to create a filesystem and in some cases (e.g. for LVM) this information is quite extensive. I suggest to have all commands necessary to get a system running here - including the commands necessary to create a working filesystem layout. In my opinion, this includes a proper subvolume layout for btrfs, because it is quite difficult to implement that post installation, when the folders that should not be included in root volume snapshots already contain data. I will skip extended information and link to the appropriate pages for that. Where necessary, I will update the Btrfs page as well. I don't think it is desirable to avoid duplication at all costs (particularly at the cost of knowing which are the essential commands to be run). Agreed? Thawn (talk) 09:55, 27 December 2021 (UTC)
- If you want to do a large rewrite of an article section (like Special:Diff/707818) you should first make a draft on your user page and then leave people time to review it, i.e. significantly more than a single day. All changes should also be done in small, easily digestible edits. -- Alad (talk) 02:25, 29 December 2021 (UTC)
- @Alad: Thank you very much for your patience - I am new to contributing on Arch Wiki. I now created a draft on User:Thawn. I am looking forward to your comments there :). Thawn (talk) 09:19, 29 December 2021 (UTC)
- If you want to do a large rewrite of an article section (like Special:Diff/707818) you should first make a draft on your user page and then leave people time to review it, i.e. significantly more than a single day. All changes should also be done in small, easily digestible edits. -- Alad (talk) 02:25, 29 December 2021 (UTC)
New example scenario, FDE + unified kernel images for Secure Boot
Hi,
One possible use case which is not addressed here is a very simple ESP (/efi) + Luks partition, with signed unified kernel images + signed boot-loader on the ESP. One could argue that it is both simpler and more efficient than using an encrypted boot partition with grub (depending on use cases).
I've written a quick draft here based on the other sections.
It could also optionally be a TPM based approach with the Luks key bound to the TPM (windows / bitlocker style).
One thing that remains is a simple way to create the EFI bundle during installation. Using mkinitcpio involves vastly modifying preset files, which seems stupid during an installation process. Using Dracut leaves the system without automatic initramfs regeneration (installing hooks from the AUR during the installation process also seems very strange). An idea could be to use sbctl, but sbctl(8) advises to prefer mkinitcpio or dracut for this purpose, so I don't like recommending it. I've opened a related thread on the forum, since there is no easy way to use Unified kernel images during the installation process.
Happy to hear ideas and comments
--Cvlc (talk) 16:13, 11 September 2022 (UTC)
- I added the example. Possible improvements:
- add directions if one wants to use dracut instead of mkinitcpio.
- add other boot loader options.
- --Cvlc (talk) 14:13, 28 September 2022 (UTC)
NVMe driver no longer built in to the kernel
I added a Note to the LVM on LUKS section Dm-crypt/Encrypting_an_entire_system#Configuring_mkinitcpio_2 to note this, as well as mentioning it in the Solid state drive/NVMe#Installation page. However it seems this is an issue that should be integrated into the documentation more holistically. With the increasing prevalence of NVMe boot media, and the recent change of archlinux stock kernel package to load nvme as a module, as opposed to in-built, it seems this change affects much more that full disk encryption.
—This unsigned comment is by Android (talk) 01:26, 22 January 2023. Please sign your posts with ~~~~!
- I've reverted your note. mkinitcpio's block hook already takes care of adding the modules to the initramfs, and it's there by default. If you remove that hook, you'd better know what you're doing already. Scimmia (talk) 03:17, 22 January 2023 (UTC)
I appreciate you reviewing my change, but I installed from brand new media and versions today, and I can definitely report that I had the block statement in the HOOKS line of the mkinitcpio.conf, and the drivers for nvme were definitely NOT present in the initramfs.
As stated in the Note, the boot dropped into the emergency shell, and in the /dev/ directory there were no nvme0n1 entries. Adding the stated modules to the MODULES section corrected the problem.
So while the block statement may _intend_ to correct this issue, for me it definitely did not.
—This unsigned comment is by Android (talk) 03:42, 22 January 2023. Please sign your posts with ~~~~!
- Then you've got something strange going on. NVMe has been the standard for years now, and thousands of people have installed to it using the block hook. If this were a systemic issue, it would have come up long ago. If you want help troubleshooting, try the forums, IRC, or mailing lists. Scimmia (talk) 03:45, 22 January 2023 (UTC)
Simplified instructions for basic setup
For basic setup instructions could be a lot simpler. When using systemd-boot there's no need to create */etc/fstab* or to set kernel parameters as systemd-gpt-auto-generator will take care of it. The user just has to set partition types GUIDs when partitioning.
—This unsigned comment is by Danisztls (talk) 02:44, 26 February 2023. Please sign your posts with ~~~~!