ubuntu livecd isolinux的定制

本文介绍了如何定制Ubuntu LiveCD的isolinux启动部分,包括修改语言选择以直接显示中文,以及升级内核的步骤。通过解压bootlogo文件编辑背景图片,重命名langlist为lang来实现简化语言选择。此外,还提供了预设国家为中国、时区设置为上海等自动化安装配置。

启动部分的菜单,显示内容等是在gfxboot-theme-ubuntu源码中,

apt source gfxboot-theme-ubuntu gfxboot

cd gfxboot-theme-ubuntu*/

make DEFAULT_LANG=zh_CN

sudo cp -af boot/* ../live-cd/isolinux/

参考:

https://help.ubuntu.com/community/LiveCDCustomization


如果是单纯的不显示语言选择窗口则可以通过修改配置文件来解决:

1.解压isolinux中的bootlogo文件,其中splash.pcx是显示背景图片,可以使用gimp工具编辑;

2.把langlist文件重命名为lang,修改里面的内容,只保留一行,比如zh_CN,这样,livecd启动时,会直接显示中文解码


syslinux-themes-ubuntu-xenial


升级livecd中的linux内核步骤:

1.在root filesystem中,安装新的内核包,并删除旧的内核包;删除时可能会报错,找到错误点,修改那个文件使它能够顺利删除;

2.把/boot目录下的initrdxxx和vmlinuzxxx对应的文件复制到casper目录下,替换原有的文件;

3.把/boot目录下的initrdxxx文件删除,这个文件会在安装时自动生成;


preseed example:

# Enable extras.ubuntu.com.
d-i apt-setup/extras boolean false

d-i countrychooser/shortlist select CN
d-i countrychooser/country-name string China
d-i localechooser/supported-locales multiselect zh_CN.UTF-8
d-i localechooser/languagelist select zh_CN
d-i debian-installer/locale string zh_CN.UTF-8
d-i debian-installer/language string zh_CN
d-i debian-installer/country string CN

d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i keyboard-configuration/layoutcode string us

# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string Asia/Shanghai

unattended-upgrades unattended-upgrades/enable_auto_updates boolean false

# Configure auto partitioner
d-i partman-auto/init_automatically_partition select custom
d-i partman-auto/disk string /dev/sda
#ubiquity partman-auto/method string regular
#ubiquity partman-auto/choose_recipe select All files in one partition (recommended for new users)
#ubiquity partman/confirm_write_new_label boolean true
#ubiquity partman/choose_partition select Finish partitioning and write changes to disk
#ubiquity partman/confirm boolean  true

#d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string root :: 2048 50 1000000 ext4 \
        $primary{ } $bootable{ } method{ format } \
        format{ } use_filesystem{ } filesystem{ ext4 } \
        mountpoint{ / } \
    .
d-i partman-auto/choose_recipe select root
d-i partman-auto/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-basicfilesystems/no_swap boolean false
d-i partman-partitioning/default_label select msdos

# Root User
d-i passwd/root-login boolean false

# Mortal User
d-i passwd/user-fullname string client
d-i passwd/username string client
d-i passwd/user-password password 123456
d-i passwd/user-password-again password 123456
d-i passwd/auto-login boolean true
d-i user-setup/allow-password-weak boolean true

# Alternatively: by default, the installer uses CC.archive.ubuntu.com where
# CC is the ISO-3166-2 code for the selected country. You can preseed this
# so that it does so without asking.
#d-i mirror/http/mirror select cn.archive.ubuntu.com

# Uncomment this if you don't want to use a network mirror.
d-i apt-setup/use_mirror boolean false

d-i apt-setup/services-select multiselect
d-i apt-setup/services-select-ubuntu multiselect
d-i apt-setup/universe boolean false
d-i apt-setup/backports boolean false
d-i apt-setup/security_host string
d-i apt-setup/security_path string

d-i pkgsel/upgrade select none
d-i pkgsel/updatedb boolean false

# Policy for applying updates. May be "none" (no automatic updates),
# "unattended-upgrades" (install security updates automatically), or
# "landscape" (manage system with Landscape).
d-i pkgsel/update-policy select none

# Controls whether or not the hardware clock is set to UTC.do not use UTC for windows system
d-i clock-setup/utc boolean false
d-i clock-setup/ntp boolean true

# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true

# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true

d-i grub-installer/bootdev string /dev/sda


ubiquity ubiquity/summary note
#ubiquity ubiquity/reboot boolean true
ubiquity ubiquity/poweroff boolean true

ubiquity ubiquity/success_command string \
cp /cdrom/s/disablescreensaver.desktop /target/etc/xdg/autostart;\
cp /cdrom/s/disabledpms.desktop /target/etc/xdg/autostart;\
rm -f /target/etc/init/tty*.conf;\
sed -i "/PermitRootLogin/c PermitRootLogin yes" /target/etc/ssh/sshd_config;\
in-target update-rc.d ondemand disable

本文详细介绍了如何基于Ubuntu24.04.1 Linux系统制作Live CD的全流程,涵盖从磁盘准备到最终ISO打包的各个环节。具体包括磁盘添加、OpenSSH服务安装、Cubic环境配置及其基本用法、软件源和软件的更改以及桌面、登录界面与开关机动画的个性化调整等。每个部分都有具体的命令和步骤指导,确保初学者也能轻松上手。同时,还附带了对最终生成的Live CD的功能检验过程。 Ubuntu 24.04.1 Live CD自定义配置指南涵盖了从零开始制作定制Linux发行版的全过程,包括硬件资源的准备、操作系统安装、服务配置、个性化设置以及最终的打包与测试。本文将详细分解制作流程,确保初学者能够理解和实践。 制作Live CD的第一步是添加磁盘,准备足够能存储40GB大小的硬盘。这一步在虚拟机软件中完成,需要新建虚拟硬盘并设置合适大小。 安装OpenSSH服务是为远程连接提供便利,通过虚拟机终端安装OpenSSH服务,并记录虚拟机IP地址以供后续远程连接使用。操作命令包括sudo apt install openssh-server,利用这个服务可以远程控制虚拟机,从而实现不需要物理键盘和显示器的操作环境。 安装Cubic是为了创建Live CD的环境,Cubic是基于Ubuntu的系统,支持通过命令行方式在现有Ubuntu系统中安装。安装Cubic涉及到添加PPA源、更新软件包列表和实际安装Cubic的步骤。 配置Cubic环境是接下来的重点。配置过程包括选择项目目录以及配置其他相关选项,以便在该环境下进行自定义软件和设置的安装。选择项目目录是指选择在哪个文件夹下进行后续的定制工作。 在Cubic环境中,用户可以更改软件源,选择不同的软件包,以及添加或移除特定软件。软件源的更改和软件包的管理对于定制出满足特定需求的发行版来说非常关键,能够确保系统中安装了所需的各种工具和应用。 此外,个性化的调整还包括桌面环境、登录界面的美观性和开关机动画的设置。这些设置赋予了Linux发行版独特的用户体验,让发行版不仅仅局限于功能上的定制,还包括外观和风格上的个性化。 在所有设置完成后,用户需要将定制的环境打包成ISO文件。打包过程需要按照一定顺序执行相关命令,确保所有的更改都正确无误地被记录在ISO文件中。最终,生成的Live CD需要进行功能检验,以确认所有定制都按照预期工作,且系统稳定可用。 整个指南不仅包含详细的操作步骤,还为初学者提供了具体命令和操作流程,使得无经验的用户也能轻松上手。文档中还包含了对制作出的Live CD的功能检验步骤,以确保最终产品的质量。 总结而言,本文是一份全面的Ubuntu 24.04.1 Live CD定制指南,包含了从基础安装到高级配置的完整流程,特别适合想要快速掌握Linux发行版定制技术的学习者和开发者。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值