当自定义Knoppix V9.1时的日志记录

前言

由于对一系列的操作进行了Shell化,因此需要进行更新。
Shell将使用以下内容:
– knoppix-live.sh(偶尔更新)
★操作环境
– Core i7-6700
– VMware Workstation 16 Pro(版本16.2.3)
– 虚拟环境,拥有1个核心/4GB内存/64GB硬盘(客户操作系统:Debian 10 x64)
★自定义内容
– 日语化
– 支持VMware的共享文件夹
– 将软件包保持在稳定最新状态(如果出现问题则停止更新)
– 启用named/ssh/smbd/nmbd/avahi-daemon的自动启动
– 设置用户密码和smb密码(此Shell使用knoppix作为密码)
– 其他(其他细节设置)

文件准备

将以下文件放入同一目录中
(建议使用容量为60GB的驱动器)
– knoppix-live.sh
– KNOPPIX_V9.1DVD-2021-01-25-EN.iso
(如果原始文件不存在,shell会从网络上下载)

请使用KNOPPIX_V9.1DVD-2021-01-25-EN.iso进行启动。

【图形用户界面】
· 在“监视器设置”中将屏幕分辨率设置为最佳选项
· 在“屏幕保护程序”中将屏幕保护程序设置为“禁用屏幕保护程序”
★ 在使用Knoppix内部终端时不需要以下步骤
· 在“启动SSH服务器”中启动SSH
· 在Knoppix内部终端中运行“sudo /etc/init.d/avahi-daemon start”
· 从其他计算机上使用“knoppix@microknoppix”登录

终端内部操作

完成一系列的操作后,将生成以下文件(大约需要2小时完成):
– KNOPPIX_V9.1DVD-2021-01-25-JP.iso(大约6GiB)
★注意
由于开始时的时间可能会被回滚,如果时间有偏差,请再次执行”sudo ntpdate ntp.nict.jp”。

# 地域設定
ls -l /etc/localtime
sudo cp -p /etc/localtime /etc/localtime.org
sudo ln -fs /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
ls -l /etc/localtime
# apt設定
sudo cp -p /etc/apt/sources.list /etc/apt/sources.list.org
sudo bash -c "
    cat /etc/apt/sources.list.org                                                  | \
    sed  -e 's/ftp\.de/deb/g'                                                        \
         -e 's~\(security\.debian\.org\)~\1/debian-security~g'                       \
         -e 's~stable/updates~stable-security~g'                                   | \
    sed  -e '/^deb http:\/\/deb\.debian\.org\/debian testing/a deb http://security.debian.org/debian-security testing-security main contrib non-free' | \
    sed  -e '/^deb http:\/\/deb\.debian\.org\/debian stable-updates/a deb http://deb.debian.org/debian testing-updates main contrib non-free' | \
    sed  -e 's/^\(deb .* oldoldstable\(\|-[A-Za-z]*\) .*$\)/#\1/g'                   \
         -e 's/^\(deb .* oldstable\(\|-[A-Za-z]*\) .*$\)/#\1/g'                      \
         -e 's/^\(deb .* testing\(\|-[A-Za-z]*\) .*$\)/#\1/g'                        \
         -e 's/^\(deb .* unstable\(\|-[A-Za-z]*\) .*$\)/#\1/g'                       \
         -e 's/^\(deb .* experimental\(\|-[A-Za-z]*\) .*$\)/#\1/g'                 | \
    sed  -e 's/^\(deb .* \([A-Za-z]*\)-backports-sloppy .*$\)/#\1/g'                 \
         -e 's/^\(deb .* \([A-Za-z]*\)-backports .*$\)/#\1/g'                        \
         -e 's/^\(deb .* \([A-Za-z]*\)-proposed-updates .*$\)/#\1/g'                 \
    > /etc/apt/sources.list
"
sudo apt-get update
# 時刻合わせ
ls -l /etc/localtime
sudo apt-get -y -t stable install ntpdate
sudo ntpdate ntp.nict.jp
date
ls -l /etc/localtime
# 作業
sudo ./knoppix-live.sh

日志的一部分

knoppix@Microknoppix:/media/sda1$ sudo ./knoppix-live.sh
*******************************************************************************
2022/05/04 14:40:50 : start [./knoppix-live.sh]
*******************************************************************************
34816+0 records in
34816+0 records out
17825792 bytes (18 MB, 17 MiB) copied, 0.223802 s, 79.6 MB/s
--- DVD -> HDD ----------------------------------------------------------------
--- Change minirt.gz ----------------------------------------------------------
--- KNOPPIX_FS.iso -> HDD -----------------------------------------------------
--- KNOPPIX1_FS.iso -> HDD ----------------------------------------------------
--- Customize HDD [chroot] ----------------------------------------------------
*******************************************************************************
2022/05/04 05:47:22 : start [/knoppix-setup.sh]
*******************************************************************************
--- initialize ----------------------------------------------------------------
--- localize ------------------------------------------------------------------
Generating locales (this might take a while)...
  en_US.UTF-8... done
  ja_JP.UTF-8... done
Generation complete.
--- module install ------------------------------------------------------------
・・・ 省略
--- cleaning ------------------------------------------------------------------
--- terminate -----------------------------------------------------------------
*******************************************************************************
2022/05/04 06:05:05 : end [/knoppix-setup.sh]
*******************************************************************************
--- Remaster HDD -> Compress --------------------------------------------------
--- Remaster HDD -> Compress [_wrk0] ------------------------------------------
--- Remaster HDD -> Compress [_wrk1] ------------------------------------------
--- Remaster HDD -> Compress [xorriso:KNOPPIX_FS] -----------------------------
・・・ 省略
-rw-r--r-- 1 root root 5.7G May  4 15:58 KNOPPIX_V9.1DVD-2021-01-25-JP.iso
*******************************************************************************
2022/05/04 15:58:50 : end [./knoppix-live.sh]
*******************************************************************************
knoppix@Microknoppix:/media/sda1$ 

尾声

我正在参考以下网页(感谢):
– 制作KNOPPIX日本语DVD版 – Linux应用大全