Quantcast
Viewing all articles
Browse latest Browse all 4610

Debian • Boot of Debian 12 encrypted on Raspberry Pi 4B 8GB

Hello, first steps on a Raspberri Pi 4B 8GB and first post in this forum.

My goal is to install "proxmox 8.3" (the latest), based on "debian 12", encrypted. After several attempts and tutorials followed, from what I read in some posts, it was recommended to start from a fresh installation of debian 12 arm64, to be installed with LUKS, and for this I flashed debian 12 for arm64 on a USB stick. Along with the USB stick with Debian (from which to boot the Raspberry), I connected an SSD drive via USB-SATA, on which to install encrypted Debian, and I followed the guided procedure with LUKS enabled, creating a bootable 512MB ESP (EFI System Partition) partition in FAT16 with `/boot/efi` mount point, a 512MB EXT2 partition with `/boot` mount point, and the remaining disk as an encrypted volume, mapped with a logical volume within which I created two logical partitions: one for root (in EXT4 format, with / as mount point) and one for swap (formatted as swap area).

Once the installation process was complete, I removed the installation media, but the new system did not boot... I tried several times, until I tried to use `UEFI boot` (https://github.com/pftf/RPi4/releases) on the microsd, which gave me access to an `EFI shell` through which I navigated to the volume on which the system has been installed, starting the `grubaa64.efi` file that made me start the system, that is, in the EFI shell:

Code:

FS0:cd EFI/debian/grubaa64.efi
and, through the same EFI shell, I also configured the boot order so that it starts from the USB SSD drive.

After booting, I unlocked the encrypted disk by running a login, at the end of which I gave:

Code:

update-grubgrub-install /dev/sda
to update and reinstall the grub. The problem is that, upon reboot, I find myself redoing the process, except that, after launching `grubaa64.efi`, I have the grub menu now installed...

However, I cannot make it appear at boot by itself (without the commands in the EFI Shell).

I read that Rasbian uses the file "/boot/firmware/cmdline.txt" and "/boot/firmware/config.txt" to give instructions to the kernel before booting, so I tried to create those two files, in debian (on which rasbian is based), following what I read here:

https://fleetstack.io/blog/raspberry-pi ... e-txt-file

https://www.raspberrypi.com/documentati ... ot-options

that is:

Code:

mkdir /boot/firmwaretouch /boot/firmware/cmdline.txttouch /boot/firmware/config.txtecho "console=serial0,115200 console=tty1 root=/dev/mapper/crypt cryptdevice=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:crypt rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=IT" >> /boot/firmware/cmdline.txt
based on the content of the "cmdline.txt" file of a successful installation of Rasbian OS 64 (not encrypted) and, for file "config.txt":

Code:

# Enable boot from USBprogram_usb_boot_mode=1# Enable audio (loads snd_bcm2835)dtparam=audio=on# Automatically load overlays for detected camerascamera_auto_detect=1# Automatically load overlays for detected DSI displaysdisplay_auto_detect=1# Enable DRM VC4 V3D driverdtoverlay=vc4-kms-v3d
Even here, at reboot, it does not start by itself, unless I run the usual commands in the EFI shell of the UEFI boot.

Can anyone give a solution? The system, once started, works fine, but the problem is automating the startup...

Thanks

Statistics: Posted by mitma — Sat Feb 01, 2025 6:56 pm — Replies 1 — Views 34



Viewing all articles
Browse latest Browse all 4610

Trending Articles