Ubuntu server 12.04 auto installation freezes at kickseeding running if ks.cfg has post scripts












1















I'm trying to make a custom Ubuntu Server iso file. Kickstart file (ks.cfg) runs smooth when there is no %post in the file and Ubuntu installs correctly with ks configuration.



Installation finishes installing base, apt, grub and It echos: Kickseed Running... and it freezes @ 0%



Installation goes well if I only add apt-get update (or something like mkdir) in %post section, but apt-get upgrade, apt-get install apache2 doesn't work



I have created dozen iso images and installed them in Virtual Box.I have been googling for 3 days and checked out ubuntu forums but haven't figured out the issue. I appreciate your help.



This is how I made the iso image. My ks.file and txt.cfg files located in isolinux directory:



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/


ks.cfg



#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


txt.cfg



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









share|improve this question





























    1















    I'm trying to make a custom Ubuntu Server iso file. Kickstart file (ks.cfg) runs smooth when there is no %post in the file and Ubuntu installs correctly with ks configuration.



    Installation finishes installing base, apt, grub and It echos: Kickseed Running... and it freezes @ 0%



    Installation goes well if I only add apt-get update (or something like mkdir) in %post section, but apt-get upgrade, apt-get install apache2 doesn't work



    I have created dozen iso images and installed them in Virtual Box.I have been googling for 3 days and checked out ubuntu forums but haven't figured out the issue. I appreciate your help.



    This is how I made the iso image. My ks.file and txt.cfg files located in isolinux directory:



    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/


    ks.cfg



    #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


    txt.cfg



    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









    share|improve this question



























      1












      1








      1








      I'm trying to make a custom Ubuntu Server iso file. Kickstart file (ks.cfg) runs smooth when there is no %post in the file and Ubuntu installs correctly with ks configuration.



      Installation finishes installing base, apt, grub and It echos: Kickseed Running... and it freezes @ 0%



      Installation goes well if I only add apt-get update (or something like mkdir) in %post section, but apt-get upgrade, apt-get install apache2 doesn't work



      I have created dozen iso images and installed them in Virtual Box.I have been googling for 3 days and checked out ubuntu forums but haven't figured out the issue. I appreciate your help.



      This is how I made the iso image. My ks.file and txt.cfg files located in isolinux directory:



      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/


      ks.cfg



      #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


      txt.cfg



      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









      share|improve this question
















      I'm trying to make a custom Ubuntu Server iso file. Kickstart file (ks.cfg) runs smooth when there is no %post in the file and Ubuntu installs correctly with ks configuration.



      Installation finishes installing base, apt, grub and It echos: Kickseed Running... and it freezes @ 0%



      Installation goes well if I only add apt-get update (or something like mkdir) in %post section, but apt-get upgrade, apt-get install apache2 doesn't work



      I have created dozen iso images and installed them in Virtual Box.I have been googling for 3 days and checked out ubuntu forums but haven't figured out the issue. I appreciate your help.



      This is how I made the iso image. My ks.file and txt.cfg files located in isolinux directory:



      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/


      ks.cfg



      #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


      txt.cfg



      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






      ubuntu-server kickstart






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 3 '15 at 23:17









      Gman Smith

      1,1332822




      1,1332822










      asked Jul 7 '12 at 0:12









      john206john206

      613




      613






















          1 Answer
          1






          active

          oldest

          votes


















          0














          TRY This. It should work



          %post --interpreter=/bin/bash
          #!/bin/bash
          apt-get update && apt-get upgrade -y





          share|improve this answer





















          • 2





            Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

            – vonbrand
            Apr 3 '13 at 20:14













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f445950%2fubuntu-server-12-04-auto-installation-freezes-at-kickseeding-running-if-ks-cfg-h%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          TRY This. It should work



          %post --interpreter=/bin/bash
          #!/bin/bash
          apt-get update && apt-get upgrade -y





          share|improve this answer





















          • 2





            Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

            – vonbrand
            Apr 3 '13 at 20:14


















          0














          TRY This. It should work



          %post --interpreter=/bin/bash
          #!/bin/bash
          apt-get update && apt-get upgrade -y





          share|improve this answer





















          • 2





            Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

            – vonbrand
            Apr 3 '13 at 20:14
















          0












          0








          0







          TRY This. It should work



          %post --interpreter=/bin/bash
          #!/bin/bash
          apt-get update && apt-get upgrade -y





          share|improve this answer















          TRY This. It should work



          %post --interpreter=/bin/bash
          #!/bin/bash
          apt-get update && apt-get upgrade -y






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 3 '13 at 20:15









          slm

          6,45563847




          6,45563847










          answered Apr 3 '13 at 19:23









          VenomVenom

          1




          1








          • 2





            Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

            – vonbrand
            Apr 3 '13 at 20:14
















          • 2





            Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

            – vonbrand
            Apr 3 '13 at 20:14










          2




          2





          Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

          – vonbrand
          Apr 3 '13 at 20:14







          Without any explanation on what is going on, I wouldn't dare try it... what is supposed to happen? What if some step fails? Why the bold, big face, etc?

          – vonbrand
          Apr 3 '13 at 20:14




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f445950%2fubuntu-server-12-04-auto-installation-freezes-at-kickseeding-running-if-ks-cfg-h%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Сан-Квентин

          8-я гвардейская общевойсковая армия

          Алькесар