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
    • 最新
    • 标签
主页 / server / 问题

问题[automated-install](server)

Martin Hope
proxyd43
Asked: 2021-09-19 05:11:43 +0800 CST

预置 debian 11 完全无人值守(摆脱问题)

  • 7

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

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

set default="autoinstall"
set timeout=3

menuentry "Debian 11 Fully Automated UEFI LVM LUKS BTRFS Remote Decrypt DEBUG TTY4" --id autoinstall {
        set background_color=black
        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
        initrd   /debian-installer/amd64/initrd.gz
}

这是我的预置文件:

#### Preseed preconfiguration file (for Debian buster)
### Partman early command
### Kernal parameter
#d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 hostname=unassigned-hostname domain=unassigned-domain
#d-i debconf/priority critical

#d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 console=ttyS0,19200n8
### Localization
d-i debian-installer/locale string en_US
d-i debian-installer/language string en
d-i debian-installer/country string US
#d-i debian-installer/locale string en_US.UTF-8 fr_FR.UTF-8
d-i localechooser/supported-locales multiselect en_US.UTF-8, fr_FR.UTF-8

### Keyboard selection
d-i keyboard-configuration/xkb-keymap select fr

###  Network configuration

# Netcfg choisira une interface connectée si possible. Cela empêchera
# # d'afficher une liste s'il y a plusieurs interfaces.
d-i netcfg/choose_interface select auto

#d-i netcfg/choose_interface select eth0
d-i netcfg/use_dhcp string true
d-i netcfg/link_wait_timeout string 10
d-i netcfg/dhcp_timeout string 60

#d-i netcfg/disable_autoconfig boolean true

d-i netcfg/dhcp_failed note
#d-i netcfg/dhcp_options select auto

#Configure network manually
# IPv4 Static network configuration
#d-i netcfg/get_ipaddress string 192.168.1.120
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string 192.168.1.1
#d-i netcfg/get_nameservers string 192.168.1.1
#d-i netcfg/confirm_static boolean true

# Set a hostname
#d-i netcfg/get_hostname string zhurong
#d-i netcfg/get_domain string planet.mars
# Force a hostname
#d-i netcfg/hostname string zhurong.planet.mars
# Disable that annoying WEP key dialog
d-i netcfg/wireless_wep string


d-i netcfg/get_hostname unassigned-hostname 
d-i netcfg/get_domain unassigned-domain
d-i netcfg/get_hostname seen true
d-i netcfg/get_domain seen true

### Mirror settings
d-i mirror/country string manual
d-i mirror/http/hostname string httpredir.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string

### Account setup
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# Set root password
# or encrypted using a crypt(3)  hash.
d-i passwd/root-password-crypted password $6$47Cx5oMpkh66eYNI$LV76xupgkvZ3rHJCq1NgXKzp3bBDv6g0FmMiSvmUp1jqaIkTEz5F6eA.SRhBzyPReVQEnzZWwFWSdKGBBn.tE1

### Clock and time zone setup
# Set hardware clock to UTC
d-i clock-setup/utc boolean true
# Set timezone
d-i time/zone string Europe/Paris
# Use NTP clock during installation
d-i clock-setup/ntp boolean true

### Partitioning
# LVM LUKS method

# Inhibit partman to fill the disk with random data 
d-i partman-auto-crypto/erase_disks boolean false

#d-i partman/early_command \
#       string dd if=/dev/zero of=/dev/sda bs=512 count=1
d-i partman-auto/method string crypto
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-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string debian
d-i partman-auto/disk string /dev/vda
d-i partman-auto/choose_recipe select boot-crypto
d-i partman-crypto/passphrase       password  aaabbbccc
d-i partman-crypto/passphrase-again password  aaabbbccc
d-i partman-auto/expert_recipe string \
boot-crypto :: \
  1024 1024 1024 ext4 \
          $primary{ } $bootable{ } \
          method{ format } format{ } \
          use_filesystem{ } filesystem{ ext4 } \
          mountpoint{ /boot } \
  . \
  8192 8192 8192 linux-swap \
          $lvmok{ } lv_name{ swap } \
          in_vg { debian } \
          method{ swap } format{ } \
  . \
  80896 80896 1000000 btrfs \
          $lvmok{ } lv_name{ root } \
          in_vg { debian } \
          method{ format } format{ } \
          use_filesystem{ } filesystem{ btrfs } \
          mountpoint{ / } \
   . \

