0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

fireflyAIO-3399C主板创建Ubuntu根文件系统

firefly 来源:firefly 作者:firefly 2019-12-13 10:42 次阅读
创建 Ubuntu 根文件系统
准备工作
安装qemu

Linux PC主机上安装模拟器:

sudo apt-get install qemu-user-static
下载和解压 ubuntu-core

Firefly-rk3399 ubuntu根文件系统是基于Ubuntu base 16.04来创建的。用户可以到ubuntu cdimg 下载,选择下载ubuntu-base-16.04.1-base-arm64.tar.gz 。

下载完之后,创建临时文件夹并解压根文件系统:

mkdir temp sudo tar -xpf ubuntu-base-16.04.1-base-arm64.tar.gz -C temp
修改根文件系统
准备工作

准备网络

sudo cp -b /etc/resolv.conf temp/etc/resolv.conf

准备qemu

sudo cp /usr/bin/qemu-aarch64-static temp/usr/bin/

进入根文件系统进行操作:

sudo chroot temp
更新及安装

更新:

apt update apt upgrade

安装自己需要的功能

apt install vim git ....(根据自己需求添加)

安装xubuntu

apt install xubuntu-desktop

可能出现错误:

E: Unable to locate package xxxx

安装包的源没有添加到/etc/apt/source.list中,导致无法识别安装包,可以自行添加源,也可以使用下面给出的source.list覆盖原来的/etc/apt/source.list文件:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted ## Uncomment the following two lines to add software from the 'universe' ## repository. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
添加用户及设置密码

添加用户

useradd -s '/bin/bash' -m -G adm,sudo firefly

给用户设置密码:

passwd firefly

给root用户设置密码:

passwd root

修改完自己的根文件系统就可以退出了。

exit
制作根文件系统

制作自己的根文件系统,大小依据自己的根文件系统而定,注意依据temp文件夹的大小来修改count值

dd if=/dev/zero of=linuxroot.img bs=1M count=2048 sudo mkfs.ext4 linuxroot.img mkdir rootfs sudo mount linuxroot.img rootfs/ sudo cp -rfp temp/* rootfs/ sudo umount rootfs/ e2fsck -p -f linuxroot.img resize2fs -M linuxroot.img

这样 linuxroot.img 就是最终的根文件系统映像文件了。

FAQs
根文件系统加载后,大小不正常,未占满整个分区:

在系统正确加载后执行扩展文件系统命令:

resize2fs /dev/mtd/by-name/linuxroot

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • Linux
    +关注

    关注

    87

    文章

    10943

    浏览量

    206546
  • 嵌入式主板
    +关注

    关注

    7

    文章

    6060

    浏览量

    34567
  • Firefly
    +关注

    关注

    2

    文章

    533

    浏览量

    6735
收藏 人收藏

    评论

    相关推荐

    【NanoPi NEO2试用体验】构建ubuntu文件系统

    Ubuntu文件系统的核心部分,默认没有图形界面等等。在Ubuntu主机中创建目录并下载Ubuntu
    发表于 07-17 09:07

    瑞芯微VS-RK3399创建 Ubuntu 文件系统》分享

    瑞芯微VS-RK3399创建 Ubuntu 文件系统》分享更新时间:2018-3-30准备工作安装qemu在Linux PC主机上安装模
    发表于 03-30 10:03

    NFS文件系统挂载

    :通过tftp使用Ubuntu中的/tftpboot中的uImage启动rootfs文件系统:通过NFS使用Ubuntu中的/nfs_rootfs中的
    发表于 11-05 07:31

    如何导出Ubuntu文件系统

    如何安装fireflydev?如何导出Ubuntu文件系统
    发表于 03-02 07:37

    如何创建UBUNTU文件系统RK3288?

    如何创建UBUNTU文件系统RK3288?
    发表于 03-03 06:33

    如何对RK3288的ubuntu文件系统进行配置呢

    怎样去修改RK3288的ubuntu文件系统播放呢?如何对RK3288的ubuntu文件系统
    发表于 03-04 07:47

    如何制作rk3399 arm64 ubuntu18.04 文件系统

    如何制作rk3399 arm64 ubuntu18.04 文件系统
    发表于 03-07 06:34

    如何使用Ubuntu 16.04编译文件系统

    如何使用Ubuntu 16.04编译文件系统
    发表于 03-09 07:57

    基于Ubuntu 18.04 64bit文件系统定制步骤

    ubuntu-base-18.04.5-base-arm64.tar.gz -C temp修改文件系统准备工作准备网络:sudo cp -b /etc/resolv.conf te
    发表于 04-28 11:24

    RK3288的ubuntu文件系统修改与操作步骤简析

    ubuntu-base-16.04-core-armhf.tar.gz -C ubuntufs接下来就是修改我们的文件系统在修改之前我们要做一些准备工作由于我们要chroot,所以
    发表于 05-19 10:01

    飞凌RK3399开发板如何在Ubuntu保留文件系统

    保留在文件系统中 ,而RK3399处理器的Ubuntu系统提供了文件系统镜像ubuntu.img
    发表于 10-08 10:36

    Firefly-RK3399文件系统介绍

    创建 Ubuntu文件系统 准备工作 安装qemu
    的头像 发表于 11-23 10:55 1791次阅读
    Firefly-RK<b class='flag-5'>3399</b>根<b class='flag-5'>文件系统</b>介绍

    FireflyRK3128主板Ubuntu文件系统创建

    创建 Ubuntu文件系统 使用 miniroot 来创建并引导系统
    的头像 发表于 11-29 09:00 2691次阅读
    FireflyRK3128<b class='flag-5'>主板</b><b class='flag-5'>Ubuntu</b> 根<b class='flag-5'>文件系统</b><b class='flag-5'>创建</b>

    如何制作ubuntu20.04的文件系统

    firefly自带的文件系统,由于缺少一些基本功能模块,因此,我们可以自己手动制作一个ubuntu20.04的文件系统
    的头像 发表于 10-17 12:12 2916次阅读

    飞凌RK3399开发板如何在Ubuntu保留文件系统

    通过飞凌OK3399-C开发板为大家讲解如何在Ubuntu保留文件系统
    的头像 发表于 09-16 15:01 423次阅读
    飞凌RK<b class='flag-5'>3399</b>开发板如何在<b class='flag-5'>Ubuntu</b>保留<b class='flag-5'>文件系统</b>