I am following the steps from this website to customize my Ubuntu image. After unpacking the clean .iso I add some files to the "remaster" and also I would like to install some apps (wireshark for example), so when the systems boots with the custom image, there is no need to install anything. I run the following script:

sudo uck-remaster-clean
sudo uck-remaster-unpack-iso my.iso
sudo uck-remaster-unpack-rootfs

// .. add desired files to the remaster
sudo apt-get install wireshark

sudo uck-remaster-pack-rootfs -c
sudo uck-remaster-pack-iso -g myNew.iso

However, wireshark is installed on the machine on which I am running the script, not in the remaster-root system. What do I need to modify in the script above to have the apps installed on the unpacked ISO? Is it even possible?


You need to chroot into your remaster-root-system. you forgot to run one command.

sudo uck-remaster-chroot-rootfs
  • I assume this line comes before sudo apt-get? Do I have to chroot again after installing updates and/or apps? – Nazar Jul 20 '17 at 13:40
  • Yeah this has to be run before apt-get. It is actually there in the website you linked. I don't really have experience with this particular method but you should not need to chroot again. you may have to run exit but again I am not sure if that is needed in your case – Rumesh Jul 20 '17 at 13:43
  • I almost got it to work as needed. Once I call chroot it changes the prompt to root@me-VirtualBox:/# and stays there. So I have to manually call apt-get stuff and then exit when finished. Then, when I call exit, the script continues to execute after the chroot line. Is there a way to make apt-get calls automatically from a script? – Nazar Jul 20 '17 at 15:19
  • Take a look at this answer askubuntu.com/a/551361/399217. It should do what you want. maybe create another script with all the apt-get commands and place it whithin your chroot environment. then it may be possible to run sudo uck-remaster-chroot-rootfs ./chroot.sh. If that does not work, you may need to specify the directory containing your the environment before the script itself. maybe something like sudo uck-remster-chroot-rootfs <directory> ./chroot.sh – Rumesh Jul 21 '17 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.