#d-i partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

### Apt setup
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
### Package selection
tasksel tasksel/first multiselect standard
# Individual additional packages to install
d-i pkgsel/include string openssh-server vim tmux tcpdump dropbear-initramfs cryptsetup-initramfs python3.9
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true
popularity-contest popularity-contest/participate boolean false


### GRUB STUFF
d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev  string default

# Note: options passed to the installer will be added automatically. 
#d-i debian-installer/add-kernel-opts string nousb

# Optional password for grub, either in clear text
# #d-i grub-installer/password password r00tme
# #d-i grub-installer/password-again password r00tme
# # or encrypted using an MD5 hash, see grub-md5-crypt(8).
# #d-i grub-installer/password-crypted password [MD5 hash]
#
# # Use the following option to add additional boot parameters for the
# # installed system (if supported by the bootloader installer).
# # Note: options passed to the installer will be added automatically.
# #d-i debian-installer/add-kernel-opts string nousb
#
# ### Finishing up the installation
# # Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note


d-i preseed/late_command string \
  mkdir -p -m 700 /target/root/.ssh; \
  echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEe3gF//znGIzq30frI6O9qDn5eM6uqEZZlx7mR5SiS" > /target/root/.ssh/authorized_keys; \
  in-target chown --recursive root:root /root/.ssh; \
  in-target chmod 0644 /root/.ssh/authorized_keys; \
  in-target update-alternatives --set editor /usr/bin/vim.basic; \
  in-target passwd --expire root; \
  in-target echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEe3gF//znGIzq30frI6O9qDn5eM6uqEZZlx7mR5SiS' > /etc/dropbear-initramfs/authorized_keys; \
  in-target sed -i '/*PasswordAuthentication*/c\PasswordAuthentication no' /etc/ssh/sshd_config; \
  in-target sed -i '/*PasswordAuthentication*/c\PasswordAuthentication no' /etc/ssh/sshd_config; \
  in-target systemctl enable --now sshd; \
  in-target sed -i '/*DROPBEAR_OPTIONS=*/c\DROPBEAR_OPTIONS="-I 300 -j -k -p 22 -s -c /bin/cryptroot-unlock "' /etc/dropbear-initramfs/config; \
  in-target sed -i '/*IP=*/c\IP="dhcp"' /etc/initramfs-tools/initramfs.conf; \
  in-target update-initramfs -u;
#

目前我得到 debien 安装程序要求我:

  • 主机名
  • 域名

我只是想摆脱这些问题。这是我尝试过的:

  • 我尝试在 pxe 服务器上的命令行内核选项中使用 priority=critical。
  • 我将我的 dhcpd 服务器配置为管理此特定主机的主机名域名。
host curiosity {
hardware ethernet 12:34:45:12:34:56;
fixed-address 192.168.1.90;
option host-name "curiosity";
option domain-name "planet.mars";
}

我知道我可以设置主机名/域变量,一切都会好起来的,但我想制作一个非常通用的预置来部署在多个服务器上。

一些帮助或线索将不胜感激。

提前谢谢你。

编辑:已解决:

顺便说一句,第一个 preseed 并不完美。如果有人对此感兴趣,那就更好了。

它通过 ssh DEBUG TTY4 实现全自动 Debian 11 UEFI LUKS BTRFS 远程解密

#### Preseed preconfiguration file (for Debian bullseye)

# Debian 11 Fully Automated UEFI LVM LUKS BTRFS Remote Decrypt via ssh DEBUG # TTY4


### Partman early command
### Kernel parameter
#d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 hostname=unassigned-hostname domain=unassigned-domain
#d-i debconf/priority critical

#d-i debian-installer/add-kernel-opts string net.ifnames=0 biosdevname=0 console=ttyS0,19200n8
### Localization
d-i debian-installer/locale string en_US
d-i debian-installer/language string en
d-i debian-installer/country string US
#d-i debian-installer/locale string en_US.UTF-8 fr_FR.UTF-8
d-i localechooser/supported-locales multiselect en_US.UTF-8, fr_FR.UTF-8

### Keyboard selection
d-i keyboard-configuration/xkb-keymap select fr

###  Network configuration

# Netcfg choisira une interface connectée si possible. Cela empêchera
# # d'afficher une liste s'il y a plusieurs interfaces.
d-i netcfg/choose_interface select auto

#d-i netcfg/choose_interface select eth0
d-i netcfg/use_dhcp string true
d-i netcfg/link_wait_timeout string 10
d-i netcfg/dhcp_timeout string 60

#d-i netcfg/disable_autoconfig boolean true

d-i netcfg/dhcp_failed note
#d-i netcfg/dhcp_options select auto

#Configure network manually
# IPv4 Static network configuration
#d-i netcfg/get_ipaddress string 192.168.1.120
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string 192.168.1.1
#d-i netcfg/get_nameservers string 192.168.1.1
#d-i netcfg/confirm_static boolean true

# Set a hostname
#d-i netcfg/get_hostname string zhurong
#d-i netcfg/get_domain string planet.mars
# Force a hostname
#d-i netcfg/hostname string zhurong.planet.mars
# Disable that annoying WEP key dialog
d-i netcfg/wireless_wep string

#d-i netcfg/get_hostname=install
d-i netcfg/get_hostname unassigned-hostname 
d-i netcfg/get_domain unassigned-domain
d-i netcfg/get_hostname seen true
d-i netcfg/get_domain seen true

### Mirror settings
d-i mirror/country string manual
d-i mirror/http/hostname string httpredir.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string

### Account setup
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# Set root password
# or encrypted using a crypt(3)  hash.
d-i passwd/root-password-crypted password $6$47Cx5oMpkh999YNI$XG76xupgkvZ3rHJCq1NgXKzp3bBfIuj0FmMiSvmUp1jqaIkTEz5F6eA.SRhBzyPReVQEnzZWwFWSdYGCBn.tE1

### Clock and time zone setup
# Set hardware clock to UTC
d-i clock-setup/utc boolean true
# Set timezone
d-i time/zone string Europe/Paris
# Use NTP clock during installation
d-i clock-setup/ntp boolean true

### Partitioning
# LVM LUKS method

# Inhibit partman to fill the disk with random data 
d-i partman-auto-crypto/erase_disks boolean false

#d-i partman/early_command \
#       string dd if=/dev/zero of=/dev/sda bs=512 count=1

# Force UEFI booting ('BIOS compatibility' will be lost). Default: false.
d-i partman-efi/non_efi_system boolean false
# Ensure the partition table is GPT - this is required for EFI
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt

d-i partman-auto/method string crypto
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-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string debian
d-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select boot-crypto
d-i partman-crypto/passphrase       password  aabbcc
d-i partman-crypto/passphrase-again password  aabbcc
d-i partman-auto/expert_recipe string \
boot-crypto :: \
  512 50 512 fat32 \
          $primary{ } $bootable{ } \
          method{ efi } format{ } \
          mountpoint{ /boot/efi } \
  . \
  1024 1024 1024 ext4 \
          $primary{ } $bootable{ } \
          method{ format } format{ } \
          use_filesystem{ } filesystem{ ext4 } \
          mountpoint{ /boot } \
  . \
  8192 8192 8192 linux-swap \
          $lvmok{ } lv_name{ swap } \
          in_vg { debian } \
          method{ swap } format{ } \
  . \
  80896 80896 1000000 btrfs \
          $lvmok{ } lv_name{ root } \
          in_vg { debian } \
          method{ format } format{ } \
          use_filesystem{ } filesystem{ btrfs } \
          mountpoint{ / } \
  . \

#d-i partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

### Apt setup
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
### Package selection
tasksel tasksel/first multiselect standard
# Individual additional packages to install
d-i pkgsel/include string openssh-server vim tmux tcpdump dropbear-initramfs cryptsetup-initramfs python3.9
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true
popularity-contest popularity-contest/participate boolean false


### GRUB STUFF
d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev  string default

# Note: options passed to the installer will be added automatically. 
#d-i debian-installer/add-kernel-opts string nousb

# Optional password for grub, either in clear text
# #d-i grub-installer/password password r00tme
# #d-i grub-installer/password-again password r00tme
# # or encrypted using an MD5 hash, see grub-md5-crypt(8).
# #d-i grub-installer/password-crypted password [MD5 hash]
#
# # Use the following option to add additional boot parameters for the
# # installed system (if supported by the bootloader installer).
# # Note: options passed to the installer will be added automatically.
# #d-i debian-installer/add-kernel-opts string nousb
#
# ### Finishing up the installation
# # Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note


d-i preseed/late_command string \
  mkdir -p -m 700 /target/root/.ssh; \
  echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEe3gF//znGIzq30frI6O9qDn5eM6uqEZZlx7mR5SiS" > /target/root/.ssh/authorized_keys; \
  in-target chown --recursive root:root /root/.ssh; \
  in-target chmod 0644 /root/.ssh/authorized_keys; \
  in-target update-alternatives --set editor /usr/bin/vim.basic; \
  

d-i preseed/late_command string \
  mkdir -p -m 700 /target/root/.ssh; \
  echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEe3gF//znGIzq30frI6O9qDn5eM6uqEZZlx7mR5SiS" > /target/root/.ssh/authorized_keys; \
  in-target chown --recursive root:root /root/.ssh; \
  in-target chmod 0644 /root/.ssh/authorized_keys; \
  in-target update-alternatives --set editor /usr/bin/vim.basic; \
  echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEe3gF//znGIzq30frI6O9qDn5eM6uqEZZlx7mR5SiS' > /target/etc/dropbear-initramfs/authorized_keys; \
  echo 'PasswordAuthentication no' >> /target/etc/ssh/sshd_config.d/setup; \
  echo 'PermitRootLogin prohibit-password' >> /etc/ssh/sshd_config.d/setup; \
  echo 'auto eno1' >> /target/etc/network/interfaces; \
  sed -i 's/eth0/eno1/g' /target/etc/network/interfaces; \
  in-target systemctl enable --now sshd; \
  echo 'DROPBEAR_OPTIONS="-I 300 -j -k -p 22 -s -c /bin/cryptroot-unlock"' >> /target/etc/dropbear-initramfs/config; \
  echo 'IP="dhcp"' >> /target/etc/initramfs-tools/initramfs.conf; \
  in-target update-initramfs -u;

#  in-target passwd --expire root; \

解决 !

debian automated-install pxe-boot preseed
  • 1 个回答
  • 5702 Views
Martin Hope
user61917
Asked: 2021-08-06 12:36:25 +0800 CST

寻找有关将 Tenable 扫描器部署到现有 GCP Compute Engine 虚拟机和 GKE 集群的资源

  • 0

我是 GCP(谷歌云平台)新手,他的任务是弄清楚如何将 Tenable 扫描器代理部署到已经存在的 GCP 计算引擎实例和 GKE(谷歌 Kubernetes 引擎)集群。

我一直在寻找有关以自动化方式部署/安装独立计算实例和 GKE 容器的应用程序的在线指导;到现在还无济于事。

任何能帮助我完成任务的见解或指导将不胜感激!

谢谢!!!

google-cloud-platform automated-install google-compute-engine google-kubernetes-engine
  • 1 个回答
  • 142 Views
Martin Hope
gxor
Asked: 2020-09-18 01:07:22 +0800 CST

如何/为什么如此快速地安装 VPS 服务器

  • 0

托管虚拟服务器供个人使用的服务怎么能这么快完成操作系统的安装?

如果我安装任何操作系统的服务器版本,至少需要几分钟。但如果我在线订购虚拟服务器,安装只需几秒钟。我什至可以在多个安装之间进行选择,例如 Ubuntu 20、18、16;Debian ...然后我还可以选择内核数量,内存和东西...

安装是否已经完成,只有用户名更改为我输入的安装?

installation vps automated-install
  • 1 个回答
  • 28 Views
Martin Hope
MyCatsHat
Asked: 2020-06-01 08:03:15 +0800 CST

无法让 cronjob 运行安装需要 root 的服务的脚本

  • 1

我需要在 Ubuntu 18.04 上通过 cron 运行一个脚本,myscript.sh其中包含另一个脚本的安装说明等,pluckeye-linux-0.99.40.installer我遇到了一个乏味的错误:

有问题的脚本是Pluckeye一种家长控制应用程序的安装程序。这需要以 root 身份运行。里面myscript.sh我放了

cd "/path/to/pluckeye/"
./pluckeye-linux-0.99.40.installer
  • 当我跑到sudo crontab -e那里

    * 20 * * * "/path/to/myscript.sh"

    然后 Pluckeye 的安装程序返回一个神秘的错误(我将 cron 执行的输出重定向到一个文件,以便我可以看到出了什么问题):

    0b8e:24: ca151e1e WARNING 32512 0b8e:33: ca151e1e WARNING 0x30b8e019 0b8e:42: ca151e1e WARNING 0x30b8e019 0b8e:78: ca151e1e WARNING 0x30b8e019 0c2c:14: ca151e1e WARNING 0x30b8e019 0b4c:20: ca151e1e WARNING 0x30b8e019 0c70:48: ca151e1e WARNING 0x30b8e019 FAILED TO INSTALL: 6400

  • 但是当我在我的shell中正常运行安装程序时sudo(否则它会立即返回并出错

    I need to be invoked by root
    FAILED TO INSTALL: 11520

    ) 它可以正常工作。


我认为这是因为 cron 使用自己的最小环境。我已经尝试了我在互联网上找到的各种东西,比如使用而不是上面的

* 20 * * * . $HOME/.profile; "/path/to/myscript.sh"

希望让安装程序现在可以工作,但这并没有改变。我不想sudo放在脚本里面,意思是

cd "/path/to/pluckeye/"
sudo ./pluckeye-linux-0.99.40.installer

正如我所读到的那样,这会带来安全风险。

我需要做什么才能让 Pluckeye 通过 cron 自行安装?

scripting installation cron automated-install
  • 1 个回答
  • 121 Views
Martin Hope
Cus
Asked: 2020-03-21 23:47:38 +0800 CST

vmware linux 自动安装

  • 0

vmware 产品有 linux 自动安装功能吗?(如windows自动安装)或者如果不是如何实现这个功能?

virtual-machines automated-install
  • 1 个回答
  • 339 Views
Martin Hope
Jav
Asked: 2015-04-25 00:42:31 +0800 CST

使用 preseed 进行无人值守安装 -- 为 partman-auto 提供自定义设备

  • 5

我在不同类型的服务器(HP Proliant ML110、ML310、ML350)上使用 USB 驱动器和预置文件进行无人值守安装 Ubuntu-14.04-server。

  • 在 ML110 和 ML310 上,硬盘在/dev/sda,USB 驱动器取/dev/sdb.
  • 在服务器 ML350 上,USB 驱动器占用/dev/sda并且硬盘驱动器显示为/dev/sdb.

由于这应该是一个完全无人值守的安装,无论服务器类型如何,我都需要找到一种方法将正确的设备路径提供给d-i partman-auto/disk.

我的第一个想法是强制硬盘驱动器出现在 USB 驱动器之前,允许它承担/dev/sdaML350 服务器;但我没有找到办法做到这一点。

因此,我制作了一个小脚本,在执行之前检测设备名称partman,并将其记录在变量中$INSTALL_DEV:

d-i partman/early_command string                                  \
    for DEV in `ls /sys/block | grep sd`; do                      \
        if [ -n "`ls -l /sys/block/$DEV | grep /usb`" ]; then     \
            USB_DEV=/dev/${DEV};                                  \
            echo "USB_DEV is $USB_DEV" >> /var/log/syslog;        \
        else                                                      \
            INSTALL_DEV=/dev/${DEV};                              \
            echo "INSTALL_DEV = $INSTALL_DEV" >> /var/log/syslog; \
            break;                                                \
        fi;                                                       \
    done;                                                         \

从那时起,我一直在努力寻找一种方法将该变量赋予d-i partman-auto/disk. 我想到了不同的替代方案,但我找不到实现其中一个的方法:

  1. 使partma-auto/disk解释成为变量。但不幸的是,它只需要一个字符串作为值。
  2. 修改debian-installer我希望存储预置值的数据库。但是我没有找到数据库文件(也没有改变它的方法)。
  3. 使用正确的设备制作一个包含一个微小预置文件的脚本。但我只能preseed/include在硬盘驱动器显示之前包含来自 的文件/dev。
automated-install
  • 1 个回答
  • 4427 Views
Martin Hope
user57862
Asked: 2013-03-08 05:17:09 +0800 CST

使用 Powershell 和 Hyper-V 无人值守安装 Windows

  • 3

这可能吗?我有一个脚本可以达到安装 Windows Server 2008 的目的。但是它确实达到了“单击下一步……等等……”,我希望能够将它集成到我的 powershell 中如果有可能,请编写脚本。

现在我的脚本是 Super Basic,它基本上创建了一个新的 VM,一个新的 VHD,为它设置了内存/硬盘空间/等等。但它只达到安装 Windows 点(所以我选择一个 ISO 并使用虚拟 DVD 从中引导)。但我想知道是否有办法克服这一点。

供参考,这是我的简单脚本:

PS C:\Users\mrsmith\Desktop> New-VM -Name "MattTest" -MemoryStartupBytes 2GB -BootDevice CD -SwitchName Lab -path c:\VMdocs -NewVHDSizeBytes 40GB –NewVHDPath c:\base.vhdx

PS C:\Users\mrsmith\Desktop> Set-VMDvdDrive -VMName MattTest -Path C:\ISOFiles\Windows2008.

PS C:\Users\mrsmith\Desktop> Start-VM -Name MattTest

顺便说一句,我在 Windows 8 上对此进行了测试,不确定这是否重要。

谢谢!

automated-install
  • 2 个回答
  • 4115 Views
Martin Hope
LucasBr
Asked: 2012-05-18 14:51:59 +0800 CST

适合所有常见 Linux 风格的 Bash 安装脚本

  • -1

我的老板要求我制作一个 bash 脚本,该脚本可以在 Linux 机器(只是一些常见的 Linux 版本)中安装 Apache、PHP 和 MySQL (AMP) 二进制文件。

不幸的是,全部通过源代码编译和安装不是一种选择。

所以,我必须这样做。我想到了一个可能的解决方案:尝试 grepuname -a尝试找到识别发行版的东西,然后运行 ​​apt-get、yum 或其他类似命令,但这很复杂,因为我需要安装这些发行版并一个一个地尝试。

你能告诉我这是个好主意还是有更好的主意?

yum installation bash apt automated-install
  • 1 个回答
  • 247 Views
Martin Hope
user40876
Asked: 2010-04-19 01:49:11 +0800 CST

如何在 100 台远程机器上自动安装 Ubuntu?

  • 5

帮助!我迫切需要一些建议/帮助...

我希望使用可从我的 Web 服务器访问的 Kickstart 配置文件在遍布全国的 100 台远程机器上自动安装(通过 CD 或 USB)Ubuntu 10.04。

如何创建启动 CD(或 USB)?

如何专门将引导参数添加到该引导 CD(或 USB),以告诉它用于自动 Kickstart 安装的 URL?

linux ubuntu installation automated-install ubuntu-10.04
  • 4 个回答
  • 3480 Views
Martin Hope
Stu
Asked: 2010-02-26 03:19:32 +0800 CST

WMIC 在查询产品时返回错误

  • 1

我正在尝试在我的服务器上自动安装 MSI,但是在继续安装之前,我需要从服务器上卸载以前的版本。

在互联网上搜索我发现 WMIC 是所需的工具,但似乎在服务器上设置 WMI 存在问题。运行以下命令会报错:

命令提示符>wmic

然后在工具里面

/跟踪:开启

产品获得名称

这将返回一长串成功和一个失败:

FAIL: IEnumWbemClassObject->Next(WBEM_INFINITE, 1, -, -)
Line:    396 File: d:\nt\admin\wmi\wbem\tools\wmic\execengine.cpp

Node - ENTECHORELDEV
ERROR:
Code = 0x80041010
Description = The specified class is not valid.
Facility = WMI

我正在尝试在具有管理员权限的 Windows Server 2003 R2 的标准安装上运行它。

谢谢

斯图

windows windows-server-2003 wmi automated-install
  • 2 个回答
  • 8510 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve