Page 5 of 6

Re: CentOS - Raspberry PI 4

Posted: 2020/09/05 01:11:05
by pgreco
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

Re: CentOS - Raspberry PI 4

Posted: 2020/11/16 07:30:23
by monadnomad
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

Re: CentOS - Raspberry PI 4

Posted: 2020/11/17 21:05:54
by pgreco
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.

Re: CentOS - Raspberry PI 4

Posted: 2020/11/27 00:22:50
by bcus
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

Re: CentOS - Raspberry PI 4

Posted: 2020/11/27 01:56:04
by bcus
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

Re: CentOS - Raspberry PI 4

Posted: 2020/11/29 01:26:00
by peac
Hi there,

Thank you for packaging CentOS 8 for Raspberry Pi 4 ! I've installed it properly on mine.

How should I go about adding support for KVM ? As far as I understand I would have to compile the raspberry kernel from source on the raspi (or cross compile) and create the image as you did. You have pointed PFTF and their UEFI developments but from the messages in this thread and their about page it seems quite unstable yet, I will use this as last resort.

Could you please explain how to create the image as you did but enabling KVM ?

Thank you again for making it available

Re: CentOS - Raspberry PI 4

Posted: 2020/12/13 18:33:49
by spawnstun
Hello.. :) . Is there an image for a raspberry 3+? :roll:

Re: CentOS - Raspberry PI 4

Posted: 2020/12/26 02:09:16
by pgreco
spawnstun wrote:
2020/12/13 18:33:49
Hello.. :) . Is there an image for a raspberry 3+? :roll:
The same image should work without issues in the 3B+ if you want to use it in aarch64 mode

Re: CentOS - Raspberry PI 4

Posted: 2020/12/26 02:12:09
by pgreco
peac wrote:
2020/11/29 01:26:00
Hi there,

Thank you for packaging CentOS 8 for Raspberry Pi 4 ! I've installed it properly on mine.

How should I go about adding support for KVM ? As far as I understand I would have to compile the raspberry kernel from source on the raspi (or cross compile) and create the image as you did. You have pointed PFTF and their UEFI developments but from the messages in this thread and their about page it seems quite unstable yet, I will use this as last resort.

Could you please explain how to create the image as you did but enabling KVM ?

Thank you again for making it available
KVM is already working in the image, but not as a module (CONFIG_KVM=y), I just tested an aarch64 vr in my rpi4 and worked without issues

Re: CentOS - Raspberry PI 4

Posted: 2021/01/16 16:53:37
by p3ck
Would you be willing to change the cmdline.txt to use the PARTUUID? Then the image won't need any modification to work between sdcard vs usb.

The following is what I've changed it to:
console=ttyAMA0,115200 console=tty1 root=PARTUUID=68bafdb3-03 rootfstype=ext4 elevator=deadline rootwait

Thanks!