So I'm installing a version of Linux Mint. I would like to edit the programs and files that are included in the ISO, because there is not always internet access. For example, a very specific wallpaper, as well as Mine-craft, and Java (there's more, but this is where I'm leaving this). If this is impossible, how would I make a similar changes with a Distro builder?
DISCLAIMER: I haven't actually done this with Mint. I have an old book from 2006 ("Knoppix Hacks" by Kyle Rankin) which describes how to do it with Knoppix Linux, one of the first bootable live Linux distros. The basic steps are probably still the same, but Your Mileage May Vary. Good luck.
- Start with a UEFI-Bootable Linux Mint USB Drive. You can create this from a Linux Mint ISO image in a variety of ways, depending on your host OS. The docs are out there. Use Google.
- Boot from the Linux Mint USB drive. If you plan on installing any new packages, make sure the Internet connection is up and running.
- Remastering will require the use of your hard drive. You do not need to use a completely blank, unformatted partition, but you'll need several GB of free space, and the partition must be formatted with a Linux filesystem.
From a root shell, mount the partition with read/write permissions:
mount -0 rw /dev/sda1 /mnt/sda1
sda1with the partition and mount point you are using.
To remaster the Mint ISO, you must copy the complete filesystem to the disk so that you can edit it. The instructions for Knoppix were:
mkdir -p source/KNOPPIX
cp -Rp /KNOPPIX/* source/KNOPPIX
I'm not sure that the Mint LiveCD will have a root-level
/MINTdirectory, but a similar command should suffice. The remaining instructions assume that you have copied
The next step is to use the
chrootcommand to turn the
source/directory into the effective root filesystem. You may need to copy the
resolv.conffile from the LiveCD into the chroot environment with a command like this:
cp /etc/dhcpc/resolv.conf source/MINT/etc/dhcpc/resolv.conf
source/MINTdirectory and mount the
mount -t proc /proc proc
Now you are in a chrooted environment. You can remove packages you don't want:
apt-get --purge remove packagename
And you can add new packages to the distribution:
apt-get install packagename
This is how you'll add Java or whatever your friend wants. This is also a good time to customize the wallpaper.
Once you set up the MINT root filesystem in the source directory, create the actual filesystem that will appear in your remastered ISO image. Put this filesystem in a new directory called
master. From the mounted partition, run:
rsync -a /cdrom /master
Then you'll need to use
mkisofsto create an ISO-9660 filesystem, and to generate the ISO image from that filesystem.
It's a lot of steps, and this is only sketchy information, and I can't really spend more time trying this out so I can answer questions about the Mint-specific implementation. But hopefully it's enough to get you on the right track.