2

Okay so I'm attempting to build my own custom live CD and eventually a distro based on Debian, using the live-build tools and squashfs-tools/chroot to modify the image. I'm also playing around with LinuxFromScratch, but my questions right now are mainly about the debian-installer and possibly preseeding, What I'd like to know is how i can force debian-installer to use a custom package repo, for example, how would Kali-Linux seed "Kali-rolling" or Ubuntu with their own repos. I've mirrored the Debian 8 repo (udebs and source included), and created my own repo using aptly I then imported all packages from the mirror into my own repo, along with some others I'd tested beforehand. Now the problem is possibly the naming for the distribution and the components, as I chose to set up the repo with a distribution/suite name other than jessie, and components have been merged into one component which I called "universe" like what is is used by Ubuntu.

I know where preseed files should be put, and I've successfully modified the installer with a preseed.cfg file to skip creation of a new user other than root (I know most would advise against this but it's personal preference to create users after install), but when I try add a custom mirror in the preseed file, the installer seems to just ignore it and asks me if I'd like to use an arbitrary Debian mirror.

So how can I make changes to the installer or preseed file so that it can use this custom distro/suite and component during install?

This is what I tried:

d-i passwd/make-user boolean false
d-i netcfg/hostname string redebian
d-i netcfg/get_nameservers string 8.8.8.8
d-i mirror/protocol string http
d-i mirror/http/hostname string xx.xx.xx.xx
d-i mirror/http/directory string /
d-i mirror/http/proxy string
d-i mirror/suite string redebian
d-i mirror/udeb/suite string redebian
d-i apt-setup/universe boolean true

There's no problems adding the repo directly to /etc/apt/sources.list I just don't know how to add it to the installer etc; even when I try select it manually, it tells me it's a bad mirror because it's only looking for the URL and directory; it doesn't ask about which suite and components to use.

1

After some trial and error, eventually I looked into /var/log/syslog and saw some odd things, such as the installer making requests to the specified mirror with the "wrong" suite/codename, I wondered where it was pulling that value from, so I extracted the ISO with bsdtar as I'd done before in order to place the preseed.cfg file. I noticed this time there was a hidden directory named .disk inside there were some configuration files that the installer apparently must use to get some values during install. I changed these values to the desired values, then changed the name of the of the dists/jessie directory to dists/redebian, recreated the symlinks for stable, unstable, and testing so they point to redebian, altered the Release files on the ISO so they contained information the same as my repository, then finally recalculated all the md5sums.

Now debian-installer is recognizing the published repo as being a valid mirror.

I did still have a problem installing grub afterwards, but I'm sure I'll work that one out eventually.

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.