Install CentOS 7 on Raspberry pi 4 Model B

We have summarized how to install CentOS on Raspberry pi 4 Model B.

RaspPi4.jpg

environment

Micro SD card writing environment: MacBook Pro MacOS Mojave Raspberry pi : pi 4 Model B 8GB RAM 4core Micro SD card: 512 GB

flow

  1. MicroSD card format
  2. Download OS image
  3. CentOS writing
  4. Start with Raspberry pi
  5. Disk allocation
  6. Wifi settings

Reference article / site https://7ka.org/raspberrypi-sd-init-mac/ https://www.centos.org/download/ https://www.raspberrypi.org/documentation/installation/installing-images/mac.md https://www.clara.jp/media/?p=5792#1-BOSPCmicroSD https://www.sgv417.jp/~makopi/blog/archives/2019 https://qiita.com/ftom/items/bdbb44383299029ea3b0

1. MicroSD card format

Insert the MicroSD card into your Mac and format it on the command line.

1-1. First, use the diskutil list to display the list of connected disks and find the MicroSD card. In my environment / dev / disk3 is the MicroSD card.

diskutil list

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         250.8 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.8 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            230.1 GB   disk1s1
   2:                APFS Volume Preboot                 64.9 MB    disk1s2
   3:                APFS Volume Recovery                522.7 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +18.0 MB    disk2
   1:        Apple_partition_map                         32.3 KB    disk2s1
   2:                  Apple_HFS Flash Player            18.0 MB    disk2s2

/dev/disk3 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *512.1 GB   disk3
   1:               Windows_NTFS                         512.0 GB   disk3s1

1-2. Next, format / dev / disk3.

diskutil eraseDisk MS-DOS RPI disk3

Started erase on disk3
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk3s2 as MS-DOS (FAT) with name RPI
newfs_msdos: /dev/rdisk3s2: newfs_exfat should be used for SDXC media
512 bytes per physical sector
/dev/rdisk3s2: 999487104 sectors in 15616986 FAT32 clusters (32768 bytes/cluster)
bps=512 spc=64 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=411648 drv=0x80 bsec=999731200 bspf=122008 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk3

2. Download OS image

2-1. Download the CentOS image. https://www.centos.org/download/

In this article, I downloaded the OS image from the mirror site below. http://mirror.aktkn.sg/centos-altarch/7.8.2003/isos/armhfp/

This article has downloaded CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-4-2003-sda.raw.xz.

2-2. When the download is complete, double-click the file to unzip it.

3. CentOS writing

Write the unzipped file (CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-4-2003-sda.raw) to the MicroSD card. 3-1. First, unmount Disk.

diskutil unmountDisk /dev/disk3

3-2. Execute the following command to write.

if =

sudo dd bs=1m if=CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-4-2003-sda.raw of=/dev/rdisk3; sync

Password:
2612+0 records in
2612+0 records out
2738880512 bytes transferred in 35.963779 secs (76156638 bytes/sec)

If you see Resource busy, do the following:

sudo diskutil unmountDisk /dev/disk3

3-3. Eject

If the writing is successful, execute the following command.

sudo diskutil eject /dev/rdisk3

4. Start with Raspberry pi

4-1. Insert the MicroSD card into the Raspberry pi and turn it on.

4-2. localhost login: will be displayed. Enter root and enter centos as the password.

5. Disk allocation

5-1. At this stage, the free space on the MicroSD card is not allocated for use, so allocate it. First, execute the df command for confirmation.

Only 1.7 GB is allocated to root as shown below. The following is the state where 100% of root is used because the installation work was done without doing this work ...


df -hT

File system type size used remaining used% mount position /dev/root ext4 1.7G 1.7G 0 100% / devtmpfs devtmpfs 3.9G 0 3.9G 0% /dev tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs tmpfs 3.9G 17M 3.9G 1% /run tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/mmcblk0p1 vfat 286M 58M 229M 21% /boot tmpfs tmpfs 788M 0 788M 0% /run/user/0


5-2.Extend the root assignment.

rootfs-expand


5-3.Check again with the df command.

The size available for root has been expanded.

df -hT

File system type size used remaining used% mount position /dev/root ext4 469G 1.2G 468G 1% / devtmpfs devtmpfs 3.9G 0 3.9G 0% /dev tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs tmpfs 3.9G 17M 3.9G 1% /run tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/mmcblk0p1 vfat 286M 54M 233M 19% /boot tmpfs tmpfs 788M 0 788M 0% /run/user/0 [[email protected] ~]#


### 6.Wifi settings

Connect to wifi.

6-1.Start network.

service network start


6-2.Check the status of network devices.

nmcli d


wifi is displayed as disconnected.

6-3.Since the wifi device is working, it will show you the available access points.

nmcli dev wifi list


6-4.Connect to the SSID.

nmcli --ask dev wifi connect

You will be asked for the password, so enter it.

6-5.If you can connect, please check if you can enter from another terminal with ssh.



This is the end of the first step of installing CentOS 7 for the time being.
Please change the password and install the package according to your purpose.:cat: :cat:





Recommended Posts

Install CentOS 7 on Raspberry pi 4 Model B
Install Ubuntu Core 18 on Raspberry Pi 2 Model B
Install Docker on Raspberry Pi
Install MariaDB on Raspberry Pi OS
Try putting CentOS 8 on Raspberry Pi 3
Headless install of Ubuntu 20.10 on Raspberry Pi
Install Golang on CentOS 8
Install Vertica 10.0 on CentOS 6.10
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
I couldn't install docker with raspberry pi2 b +.
Introduced GROWI to Raspberry Pi 4 Model B (Ubuntu)
Put Ubuntu 20.04.1 on Raspberry Pi 4
Install OpenFOAM v2006 on CentOS
Install Apache on CentOS on VirtualBox
Install Ruby 2.7 on CentOS 7 (SCL)
Minecraft server on Raspberry Pi 4
Put Redmine docker container in Raspberry Pi 4 Model B 2GB
Install Java Open JDK 8 on CentOS 7
Note: setting javaMail on Raspberry Pi
How to install MariaDB 10.4 on CentOS 8
Install apache 2.4.46 from source on CentOS7
Steps to install MySQL 8 on CentOS 8
Steps to install devtoolset-6 on CentOS 7
Install Java 9 on windows 10 and CentOS 7
Install Cloud9 on Raspberry pi 4 and set up Rails development environment
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
20.10 is better than 20.04 for USB booting Ubuntu on Raspberry Pi 4B
Install samba4 from source code on CentOS8
I installed Docker on my Raspberry Pi 3
Install the webmail client Rainloop on CentOS 8
How to install beta php8.0 on CentOS8
Launched Redmine with Docker on Raspberry Pi 3
Serially connect to Ubuntu on Raspberry Pi
Install NextCloud on CentOS 7 with Alibaba Cloud ECS
Radiko recording server on Raspberry Pi 4 (Docker unused)
[CentOS] Install apache-loggen
Send emails using Docker container on Raspberry Pi 3
OpenVPN on CentOS 8
Install GitLab on CentOS 8 with no internet connection
Install CMS Made Simple v2.2.2 on LAMP on CentOS 7.3
[Amateur remarks] CentOS 8 was installed on Raspberry Pi 4 8G, and Wordpress was built using Docker-Compose.
Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
How to run javafx with Raspberry Pi Posted on 2020/07/12
Install BookStack Documentation Wiki on Elastic Compute Service on CentOS 7
Install the latest hardware drivers from ELRepo on CentOS
Display characters on I2C 1602 LCD with Raspberry Pi 3 & Java
Install MySQL 5.6 on CentOS6 [How to specify the version]
Install ag (the silver searcher) [on CentOS / Ubuntu / Mac]
Install Corretto 8 on Windows
Maven on CentOS 7 tutorial
Install OpenJDK on macOS