AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1602785

Eric Chang's questions

Martin Hope
Eric Chang
Asked: 2022-06-14 06:09:27 +0800 CST

如何使用交互式部分自动重启?

  • 0

自动安装与自定义用户数据完美运行,但安装完成后不会自动重启。

我在https://ubuntu.com/server/docs/install/autoinstall-reference中找不到有关重新启动的文档

我还在这里找到一篇文章http://junyelee.blogspot.com/2021/05/subiquity.html

# use interactive-sections to avoid an automatic reboot

这是我的用户数据

#cloud-config
autoinstall:
  ### config storage and network manually
  interactive-sections:
    - storage
  # Swapfile on root volume
  swap:
    swap: 16GB
  late-commands:
    - curtin in-target --target=/target -- apt-get --purge -y --quiet=2 remove byobu
    - curtin in-target --target=/target -- apt-get install -y git wget curl rsync net-tools ssh ubuntu-desktop plymouth-theme-ubuntu-logo grub-gfxpayload-lists mailutils
    - curtin in-target --target=/target -- hostnamectl set-hostname ubuntu-jammy.abc.com
  # Write a script that can take care of some post install setup "late-commands" cannot be interactive unfortunately"
    - |
      cat <<EOF | sudo tee /target/etc/finish-install-setup.sh
      #!/usr/bin/env bash
      echo *************************
      echo ****  Finish Setup   ****
      echo *************************
      echo 'Enter the hostname for this system: '
      read NEW_HOSTNAME
      hostnamectl set-hostname \${NEW_HOSTNAME}
      echo
      echo 'Enter the timezone for this system: '
      echo 'Asia/Taipei'
      read NEW_TIMEZONE
      timedatectl set-timezone \${NEW_TIMEZONE}
      echo *************************
      echo
      echo *************************
      echo 'Restarting to finish ...'
      shutdown -r 3
      EOF
    - curtin in-target --target /target chmod 744 /etc/finish-install-setup.sh
  apt:
    disable_components: []
    geoip: true
    preserve_sources_list: false
    primary:
    - arches:
      - amd64
      - i386
      uri: http://free.nchc.org.tw/ubuntu
    - arches:
      - default
      uri: http://ports.ubuntu.com/ubuntu-ports
  drivers:
    install: false
  identity:
    hostname: ubuntu-jammy
    password: somesupersecretpasswordhere
    realname: administrator
    username: administrator
  kernel:
    package: linux-generic
  keyboard:
    layout: us
    toggle: null
    variant: ''
  locale: en_US.UTF-8
  network:
    ethernets:
      ens18:
        dhcp4: true
    version: 2
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  ### user-data , commands run during first boot
  user-data:
    runcmd:
      - rm -rf  /usr/bin/python
      - ln -s /usr/bin/python3.10 usr/bin/python
      - wget https://download.nomachine.com/download/7.8/Linux/nomachine_7.8.2_1_amd64.deb -O /opt/nomachine.deb
      - dpkg -i /opt/nomachine.deb
      #- /etc/finish-install-setup.sh
  version: 1

我必须在最后按回车键重新启动机器,我认为这不是一个好的“自动化”。

但是我需要手动配置存储布局,有没有安装完成后强制重启的解决方案?

automation
  • 1 个回答
  • 92 Views
Martin Hope
Eric Chang
Asked: 2022-06-10 07:30:30 +0800 CST

ubuntu jammy ISO 不再尊重自动化的预置文件?

  • 2

我构建 ubuntu 18.04/20.04 自定义 ISO 并使用立方更新 ubuntu.seed 文件(https://github.com/PJ-Singh-001/Cubic)

但是当我尝试使用 ubuntu jammy 执行相同的程序时,ISO 不尊重预种子文件,我不知道为什么并且没有相关的日志文件来确定发生了什么。

任何人都可以确认 ubuntu jammy 没有遵循 preseed 文件吗?如果是这样,还有其他解决方案吗?

preseed
  • 1 个回答
  • 43 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve