<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3AAndar1an</id>
	<title>User:Andar1an - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3AAndar1an"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Andar1an&amp;action=history"/>
	<updated>2026-05-04T00:49:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Andar1an&amp;diff=27458&amp;oldid=prev</id>
		<title>Andar1an: update fstab uuids</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Andar1an&amp;diff=27458&amp;oldid=prev"/>
		<updated>2024-10-03T22:46:18Z</updated>

		<summary type="html">&lt;p&gt;update fstab uuids&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:46, 3 October 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l78&quot;&gt;Line 78:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;BOOTLOADER=none setup-disk -m sys /mnt&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;BOOTLOADER=none setup-disk -m sys /mnt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;export UUID&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=$(blkid -s UUID -o value /dev/nvme0n1p2 | sed -n &#039;s/.*UUID=\&quot;\([^\&quot;]*\)\&quot;.*/\1/p&#039; )&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;export UUID=$(blkid -s UUID -o value /dev/dm-0 | sed -n &#039;s/.*UUID=\&quot;\([^\&quot;]*\)\&quot;.*/\1/p&#039; )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;export UUID2&lt;/del&gt;=$(blkid -s UUID -o value /dev/dm-0 | sed -n &#039;s/.*UUID=\&quot;\([^\&quot;]*\)\&quot;.*/\1/p&#039; )&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;export &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2&lt;/ins&gt;=$(blkid -s UUID -o value /dev/nvme0n1p1 | sed -n &#039;s/.*UUID=\&quot;\([^\&quot;]*\)\&quot;.*/\1/p&#039; )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;export &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID3&lt;/del&gt;=$(blkid -s UUID -o value /dev/nvme0n1p1 | sed -n &#039;s/.*UUID=\&quot;\([^\&quot;]*\)\&quot;.*/\1/p&#039; )&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Can modify output of setup-disk&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Can modify output of setup-disk&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cat &amp;lt;&amp;lt;EOF &amp;gt;/mnt/etc/fstab&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cat &amp;lt;&amp;lt;EOF &amp;gt;/mnt/etc/fstab&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$UUID	/	btrfs	rw,noatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@ 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$UUID	/	btrfs	rw,noatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@ 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/home	btrfs	rw,relatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@home 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/home	btrfs	rw,relatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@home 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/opt	btrfs	rw,relatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@opt 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/opt	btrfs	rw,relatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@opt 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/tmp	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@tmp 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/tmp	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@tmp 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/var	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@var 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/var	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@var 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/run	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@run 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/run	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@run 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/srv	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@srv 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/srv	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@srv 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/.snapshots	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@.snapshots 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/.snapshots	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@.snapshots 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/del&gt;/swap	btrfs	rw,ssd,noatime,nodatacow,compress=none,subvol=/@swap 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID	&lt;/ins&gt;/swap	btrfs	rw,ssd,noatime,nodatacow,compress=none,subvol=/@swap 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID3	&lt;/del&gt;/boot/efi	vfat	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;UUID=$&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;UUID2	&lt;/ins&gt;/boot/efi	vfat	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/dev/cdrom	/media/cdrom	iso9660	noauto,ro 0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/dev/cdrom	/media/cdrom	iso9660	noauto,ro 0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/dev/usbdisk	/media/usb	vfat	noauto	0 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/dev/usbdisk	/media/usb	vfat	noauto	0 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Andar1an</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Andar1an&amp;diff=27429&amp;oldid=prev</id>
		<title>Andar1an: Full Disk Encryption - BTRFS Subvolumes + LUKS2 - Single Disk, No RAID, No Secure Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Andar1an&amp;diff=27429&amp;oldid=prev"/>
		<updated>2024-09-30T17:24:31Z</updated>

		<summary type="html">&lt;p&gt;Full Disk Encryption - BTRFS Subvolumes + LUKS2 - Single Disk, No RAID, No Secure Boot&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;# WIP - Lots of references to LVM on LUKS and Secure Boot Alpine wikis - will add links and references later&lt;br /&gt;
&lt;br /&gt;
# TODO: &lt;br /&gt;
- Poweroff has some errors related to mounts - look into&lt;br /&gt;
- Validate swapfile compression and cow settings - if remounting while installing didn&amp;#039;t work use chattrc&lt;br /&gt;
- Wiki page formatting&lt;br /&gt;
&lt;br /&gt;
# System:&lt;br /&gt;
Alpine 3.20 on Lenovo X1 Yoga Gen 4&lt;br /&gt;
&lt;br /&gt;
# Steps:&lt;br /&gt;
setup-keymap&lt;br /&gt;
setup-hostname&lt;br /&gt;
setup-interfaces&lt;br /&gt;
rc-service networking start&lt;br /&gt;
passwd&lt;br /&gt;
setup-timezone&lt;br /&gt;
setup-ntp&lt;br /&gt;
setup-sshd&lt;br /&gt;
&lt;br /&gt;
# load btrfs module, or will get missing /dev/btrfs-control warning when creating fs.&lt;br /&gt;
modprobe btrfs&lt;br /&gt;
setup-apkrepos&lt;br /&gt;
apk update&lt;br /&gt;
apk add btrfs-progs cryptsetup dosfstools mkinitfs parted&lt;br /&gt;
&lt;br /&gt;
# use optimal partition alignment for disk&lt;br /&gt;
parted -a optimal /dev/nvme0n1 -s \&lt;br /&gt;
    mklabel gpt \&lt;br /&gt;
    mkpart ESP fat32 1MiB 512MiB \&lt;br /&gt;
    mkpart luks btrfs 512MiB 100% \&lt;br /&gt;
    set 1 esp on&lt;br /&gt;
&lt;br /&gt;
# overwrite luks parition with 0&amp;#039;s - takes a while, took me 20 min for 476 GiB&lt;br /&gt;
# dd if=/dev/urandom of=/dev/nvme0n1p2 bs=1M status=progress&lt;br /&gt;
&lt;br /&gt;
# Luks2 Optimized for security (see cryptsetup notes below):&lt;br /&gt;
cryptsetup luksFormat /dev/nvme0n1p2 -v -c aes-xts-plain64 -s 512 --hash sha512 --pbkdf pbkdf2 --iter-time 5000 --use-random &lt;br /&gt;
&lt;br /&gt;
# can verify keyslot has a key&lt;br /&gt;
# cryptsetup luksDump /dev/nvme0n1p2&lt;br /&gt;
&lt;br /&gt;
mkfs.fat -F 32 -n ESP /dev/nvme0n1p1&lt;br /&gt;
cryptsetup luksOpen /dev/nvme0n1p2 luks&lt;br /&gt;
mkfs.btrfs -L ROOT /dev/mapper/luks&lt;br /&gt;
&lt;br /&gt;
# create subvolumes &lt;br /&gt;
mount /dev/mapper/luks /mnt&lt;br /&gt;
btrfs sub create /mnt/@&lt;br /&gt;
btrfs sub create /mnt/@swap&lt;br /&gt;
btrfs sub create /mnt/@.snapshots&lt;br /&gt;
btrfs sub create /mnt/@tmp&lt;br /&gt;
btrfs sub create /mnt/@run&lt;br /&gt;
btrfs sub create /mnt/@var&lt;br /&gt;
btrfs sub create /mnt/@srv&lt;br /&gt;
btrfs sub create /mnt/@home&lt;br /&gt;
btrfs sub create /mnt/@opt&lt;br /&gt;
umount /mnt&lt;br /&gt;
&lt;br /&gt;
# following mounts will inherit primary mount options until remounted&lt;br /&gt;
mount -o ssd,noatime,space_cache=v2,compress-force=zstd:2,discard=async,subvol=@ /dev/mapper/luks /mnt&lt;br /&gt;
# Mount the sub volumes:&lt;br /&gt;
mkdir -p /mnt/swap /mnt/.snapshots /mnt/tmp /mnt/run /mnt/var /mnt/srv /mnt/home /mnt/opt&lt;br /&gt;
mount -o subvol=@home /dev/mapper/luks /mnt/home&lt;br /&gt;
mount -o subvol=@opt /dev/mapper/luks /mnt/opt&lt;br /&gt;
mount -o subvol=@tmp /dev/mapper/luks /mnt/tmp&lt;br /&gt;
mount -o subvol=@var /dev/mapper/luks /mnt/var&lt;br /&gt;
mount -o subvol=@run /dev/mapper/luks /mnt/run&lt;br /&gt;
mount -o subvol=@srv /dev/mapper/luks /mnt/srv&lt;br /&gt;
mount -o subvol=@.snapshots /dev/mapper/luks /mnt/.snapshots&lt;br /&gt;
mount -o subvol=@swap /dev/mapper/luks /mnt/swap&lt;br /&gt;
&lt;br /&gt;
mkdir -p /mnt/boot/efi&lt;br /&gt;
# Mount the EFI partition&lt;br /&gt;
mount /dev/nvme0n1p1 /mnt/boot/efi&lt;br /&gt;
&lt;br /&gt;
# easier to not install bootlader with setup-disk&lt;br /&gt;
BOOTLOADER=none setup-disk -m sys /mnt&lt;br /&gt;
&lt;br /&gt;
export UUID=$(blkid -s UUID -o value /dev/nvme0n1p2 | sed -n &amp;#039;s/.*UUID=\&amp;quot;\([^\&amp;quot;]*\)\&amp;quot;.*/\1/p&amp;#039; )&lt;br /&gt;
export UUID2=$(blkid -s UUID -o value /dev/dm-0 | sed -n &amp;#039;s/.*UUID=\&amp;quot;\([^\&amp;quot;]*\)\&amp;quot;.*/\1/p&amp;#039; )&lt;br /&gt;
export UUID3=$(blkid -s UUID -o value /dev/nvme0n1p1 | sed -n &amp;#039;s/.*UUID=\&amp;quot;\([^\&amp;quot;]*\)\&amp;quot;.*/\1/p&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
# Can modify output of setup-disk&lt;br /&gt;
cat &amp;lt;&amp;lt;EOF &amp;gt;/mnt/etc/fstab&lt;br /&gt;
UUID=$UUID	/	btrfs	rw,noatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@ 0 0&lt;br /&gt;
UUID=$UUID2	/home	btrfs	rw,relatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@home 0 0&lt;br /&gt;
UUID=$UUID2	/opt	btrfs	rw,relatime,compress-force=zstd:2,ssd,discard=async,space_cache=v2,subvol=/@opt 0 0&lt;br /&gt;
UUID=$UUID2	/tmp	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@tmp 0 0&lt;br /&gt;
UUID=$UUID2	/var	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@var 0 0&lt;br /&gt;
UUID=$UUID2	/run	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@run 0 0&lt;br /&gt;
UUID=$UUID2	/srv	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@srv 0 0&lt;br /&gt;
UUID=$UUID2	/.snapshots	btrfs	rw,ssd,noatime,nodatacow,space_cache=v2,compress-force=zstd:2,discard=async,subvol=/@.snapshots 0 0&lt;br /&gt;
UUID=$UUID2	/swap	btrfs	rw,ssd,noatime,nodatacow,compress=none,subvol=/@swap 0 0&lt;br /&gt;
UUID=$UUID3	/boot/efi	vfat	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 2&lt;br /&gt;
/dev/cdrom	/media/cdrom	iso9660	noauto,ro 0 0&lt;br /&gt;
/dev/usbdisk	/media/usb	vfat	noauto	0 0&lt;br /&gt;
tmpfs	/tmp	tmpfs	nosuid,nodev	0	0&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# remount subvolumes for different mount options to be used&lt;br /&gt;
umount /mnt/swap&lt;br /&gt;
mount -o rw,ssd,noatime,nodatacow,compress=none,subvol=@swap /dev/mapper/luks /mnt/swap&lt;br /&gt;
&lt;br /&gt;
# Now create swapfile with correct subvolume options&lt;br /&gt;
# https://btrfs.readthedocs.io/en/latest/Swapfile.html&lt;br /&gt;
btrfs filesystem mkswapfile --size 20G /mnt/swap/swapfile&lt;br /&gt;
swapon /mnt/swap/swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Look into updating to current key options - https://wiki.archlinux.org/title/Dm-crypt/Device_encryption#Keyfiles&lt;br /&gt;
# To avoid having to type your decryption password twice every boot (once for GRUB and once for Alpine), add a keyfile to your LUKS partition. The filename is important. &lt;br /&gt;
touch /mnt/crypto_keyfile.bin&lt;br /&gt;
chmod 600 /mnt/crypto_keyfile.bin&lt;br /&gt;
dd bs=512 count=4 if=/dev/urandom of=/mnt/crypto_keyfile.bin&lt;br /&gt;
cryptsetup luksAddKey /dev/nvme0n1p2 /mnt/crypto_keyfile.bin&lt;br /&gt;
&lt;br /&gt;
# This keyfile is stored encrypted (it is in your LUKS partition), so its presence does not affect system security.&lt;br /&gt;
# Mount the required filesystems for the Grub EFI installer to do the installation:&lt;br /&gt;
# rbind is recurrsive, rslave is a mirror mount, the proc file system acts as an interface to internal data structures in the kernel. &lt;br /&gt;
&lt;br /&gt;
# see https://wiki.archlinux.org/title/Chroot section 4.3&lt;br /&gt;
mount -t proc /proc /mnt/proc&lt;br /&gt;
mount --rbind /dev /mnt/dev&lt;br /&gt;
mount --make-rslave /mnt/dev&lt;br /&gt;
mount --rbind /sys /mnt/sys&lt;br /&gt;
&lt;br /&gt;
# Then run chroot:&lt;br /&gt;
chroot /mnt&lt;br /&gt;
&lt;br /&gt;
# Install GRUB2 for EFI&lt;br /&gt;
apk add grub grub-efi efibootmgr&lt;br /&gt;
&lt;br /&gt;
# To get the UUID of your storage device into a file for later use, run this command:&lt;br /&gt;
export UUID=$(blkid -s UUID -o value /dev/nvme0n1p2 | sed -n &amp;#039;s/.*UUID=\&amp;quot;\([^\&amp;quot;]*\)\&amp;quot;.*/\1/p&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
# cryptdm = device name set in cryptsetup&lt;br /&gt;
cat &amp;lt;&amp;lt;EOF &amp;gt;/etc/default/grub&lt;br /&gt;
GRUB_TIMEOUT=2&lt;br /&gt;
GRUB_DISABLE_SUBMENU=y&lt;br /&gt;
GRUB_DISABLE_RECOVERY=false&lt;br /&gt;
GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;modules=sd-mod,usb-storage,btrfs,nvme cryptroot=UUID=$UUID cryptdm=luks cryptkey quiet rootfstype=btrfs&amp;quot;&lt;br /&gt;
GRUB_PRELOAD_MODULES=&amp;quot;luks2 cryptodisk part_gpt gcry_sha512 pbkdf2&amp;quot;&lt;br /&gt;
GRUB_ENABLE_CRYPTODISK=y&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# # Update mkinitfs conf modules&lt;br /&gt;
cat &amp;lt;&amp;lt;EOF &amp;gt;/etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
features=&amp;quot;ata base ide scsi usb virtio btrfs nvme cryptsetup cryptkey&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
# if more than 1 kernel, explicitly state value&lt;br /&gt;
mkinitfs $(ls /lib/modules/)&lt;br /&gt;
&lt;br /&gt;
grub-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=ALPINE --modules=&amp;quot;luks2 part_gpt cryptodisk btrfs gcry_rijndael pbkdf2 gcry_sha512&amp;quot;&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig -o /boot/grub/grub.cfg&lt;/div&gt;</summary>
		<author><name>Andar1an</name></author>
	</entry>
</feed>