Results 1 to 2 of 2

Thread: Using preseed/late_command....

  1. #1
    Join Date
    Nov 2005
    Oslo, Norway
    Ubuntu 14.04 Trusty Tahr

    Unhappy Using preseed/late_command....

    I'm setting up an automatic install of Ubuntu 12.04, using preseed. Everything installs fine, without any questions, but I can't quite figure out how to use the late_command at the end of the preseed file.

    What I want to do is wget a shell script and run that.

    I tried:
    d-i preseed/late_command string chroot /target;cd /;/usr/bin/wget http://ubuntu/12.04/postinst/files.tar.gz;/bin/tar -zxvf files.tar.gz;/bin/sh files/;touch /root/test;
    But it just hung at the very end of the installation. The installation was functional, but the script had not run at all.

    Is the newly installed file system mounted under /target? And what's the environment like at this point in the install. What would be the correct way to do this?

  2. #2
    Join Date
    Dec 2011

    Re: Using preseed/late_command....

    Hi - a working script would look like this:
    d-i preseed/late_command string \
    in-target wget -O /tmp/files.tar.gz http://ubuntu/12.04/postinst/files.tar.gz ; \
    in-target tar zxf /tmp/files.tar.gz -C /tmp/ ; \
    in-target /bin/sh /tmp/files/ ; \
    in-target touch /root/test

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts