• 制作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
    
  • 相关阅读:
    获奖喜讯 | 中恒科技连获第十一届“龙图杯”全国BIM大赛三项大奖
    RabbitMQ传递序列化/反序列化自定义对象时踩坑
    瑞吉外卖笔记
    机器学习:基于梯度下降算法的线性拟合实现和原理解析
    硬盘使用时间如何修改?
    金仓数据库 KingbaseGIS 使用手册(6.16. 聚类函数)
    java计算机毕业设计京东仓库管理系统源码+mysql数据库+系统+lw文档+部署
    编译报错:undefined reference to `TIFFReadDirectory@LIBTIFF_4.0‘解决方法
    键盘切换不出中文输入法的解决方法
    算力被“卡脖子”,光子时代“换道超车”
  • 原文地址:https://blog.csdn.net/u012456479/article/details/143309400