admin 管理员组

文章数量: 1184232

linux环境下使用mkisofs制作系统镜像ISO

1 ,打开linux环境,如centos,kylin10等环境,并挂载镜像到系统上。

[root@localhost ~]# mount /dev/sr1 /mnt/kylin/
mount: /mnt/kylin: WARNING: device write-protected, mounted read-only.
[root@localhost ~]#

2,新建文件夹,并使用cp -ar 命令把挂载镜像包含隐藏文件复制到新文件夹内

[root@localhost ~]# mkdir Kylin[root@localhost ~]# ls -a /mnt/kylin/.   .discinfo  images    .kylin-post-actions           manual    .productinfo  TRANS.TBL
..  EFI        isolinux  .kylin-post-actions-nochroot  Packages  repodata      .treeinfo
[root@localhost ~]# cp -ar /mnt/kylin/. Kylin/[root@localhost ~]# ls -a Kylin/.   .discinfo  images    .kylin-post-actions           manual    .productinfo  TRANS.TBL
..  EFI        isolinux  .kylin-post-actions-nochroot  Packages  repodata      .treeinfo

3,新建文件夹install,放置自动分区文件ks.cfg

[root@localhost Kylin]# mkdir install[root@localhost Kylin]# cd install/[root@localhost install]# vi ks.cfg[root@localhost install]# ls
ks.cfg

kylin10的ks.cfg文件参考如下:

#version=DEVEL# Use graphical install#ignoredisk --only-use=sda
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=sda
#clearpart --all --initlabel --drives=sda
graphical
cdrom
eula --agreed
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'# System language#lang en_US.UTF-8
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --ipv6=auto --device=link
network --hostname=LanEye
# Root password
rootpw --plaintext 6Rajj@1&#!qaz@wsx12#x window system configuration information
xconfig --startxonboot
# Run the Setup Agent on first boot
firstboot --disable
# System services
services --enabled="chronyd"# System timezone
timezone Asia/Shanghai --isUtc
%post --nochroot
#####copy kyinfo and LICENSEif

本文标签: 新建文件 系统 制作