Erro durante a instalação autônoma do Apt-Mirror do Ubuntu Server 12.04 pela rede usando o PXE [closed]

9

Estou tentando inicializar o PXE e reconstruir completamente um novo servidor com uma imagem "Ubuntu 12.04 Server" na rede usando o apt-mirror, mas recebo vários erros no meio da instalação. Eu sou capaz de reconstruir com sucesso o mesmo servidor com um CDROM físico (criado usando os mesmos arquivos da imagem "ubuntu-12.04.2-server-amd64.iso") sem problema, ainda tenho problemas de construção através da rede, uma vez que fornece as seguintes mensagens de erro logo depois de particionar os discos e iniciar a última grande transferência de arquivos. Como resultado, não consegui criar um servidor PXE de sucesso usando a rede interna da minha empresa (usando o repositório externo).

Erro 1:

  

!! Instale o sistema básico

     

Aviso do Debootstrap

     

Aviso: não foi possível baixar a ejeção de pacote (ver 2.1.5 + deb1 + cvs20081104-9 arc amd64)

Erro 2:

  

!! Instale o sistema básico

     

Aviso do Debootstrap

     

Aviso: não foi possível baixar o pacote liblzma5 (ver 5.1.1alpha + 20110809-3 arc amd64)

Erro 3:

  

!! Instale o sistema básico

     

Aviso do Debootstrap

     

Aviso: não foi possível baixar o pacote libstdc ++ 6 (ver 4.6.3-1ubuntu5 arc amd64)

Mais erros semelhantes aparecem, mas foram omitidos por brevidade ...

Aqui está a última parte do / var / log / syslog :

...
Jul 12 17:30:00 partman-lvm:   Logical volume "swap_1" successfully removed
Jul 12 17:30:00 udevd[24071]: inotify_add_watch(6, /dev/dm-1, 10) failed: No such file or directory
Jul 12 17:30:00 partman-lvm:   0 logical volume(s) in volume group "coolservername" now active
Jul 12 17:30:00 partman-lvm:   Volume group "coolservername" successfully removed
Jul 12 17:30:00 partman-lvm:   Labels on physical volume "/dev/sda3" successfully wiped
Jul 12 17:30:02 partman-lvm:   Physical volume "/dev/sda3" successfully created
Jul 12 17:30:02 partman-lvm:   Volume group "coolservername" successfully created
Jul 12 17:30:02 partman-lvm:   Logical volume "root" created
Jul 12 17:30:02 partman-lvm:   Logical volume "swap_1" created
Jul 12 17:30:06 kernel: [  184.508873] Adding 16695292k swap on /dev/mapper/coolservername-swap_1.  Priority:-1 extents:1 across:16695292k
Jul 12 17:30:07 partman: mke2fs 1.42 (29-Nov-2011)
Jul 12 17:30:21 kernel: [  199.286079] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: errors=remount-ro
Jul 12 17:30:22 apt-install: Queueing package e2fsprogs for later installation
Jul 12 17:30:22 main-menu[514]: (process:25003): /var/lib/partman/devices/=dev=sda
Jul 12 17:30:23 main-menu[514]: DEBUG: resolver (libnewt0.52): package doesn't exist (ignored)
Jul 12 17:30:23 main-menu[514]: DEBUG: resolver (ext2-modules): package doesn't exist (ignored)
Jul 12 17:30:23 main-menu[514]: INFO: Menu item 'bootstrap-base' selected
Jul 12 17:30:23 debconf-copydb: Cannot open question file /target/var/cache/debconf/config.dat: No such file or directory
Jul 12 17:30:23 debconf-copydb: Cannot open template file /target/var/cache/debconf/templates.dat: No such file or directory
Jul 12 17:30:23 base-installer: chroot: can't execute 'debconf-set-selections': No such file or directory
Jul 12 17:30:23 base-installer: warning: /usr/lib/base-installer.d/20console-setup returned error code 127
Jul 12 17:30:55 base-installer: error: exiting on error base-installer/debootstrap-failed
Jul 12 17:30:55 main-menu[514]: WARNING **: Configuring 'bootstrap-base' failed with error code 1
Jul 12 17:30:55 main-menu[514]: WARNING **: Menu item 'bootstrap-base' failed.
Jul 12 17:30:56 main-menu[514]: INFO: Modifying debconf priority limit from 'high' to 'medium'
Jul 12 17:30:56 debconf: Setting debconf/priority to medium
Jul 12 17:30:57 main-menu[514]: DEBUG: resolver (libnewt0.52): package doesn't exist (ignored)
Jul 12 17:30:57 main-menu[514]: DEBUG: resolver (ext2-modules): package doesn't exist (ignored)
Jul 12 17:30:59 main-menu[514]: INFO: Menu item 'save-logs' selected

