CentOS - Raspberry PI 4

Issues related to hardware problems
pgreco
Posts: 23
Joined: 2018/04/14 17:23:02

Re: CentOS - Raspberry PI 4

Post by pgreco » 2020/09/05 01:11:05

ajayc123 wrote:
2020/09/03 14:27:12
pgreco wrote:
2020/07/29 23:38:36
I've been updating the rpi4/aarch64/c8stream image in the last few days. The link is the same that was posted a few days ago (https://people.centos.org/pgreco/CentOS ... Minimal-4/).

As always, userspace is stock c8, but the kernel is built in my servers, unsigned.
I'm trying to keep this kernels update with what we build for c7, so you could use this as a temporary repo https://people.centos.org/pgreco/rpi_aarch64_el8/

Pablo.
Pablo, thanks a lot for this. It works quite fine, and I did not face any issues so far (in my limited use). I am curious if you are planning to publish a version with gui (like gnome) in near future ?
Not really, at least until these become more official, but you could convert it basically by doing

Code: Select all

sudo dnf install NetworkManager-wifi @gnome-desktop @base-x
and maybe a few other things

monadnomad
Posts: 2
Joined: 2020/11/16 07:21:47

Re: CentOS - Raspberry PI 4

Post by monadnomad » 2020/11/16 07:30:23

Pablo, I greatly appreciate the Raspi image you created, CentOS-Userland-8-aarch64-RaspberryPI-Minimal-4-sda.

After a couple of days poking around (I'm new at this) I got it to boot. Hurray! Now, if I want to use your image to boot the Pi off of a USB attached drive, instead of the microSD, how do I do that?

Thank you and best wishes

pgreco
Posts: 23
Joined: 2018/04/14 17:23:02

Re: CentOS - Raspberry PI 4

Post by pgreco » 2020/11/17 21:05:54

monadnomad wrote:
2020/11/16 07:30:23
After a couple of days poking around (I'm new at this) I got it to boot. Hurray! Now, if I want to use your image to boot the Pi off of a USB attached drive, instead of the microSD, how do I do that?
You dd it to the disk just like you did to the microSD card, then you edit the cmdline.txt in the first partition and change /dev/mmcblk3 into /dev/sda3.
We've had some people have issues with certain sata-usb adapters, so that part may be an adventure.

Pablo.

bcus
Posts: 2
Joined: 2020/11/26 23:42:54

Re: CentOS - Raspberry PI 4

Post by bcus » 2020/11/27 00:22:50

pgreco, thank you for the work you've done with this CentOS image, I have tried it on my USB HDD drive and it's working for me that I can boot and use it just like the official Raspberry images. I have a few questions and hopefully I do not use to much of your time with this. Do you use discord?

What I am trying to do is the following, I have looked on many different sites to find information on how to encrypt the entire disk. All refer to Ubuntu, Raspbian or only show how to encrypt one partition.

What I found so far is that the /boot partition needs to be encrypted with LUKS1 format only, as to the rest of the system, it can be LUKS2 format. There is a lot to be learn from RHEL8 documention. The end result is to run LUKS2 on LVM.

I currently have the USB HDD (/dev/sdb) connected to Pi4, unused, I have another USB HDD (/dev/sda) connected to Pi4 booted. I want to use the first disk to encrypt the entire second disk and setup CentOS. This means encrypting everything: /boot, swap, /tmp, /, /home.

Do you think that this could be a simple task in a way that passing the correct configuration parameters to GRUB for example could make all this possible?

Here is a link for John's git page where he accomplished something similar.

Cheers

bcus
Posts: 2
Joined: 2020/11/26 23:42:54

Re: CentOS - Raspberry PI 4

Post by bcus » 2020/11/27 01:56:04

Pablo,

I have performed a secure erase with MiniTool Partition Wizard 12 on Windows 10, and also a second time on Linux with the following command to prepare the disk for encryption.

Code: Select all

sudo cryptsetup open --type plain -d /dev/urandom /dev/sdb secure_erase
sudo dd if=/dev/zero of=/dev/mapper/secure_erase count=1024 bs=1024 status=progress
sudo cryptsetup close secure_erase

I have never encrypted my USB HDD; therefore, I do not need to wipe any previous LUKS header with the command bellow. In case some are reading this and need to do this, the command to type is below, regardless of LUKS version (LUKS1 = 256 bit // LUKS2 = 512 bit)

Code: Select all

sudo dd if=/dev/urandom of=/dev/sdX1 count=40960 bs=512

This git page from Styper could perhaps be ported to CentOS 8 ? For me the issue is that both the HDMI ports on the Pi4 are no longer working and I cannot see the TV output, there was two tiny chips underneath the board, HDMI area, that were accidentally removed because of tape...


I am ready to create the partitions to later use with LVM2 and LUKS2. OR instead, do I type "pvcreate /dev/sdb" and later encrypt the "/boot" partition with LUKS1 only? i am confused on this part. If I do this, then creating the partitions at this stage is not necessary.

Code: Select all

sudo fdisk /dev/sdb
** Device does not contain a recognized partition table.
g (create a new empty GPT partition table)
n (add a new partition)
1M (size)
t (change a partition type)
4 (BIOS boot)
n (add a new partition)
[enter] (use the rest of the disk)
w (write table to disk and exit)
sudo fdisk -l /dev/sdb
Device       Start       End   Sectors   Size Type
/dev/sdb1     2048   1048576   1046529   511M BIOS boot
/dev/sdb2  1050624 976773134 975722511 465.3G Linux filesystem

I am not sure if XFZ is supported yet on the Pi4 and CentOS 8, I got nothing for CentOS 8 and XFS on Google. I assume that at this point I can start creating the volumes and encrypting them, later I can use the command "dd" to use your image CentOS-Userland-8-aarch64-RaspberryPI-Minimal-4-sda.raw.xz, make the necessary changes and boot with an entire encrypted disk ?? I wonder how to decrypt automatically at boot with hardware or key file inside an USB drive only needed at boot to decrypt the device...

Cheers

Post Reply

Return to “CentOS 8 - Hardware Support”