Cubic(Custom Ubuntu ISO Creator)创建自定义镜像

简介: Cubic(Custom Ubuntu ISO Creator)创建自定义镜像

关于Cubic
Cubic(Custom Ubuntu ISO Creator)包含但不限于以下功能:

安装新软件包
删除现有的软件包
安装其他内核
添加更多背景壁纸
添加文件和文件夹
修改现有的ISO
GUI界面

安装

sudo apt-add-repository ppa:cubic-wizard/release
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7579F80E494ED3406A59DF9081525E2B4F1283B
sudo apt update
sudo apt install cubic

选择项目路径
选择好项目路径后点Next

选择源镜像
选择好后,Original ISO一栏不可更改信息,在Custom ISO里面更改信息,更改好后点Next

进入chroot
当上一步完成之后,会进入chroot模式,相当于一个还没有创建用户的模式,所有的自定义都是在这里进行,在这里你可以安装软件、卸载软件或者拖入文件复制到系统内。

开始自定义
以创建ZHUbuntu为例

  1. 修改源为中科大源
  2. 安装搜狗拼音
  3. 安装vim
  4. 安装zsh等
  5. 安装vscode
  6. 安装opencv

修改源为中科大源

sudo vi /etc/apt/sources.list

sudo apt update
sudo apt upgrade
# deb cdrom:[Ubuntu 18.04.5 LTS _Bionic Beaver_ - Release amd64 (20200806.1)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-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.ustc.edu.cn/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-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.ustc.edu.cn/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-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.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

安装vim

sudo apt vim

在镜像中添加一个root用户

先添加一个普通用户

adduser wmj

然后将这个用户赋予root权限:修改/etc/sudoers文件,找到下面一行,在root下面添加一行“wmj ALL=(ALL) ALL”
在这里插入图片描述
以下操作均在wmj用户下执行

安装搜狗拼音

点击左上角按钮,将deb复制到当前目录,然后安装,下文同理

sudo dpkg -i [tab补全]

sudo apt -f install

sudo dpkg -i [tab补全]

安装vscode

sudo dpkg -i [tab补全]

安装zsh等

sudo apt install git curl wget zsh python3-pip autojump net-tools openssh-server cmake gcc python-pip python-wstools

# pip
cp pip/pip.conf /home/wmj/.pip

# fonts
cp -r fonts/ /home/wmj/.fonts

# zsh
cp zsh/zshrc /home/wmj/.zshrc

sudo cp zsh/zshrc_root /root/.zshrc

# oh-my-zsh
【gitee下载oh-my-zsh源码中的tools/install.sh,等修改好install中的REPO和REMOTE的地址(改为gitee仓库的地址),执行完install.sh后再执行以下两条】
cp -r zsh/oh-my-zsh /home/wmj/.oh-my-zsh
sudo cp -r zsh/oh-my-zsh /root/.oh-my-zsh

# 设置zsh为默认shell
chsh -s /usr/bin/zsh
sudo chsh -s /usr/bin/zsh

charactor not in range解决方法

.bashrc 文件底部添加以下两行:
export LC_ALL=C.UTF-8
export LANG=C.UTF-8

编译安装opencv3.4.10

安装相机驱动

run完把inc里面的头文件复制到/usr/include

自定义系统设置
跳过

备注

  1. 进入镜像安装的时候会强制让新建一个用户,要新建一个名称不为事先写入镜像的用户,进入系统后这个新建的用户自然会消失,但是设备名会与新建用户时设定的用户名一致
  2. 做镜像的时候,封装镜像前记得输入sudo passwd把密码再设置一次,否则进入系统后要重新设置密码
  3. 事先更换的软件源又被换回去了,必须手动再换一次
  4. 搜狗输入法要重新安装
  5. ssh密钥要生成
目录
相关文章
|
Ubuntu Docker 容器
ubuntu 桌面 docker 镜像 vnc
ubuntu 桌面 docker 镜像 vnc
473 0
|
7月前
|
Ubuntu Linux 数据安全/隐私保护
Beta 版 Ubuntu 24.04 LTS 镜像开放下载:GNOME 46 + Linux 6.8
IT之家附上镜像下载地址:Beta 版 Ubuntu 24.04 LTS
|
7月前
|
缓存 Ubuntu Docker
Ubuntu环境下删除Docker镜像与容器、配置静态IP地址教程。
如果遇见问题或者想回滚改动, 可以重启系统.
474 16
|
7月前
|
Ubuntu 网络安全 PHP
如何使用vscode的Docker插件管理ubuntu 拉取服务器的镜像以及创建容器
本测试镜像旨在记录使用vscode的Docker插件拉取病创建Dockerfile,以及拉取镜像。
|
7月前
|
Ubuntu Unix Linux
详细指导:Ubuntu镜像下载及系统安装全过程
安装Ubuntu系统并配置引导文件后,您已经成功地将Ubuntu添加到了您的计算机的多重启动选项中。至此,整个安装与配置过程已经全部完成。
|
11月前
|
Ubuntu 安全 网络安全
Docker镜像:Ubuntu支持systemctl、SSH和VNC
总的来说,Docker提供了一个灵活且强大的方式来创建和运行自定义的Ubuntu镜像。通过理解和使用Dockerfile,你可以轻松地创建一个支持systemctl、SSH和VNC的Ubuntu镜像。
772 21
|
11月前
|
Ubuntu Linux 网络安全
Ubuntu Docker镜像:支持systemctl、SSH、VNC
总的来说,创建一个支持systemctl、SSH和VNC的Ubuntu Docker镜像需要一些技术知识,但是通过学习和实践,我们可以掌握这些技术。这将使我们能够更有效地使用Docker,更好地管理我们的应用程序和服务。CentOS系统中的日志文件位置和管理
355 17
|
Ubuntu NoSQL Linux
《docker基础篇:3.Docker常用命令》包括帮助启动类命令、镜像命令、有镜像才能创建容器,这是根本前提(下载一个CentOS或者ubuntu镜像演示)、容器命令、小总结
《docker基础篇:3.Docker常用命令》包括帮助启动类命令、镜像命令、有镜像才能创建容器,这是根本前提(下载一个CentOS或者ubuntu镜像演示)、容器命令、小总结
656 6
《docker基础篇:3.Docker常用命令》包括帮助启动类命令、镜像命令、有镜像才能创建容器,这是根本前提(下载一个CentOS或者ubuntu镜像演示)、容器命令、小总结