斐讯N1由debian刷centos至闪存操作步骤以及更改源

刷完debian或者ubuntu,然后用u盘系统启动,再用U盘系统修改闪存系统文件但不修改bootloader等文件以便正常启动。即U盘系统引导后将现有debian或者ubuntu改为centos7

cd /root
wget https://mirrors.tuna.tsinghua.edu.cn/centos-vault/altarch/7.4.1708/isos/aarch64/CentOS-7-aarch64-rootfs-7.4.1708.tar.xz
mkdir /root/x
e2fsck -y /dev/mmcblk1p2
mount /dev/mmcblk1p2 /root/x
cd x
rm -rf *
cd /root
tar -xpJf CentOS-7-aarch64-rootfs-7.4.1708.tar.xz -C /root/x
cd x/lib
rm -rf modules firmware
cd /root
umount x
之后关机拔掉 U 盘,重启即可进入 CentOS, root 密码是 centos
passwd root 修改root密码
mkdir /etc/yum.repos.d/bak
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak

下载阿里云源 wget http://mirrors.aliyun.com/repo/Centos-7.repo

改为阿里云源 #需要修改为centos-altarch

vi /etc/yum.repos.d/CentOS-7.repo

[base]
name=CentOS- r e l e a s e v e r − B a s e − m i r r o r s . a l i y u n . c o m f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − a l t a r c h / releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-altarch/ releaseverBasemirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosaltarch/releasever/os/ b a s e a r c h / h t t p : / / m i r r o r s . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch/ http://mirrors.aliyuncs.com/centos-altarch/ basearch/http://mirrors.aliyuncs.com/centosaltarch/releasever/os/ b a s e a r c h / h t t p : / / m i r r o r s . c l o u d . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch/ http://mirrors.cloud.aliyuncs.com/centos-altarch/ basearch/http://mirrors.cloud.aliyuncs.com/centosaltarch/releasever/os/$basearc h/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS- r e l e a s e v e r − U p d a t e s − m i r r o r s . a l i y u n . c o m f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − a l t a r c h / releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-altarch/ releaseverUpdatesmirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosaltarch/releasever/updates/ b a s e a r c h / h t t p : / / m i r r o r s . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch/ http://mirrors.aliyuncs.com/centos-altarch/ basearch/http://mirrors.aliyuncs.com/centosaltarch/releasever/updates/ b a s e a r c h / h t t p : / / m i r r o r s . c l o u d . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch / http://mirrors.cloud.aliyuncs.com/centos-altarch/ basearch/http://mirrors.cloud.aliyuncs.com/centosaltarch/releasever/updates/$ba search/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS- r e l e a s e v e r − E x t r a s − m i r r o r s . a l i y u n . c o m f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − a l t a r c h / releasever - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-altarch/ releaseverExtrasmirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosaltarch/releasever/extras/ b a s e a r c h / h t t p : / / m i r r o r s . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch/ http://mirrors.aliyuncs.com/centos-altarch/ basearch/http://mirrors.aliyuncs.com/centosaltarch/releasever/extras/ b a s e a r c h / h t t p : / / m i r r o r s . c l o u d . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch/ http://mirrors.cloud.aliyuncs.com/centos-altarch/ basearch/http://mirrors.cloud.aliyuncs.com/centosaltarch/releasever/extras/$bas earch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS- r e l e a s e v e r − P l u s − m i r r o r s . a l i y u n . c o m f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − a l t a r c h / releasever - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-altarch/ releaseverPlusmirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosaltarch/releasever/centosplus/ b a s e a r c h / h t t p : / / m i r r o r s . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearc h/ http://mirrors.aliyuncs.com/centos-altarch/ basearch/http://mirrors.aliyuncs.com/centosaltarch/releasever/centosplus/ b a s e a r c h / h t t p : / / m i r r o r s . c l o u d . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basea rch/ http://mirrors.cloud.aliyuncs.com/centos-altarch/ basearch/http://mirrors.cloud.aliyuncs.com/centosaltarch/releasever/centosplus/ $basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#contrib - packages by Centos Users
[contrib]
name=CentOS- r e l e a s e v e r − C o n t r i b − m i r r o r s . a l i y u n . c o m f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − a l t a r c h / releasever - Contrib - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-altarch/ releaseverContribmirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosaltarch/releasever/contrib/ b a s e a r c h / h t t p : / / m i r r o r s . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch/ http://mirrors.aliyuncs.com/centos-altarch/ basearch/http://mirrors.aliyuncs.com/centosaltarch/releasever/contrib/ b a s e a r c h / h t t p : / / m i r r o r s . c l o u d . a l i y u n c s . c o m / c e n t o s − a l t a r c h / basearch / http://mirrors.cloud.aliyuncs.com/centos-altarch/ basearch/http://mirrors.cloud.aliyuncs.com/centosaltarch/releasever/contrib/$ba search/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#yum clean all
#yum makecache
#yum update

  • 4
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

BigKay

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值