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

梦想不抛弃苦心追求的人,只要不停止追求,你们会沐浴在梦想的光辉之中。再美好的梦想与目标,再完美的计划和方案,如果不能尽快在行动中落实,最终只能是纸上谈兵,空想一番。只要瞄准了大方向,坚持不懈地做下去,才能够扫除挡在梦想前面的障碍,实现美好的人生蓝图。Cubic(Custom Ubuntu ISO Creator)创建自定义镜像,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com,来源:原文

关于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密钥要生成

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/150990.html

(0)
飞熊的头像飞熊bm

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!