I'm trying to install Debian 9.5 preseeded on an offline VM. The install breaks because it can't install the package grub-pc.

Research up to now shows that (presumably at this point during the installation) the entry for the install-DVD in sources.list is commented out. Even after searching the net for several days now, I can't figure out how to pressed d-i in such a way that the DVD stays available for installing further packages.

I already found out about (and added):

d-i apt-setup/use_mirror boolean false
d-i apt-setup/no_mirror boolean true
d-i apt-setup/services-select multiselect

This way no http-mirror is added to the sources.list.

I managed to reach so goal in a non-preseeded install (as far as I remember), but looking at the questions.dat of that install doesn't give me a clue either. :(

What directives do I need to use here?

  • Do you have an Official Debian CD or DVD on hand to use as a repository? You need to have one in a disk drive your install can access to be able to set up properly. – kemotep Nov 12 '18 at 21:51
  • Of course: I start from the official DVD release (cdimage.debian.org/debian-cd/current/amd64/bt-dvd/…), add the preseed file to initrd and install from that iso, which is then accessible to the VM as DVD. – kaba Nov 13 '18 at 10:37
  • Is it impossible to have the vm networked during install then remove network access after the install is complete? the package may not be available on a standard installer so you will need to add the package and its dependencies manually. debconf-get-selections --installer > file and debconf-get-selections >> file will inform you of all questions asked during the install. You can preseed the answers to any of these questions and the results of these could inform you of why that package is failing to install. – kemotep Nov 13 '18 at 14:26
  • No, the VM is in a closed network (for security reasons). The package that fails to install is grub-pc. It fails because (by then) the DVD is removed (commented) from sources.list, though still available in the drive. The package exists on the DVD. I'l try that debconf-get-selections though... – kaba Nov 13 '18 at 15:43
  • Understandable. You can add a CD-ROM repo uisng apt-cdrom add if the CD-ROM/DVD is still mounted. Just drop into another TTY as you work your way through the install and run the above command. Another option is to build your debian install using debootstrap instead of debian-installer. – kemotep Nov 13 '18 at 15:54

Seems that I have to self-answer. :)

The solution is to not have all the lines about mirrors and cdroms in the preseed file:

#d-i anna/retriever string cdrom-retriever
#d-i mirror/country string manual
#d-i mirror/http/hostname string http.us.debian.org
#d-i mirror/http/directory string /debian
#d-i mirror/http/proxy string
#d-i apt-setup/use_mirror boolean false
#d-i apt-setup/no_mirror boolean true
#d-i apt-setup/cdrom/set-first boolean false
#d-i grub-installer/with_other_os boolean true
#d-i grub-installer/bootdev string /dev/sda

Since I de-activated the above lines (intended to give manual answers to further research), the automated installation works like it should. o_O Which means: (a) installations continues from DVD and (b) the install-DVD, and nothing else is referenced in the final sources.listn.

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.