Add luks device to crypttab and rebuild initramfs
This commit is contained in:
parent
3f7ba24040
commit
e8951c437b
|
@ -214,6 +214,14 @@ mkdir -p -- /target/run/udev
|
|||
mountpoint -q /target/run/udev || mount --bind -- /run/udev /target/run/udev
|
||||
### }}}
|
||||
## }}}
|
||||
## Luks {{{
|
||||
luks_part_uuid=$(blkid | grep "${hdd}2.*TYPE=\"crypto_LUKS\"" | sed 's/.*UUID="\(.*\)" TYPE.*/\1/')
|
||||
### Ensure crypttab file contains the LUKS informations
|
||||
printf '%b\n' "${luks_pv_name} UUID=${luks_part_uuid} none luks,discard" >> /etc/crypttab
|
||||
|
||||
### Regenerate initramfs
|
||||
update-initramfs -k all -u
|
||||
## }}}
|
||||
## Network {{{
|
||||
### Get all informations from current network configuration in rescue mode
|
||||
net_device=$(ip r | grep "^default" | head -1 | cut -d" " -f5)
|
||||
|
|
Loading…
Reference in New Issue