Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm currently working on PXE booting 10 or so machines to install Debian on them over the network from a centralized DHCP + TFTP server. I'm using the TFTP server to serve the Debian netboot image to the PXE clients. I'm also serving them a preseeding file via FTP.

So far (after hours of Google, trial and error) so good. The thing is, while reading the preseeding file, the hosts seem to be trying to fetch packages over the Internet; which is quite logical since the netboot image is only 8-9 MB in size.

The problem with that is that the Internet connection in that environment is currently unreliable so I was wondering if there's a way I can direct the hosts (via the preseed file or a kernel boot parameter) to clone my existent Debian system (i.e. the one on the DHCP/TFTP server). I would appreciate any help and I'm willing to share further information about my setup if you think they'd be helpful to you either to help you set up a similar environment or to help you suggest a solution to me :)

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Instead of going to the Internet, you could go to a local debian repository.

This link explains how to setup a debian repository.

You would then have to find how to set your netboot image to get the packages from your local repository. I do not know how to do that, but a liar DNS server could be a solution.

share|improve this answer
    
Thanks for the link. Will try and get back to you. I'm thinking (hoping, really) that tricking the netboot image to grab packages from the local repo should be easy through the preseed file as you can define url addresses for your repos in there. –  Joseph R. Mar 16 '13 at 20:29
    
Even though I ended up doing things differently, your answer is the one that targets the original question. –  Joseph R. Mar 18 '13 at 22:13
add comment

If possible, you should create a local mirror inside that 'unreliable' network.

There are several tools that can help here, like debmirror, mrepo, aptmirror reprepo.

Also try Foreman for easy management of preseed files(and other things like PXE, DHCP, DNS). Foreman can take a little time to setup, but once you do, you'll have an easier time.

share|improve this answer
    
Will take a look at those and get back to you. That does sound like a good option since the LAN is pretty solid; it's on the WAN side that things get iffy. –  Joseph R. Mar 16 '13 at 20:21
add comment

Even though both of your answers pointed me in the right direction (and guided me to a lot of helpful reading), I'm answering my own question because I did it somewhat differently and in a way that involved almost no learning curve (I'm kind of on a time-frame for this task):

I have DVD 1 of the Debian DVD set which already contains a repo that is enough for a satisfactory install so I thought I'd use it instead of creating a new repo.

dd if=/dev/cdrom of=/path/to/ftp/dir/debian/debian.iso
mount -o loop /path/to/ftp/dir/debian/debian.iso /path/to/ftp/dir/debian

I then pointed the installer to that repo via

d-i mirror/protocol/string ftp
d-i mirror/ftp/hostname string <server-ip>
d-i mirror/ftp/directory string /debian

in the preseeding file. The repo on the DVD is, however, unsigned so for things to go smoothly, I also needed to add

d-i debian-installer/allow_unauthenticated boolean true

to the preseeding file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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