当前位置: 首页 > article >正文

制作Ubuntu根文件系统

制作Ubuntu根文件系统:
gunzip ubuntu-base-22.04.5-base-arm64.tar.gz
mkdir ubuntu
tar xvpf ubuntu-base-22.04.5-base-arm64.tar -C ubuntu

挂载目录、复制dns、执行chroot

cd /userdisk/ubuntu
cp /etc/resolv.conf ./etc/resolv.conf
mount --bind /dev ./dev
mount --bind /dev/pts ./dev/pts
mount --bind /proc ./proc
mount --bind /sys ./sys
mkdir rootdir
mount --bind / ./rootdir
cd /userdisk/ubuntu
chroot .
su root

先进入root用户执行apt update 否则会一直报错

su root
apt update

apt update报错解决

/dev/null权限

chmod 777 /dev/null

GPG error: http://ports.ubuntu.com

chmod 1777 /tmp

常用软件包

alias ins=‘apt install’
ins -y htop neofetch file curl git zsh net-tools
sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”

nmcli

apt install -y network-manager

安装gnome桌面

apt install -y gnome-shell ubuntu-gnome-desktop

安装xfce桌面

apt install -y xfce4

export LD_LIBRARY_PATH=/userdisk/ubuntu/lib:/userdisk/ubuntu/usr/lib:/userdisk/ubuntu/usr/lib/aarch64-linux-gnu/weston/:/userdisk/ubuntu/lib/aarch64-linux-gnu/:$LD_LIBRARY_PATH

export PATH=/bin/:/sbin/:/usr/bin/:
sudo cp -Rfd …/ubuntu_gnome/* .

sudo mount --bind /dev ./dev
sudo mount --bind /dev/pts ./dev/pts
sudo mount --bind /proc ./proc
sudo mount --bind /sys ./sys
sudo umount dev
sudo umount dev/pts
sudo umount proc
sudo umount sys

软件源

sudo vi etc/apt/sources.list


# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy main restricted
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy-updates main restricted
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-updates main restricted

## 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://mirrors.aliyun.com/ubuntu-ports/ jammy universe
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy universe
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy-updates universe
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy multiverse
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy multiverse
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy-updates multiverse
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-updates multiverse

## 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://mirrors.aliyun.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu-ports/ jammy-security main restricted
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-security main restricted
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy-security universe
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-security universe
deb http://mirrors.aliyun.com/ubuntu-ports/ jammy-security multiverse
# deb-src http://mirrors.aliyun.com/ubuntu-ports/ jammy-security multiverse

好家伙,systemd这么大:

root@jenkins-2:/# apt install systemd
qemu: Unsupported syscall: 293
qemu: Unsupported syscall: 293
Installing:
  systemd

Installing dependencies:
  adduser                  gir1.2-girepository-2.0  libgirepository-1.0-1  libkmod2               libreadline8t64    netbase              python3.12          xdg-user-dirs
  ca-certificates          gir1.2-glib-2.0          libglib2.0-0t64        libkrb5-3              libsqlite3-0       networkd-dispatcher  python3.12-minimal
  dbus                     krb5-locales             libglib2.0-data        libkrb5support0        libsystemd-shared  openssl              readline-common
  dbus-bin                 libapparmor1             libgssapi-krb5-2       libnsl2                libtirpc-common    python3              shared-mime-info
  dbus-daemon              libatomic1               libicu74               libpython3-stdlib      libtirpc3t64       python3-dbus         systemd-resolved
  dbus-session-bus-common  libdbus-1-3              libk5crypto3           libpython3.12-minimal  libxml2            python3-gi           systemd-timesyncd
  dbus-system-bus-common   libexpat1                libkeyutils1           libpython3.12-stdlib   media-types        python3-minimal      tzdata

Suggested packages:
  liblocale-gettext-perl  default-dbus-session-bus  libarchive13t64  libfido2-1      iw                python-dbus-doc  readline-doc        systemd-boot
  perl                    | dbus-session-bus        libbpf1          libip4tc2       | wireless-tools  python3.12-venv  systemd-container   systemd-repart
  cron                    low-memory-monitor        libcryptsetup12  libpwquality1   python3-doc       python3.12-doc   systemd-cryptsetup  libtss2-tcti-device0
  quota                   krb5-doc                  libdw1t64        libqrencode4    python3-tk        binutils         systemd-homed       polkitd
  ecryptfs-utils          krb5-user                 libelf1t64       libtss2-rc0t64  python3-venv      binfmt-support   systemd-userdbd

Recommended packages:
  linux-sysctl-defaults

Summary:
  Upgrading: 0, Installing: 51, Removing: 0, Not Upgrading: 0
qemu: Unsupported syscall: 293
  Download size: 30.0 MB
  Space needed: 111 MB / 616 MB available

Continue? [Y/n] y

http://www.kler.cn/a/370049.html

相关文章:

  • 数学规划问题2 .有代码(非线性规划模型,最大最小化模型,多目标规划模型)
  • 2025美赛倒计时,数学建模五类模型40+常用算法及算法手册汇总
  • 62,【2】 BUUCTF WEB [强网杯 2019]Upload1
  • 【数据结构】二分查找
  • bash: ./xxx: No such file or directory
  • 【SpringCloud】黑马微服务学习笔记
  • Flink(一)
  • 使用DeepSpeed进行多机多卡训练模型
  • Bug|空心病,不知道自己要干什么
  • 大语言模型数据流程源码解读(基于llama3模型)
  • 自己搭建[文本转语音]服务器
  • 2024 Rust现代实用教程:1.2编译器与包管理工具以及开发环境搭建
  • C++基于opencv的视频质量检测--图像清晰度检测
  • electron 监听窗口高端变化
  • JS | CommonJS、AMD、CMD、ES6-Module、UMD五种JS模块化规范
  • 海外发稿:探索海外外媒宣发分发渠道-大舍传媒
  • 如何使用VBA识别Excel中的“单元格中的图片”(1/2)
  • 着色器的认识
  • JMeter之JMX文件解释
  • Windows驱动开发(三)—— 驱动和应用层通信的几种方式
  • Openpyxl--学习记录
  • 【文心智能体 | AI大师工坊】如何使用智能体插件,完成一款旅游类智能体的开发,来体验一下我的智能体『​​​​​​​背包客』
  • 如何将 Excel 数据转换为 SQL 脚本:基于 Java 的全面解析
  • 问:数据库SQL优化实践整理?
  • python 相关
  • Android--简易计算器实现