标签: preseed

如何让 HTTP preseed 在 Ubuntu 10.04 LTS (Lucid) 上正常工作?

安装介质:ubuntu-10.04-desktop-i386.iso

我尝试了很多不同的引导参数,但安装程序要么忽略了预置配置,要么直接将自己作为 LiveCD 引导。

我尝试过的引导参数示例:

auto url= http://mydomain.com/path/preseed.cfg boot=casper only-ubiquity initrd=/casper/initrd.lz 安静的飞溅——

如果我删除only-ubiquity,它会作为 LiveCD 启动。如果我删除boot=casper,它将无法启动。如果我添加vga=normal locale=en_US console-setup/layoutcode=us console-setup/ask_detect=false interface=auto,它仍然无法进行自动安装。如果我删除auto,它是一样的。

启动此类安装的正确引导参数是什么?

从服务器托管的 apache 日志中preseed.cfg,我看到安装程序在获取预置文件时没有问题。我的预置文件几乎与https://help.ubuntu.com/10.04/installation-guide/example-preseed.txt 中的文件相同。此外,我已经运行debconf-set-selections -c preseed.cfg以确保预置文件是正确的。

ubuntu automated-install ubuntu-10.04 preseed

21
推荐指数
1
解决办法
2万
查看次数

传递变量以在 Debian Jessie 安装的 preseed 文件中使用

是否可以通过引导提示向 Debian 安装程序添加变量,以便可以在预置文件中使用该变量?

特别是,我正在尝试解决以下问题:

我们有一个非常广泛的安装后脚本,通常是从服务器下载的。但是现在我想创建 Packer 映像并将安装后脚本与其他 Packer 文件一起保留在版本控制中。为了访问 preseed,我可以在引导命令中执行“preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg”。但现在我希望安装程序从同一位置下载安装后脚本。

目前,安装后挂钩如下所示:

d-i preseed/late_command string wget -q -O /tmp/postinstall.sh http://our.public.server/postinstall.jessie.sh ; sh /tmp/postinstall.sh
Run Code Online (Sandbox Code Playgroud)

理想情况下,我想做类似的事情:

d-i preseed/late_command string wget -q -O /tmp/postinstall.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/postinstall.jessie.sh ; sh /tmp/postinstall.sh
Run Code Online (Sandbox Code Playgroud)

但是当然 Debian 安装程序不会用所需的值替换那些。所以我在想有可能将类似环境变量的变量传递给我们可以在 preseed 文件中使用的安装程序。

任何提示或提示表示赞赏!

编辑:尝试将 late_command 添加到引导命令中,但没有被接受。

编辑:尝试预置/运行,但它在不允许目标内命令的不同环境中运行。

编辑:这可以是一种解决方法:如何在 debian preseed 文件中通过管道将命令组合在一起?但我更喜欢将脚本放在一个单独的文件中。如果不可能,那也是不可能的。

debian environment-variables preseed packer

9
推荐指数
2
解决办法
5266
查看次数

debian 6 预置一直在询问“将更改写入磁盘并配置 LVM?”

我尝试使用专家配方为 debian 6.0.5 netinstall 配置 lvm。我不想被问到任何问题,但它一直问我“将更改写入磁盘并配置 LVM?”

这是我的 preseed.cfg 的一部分:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto-lvm/new_vg_name string vg00
d-i partman-auto/expert_recipe string                         \
  boot-root ::                                            \
          128 50 128 ext2                                 \
                  $primary{ } $bootable{ }                \
                  method{ format } format{ }              \
                  use_filesystem{ } filesystem{ ext2 }    \
                  mountpoint{ /boot }                     \
          .                                               \
          10000 50 10000 ext4                             \
                  $defaultignore{ }                       \
                  $lvmok{ }                               \
                  lv_name{ root }                         \ …
Run Code Online (Sandbox Code Playgroud)

debian lvm preseed

8
推荐指数
3
解决办法
1万
查看次数

Debian/Ubuntu 通过 early/run 命令设置预置镜像变量

我需要知道如何通过 di early/command 或 di preseed/run 将其添加到 preseed 中,以便preseed.cfg/proc/cmdline参数中设置我的镜像。

如果我做:

d-i preseed/run string ws/ubuntu.sh

#!/bin/sh
     for x in `cat /proc/cmdline`; do
             case $x in RPHOST*)
                     eval $x

                     d-i mirror/http/hostname string ${RPHOST}
                     d-i mirror/http/mirror string ${RPHOST}
                     d-i apt-setup/security_host string ${RPHOST}
                     ;;
             esac; 
done
Run Code Online (Sandbox Code Playgroud)

它失败。

它在 CentOS 启动%pre部分运行良好,但我不知道如何通过 debian/ubuntu 预置来实现。

ubuntu debian preseed

7
推荐指数
1
解决办法
3252
查看次数

完全无人值守预置 debian 11(排除问题)

我正在尝试完全自动化地预置 debian 11 netinstall。\n我在这里阅读了许多文档:

\n

这是我的引导行(来自 grub.cfg)

\n
set default="autoinstall"\nset timeout=3\n\nmenuentry "Debian 11 Fully Automated UEFI LVM LUKS BTRFS Remote Decrypt DEBUG TTY4" --id autoinstall {\n        set background_color=black\n        linux    /debian-installer/amd64/linux auto=true url=tftp://192.168.1.100/preseed/debseed11_crypt.cfg net.ifnames=0 biosdevname=0 ipv6.disable=1 language=en locale=en_US.UTF-8 keymap=fr vga=788 noprompt DEBCONF_DEBUG=5 --- quiet\n        initrd   /debian-installer/amd64/initrd.gz\n}\n
Run Code Online (Sandbox Code Playgroud)\n

这是我的预置文件:

\n
#### Preseed preconfiguration file (for Debian buster)\n### Partman early command\n### Kernal parameter\n#d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 hostname=unassigned-hostname domain=unassigned-domain\n#d-i debconf/priority critical\n\n#d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 console=ttyS0,19200n8\n### Localization\nd-i debian-installer/locale string en_US\nd-i debian-installer/language string en\nd-i …
Run Code Online (Sandbox Code Playgroud)

debian automated-install preseed pxe-boot

7
推荐指数
1
解决办法
1万
查看次数

如何使用/调试 Debian preseed with SSL 使用 Startssl Certs

预播工作非常适合我使用:

auto url=http://mydomain.com/preseed.cfg
Run Code Online (Sandbox Code Playgroud)

但是一旦我使用 https 连接,它就不再起作用了。

auto url=https://mydomain.com/preseed.cfg
Run Code Online (Sandbox Code Playgroud)

使用 wget 我可以毫无问题地下载预置文件,使用 lynx 我得到一个

"SSL-Error:no issuer was found"
Run Code Online (Sandbox Code Playgroud)

所以它看起来像一个证书问题,我使用startssl.com来生成我的免费证书,nginx充当ssl网络服务器(使用firefox访问https站点没有问题)。

如何调试这个?如何强制通过 ssl 连接获取文件?

ssl debian preseed

6
推荐指数
1
解决办法
1423
查看次数

使用 RAID 和 LVM 预安装 12.04

我正在尝试使用以下分区方法设置预安装(Ubuntu 12.04.03 64 位),但它不起作用,我不知道为什么。

拜托,欧比旺,你是我唯一的希望。

-1所以我试图改变在大小最初是10亿-1,但它并没有区别。

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/purge_lvm_from_device  boolean true

d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/method string raid

d-i partman-auto-lvm/new_vg_name string vg_sys
d-i partman-auto-lvm/guided_size string max

d-i partman-auto/choose_recipe select raid-lvm
d-i partman-auto/expert_recipe string                      \
      raid-lvm ::                                          \
        512 10 512 raid                                    \
          $primary{ } $lvmignore{ } $bootable{ }           \
          method{ raid }                                   \
        .                                                  \
        8192 20 -1 raid                                    \
          $primary{ } $lvmignore{ }                        \
          method{ raid …
Run Code Online (Sandbox Code Playgroud)

preseed ubuntu-12.04

6
推荐指数
1
解决办法
6576
查看次数

dpkg-reconfigure:对话框前端成功设置 postfix;非交互式前端失败

(注意,在这个问题中,前导#表示根提示符,而不是注释。此外,我已将实际主机名替换为<myhostname>。)

正如debconf (7)手册页所述,dpkg-reconfigure可以使用多个前端中的任何一个来调用,包括默认(“对话框”)交互式前端和“非交互式”前端。

我的想法正确吗?

# dpkg-reconfigure postfix
Run Code Online (Sandbox Code Playgroud)

调用对话框前端,并按Enter回答每个问题,应该相当于运行以下命令?

# dpkg-reconfigure -f noninteractive postfix
Run Code Online (Sandbox Code Playgroud)

如果是这样,那么我不明白以下差异。

差异

在从我的网络主机映像(已安装 postfix)中新填充 Debian 9“Stretch”的 VPS 上,我使用以下命令进行预置debconf-set-selections

# debconf-set-selections <<< "postfix postfix/destinations string <myhostname>"
# debconf-set-selections <<< "postfix postfix/mailbox_limit string 51200000"              
# debconf-set-selections <<< "postfix postfix/mailname string <myhostname>"    
# debconf-set-selections <<< "postfix postfix/main_mailer_type select Internet Site"      
# debconf-set-selections <<< "postfix postfix/protocols select ipv4"                      
# debconf-set-selections <<< "postfix postfix/root_address …
Run Code Online (Sandbox Code Playgroud)

automation dpkg preseed debconf debian-stretch

6
推荐指数
1
解决办法
2916
查看次数

Preseed Ubuntu / Debian - 分区:防止“分区 1 不在物理扇区边界上启动”。

预置 Ubuntu / Debian 工作正常 - 系统可启动。

fdisk -l结果如下:

Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000e157a

Device     Boot    Start       End  Sectors   Size Id Type
/dev/sda1             63    192779   192717  94.1M 83 Linux
/dev/sda2  *      192780   1172744   979965 478.5M 83 Linux
/dev/sda3        1172745  96470324 95297580  45.5G 83 Linux …
Run Code Online (Sandbox Code Playgroud)

ubuntu partition debian preseed partition-alignment

5
推荐指数
1
解决办法
1617
查看次数

预置自动分区

partman多年来,我一直在使用以下设置来自动安装 VM:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman/alignment string "optimal"
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              64 512 300% linux-swap                          \
                      $primary{ }                             \
                      method{ swap } format{ }                \
              .                                               \
              500 10000 1000000000 ext4                       \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .
d-i partman/confirm_write_new_label boolean …
Run Code Online (Sandbox Code Playgroud)

ubuntu partition supermicro preseed

5
推荐指数
2
解决办法
5089
查看次数