樹莓派3代B型 Raspberry Pi Model 3 B 安裝 centos7系統


 板子類型: Raspberry Pi Model 3 B 搭配 32G的SD卡:

 

 

 

 

 

 

 

 

 

 

  

 

下載支持樹莓派版本的centos7系統

 

https://buildlogs.centos.org/centos/7/isos/armhfp/

 

Mac上下載一個SD卡管理工具(格式化用) 

 

https://www.sdcard.org/downloads/formatter_4/eula_mac/index.html

 

 

 

格式化前:

 格式化操作:

 

 

格式化后,發現在電腦上也能發現SD卡

 

先卸載掉外部磁盤

liugx@liugx ~$ sudo diskutil umount /dev/disk2s1
Password:
Volume BOOT on disk2s1 unmounted
liugx@liugx ~$

 

 然后通過命令,將解壓后的系統拷貝到SD卡中(常說的燒錄)

liugx@liugx Downloads$ sudo dd bs=1m if=./CentOS-Userland-7-armv7hl-Minimal-1611-test-RaspberryPi3.img of=/dev/rdisk2
Password:
3072+0 records in
3072+0 records out
3221225472 bytes transferred in 334.167413 secs (9639556 bytes/sec)
liugx@liugx Downloads$ 

 

少錄完再看SD卡的狀態

 

 

 

系統寫入SD卡后,插上電源

 

 

附指示燈說明:
  1. 紅燈常亮: 未能檢測到TF卡;
  2. 雙燈「紅、綠(紅燈旁邊)」常亮: 未能檢測到系統;
  3. 紅燈常亮,綠燈閃爍: 系統運行正常。

 

 插入網線到路由器上,並且從路由器「路由器上連接設備多的話基本靠猜(連接網絡時間,設備類型)」上獲取樹莓派局域網ip,然后ssh登錄

 

 看到這里說明  樹莓派3代B型 Raspberry Pi Model 3 B 安裝 centos7  已經成功了

以上部分內容參考地址:

  • https://blog.mrabit.com/details/37 

 

centos 安裝好后發現磁盤空間大小和 SD 卡不一致

從新分配空間

網上查到的解釋是因為centos的image是為2G SD卡准備的,如果想用剩余空間,就得重新分配分區。

步驟:

fdisk /dev/mmcblk0

執行命令:d  (刪除分區3)

執行命令:p (按這時候應該是少了一個分區了)

執行命令:n  (加分區)

執行命令:p (主要分區)

直接回車

后面的值默認即可

執行命令:p

執行命令:w

然后reboot 

執行命令: resize2fs /dev/mmcblk0p3
執行df -h查看

 

 

 

 

 

 

 

這里空間和 SD卡 空間一致了

以上部分內容參考地址:

  • https://www.cnblogs.com/caiji/p/7891403.html

 

 

如果要用WIFI的話,在/root/READEME 中有描述

== CentOS 7 userland ==

If you want to automatically resize your / partition, just type the following (as root user):
/usr/local/bin/rootfs-expand

For wifi on the rpi3, just proceed with those steps :

curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.bin > /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin

curl --location https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.txt > /usr/lib/firmware/brcm/brcmfmac43430-sdio.txt

systemctl reboot


                              

 

===================================================

由於找不到有效的centos軟件源,今天從新刷了一個 raspbian lite 系統

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM