- if 'preseed' in install: # d-i based installer
- baseurl = install['mirror']+"/dists/"+install['dist']+"/main/installer-"+install['arch']+"/current/images"
- kernelurl = baseurl + "/netboot/xen/vmlinuz"
- ramdiskurl = baseurl + "/netboot/xen/initrd.gz"
+ if 'ks' in install or 'preseed' in install:
+ if 'ks' in install: # anaconda based installer
+ baseurl = install['mirror']+"/releases/"+install['dist']+"/Everything/"+install['arch']+"/os"
+ kernelurl = baseurl + "/images/pxeboot/vmlinuz"
+ ramdiskurl = baseurl + "/images/pxeboot/initrd.img"
+ extras = ["inst.text",
+ "inst.repo="+baseurl,
+ "inst.ks="+install['ks'],
+ "--", "console=hvc0",
+ ]
+ elif 'preseed' in install: # d-i based installer
+ baseurl = install['mirror']+"/dists/"+install['dist']+"/main/installer-"+install['arch']+"/current/images"
+ kernelurl = baseurl + "/netboot/xen/vmlinuz"
+ ramdiskurl = baseurl + "/netboot/xen/initrd.gz"
+
+ # For debugging, add "DEBCONF_DEBUG=5" to the arguments.
+ extras = ["auto=true",
+ "debconf/priority=critical",
+ 'preseed/early_command="grep -v tty0 /etc/inittab >/etc/inittab.new; mv -f /etc/inittab.new /etc/inittab"',
+ "debian-installer/locale=en_US.UTF-8",
+ "debian-installer/exit/always_halt=true",
+ "url="+install['preseed'],
+ "--", "console=hvc0"]
+ else:
+ raise RuntimeError('unknown new-style autoinstall')