preseed + firstrun script

Valter Nogueira valter at
Wed Aug 24 11:20:19 UTC 2011

I am following in
order to get a standard way to install my servers.

The text suggests using a *"Create a 'firstrun' script that executes the
first time the system boots, and disables itself on completion."*

Does someone know how to accomplish such task?

I have tried to create a script called /etc/rc2.d/S99firstrun, wich would
self-delete on finish.

In order to do so, I used the following line in preseed:

*d-i preseed/late_command string /bin/cp /cdrom/myfiles/S99firstrun
/target/etc/init.d/firstrun; /bin/chmod 755
/target/etc/init.d/firstrun;/bin/ln -s ../init.d/firstrun

In some installations it runs at first boot, in others it runs on second
boot and there are others installs that it doesn't run at all.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list