[12:39] <jgonzalez> hi there, is this the right channel to do questions about doing automated installations using preseeding?
[12:40] <cjwatson> jgonzalez: yep
[12:46] <jgonzalez> sorry to reapear the question, I got disconnected...
[12:46] <jgonzalez> hi there, is this the right channel to do questions about doing automated installations using preseeding?
[12:48] <soren> It is.
[12:50] <jgonzalez> I'm trying to automate installation of servers for my customers, so I provide default values for almost everything but things like hostname and domain. Domain seems to be a medium priority question, so I don't get the chance to change it unless I specify debconf=medium, but in that case I get the installer menu and the installation is no longer automatic... is there any way to change the priority of a question using preseeding?
[12:53] <cjwatson> firstly, no
[12:53] <cjwatson> secondly, priority isn't relevant to whether you can preseed something
[12:54] <cjwatson> thirdly, you're probably running into http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343269, unfortunately
[12:54] <ubotu> Debian bug 343269 in netcfg "hostname/domain name preseeding is quite broken" [Normal,Open]
[12:54] <cjwatson> unless you're trying to provide a default but intentionally have the question asked to whoever's monitoring the installation?
[12:55] <cjwatson> unfortunately that isn't possible at the moment; 8.04 will be better in this regard because it asks the domain question at priority high if you're doing static network configuration
[12:56] <jgonzalez> that's what I'm trying to do... I provide a meaningless default, and I want hostname and domain to be filled up in every installation
[12:56] <jgonzalez> is there any way to do this?
[12:58] <jgonzalez> so there's no way to fix this using 7.10?
[12:58] <cjwatson> jgonzalez: one moment
[12:58] <cjwatson> jgonzalez: are you installing from the network or from a CD?
[12:58] <jgonzalez> from a CD
[12:58] <jgonzalez> I use chained preseeding
[12:59] <jgonzalez> a pressed file in the CD and another one from the Internet
[12:59] <cjwatson> wow, complex
[12:59] <cjwatson> ok
[12:59] <jgonzalez> I just wanted to avoid having to burn new CDs if we change anything in the default values
[12:59] <cjwatson> jgonzalez: are you using DHCP or static configuration?
[12:59] <jgonzalez> static
[13:00] <jgonzalez> in the CD preseeding file I just preseed the network providing default values and asking the questions any way (seen false)
[13:01] <jgonzalez> I preseed the rest in the file located in the Internet
[13:03] <cjwatson> jgonzalez: ok, a very nasty approach is to have preseed/early_command re-ask the question by hand
[13:03] <cjwatson> something like this:
[13:03] <cjwatson> . /usr/share/debconf/confmodule
[13:04] <cjwatson> db_input critical netcfg/get_hostname
[13:04] <cjwatson> HOSTNAME="$RET"
[13:04] <cjwatson> db_input critical netcfg/get_domain
[13:04] <cjwatson> DOMAIN="$RET"
[13:05] <jgonzalez> umm... should I save the last 5 lines as a shell script and invoke it using early_command?
[13:05] <cjwatson> and then substitute $HOSTNAME and $DOMAIN back into at least /etc/network/interfaces, /etc/hostname, /etc/resolv.conf, /etc/hosts
[13:05] <cjwatson> you'll probably want to make your dummy preseeded ones be easily substitutable using 'sed -i'
[13:05] <cjwatson> shell script> yes
[13:06] <jgonzalez> and then another script making the substitutions and invoked using late_command?
[13:06] <cjwatson> something like 'sed -i "s/DUMMYHOSTNAME/$HOSTNAME/g; s/DUMMYDOMAIN/$DOMAIN/g" /etc/network/interfaces /etc/hostname /etc/resolv.conf /etc/hosts'
[13:06] <cjwatson> no, it has to be in the same script
[13:06] <cjwatson> you might need to wrap that in a loop to detect whether the files exist
[13:07] <jgonzalez> buf... I guess you can't turn 8.04 into 8.03, can you? :P
[13:07] <cjwatson> no :-)
[13:07] <cjwatson> if you're wondering why this is in early_command that's because this is editing the files used by the installer itself which are then copied over to the target system later
[13:07] <jgonzalez> yes, I guessed so
[13:08] <jgonzalez> ok, I'll try it, thank you very much
[13:08] <cjwatson> let me produce a better version
[13:08] <cjwatson> the suggestion above is a bit buggy
[13:09] <cjwatson> http://paste.ubuntu.com/4709/ should be a bit better
[13:09] <cjwatson> totally untested though
[13:10] <jgonzalez> ok, I'll give it a try, thank you very much
[13:31] <xivulon> Would it be possible to append (cat) the md5sum of an ISO to the ISO file itself? So that the last n bytes are the checksum of the preceeding chunk?
[13:38] <cjwatson> it *might* be technically possible but who knows what a non-standard approach like that would break
[13:39] <cjwatson> a phenomenal amount of software deals with ISO-9660 file systems and trying to invent extensions in ways not provided by the standard isn't a good plan IMO
[13:48] <xivulon> agreed
[13:50] <xivulon> would you say that if I check squashfs.filesystem I should catch most of the issues with corrupted CDs?
[13:54] <cjwatson> yes
[13:54] <xivulon> good
[14:40] <xivulon> Other cryptoquestion, it would be nice to verify remote metalinks. I was thinking of using a cross-compiled version of gpgv with a keyring embedded within wubi.
[14:41] <xivulon> Then always download XYZ.metalink + XYZ.metalink.sig. Is such approach reasonable?
[14:59] <jgonzalez> where should I put scripts invoked using preseed/early_command or preseed/late_command?
[14:59] <cjwatson> jgonzalez: I'd use /tmp
[15:00] <jgonzalez> cjwatson... can I include the script in the remastered CD and invoke it using a full path? kind of /cdrom/whatever/script.sh
[15:00] <cjwatson> sure
[15:01] <jgonzalez> ummm
[15:02] <jgonzalez> what about hosting the script in the same place where the second preseed file is? I mean kind of http://myserver.com/path/to/script.sh? would that work?
[15:03] <jgonzalez> no answer :) gonna try it
[15:04] <cjwatson> no, that won't work, though you can have a trivial wrapper in early_command that wgets something and then runs it
[15:05] <cjwatson> p.s. a one-minute delay isn't "no answer" ...
[15:05] <jgonzalez> cjwatson, sorry, wans't my intention, I appreciate a lot your help :)
[15:06] <cjwatson> :)
[16:12] <saispo> hi
[16:13] <saispo> cjwatson: it's possible to deactivate automatic generation of xorg.conf in the debian installer ? my metapackage install it and write an xorg.conf automaticaly...
[16:40] <cjwatson> saispo: that's not an installer function as such; the xserver-xorg package does it in its postinst
[16:40] <cjwatson> saispo: I don't think there is, and I think you should probably just write over it after xserver-xorg has been installed; but for an authoritative answer you should consult the X team
[16:42] <saispo> ok, thanks, i try with some directive in preseed, will test :)
[16:48] <jgonzalez> cjwatson: I've tried using the script you gave me, but it doesn't seem to do anything
[16:49] <cjwatson> jgonzalez: ok, boot with DEBCONF_DEBUG=developer and also put 'set -x' near the top of the script and it should give you a trace
[16:49] <cjwatson> (in /var/log/syslog)
[16:49] <jgonzalez> I guess this is correct:  d-i preseed/early_command string wget -O /tmp/configure-hostname-domain.sh \
[16:49] <jgonzalez>  11        http://puppet.openinput.com/preseed/ubuntu/gutsy/configure-hostname-domain.sh; \
[16:49] <jgonzalez>  12        chmod +x /tmp/configure-hostname-domain.sh; /tmp/configure-hostname-domain.sh
[16:50] <jgonzalez> gonna try to debug it
[16:51] <jgonzalez> Another question: I'm doing LVM, and if I try to reinstall I machine I've previously installed it fails because it founds a duplicate volume name group, any idea?
[16:54] <cjwatson> I think at present you'll need to explicitly delete the volume group using the LVM tools from early_command
[16:56] <jgonzalez> ok... regarding the script issue... does "<-- 30 question skipped" mean anything?
[16:57] <jgonzalez> it seems the script gets executed, but it doesn't prompt for values, it uses the values provided in the preseed file
[17:00] <cjwatson> ah
[17:01] <cjwatson> put 'db_fset netcfg/get_hostname seen false' before 'db_input critical netcfg/get_hostname', and similarly for get_domain
[17:04] <jgonzalez> cjwatson: ok, now it works, thanks a lot :)
[17:08] <jgonzalez> about the LVM problem... it's quite annoying: I lvremove all volumes, vgremove all groups, and the with fdisk I remove all partitions, I go back to hard disk detection and the complains about "no root file system detected" or something like that (using spanish installation). If I reboot the machine the it works ok
[17:09] <jgonzalez> s/the/then
[17:13] <cjwatson> jgonzalez: cool
[17:20] <jgonzalez> $ echo "r00tme" | mkpasswd -s -H MD5 <- Is this correct to generate encrypted passwords to include them in the preseed file? Mine doesn't seem to be working
[17:28] <cjwatson> sounds ok ...
[17:28] <cjwatson> you're just setting passwd/user-password-crypted to the encrypted text, right?
[17:29] <cjwatson> or root-password-crypted
[17:29] <cjwatson> if the latter, you will also need to set 'd-i passwd/root-login boolean true'
[17:33] <jgonzalez> user-password
[17:34] <jgonzalez> I'm trying tight now with a shorter one, to check if it was my fault while typing
[17:34] <jgonzalez> s/tight/right/
[17:44] <jgonzalez> does pkgsel/include only work with package included in the CD? If so I guess that to install any package not included in the CD you must use late_command, right?
[17:59] <cjwatson> jgonzalez: right, afraid so
[18:00] <cjwatson> though strictly speaking that's maybe a bug; pkgsel/include can only be triggered by hand and it's probably ok to have that go to the network
[18:01] <jgonzalez> so I'll have to do something like in-target aptitude install whatever package?
[18:01] <cjwatson> right
[18:01] <jgonzalez> another question
[18:01] <jgonzalez> should tasksel tasksel/first multiselect standard install openoffice and gnome????
[18:01] <CIA-44> pkgsel: cjwatson * r100 ubuntu/debian/ (changelog postinst):
[18:01] <CIA-44> pkgsel: * Move final sources.list into place before processing pkgsel/include, so
[18:01] <CIA-44> pkgsel:  that you can use that to install packages not on the CD.
[18:02] <CIA-44> pkgsel: cjwatson * r101 ubuntu/debian/changelog: releasing version 0.16ubuntu2
[18:03] <cjwatson> jgonzalez: it doesn't, but the language pack installation shortly afterwards does. preseed 'd-i pkgsel/install-language-support boolean false'
[18:04] <cjwatson> and 'd-i pkgsel/language-pack-patterns string' too
[18:04] <jgonzalez> hmmm, so in 8.04 I'll be able to use pkgsel/include to install packages not included in the CD?
[18:04] <soren> a
[18:04] <soren> gah
[18:05] <jgonzalez> :S a-gah = yes???? :)
[18:06] <cjwatson> jgonzalez: yes
[18:06] <cjwatson> though I'm sure that's not what soren meant to mistype
[18:07] <jgonzalez> :)
[18:14] <jgonzalez> I have just noticed that the LVM recipe wasn't correctly selected... I'm using 'd-i partman/choose_partition select Finalizar el particionado y escribir los cambios en el disco' (spanish translation, of course I select the spanish locale in the beginning using a kernel parameter)
[18:14] <jgonzalez> ops
[18:15] <jgonzalez> I meant 'd-i partman-auto/choose_recipe select Separar particiones /home, /usr, /var y /tmp'
[18:16] <jgonzalez> lvscan only shows root and swap_1
[18:25] <jgonzalez> any idea on this? I've noticed that this option only shows when using the expert mode, but this shouldn't be a problem when using preseeding, right?
[18:39] <cjwatson> the current translation actually seems to be /usr/ not /usr
[18:40] <cjwatson> it has to match exactly
[18:40] <cjwatson> that whole interface with translated strings is rather unfortunate; there's a bug about it
[22:48] <cjwatson> evand: any progress with getting the ubiquity-preserve-home bug fixed?