{"id":137,"date":"2009-11-10T19:02:21","date_gmt":"2009-11-10T18:02:21","guid":{"rendered":"http:\/\/www.joerg-seyfried.de\/?p=137"},"modified":"2021-02-09T20:14:34","modified_gmt":"2021-02-09T19:14:34","slug":"preseeding-ubuntu-karmic","status":"publish","type":"post","link":"https:\/\/www.joerg-seyfried.de\/alt\/2009\/11\/preseeding-ubuntu-karmic\/","title":{"rendered":"Preseeding Ubuntu Karmic"},"content":{"rendered":"<p><!--:de-->(English article below) Dieser Artikel ist eine Dokumentation von vielen schwei\u00dftreibenden Besuchen im Netz. Leider gibt es f\u00fcr Ubuntu keine so sch\u00f6n zusammenh\u00e4ngende Doku wie f\u00fcr Debian &#8211; liegt aber auch daran, dass man mit Ubiquity noch viel mehr sch\u00f6nes Zeug anstellen kann wie mit dem Debian-Installer. Um es einem noch breiteren Publikum zug\u00e4nglich zu machen, ist dieses Posting <em>ausnahmsweise auf Englisch<\/em>.<\/p>\n<p>So you want to preseed Ubuntu? Fine. You&#8217;ve probably read <a href=\"https:\/\/help.ubuntu.com\/community\/InstallCDCustomization\" target=\"_blank\" rel=\"noopener\">this article<\/a>. Maybe you&#8217;ve seen <a href=\"https:\/\/help.ubuntu.com\/community\/InstallCDCustomization\" target=\"_blank\" rel=\"noopener\">the scripts, too<\/a>. However, there are still some gaps wide enough to stumble into. Here&#8217;s a quick overview over how to create an unattended install CD. If you want to add customized packages, you&#8217;re a bit more adventurous than I was &#8211; but this might give you a head start, anyway.<\/p>\n<h3>Getting the files out of the ISO<\/h3>\n<p>Here&#8217;s your first stop. Go grab everything that&#8217;s on the original CD image (no need to burn it, the file itself is just fine if you do this):<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">mkdir loopdir\nmount -o loop ubuntu_whatever.iso loopdir\n# you might need a \"modprobe loop\" first<\/pre>\n<p>Now, grab everything inside and copy it to a place where you can modify it:<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">mkdir cd\ncp -a loopdir\/{.disk,*} cd\/<\/pre>\n<p>(Others might find a\u2026<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">rsync -a -H loopdir\/ cd<\/pre>\n<p>\u2026more elegant. Whatever you do, don&#8217;t miss the \u201c.disk\u201d directory &#8211; otherwise, you&#8217;ll end up with annoying errors when booting from the final CD &#8211; which say that it cannot find a live file system).<\/p>\n<h3>The preseed configuration file<\/h3>\n<p>Now, you&#8217;re <a href=\"https:\/\/help.ubuntu.com\/8.04\/installation-guide\/i386\/preseed-using.html\" target=\"_blank\" rel=\"noopener\">here<\/a>. That&#8217;s a lot of nice things you can configure there &#8211; but the main thing missing in the 8.xx docs is the part about Ubiquity. Here&#8217;s an excerpt from my <a href=\"http:\/\/j-sey.de\/files\/preseed.cfg.gz\" target=\"_blank\" rel=\"noopener\">preseed.cfg<\/a> (you might use that as a quick start &#8211; but note that I&#8217;ve preseeded a German installation):<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\"># make sure we get over page 6 of the installation questions:\nubiquity        ubiquity\/summary        note\n# disable this for one single click before reboot:\nubiquity        ubiquity\/reboot boolean true\n# the rest should be quite self-explanatory:\nubiquity        languagechooser\/language-name   select  German\nubiquity        countrychooser\/shortlist        select  DE\nubiquity        countrychooser\/countryname      select  Germany\nubiquity        countrychooser\/country-name      string Germany\ndebconf         debconf\/language        string  de\nubiquity        console-keymaps-at\/keymap       select  de\nubiquity        tzconfig\/gmt    boolean false\nubiquity        time\/zone       select  Europe\/Berlin\nubiquity        debian-installer\/country        string DE\nubiquity        debian-installer\/language       string de\nubiquity        debian-installer\/locale select  de_DE.UTF-8\nconsole-setup   console-setup\/layoutcode        select  de\nconsole-setup   console-setup\/modelcode select  pc105\nconsole-setup   console-setup\/layout    select  Germany\nconsole-setup   console-setup\/variant   select  Germany\n\nubyquity        localechooser\/supported-locales multiselect\\\nde_DE.UTF-8 en_US.UTF-8\n# this is what the \"late_command\" in d-i does. I prefer a trick like\n# this to do some setup work on the freshly installed machine -\n# this script gets pulled from 192.168.1.1 via http and should\n# disable itself after execution. Comment this away if you don't\n# want it!\nubiquity        ubiquity\/success_command        string  wget \\ http:\/\/192.168.1.1\/ubuntu_deploy -O \/target\/etc\/init.d\/S99deploy; ln -s\\ \/etc\/init.d\/S99deploy \/target\/etc\/rc2.d\/S99deploy; chmod ugo+x \/target\/etc\/init.d\/S99deploy<\/pre>\n<h3>Modify boot command line<\/h3>\n<p>I prefer the elegant way: I modify menu.cfg in the isolinux dir. Add these lines to the position you like (add it to text.cfg if you want to have it in between the rest of the options):<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">label unattended\n        menu label Unattended auto install\n        kernel \/casper\/vmlinuz\n        append file=\/cdrom\/preseed\/my.seed boot=casper initrd=\/casper\/initrd.lz debian-installer\/locale=de_DE \\\nautomatic-ubiquity noprompt quiet splash --<\/pre>\n<p>Modify the locale and name of the preseeding file. Make sure you boot into \u201cautomatic-ubiquity\u201d. Use noprompt if you want to use ubiquity&#8217;s reboot-option in the preseed file.<\/p>\n<h3>Create the ISO<\/h3>\n<p>At this point, I don&#8217;t go any further. If you want to add packages, do so. But be warned that all the gpg stuff mentioned in the docs apply in that case.<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">mkisofs -o my_iso_file.iso -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux\/isolinux.bin -c isolinux\/boot.cat .\/cd<\/pre>\n<p>Use Virtualbox for extensive testing. Burn at will. And: have fun!<!--:--><!--:en-->So you want to preseed Ubuntu? Fine. You&#8217;ve probably read <a href=\"https:\/\/help.ubuntu.com\/community\/InstallCDCustomization\" target=\"_blank\" rel=\"noopener\">this article<\/a>. Maybe you&#8217;ve seen <a href=\"https:\/\/help.ubuntu.com\/community\/InstallCDCustomization\" target=\"_blank\" rel=\"noopener\">the scripts, too<\/a>. However, there are still some gaps wide enough to stumble into. Here&#8217;s a quick overview over how to create an unattended install CD. If you want to add customized packages, you&#8217;re a bit more adventurous than I was &#8211; but this might give you a head start, anyway.<\/p>\n<h3>Getting the files out of the ISO<\/h3>\n<p>Here&#8217;s your first stop. Go grab everything that&#8217;s on the original CD image (no need to burn it, the is is just fine if you do this):<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">mkdir loopdir\nmount -o ubuntu_whatever.iso loopdir\n# you might need a \"modprobe loop\" first<\/pre>\n<p>Now, grab everything inside and copy it to a place where you can modify it:<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">mkdir cd\ncp -a loopdir\/* cd\/\ncp -a loopdir\/.d* cd\/<\/pre>\n<p>(Others might find a\u2026<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">rsync -a -H loopdir\/ cd<\/pre>\n<p>\u2026more elegant. Whatever you do, don&#8217;t miss the \u201c.disk\u201d directory &#8211; otherwise, you&#8217;ll end up with annoying errors when booting from the final CD &#8211; which say that it cannot find a live file system).<\/p>\n<h3>The preseed configuration file<\/h3>\n<p>Now, you&#8217;re <a href=\"https:\/\/help.ubuntu.com\/8.04\/installation-guide\/i386\/preseed-using.html\" target=\"_blank\" rel=\"noopener\">here<\/a>. That&#8217;s a lot of nice things you can configure there &#8211; but the main thing missing in the 8.xx docs is the part about Ubiquity. Here&#8217;s an excerpt from my <a href=\"http:\/\/j-sey.de\/files\/preseed.cfg.gz\" target=\"_blank\" rel=\"noopener\">preseed.cfg<\/a> (you might use that as a quick start &#8211; but note that I&#8217;ve preseeded a German installation):<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\"># make sure we get over page 6 of the installation questions:\nubiquity        ubiquity\/summary        note\n# disable this for one single click before reboot:\nubiquity        ubiquity\/reboot boolean true\n# the rest should be quite self-explanatory:\nubiquity        languagechooser\/language-name   select  German\nubiquity        countrychooser\/shortlist        select  DE\nubiquity        countrychooser\/countryname      select  Germany\nubiquity        countrychooser\/country-name      string Germany\ndebconf         debconf\/language        string  de\nubiquity        console-keymaps-at\/keymap       select  de\nubiquity        tzconfig\/gmt    boolean false\nubiquity        time\/zone       select  Europe\/Berlin\nubiquity        debian-installer\/country        string DE\nubiquity        debian-installer\/language       string de\nubiquity        debian-installer\/locale select  de_DE.UTF-8\nconsole-setup   console-setup\/layoutcode        select  de\nconsole-setup   console-setup\/modelcode select  pc105\nconsole-setup   console-setup\/layout    select  Germany\nconsole-setup   console-setup\/variant   select  Germany\n\nubyquity        localechooser\/supported-locales multiselect\\\nde_DE.UTF-8 en_US.UTF-8\n# this is what the \"late_command\" in d-i does. I prefer a trick like\n# this to do some setup work on the freshly installed machine -\n# this script gets pulled from 192.168.1.1 via http and should\n# disable itself after execution. Comment this away if you don't\n# want it!\nubiquity        ubiquity\/success_command        string  wget \\ http:\/\/192.168.1.1\/ubuntu_deploy -O \/target\/etc\/init.d\/S99deploy; ln -s\\ \/etc\/init.d\/S99deploy \/target\/etc\/rc2.d\/S99deploy; chmod ugo+x \/target\/etc\/init.d\/S99deploy<\/pre>\n<h3>Modify boot command line<\/h3>\n<p>I prefer the elegant way: I modify menu.cfg in the isolinux dir. Add these lines to the position you like (add it to text.cfg if you want to have it in between the rest of the options):<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">label unattended\n        menu label Unattended auto install\n        kernel \/casper\/vmlinuz\n        append file=\/cdrom\/preseed\/my.seed boot=casper initrd=\/casper\/initrd.lz debian-installer\/locale=de_DE \\\nautomatic-ubiquity noprompt quiet splash --<\/pre>\n<p>Modify the locale and name of the preseeding file. Make sure you boot into \u201cautomatic-ubiquity\u201d. Use noprompt if you want to use ubiquity&#8217;s reboot-option in the preseed file.<\/p>\n<h3>Create the ISO<\/h3>\n<p>At this point, I don&#8217;t go any further. If you want to add packages, do so. But be warned that all the gpg stuff mentioned in the docs apply in that case.<\/p>\n<pre style=\"background-color: #f3f5f7; white-space: pre-wrap; word-wrap: break-word; padding: 5pt; border: 1pt solid #aebdcc;\">mkisofs -o my_iso_file.iso -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux\/isolinux.bin -c isolinux\/boot.cat .\/cd<\/pre>\n<p>Use Virtualbox for extensive testing. Burn at will. And: have fun!<!--:--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>(English article below) Dieser Artikel ist eine Dokumentation von vielen schwei\u00dftreibenden Besuchen im Netz. Leider gibt es f\u00fcr Ubuntu keine so sch\u00f6n zusammenh\u00e4ngende Doku wie f\u00fcr Debian &#8211; liegt aber auch daran, dass man mit Ubiquity noch viel mehr sch\u00f6nes Zeug anstellen kann wie mit dem Debian-Installer. Um es einem noch breiteren Publikum zug\u00e4nglich zu [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[70],"tags":[24],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-linux-2","tag-howto"],"_links":{"self":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":20,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":603,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts\/137\/revisions\/603"}],"wp:attachment":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}