Re: RAID installation at boot questions
On Sat, 14 Nov 2020 08:12:41 +0100
john doe <johndoe65534@mail.com> wrote:
> >
> > What do I do to automate that?
> >
>
>
>
> Is your '/etc/crypttab' file properly populated?
Well, I thought it was....
At first I got the UUID for the RAID device, /dev/md0:
root@hawk:~# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Thu Nov 12 12:06:28 2020
Raid Level : raid1
Array Size : 3906884416 (3725.90 GiB 4000.65 GB)
Used Dev Size : 3906884416 (3725.90 GiB 4000.65 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sat Nov 14 11:52:39 2020
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Name : hawk:0 (local to host hawk)
UUID : 0d3ec9c1:2bc5b3e8:24a27283:c0cad01b
Events : 12270
Number Major Minor RaidDevice State
0 8 33 0 active sync /dev/sdc1
1 8 49 1 active sync /dev/sdd1
root@hawk:~#
and set that up as a line in /etc/crypttab:
encryptedRaid UUID=0d3ec9c1-2bc5-b3e8-24a2-7283c0cad01b none luks
Didn't work, and gave a 90 second timeout.
Note that the UUID in crypttab is re-formatted to agree with the other
UUIDs in that file, dashes rather than colons. Is that relevant?
Or (afterthought here) did I give it the wrong UUID?
root@hawk:~# ll /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 300 Nov 14 11:52 ./
drwxr-xr-x 8 root root 160 Nov 14 11:51 ../
lrwxrwxrwx 1 root root 10 Nov 14 11:52 343ed59e-ae41-4733-8277-f1b77de67479 -> ../../sda5
lrwxrwxrwx 1 root root 10 Nov 14 11:52 52be92ca-795f-46ef-9c52-074fceedc53c -> ../../dm-1
lrwxrwxrwx 1 root root 9 Nov 14 11:52 57de8169-da6c-4952-b6ac-25e6c87dbf1a -> ../../md0
...
root@hawk:~#
Anyway, I tried it by device name, and that worked.
encryptedRaid /dev/md0 none luks
Useful tip: that worked without a prompt because I gave /dev/md0's
encryption the same passphrase I gave the other encrypted partitions.
This also works:
encryptedRaid /dev/md0 /root/raid.encrypt.password.txt luks
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
Reply to: