LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-16-2008, 08:28 AM   #1
Curtor
Member
 
Registered: Feb 2008
Posts: 65

Rep: Reputation: 16
Running Script after Preseed Install


Hello there,

If you don't want to here the long version, but still want to answer my question, please skip down to THE BOTTOM!

You can probably tell what I want to do already from the title, so I'll sum up what I have already done real quick:

First off, for those that don't know, a preseed file is a script which auto answers all the questions in the install process for you, so you can start it, walk away, and come back with a full system without having to babysit the install and answer all the questions. Here is a handy page if you are interested yourself:
https://help.ubuntu.com/7.04/install...eed-using.html

1) Tried installing from CD and specifying to look on a thumb drive for the preseed file through a boot parameter. Could not get it to find the file, not sure where it would look or how it would mount the dive.
2) Made a boot thumb drive, and placed preseed file on there. Worked fine, but didn't find file until it looked for it while looking for iso on the thumb drive.
3) Improved number of questions I had to answer by placing file right in the initrd file. This is tricky, if you are curious about it, you can ask. This should, in theory, also work if you edited the initrd on an iso and burned it.

Now, at the end of the install, I want to run a script that does some further set up aside from the installation. Here is a section of the default provided preseed file:
Code:
# d-i preseeding is inherently not secure. Nothing in the installer checks
# for attempts at buffer overflows or other exploits of the values of a
# preconfiguration file like this one. Only use preconfiguration files from
# trusted locations! To drive that home, and because it's generally useful,
# here's a way to run any shell command you'd like inside the installer,
# automatically.

# This first command is run as early as possible, just after
# preseeding is read.
#d-i preseed/early_command string anna-install some-udeb

# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
Now, using this new information, I want to run a script. Trouble is, that when I do this, using
d-i preseed/late_command string sh testscript.sh
I get an error that the file cannot be found. My theory is that during the final stages of the install, it is running from the hard drive and not the installation device.

// THE BOTTOM \\

Therefore, during installation, I want to try to place a file from the boot device onto the hard drive. How would I go about doing this, what/where on the .iso do I edit?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Preseed not found Curtor Ubuntu 1 09-12-2008 07:27 AM
Preseed file documentation or how-to? matiasar Debian 2 09-03-2008 06:56 AM
Running a script called INSTALL joshd1982 Linux - Newbie 3 01-29-2006 05:44 PM
Permission denied on client when running install script residing on NFS server dstotz Linux - Newbie 2 12-11-2004 02:10 PM
Running shell script install, how? henrikanttonen Linux - Newbie 9 08-06-2004 08:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration