netson / ubuntu-unattended

Script to create unattended Ubuntu ISO
MIT License
370 stars 185 forks source link

How to copy local files into image? #19

Closed tommueller closed 8 years ago

tommueller commented 8 years ago

Hey,

thanks for the great project! I would love to be able to add files from my local maschine into the installed linux. It is not a problem to copy the files to the image of course, but how do I get a file from the image copied into the users home folder during the install process?

Thanks a lot! Tom

netson commented 8 years ago

Hi, have you tried using the late command? you'll find an example of this in the script itself. It's what's used to download the start.sh file from github into the users' home dir at the end of the install.

tommueller commented 8 years ago

Hey. Yes I tried that, but I couldn't figure out how to copy files from cd into the chroot environment. I suppose I need to use mount -bind, but I don't know how ... Cheers, Tom

netson commented 8 years ago

Check out this link: https://www.safaribooksonline.com/library/view/ubuntu-hacks/0596527209/ch01s04.html

They describe in much detail how to do this manually for a Ubuntu Live CD and the process shouldn't be very different here.

tommueller commented 8 years ago

Thanks, I decided to go another way ... I now include the files into to image and then just mount the image when the system is started. Easier ... I pushed it to my fork here: https://github.com/tommueller/ubuntu-unattended Thanks!