提交 55cb4be8 创建 作者: Administrator's avatar Administrator

增加新文件

上级
#cloud-config
autoinstall:
version: 1
locale: zh_CN.UTF-8
keyboard:
layout: us
identity:
hostname: ubuntu2404
username: bjjc
password: "$6$rounds=4096$REPLACE_WITH_YOUR_HASH"
ssh:
install-server: true
allow-pw: true
storage:
config:
# ===== 磁盘 =====
- type: disk
id: disk0
match:
name: nvme0n1
ptable: gpt
wipe: superblock
grub_device: true
# ===== EFI =====
- type: partition
id: part-efi
device: disk0
size: 512M
flag: boot
- type: format
id: fs-efi
volume: part-efi
fstype: fat32
- type: mount
id: mount-efi
device: fs-efi
path: /boot/efi
# ===== /boot =====
- type: partition
id: part-boot
device: disk0
size: 1G
- type: format
id: fs-boot
volume: part-boot
fstype: ext4
- type: mount
id: mount-boot
device: fs-boot
path: /boot
# ===== root (btrfs) =====
- type: partition
id: part-root
device: disk0
size: -1
- type: format
id: fs-root
volume: part-root
fstype: btrfs
# ===== btrfs 子卷 =====
- type: btrfs-subvolume
id: subvol-root
volume: fs-root
name: "@"
- type: btrfs-subvolume
id: subvol-home
volume: fs-root
name: "@home"
# ===== 挂载 =====
- type: mount
id: mount-root
device: fs-root
path: /
options: "subvol=@,compress=zstd"
- type: mount
id: mount-home
device: fs-root
path: /home
options: "subvol=@home,compress=zstd"
# ===== 开机自动登录(关键)=====
late-commands:
- curtin in-target -- mkdir -p /etc/systemd/system/getty@tty1.service.d
- curtin in-target -- bash -c 'cat > /etc/systemd/system/getty@tty1.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin bjjc --noclear %I \$TERM
EOF'
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论