板子类型: 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+0records out3221225472 bytes transferred in 334.167413 secs (9639556 bytes/sec)
liugx@liugx Downloads$
少录完再看SD卡的状态
系统写入SD卡后,插上电源
附指示灯说明:
红灯常亮: 未能检测到TF卡;
双灯「红、绿(红灯旁边)」常亮: 未能检测到系统;
红灯常亮,绿灯闪烁: 系统运行正常。
插入网线到路由器上,并且从路由器「路由器上连接设备多的话基本靠猜(连接网络时间,设备类型)」上获取树莓派局域网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 系统