Implementei pela primeira vez uma solução DHCP / TFTP usando o pxelinux ( link ), mas depois mudei para o gpxelinux com o syslinux para tentar para que isso funcione (além disso, parece que o uso de HTTP é mais rápido que o TFTP etc.). Ainda sem sucesso, tentei usar um arquivo Kickstart simples:

install
url --url http://10.16.25.80:4040/ubuntu/repository/

... juntamente com um repositório apt-mirror completo (como sugerido aqui - & gt; Não é possível instalar o 12.10 com o PXE ) sem melhorias. Eu também tentei usar a imagem "ubuntu-12.04.2-alternate-amd64.iso" também.

Hardware do servidor (aquele que estou tentando refazer a imagem)

  • Dell PowerEdge R320
  • 4 discos rígidos físicos configurados como hardware RAID 0 com uma unidade virtual de 4 TB.
  • 16 GB de RAM

Sobre o servidor host (servidor usado para construir)

O servidor de hospedagem é de hardware similar e foi previamente configurado com o Ubuntu Server 12.04 (preciso) com o servidor Chef 10.18.2 usando o web-ui que usa o merb para serviços web (HTTP). Este servidor atua como o host DHCP / HTTP / TFTP / APT-MIRROR.

DHCP instalado

sudo apt-get install isc-dhcp-server

/ etc / default / isc-dhcp-server

INTERFACES="eth0"

/etc/dhcp/dhcpd.conf

ddns-update-style none;
option domain-name "corp.com";
option domain-name-servers dns1.corp.com, dns2.corp.com;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 10.16.25.0 netmask 255.255.255.0 {
  range 10.16.25.195 10.16.25.199;
  option domain-name "corp.com";
  option domain-name-servers 10.10.10.200, 10.10.10.201;
  option routers 10.16.25.1;
  option broadcast-address 10.16.25.254;
  option ntp-servers 10.10.10.203;
  default-lease-time 600;
  max-lease-time 7200;
  filename "gpxelinux.0";
}

TFTP instalado

sudo apt-get install tftpd-hpa

/ etc / default / tftpd-hpa

RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

Instalado o SysLinux

sudo apt-get install syslinux

/var/lib/tftpboot/pxelinux.cfg/default

...
LABEL Server (Preseed/HTTP)
    KERNEL http://10.16.25.80:4040/pxe/ubuntu/12.04/alternate-amd64/install/netboot/ubuntu-installer/amd64/linux
    APPEND auto=true interface=eth0 hostname=coolservername url=http://10.16.25.80:4040/pxe/preseed/coolservername.seed initrd=http://10.16.25.80:4040/pxe/ubuntu/12.04/alternate-amd64/install/netboot/ubuntu-installer/amd64/initrd.gz --    

Configurado um arquivo preseed

O arquivo de semente está localizado em http://10.16.25.80:4040/pxe/preseed/coolservername.seed

# Language:
d-i debian-installer/language string en
# Country:
d-i debian-installer/country string US
# Detect keyboard layout?
d-i console-setup/ask_detect boolean false
# Country of origin for the keyboard:
d-i keyboard-configuration/layout select English (US)
# Keyboard layout:
d-i keyboard-configuration/variant select English (US)
# Domain name:
d-i netcfg/get_domain string corp.com
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# Configure the application repository mirror
d-i mirror/protocol string http
d-i mirror/country string manual
d-i mirror/http/hostname string 10.16.25.80:4040
d-i mirror/http/directory string /pxe/ubuntu/repository/
#d-i mirror/http/directory string /pxe/ubuntu/12.04/server-amd64/
#d-i mirror/http/directory string /pxe/ubuntu/12.04/alternate-amd64/
d-i mirror/http/proxy string
d-i mirror/suite string precise
# Create a normal user account
d-i passwd/user-fullname string A really cool default user
d-i passwd/username string coolusername
# Normal user's encrypted password (using an MD5 hash)
d-i passwd/user-password-crypted password 12345678901234567890123456789012
# Set to true to encrypt the first user's home directory
d-i user-setup/encrypt-home boolean false
# Only ask the UTC question if there are other operating systems installed.
d-i clock-setup/utc-auto boolean true
# Controls whether or not the hardware clock is set to UTC
d-i clock-setup/utc boolean true
# Time zone setup
d-i time/zone string US/Pacific
# Configure disk storage and partitions
d-i partman-auto/method string lvm
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
# For LVM partitioning, you can select how much of the volume group to use
# for logical volumes.
d-i partman-auto-lvm/guided_size string max
# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home:   separate /home partition
# - multi:  separate /home, /usr, /var, and /tmp partitions
d-i partman-auto/choose_recipe select atomic
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
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
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
d-i debian-installer/allow_unauthenticated boolean true
# Package selection - run this grep (from existing) to see list of available options
# "grep Task /usr/share/tasksel/ubuntu-tasks.desc"
tasksel tasksel/first multiselect server, standard
# Individual additional packages to install
d-i pkgsel/include string openssh-server
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Policy for applying updates. May be "none" (no automatic updates),
# "unattended-upgrades" (install security updates automatically), or
# "landscape" (manage system with Landscape).
d-i pkgsel/update-policy select none
# By default, the system's locate database will be updated after the
# installer has finished installing most packages. This may take a while, so
# if you don't want it, you can set this to "false" to turn it off.
d-i pkgsel/updatedb boolean true
# Only install basic language packs. Let tasksel ask about tasks.
d-i pkgsel/language-pack-patterns string
# No language support packages.
d-i pkgsel/install-language-support boolean false
# Verbose output and no boot splash screen.
d-i debian-installer/quiet boolean false
d-i debian-installer/splash boolean false
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Wait for two seconds in grub
d-i grub-installer/timeout string 2
# This will prevent the installer from ejecting the CD during the reboot.
d-i cdrom-detect/eject boolean false
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
# Overwrite the server's network configuration file (/etc/network/interfaces)
d-i preseed/run string coolservername.sh

Instalado no apt-mirror

sudo apt-get install apt-mirror

/etc/apt/mirror.list

set nthreads     20
set _tilde 0
deb http://us.archive.ubuntu.com/ubuntu precise main main/debian-installer restricted restricted/debian-installer universe universe/debian-installer multiverse multiverse/debian-installer
deb-amd64 http://us.archive.ubuntu.com/ubuntu precise main main/debian-installer restricted restricted/debian-installer universe universe/debian-installer multiverse multiverse/debian-installer
deb-i386 http://us.archive.ubuntu.com/ubuntu precise main main/debian-installer restricted restricted/debian-installer universe universe/debian-installer multiverse multiverse/debian-installer
deb http://us.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
clean http://archive.ubuntu.com/ubuntu

http://10.16.25.80:4040/pxe/ubuntu/repository é um link simbólico para os arquivos espelhados em "/var/spool/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/".

Qualquer assistência seria muito apreciada em superar esses erros e ajudar com sucesso a recriação de imagens / recriação deste servidor, já que passei muito tempo investigando e pesquisando sem sorte ...

Muito obrigado antecipadamente !!

    
por JAG 09.07.2013 / 21:57

0 respostas