On Sun, Aug 27, 2006 at 03:20:54PM -0400, Joey Hess wrote: > Jens Seidel wrote: > > I can now reproduce it and found also the problem: > > APT is not able to mount a Debian CD, since APT searchs by default in > > /cdrom (see #282344) but /target/etc/fstab refers to /media/cdrom0. > > Setting Acquire::cdrom::mount "/media/cdrom0" in /target/etc/apt/apt.conf > > fixes this. > > d-i creates a /cdrom -> /media/cdrom0 link, specifially to keep apt happy.
It's not so easy. First of all, apt-cdrom(8) mentions that "This mount point must be listed in /etc/fstab". This may be wrong as mount seems first to follow symlinks before looking in fstab, i.e. mount /cdrom mounts /media/cdrom0 not /cdrom (even if it's contained in fstab). According to the man page, a later "apt-cdrom add" called by the user requires option "-d". > So the question seems to be, why isn't that working for apt in /target? > > > To reproduce it use the Beta 3 netinst ISO ("install" target) and > > install a system without network mirror. Once the installation finished > > the CD is unmounted. Now select again "Select and install software" and > > try to install another task. The system hangs now because APT cannot > > mount the CD. The same happens if the user unmout the CD manually ... > > Ok, so you're going all the way thru to the end of the installation process, > which unmounts and ejects the CD, canceling when it says it's going to reboot, (It doesn't prompt when rebooting in standard mode, I stop the process during the bootloader setup.) > and then going back and running pkgsel again. Yes. > The problem might be that base-installer adds this to apt.conf.d: > > APT::CDROM::NoMount "true"; > Acquire::cdrom { > mount "/cdrom"; > "/cdrom/" { > Mount "true"; > UMount "true"; > }; > } Indeed. I verified this. > And it's not removed until the very end of the installation. So if you > cancel and go back, you're left with an unmounted CD, and with apt configured > to never try to mount the CD. I tried to start aptitude from the console and noticed that APT::CDROM::NoMount "true"; has no effect. Even after removing this line (or using "false") apt fails to mount the CD (even after the following fix!). The problem is the line '"/cdrom/" {'. Remove the trailing slash and it works like a charm: "/cdrom" { Whether you add a slash to 'mount "/cdrom";' (to make both entries consistent) is unimportant and has no effect. The German book Debian-Anwenderhandbuch mentions that this slash is important, see http://debiananwenderhandbuch.de/apt.conf.html ("You need the trailing slash!") so it seems it was indeed necessary in the past? Why do you use Mount "true"; UMount "true"; "true" is the no-op command (not a boolean value!?) and useless!? > If so, then moving base-installer's finish-install script to run before > cdrom-detect's would solve the problem. It could be tested by > removing /target/etc/apt/apt.conf.d/00NoMountCDROM by hand and seeing it > pkgsel worked then. I'm not currently able to test this. Jens -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]