# make_ubuntu_rootfs **Repository Path**: solomon2020/make_ubuntu_rootfs ## Basic Information - **Project Name**: make_ubuntu_rootfs - **Description**: 介绍如何为aarch64平台的ARM架构硬件平台制作ubuntu根文件系统。重点如下 1. ubuntu base 的获取 2. chroot挂载前和挂载后的工作 涉及挂载脚本 3. 镜像制作 涉及制作镜像脚本 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-03 - **Last Updated**: 2026-01-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README This project aims to provide a convenient set of tools for creating and managing root filesystem (rootfs) images based on Ubuntu. Key features include mounting system directories, entering a chroot environment, and cleaning up dependencies. Below is a brief guide on using this project. ## Features - **Permission Check**: Ensures the script runs with root privileges. - **Directory Validation**: Verifies that the target directory exists and is valid. - **System Directory Mounting**: Automatically mounts essential system directories such as proc, sys, etc. - **Chroot Environment Access**: Provides functionality to enter the newly built rootfs environment. - **Dependency Check**: Verifies that required packages are installed before execution. - **Colored Output**: Uses color coding to distinguish different types of information for easier readability. ## Installation and Configuration 1. Clone the repository to your local machine: ```bash git clone https://gitee.com/solomon2020/make_ubuntu_rootfs.git ``` 2. Navigate to the project directory: ```bash cd make_ubuntu_rootfs ``` ## Usage Instructions ### Prerequisites - Ensure you have downloaded the Ubuntu base tarball and placed it in the correct directory, such as `ubuntu-22.04.5-base` or `ubuntu-24.04-base`. ### Running the Scripts #### mnt_chroot.sh This script mounts system directories and enters the chroot environment. ```bash sudo ./mnt_chroot.sh /path/to/your/rootfs ``` #### mkRootfsimg.sh This script creates a rootfs image. ```bash sudo ./mkRootfsimg.sh ``` ## Cleanup To clean up temporary files and unmount system directories, use the following command: ```bash sudo ./mnt_chroot.sh -u /path/to/your/rootfs ``` ## Contribution Guidelines Contributions are welcome. If you have improvement suggestions or find any bugs, please submit an issue or pull request. ## License This project is licensed under the MIT License. See the LICENSE file in the repository for details. --- Always follow best practices during operations, especially when making system-level changes. We hope this toolset helps you create Ubuntu rootfs images more efficiently!