inside debian-installer

Download Inside debian-installer

If you can't read please download the document

Upload: wouter-verhelst

Post on 24-May-2015

360 views

Category:

Technology


0 download

DESCRIPTION

Talk given at LOADays 2014 in Wilrijk, Belgium, about the internals of the Debian-installer.

TRANSCRIPT

  • 1. Inside debian-installer Wouter Verhelst LOADays 2014 2014-03-05 Wilrijk, Belgium

2. debian-installer? Used since 2005 embedded environment running from initramfs Modular; uses debian package files (udeb). Every udeb is a module. Main components: cdebconf main-menu partman Mostly shellscripts (busybox and dash) 3. cdebconf Based on debconf, but C rather than perl Questions asked through (translatable) templates Instanciated templates have priorities Low-priority questions are not shown to the user (default is returned instead) MVC system Thus, UI-agnostic (GTK or curses) 4. cdebconf example Template: partman-nbd/mainmenu Type: select Choices-C: connect, disconnect, finish Choices: ${CHOICES} _Description: NBD configuration action: There are currently ${NUMBER} devices connected. Template: partman-nbd/server Type: string _Description: Network Block Device server: Please enter the host name or the IP address of the system running nbd-server. db_reset partman-nbd/mainmenu db_subst partman-nbd/mainmenu NUMBER $count db_input critical partman-nbd/mainmenu db_go || break db_get partman-nbd/mainmenu option="$RET" case "$option" in connect) connect ;; 5. Main-menu Defaults to first unconfigured module in list Only shown: In expert mode (really, debconf priority low) When errors occurred, When user clicks go back 6. partman Module for partitioning and formatting hard disk Uses parted Itself very modular: partman-lvm partman-md partman-crypto partman-btrfs partman-zfs partman-nbd wouter@carillon:~/debian/debian- installer/packages$ ls -d *partman* | wc -l 24 7. Module interface Modules: postinst implements functionality; config script asks questions (debconf templates) Installer-Menu-Item: location in main-menu Retrievers can fetch more modules 8. Preseeding Providing the answers to debconf templates ahead of time, rather than interactively Not a good option for changing defaults Several options: Kernel command line Installer/medium remastering HTTP (not HTTPS) URL: Enter interactively Or preseed that... DHCP DEBCONF_DEBUG 9. Preseeding example file 10. Demo! (questions?)