You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using dislocker from git (not needed for Ubuntu 20.04)
sudo apt-get install cmake git libfuse-dev libmbedtls-dev
git clone https://github.com/Aorimn/dislocker
cd dislocker ; mkdir build ; cd build ; cmake ../ ; make ; sudo make install
# Possibly some more steps needed for dislocker fuse driver to work.
If Bitlocker is encrypted with TPM+PIN (Change -t ntfs-3g as needed)
Launch the Install Ubuntu shortcut and install Ubuntu
Select Something else mode for disk
For /boot use /dev/sda6
For /, use /dev/mapper/ubuntu--vg-root
You can use base device for bootloader (eg: /dev/sda or /dev/nvme0)
Continue installation as usual
Don't reboot after installation
Setup /etc/crypttab in the newly installed Ubuntu
Chroot to the newly installed Ubuntu
# Get UUID of root partition
sudo blkid /dev/sda6
mkdir /target
sudo mount /dev/mapper/ubuntu--vg-root /target
sudo mount /dev/sda5 /target/boot
for n in proc sys dev etc/resolv.conf; do mount --rbind /$n /target/$n; done
chroot /target
Setup crypttab
mount -a
echo 'sda6_crypt UUID=abcdefgh-1234-5678-9012-abcdefghijklm none luks,discard' >> /etc/crypttab
update-initramfs -k all -c
Setting up LUKS decryption in initramfs using dropbear SSH
apt-get install -yy dropbear-initramfs cryptsetup-initramfs lvm2
echo 'DROPBEAR_OPTIONS="-RFEsjk -c /bin/cryptroot-unlock"' > /etc/dropbear-initramfs/config
# Add your local SSH public keys to dropbear's authorized_keys file to allow password-less logins
echo '<YOUR_PUBLIC_KEY>' > /etc/dropbear-initramfs/authorized_keys
# Check if /etc/crypttab contains an entry like below;
# LUKS volume and device names vary depending on your configuration and hardware.
sda2_crypt /dev/sda2 none luks,initramfs
# Add network support to the initramfs; replace variables with your server's network configuration
# It's important to select the right network interface name.
# For static IP:
#echo 'IP="${ip_address}::${gw_ip}:${netmask}:${optional_fqdn}:${interface_name}:none"' > /etc/initramfs-tools/conf.d/ip
#echo 'ip="${ip_address}::${gw_ip}:${netmask}:${optional_fqdn}:${interface_name}:none"' >> /etc/initramfs-tools/conf.d/ip
# For DHCP
echo 'ip=::::${optional_fqdn}:${device}:dhcp' > /etc/initramfs-tools/conf.d/ip
echo 'IP=::::${optional_fqdn}:${device}:dhcp' >> /etc/initramfs-tools/conf.d/ip
update-initramfs -k all -u
# !/bin/sh
set -e
PREREQ=""
prereqs()
{
echo "${PREREQ}"
}
case "${1}" in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
# CHANGE HERE for your correct modules.
manual_add_modules iwlwifi iwlmvm
copy_exec /sbin/wpa_supplicant
copy_exec /sbin/wpa_cli
copy_file config /etc/initramfs-tools/wpa_supplicant.conf /etc/wpa_supplicant.conf
Create /etc/initramfs-tools/wpa_supplicant.conf
# Sample /etc/initramfs-tools/wpa_supplicant.conf
# note that this is independent of the system /etc/wpa_supplicant.conf (if any)
# only add the network you need at boot time. **And keep the ctrl_interface** !!
ctrl_interface=/tmp/wpa_supplicant
network={
ssid="MyNetwork"
psk="network passphrase"
}
Copy latest wifi firmware
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
cd linux-firmware
sudo cp iwlwifi-* /lib/firmware/
Create /etc/initramfs-tools/scripts/init-premount/a_enable_wireless (Change interface name here)
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /scripts/functions
AUTH_LIMIT=30
INTERFACE="wlp5s0"
alias WPACLI="/sbin/wpa_cli -p/tmp/wpa_supplicant -i$INTERFACE "
log_begin_msg "Starting WLAN connection"
/sbin/wpa_supplicant -i$INTERFACE -c/etc/wpa_supplicant.conf -P/run/initram-wpa_supplicant.pid -B -f /tmp/wpa_supplicant.log
# Wait for AUTH_LIMIT seconds, then check the status
limit=${AUTH_LIMIT}
echo -n "Waiting for connection (max ${AUTH_LIMIT} seconds)"
while [ $limit -ge 0 -a `WPACLI status | grep wpa_state` != "wpa_state=COMPLETED" ]
do
sleep 1
echo -n "."
limit=`expr $limit - 1`
done
echo ""
if [ `WPACLI status | grep wpa_state` != "wpa_state=COMPLETED" ]; then
ONLINE=0
log_failure_msg "WLAN offline after timeout"
panic
else
ONLINE=1
log_success_msg "WLAN online"
fi
configure_networking
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
echo "Killing wpa_supplicant so the system takes over later."
kill `cat /run/initram-wpa_supplicant.pid`