ubuntu24.04 autoinstall

修改ubuntu24.04.iso

新建autoinstall文件夹
创建meta-data user-data文件

#cloud-config
# See the autoinstall documentation at:
# https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html
autoinstall:
  apt:
    disable_components: []
    fallback: offline-install
    geoip: true
    mirror-selection:
      primary:
      - uri: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
      - country-mirror
      - arches: &id001
        - amd64
        - i386
        uri: http://archive.ubuntu.com/ubuntu/
      - arches: &id002
        - s390x
        - arm64
        - armhf
        - powerpc
        - ppc64el
        - riscv64
        uri: http://ports.ubuntu.com/ubuntu-ports
    preserve_sources_list: false
    security:
    - arches: *id001
      uri: http://security.ubuntu.com/ubuntu/
    - arches: *id002
      uri: http://ports.ubuntu.com/ubuntu-ports
  codecs:
    install: false
  drivers:
    install: false
  identity:
    hostname: ubuntu
    password: $6$DiNYjxCn8EeigJ9g$7hZry0ZdJoDUupllFhsvka4ny5F5wQ02SLfne78dsiZj45gWHqflA42u5Ejmj90x2.ebr7B516JZR86EAnUAo1
    realname: noz
    username: noz
  kernel:
    package: linux-generic
  keyboard:
    layout: us
    toggle: null
    variant: ''
  locale: en_US.UTF-8
  network:
    ethernets:
      ens33:
        dhcp4: true
    version: 2
  oem:
    install: auto
  source:
    id: ubuntu-server
    search_drivers: false
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  storage:
    layout:
      name: lvm
  updates: security
  version: 1

修改/boot/grub/grub.cfg


if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

set timeout=5
menuentry "Install Ubuntu Server" {
	set gfxpayload=keep
	linux	/casper/vmlinuz   autoinstall "ds=nocloud;s=/cdrom/autoinstall/"
	initrd	/casper/initrd
}
grub_platform
if [ "$grub_platform" = "efi" ]; then
menuentry 'Boot from next volume' {
	exit 1
}
menuentry 'UEFI Firmware Settings' {
	fwsetup
}
fi
submenu 'Boot and Install with the HWE kernel' {
menuentry "Install Ubuntu Server" {
	set gfxpayload=keep
	linux	/casper/hwe-vmlinuz   autoinstall "ds=nocloud;s=/cdrom/autoinstall/"
	initrd	/casper/hwe-initrd
}
}

Ubuntu 24.04是一款基于Linux的操作系统,下面是安装Ubuntu 24.04的步骤: 1. 下载Ubuntu 24.04的镜像文件:你可以从Ubuntu官方网站上下载最新的Ubuntu 24.04镜像文件。确保选择与你的计算机架构(32位或64位)相匹配的版本。 2. 制作启动盘:将下载的镜像文件写入USB闪存驱动器或者光盘。你可以使用一些工具如Rufus、Etcher等来制作启动盘。 3. 启动计算机:将制作好的启动盘插入计算机,并重启计算机。确保在计算机启动时选择从USB或光盘启动。 4. 选择安装方式:在启动时,你将看到一个安装界面。选择“Install Ubuntu”以开始安装过程。 5. 选择语言和键盘布局:在安装过程中,你需要选择你喜欢的语言和键盘布局。 6. 安装类型:在安装类型中,你可以选择“Erase disk and install Ubuntu”以清除整个硬盘并安装Ubuntu,或者选择“Something else”以手动分区。 7. 创建用户账户:在安装过程中,你需要设置一个用户名和密码,这将成为你登录Ubuntu时使用的账户。 8. 安装:完成上述步骤后,点击“Install”按钮开始安装Ubuntu 24.04。安装过程可能需要一些时间,请耐心等待。 9. 完成安装:安装完成后,你将看到一个提示窗口。点击“Restart Now”以重新启动计算机。 10. 登录Ubuntu:在计算机重新启动后,你将看到登录界面。输入之前设置的用户名和密码以登录Ubuntu。 希望以上步骤对你有所帮助!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值