1

I'm trying to create my own iso image based on Ubuntu 12.10 and I've got several questions.

1) How can I add user using preseed? I tried to do it this way, but I still have to enter the password in the graphical installation:

d-i passwd/user-fullname string kiosk
d-i passwd/username string kiosk
d-i passwd/user-password password 123
d-i passwd/user-password-again password 123
d-i passwd/user-uid string 2020
d-i user-setup/allow-password-weak boolean true

2) Is it possible to change a set of screenshots and the text that is displayed in the graphical installer?

3) How can I handle late_command in preseed file (after installation I want to configure system, install deb-packages, etc.) I tried to do it this way:

d-i preseed/late_command string mkdir /target/install/; 
cp -R /cdrom/extra/* /target/install/; 
chroot /target chmod +x /install/postinstall.sh; 
chroot /target bash /install/postinstall.sh

Thanks

superuser0
  • 1,125
Anton
  • 11

2 Answers2

1

1) This is what I have for my vagrant preseed boxes:

# create our default admin user (the others will be managed with puppet)
d-i passwd/user-fullname string Null user    
d-i passwd/username string null              
d-i passwd/user-password password not-very-secure
d-i passwd/user-password-again password not-very-secure
d-i passwd/user-uid string 10000
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string wheel adm sudo

3) Here are a few things I do in late_command:

# really, really dist-upgrade
d-i preseed/late_command string in-target apt-get update ; \
                                in-target apt-get -y dist-upgrade ; \
                                in-target apt-get -y autoremove ; \
                                in-target apt-get autoclean ; \
                                in-target apt-get clean

or you could host a complex script on the same host as your preseed file and then:

d-i preseed/late_command string \
     in-target wget http://10.0.1.23/d-i/wheezy/scripts/late_script ;\
     in-target sh late_script ;\
     in-target rm late_script ;
0

For ubuntu 12.10 late_command string looks like this

ubiquity ubiquity/success_command \
     string mkdir /target/install/; \
     cp -R /cdrom/extra/* /target/install/; \
     chroot /target chmod +x /install/postinstall.sh; \
     chroot /target bash /install/postinstall.sh;

This script copy all files that contained in extra directory on your flash drive and then execute postinstall.sh script

To create normal user account I've used this section

d-i passwd/user-fullname string kiosk
d-i passwd/username string kiosk
d-i passwd/user-password password pass
d-i passwd/user-password-again password pass
d-i passwd/user-uid string 2020
d-i user-setup/allow-password-weak boolean true
d-i netcfg/get_hostname string kiosk
d-i passwd/auto-login boolean true
d-i user-setup/encrypt-home boolean false
Anton
  • 11