ubuntu iso 目录,
代码: 全选
ls -al custom-ubuntu/
total 104
drwxr-xr-x 10 root root 4096 Jul 29 16:25 .
drwxr-xr-x 5 root root 4096 Jul 29 16:37 ..
drwxr-xr-x 3 root root 4096 Jul 25 18:08 boot
-rw-r--r-- 1 root root 2048 Jul 25 18:08 boot.catalog
drwxr-xr-x 2 root root 4096 Jul 25 18:11 casper
drwxr-xr-x 2 root root 4096 Jul 25 18:32 data
drwxr-xr-x 2 root root 4096 Jul 25 18:09 .disk
drwxr-xr-x 3 root root 4096 Jul 25 18:08 dists
drwxr-xr-x 3 root root 4096 Jul 25 18:08 EFI
drwxr-xr-x 2 root root 4096 Jul 25 18:08 install
-rw-r--r-- 1 root root 52059 Jul 29 16:25 md5sum.txt
-rw-r--r-- 1 root root 0 Jul 29 15:36 meta-data
-rw-r--r-- 1 root root 4096 Jul 29 16:07 minimal.squashfs
drwxr-xr-x 4 root root 4096 Jul 25 18:08 pool
lrwxrwxrwx 1 root root 1 Jul 25 18:08 ubuntu -> .
-rw-r--r-- 1 root root 2676 Jul 29 15:40 user-data
代码: 全选
cat custom-ubuntu/boot/grub/grub.cfg
set timeout=0
loadfont unicode
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux /casper/vmlinuz autoinstall ds=nocloud \;s=/cdrom/ ---
initrd /casper/initrd
}
代码: 全选
#cloud-config
autoinstall:
apt:
disable_components: []
fallback: abort
geoip: true
mirror-selection:
primary:
- country-mirror
- arches:
- amd64
- i386
uri: http://archive.ubuntu.com/ubuntu
- arches:
- s390x
- arm64
- armhf
- powerpc
- ppc64el
- riscv64
uri: http://ports.ubuntu.com/ubuntu-ports
preserve_sources_list: false
codecs:
install: false
drivers:
install: false
identity:
kernel:
package: linux-generic
keyboard:
layout: us
toggle: null
variant: ''
locale: en_US.UTF-8
network:
ethernets:
ens18:
dhcp4: true
version: 2
source:
id: ubuntu-server
search_drivers: false
ssh:
allow-pw: true
authorized-keys: []
install-server: false
storage:
config:
- ptable: gpt
serial: 0QEMU_QEMU_HARDDISK_drive-scsi0
path: /dev/sda
wipe: superblock-recursive
preserve: false
name: ''
grub_device: true
type: disk
id: disk-sda
- device: disk-sda
size: 1048576
flag: bios_grub
number: 1
preserve: false
grub_device: false
offset: 1048576
path: /dev/sda1
type: partition
id: partition-0
- device: disk-sda
size: 2147483648
wipe: superblock
number: 2
preserve: false
grub_device: false
offset: 2097152
path: /dev/sda2
type: partition
id: partition-1
- fstype: ext4
volume: partition-1
preserve: false
type: format
id: format-0
- device: disk-sda
size: 32209108992
wipe: superblock
number: 3
preserve: false
grub_device: false
offset: 2149580800
path: /dev/sda3
type: partition
id: partition-2
- name: ubuntu-vg
devices:
- partition-2
preserve: false
type: lvm_volgroup
id: lvm_volgroup-0
- name: ubuntu-lv
volgroup: lvm_volgroup-0
size: 16101933056B
wipe: superblock
preserve: false
path: /dev/ubuntu-vg/ubuntu-lv
type: lvm_partition
id: lvm_partition-0
- fstype: ext4
volume: lvm_partition-0
preserve: false
type: format
id: format-1
- path: /
device: format-1
type: mount
id: mount-1
- path: /boot
device: format-0
type: mount
id: mount-0
updates: security
version: 1
这些配置按道理讲是可以实现自动安装了的,但实际上每次还是需要手动配置语言,密码之类的,有大佬能指点一下吗