Versuche dies. Es sollte funktionieren
%post --interpreter=/bin/bash #!/bin/bash apt-get update && apt-get upgrade -y
Ich versuche, eine benutzerdefinierte Ubuntu Server-ISO-Datei zu erstellen. Die Kickstart-Datei (ks.cfg) wird reibungslos ausgeführt, wenn%% in der Datei nicht vorhanden ist und Ubuntu mit der ks-Konfiguration ordnungsgemäß installiert wird.
Installation beendet die Installation von base, apt, grub und It echos: Kickseed Running ... und es friert @ 0%
Die Installation verläuft gut, wenn ich nur apt-get update (oder etwas in der Art von mkdir) im Abschnitt% post hinzufüge, aber apt-get upgrade, apt-get install apache2 funktioniert nicht
Ich habe Dutzend ISO-Images erstellt und in Virtual Box installiert. Ich habe 3 Tage lang gegoogelt und Ubuntu-Foren überprüft, aber das Problem nicht herausgefunden. Ich schätze Ihre Hilfe.
So habe ich das ISO-Image gemacht. Meine ks.file- und txt.cfg-Dateien im Verzeichnis isolinux:
root@ubuntu:/home/work mount -o loop ubuntu-12.04-amd64.iso original-iso/ rsync -a original-iso/ custom-iso/ cp ks.cfg custom-iso/isolinux/ cp txt.cfg custom-iso/isolinux/ chmod -R 777 custom-iso/ #Creating Iso image mkisofs -D -r -V “$IMAGE_NAME” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ~/ubuntu-12.04-alternate-custom-amd64.iso custom-iso/
#Generated by Kickstart Configurator #platform=AMD64 or Intel EM64T #System language lang en_US #Language modules to install langsupport en_US #System keyboard keyboard us #System mouse mouse #System timezone timezone America/Los_Angeles #Root password rootpw --iscrypted somethingsomething #Initial user user ubuntu --fullname "ubuntu" --iscrypted --password somethingsomething. #Reboot after installation reboot #Use text mode install text #Install OS instead of upgrade install #Use CDROM installation media cdrom #System bootloader configuration bootloader --location=mbr #Clear the Master Boot Record zerombr yes #Partition clearing information clearpart --all --initlabel #Disk partitioning information part /boot --size 128 --fstype=ext3 --asprimary part / --size 512 --fstype=ext3 --asprimary part swap --size 512 part /tmp --size 512 --fstype=ext3 part /var --size 512 --fstype=ext3 part /usr --size 4096 --fstype=ext3 part /home --size 2048 --fstype=ext3 #System authorization infomation auth --useshadow --enablemd5 #Network information network --bootproto=dhcp --device=eth0 #Firewall configuration firewall --disabled --http --ftp --ssh #X Window System configuration information xconfig --depth=32 --resolution=1024x768 --defaultdesktop=GNOME %post apt-get update apt-get upgrade apt-get install apache2 mkdir /home/user
default autoinstall label autoinstall menu label ^Install Custom Ubuntu Server kernel /install/vmlinuz append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz quiet ks=cdrom:/isolinux/ks.cfg -- label install menu label ^Install Ubuntu Server kernel /install/vmlinuz append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet -- label cloud menu label ^Multiple server install with MAAS kernel /install/vmlinuz append modules=maas-enlist-udeb vga=788 initrd=/install/initrd.gz quiet -- label check menu label ^Check disc for defects kernel /install/vmlinuz append MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet -- label memtest menu label Test ^memory kernel /install/mt86plus label hd menu label ^Boot from first hard disk localboot 0x80
Versuche dies. Es sollte funktionieren
%post --interpreter=/bin/bash #!/bin/bash apt-get update && apt-get upgrade -y