auto_inst: the best kept Mandriva’s secret ?

Have you ever tried to automatically installed your Linux distribution ? Of course, if you’re a long time sysadmin, and Red Hat user, you use kickstart, or FAI if you happen to be a Debian fan.

But if you’re a Mandriva user, like myself, you also have a great tool to achieve the same goal: auto_inst.

What ? You were not aware ! Well, not so surprising seeing the lack of documentation around that tool, since nearly the begining. Mandriva has been lucky enough to have a contributor, David Eastcott, who published and updated for a couple of years a good auto_inst guide. It has been my bible, when I first looked at it, and found it very detailed and useful, even if I never understood why Mandriva didn’t make more noise about it (they have it as a package drakx-autoinstall-doc included in the official documentation).

But the problem is that this documentation is 6 years old now ! And even if most of it is still accurate, some other parts are now lagging behind. So trying to find a newer version, I went naturally to Mandriva’s wiki, and looked for the up to date version of it. I just found that another contributor, Roudoud0u, hosted a wiki version a bit updated on his own page. So I updated it with some of the findings I made on fs_type field for partitions, but what would be really needed, is that Mandriva takes back ownership of this documentation and host it in a decent place on its wiki, and have the writer of the tool review it and update it. It’s mostly accurate, but it wouldn’t take a lot of time for those involved in the tool to polish it with the latest goodies provided. For me, it would mean reading most of drakx code, understand it, and then being at the end able to review. Way too much for my availability 😦

The tool is extremely useful, and well done, as with a perl script declaring the $o hash, you can enhance your installation process in multiple ways. Including adding code such as with the oem patch support to do what ever fancy stuff you want with it, including fixing installer bugs 😉

For the moment, I still have a problem with the automatic installation of my 2010.0, where the installer gives back the hand to me saying “Oops, no root partition at /usr/lib/libDrakX/fs/any.pm line 68. Even looking at the code, it didn’t give me a clue, as I indeed have a ‘/’ partition in my partition list, and previously the same auto_inst file was just working correclty.

Another small issue is that the installer becomes again interactive to warn me that it will install xdm, even if I tried with multiple way to instruct it it was a server without X needed 😦

So please Mr Mandriva (or Mrs Mandriva maybe ;-), a small effort to bring that tool more in the light, as it first deserve it, and is mandatory in any distribution targetting the enterprise.

I’ve posted here an example of my auto_inst file for others to look at and share.

17 Responses to “auto_inst: the best kept Mandriva’s secret ?”

  1. Anne Says:

    Hi Bruno

    I fully agree with you 🙂 (unfortunatelly). I’m planning to migrate current doc to an easier format for updates in Mandriva svn. I’ve contacted the author and he is all ok for that. Will try to put in top todo list.
    Cheers (and happy new year)

  2. FACORAT Fabrice Says:

    I did have a look at your file :

    – you can remove the printer section. Since system-config-printer use, you can no longer configure a printer directly. You’d better use postInstall for this by using lpadmin

    – in locale, you’d better use ‘utf8’ => ‘1’ to be sure to have UTF8 support enabled

    – you are using an english keyboard, but the Europe/Paris timezone ?

    – are you sure that # is supported to add a comment ? ( # Size in in 512k blocks )

    – did you try adding just before postinstall :
    ‘interactiveSteps’ => [
    ],

    • brunocornec Says:

      1/ printer is gone. Thanks
      2/ locale updated
      3/ yes qwerty keyboard used here in France why ?
      4/ It’s a perl script, so yes a # is a comment.
      5/ I added interactiveSteps, but not better 😦 Well even worse, now my partitioning isn’t done correctly (existing partitions reuse instead of cleared, and then not all are formated and mounted/declared). Here are the error messages I got from the log drakx/ddebug.log:

      * starting step `doPartitionDisks'
      * calling umount(/mnt/sys)
      [...]
      * running: umount /mnt/proc
      * unmounting all filesystems
      * running: dmidecode
      * error: Oops, no root partition at /usr/lib/libDrakX/fs/any.pm line 68.

      Maybe it’s linked to a size issue (more allocation than what is available), but in that case the msg is cryptic at best 😦 Will test again with that.

      And still not better for xdm:

      * set_autologin Default
      * do_pkgs_during_install::install
      * selecting packages xdm

      Also I’d like to be able to automatically configure the system so that sshd is active (I put it under ‘services’ but doesn’t seem sufficient) and that ssh entry is allowed on the system by default by shorewall (or do I need to do that in the postinstall ? Again, with a doc … 😉
      I see that I probably miss the network-up and netfs services in the section for this network env to work, so I’ll add them and try again as well.

  3. brunocornec Says:

    And as I’m at it, it also seems that my postinstall script is not executed anymore 😦

    the first action of it, creating a log file doesn’t appear once the machine is booted:

    'postInstall' => '
    #
    # Run the postinstall script
    #
    exec > /root/drakx/postinstall.log 2>&1
    [...]

  4. Links 25/1/2010: NZ School Switches to GNU/Linux, KDE Software Compilation 4.4 Reaches RC2 | Boycott Novell Says:

    […] auto_inst: the best kept Mandriva’s secret ? […]

  5. FACORAT Fabrice Says:

    – partitions issues : That’s vrey strange as I don’t have this issue …
    At the beginning, just after security_user entry, I have :
    ‘interactive’ => ”,
    Like you, I do use partitions without issue :
    ‘partitions’ => [
    {
    ‘fs_type’ => ‘ext4’,
    ‘mntpoint’ => ‘/’,
    ‘size’ => 10177022
    },
    {
    ‘fs_type’ => ‘swap’,
    ‘mntpoint’ => ‘swap’,
    ‘size’ => 2000000
    },
    ],

    – sshd startup :
    Again I don’t have issue with sshd which is started at boot normally. However to be sure you can add in postinstall : chkconfig sshd on

    – XDM : concerning XDM, I don’t have this issue, but I’m installing KDE/GNOME workstations. Never try to install a X-less configuration. What about configuring X, and then removing the packages in postinstall ?

  6. brunocornec Says:

    Fabrice: Have you tried to add a postinstall script in your setup ? Mine doesn’t seem to get executed either in 2010.0 (was before). Indeed that would help solvinf the other issues.

    And again the ‘interactive’ keyword is not documented 😦 And I’m unable to find e.g. interactiveSteps in the code:

    [root@flecha libDrakX]# pwd
    /usr/lib/libDrakX
    [root@flecha libDrakX]# grep -ri interactiveS .
    [root@flecha libDrakX]#

    • brunocornec Says:

      I passed 3 hours today trying to read the installer code from 2020.0 in order to solve my issues. THe only positive one I made was a new parameter to configure automatically ports accessible after reboot with firewall:


      'firewall_ports' => '22/tcp',

      But for the rest, sames issues always: Unable to autoformat my disk. I changed partitions for fstab hoping it was it, then the name from ‘/’ to “/” without luck. Still the same Oops at the same place. And after that, my partitioning schema isn’t use at all 😦

      For xdm, I’m sure it’s linked to autologin. The doc says that without it in the auto_inst, it should’nt be invoke. I think it changed at least in 2010.0. Now, without example on how to desactivate, and with no comment in the installer code, it’s really hard to make it work. (+ the process to check is rather long :-()

      And there are other more minor problems, when I see it installed 700+ MB of packages, I’m sure some defaults are at work here without me willing them to happen.

      And without postinstall working I cannot even fix what is done wrongly by the installer.

      It’s really critical that more doc is provided so that feature can be use decently. Passing hours without results is frustrating at last.

  7. Derek - Karaoke Hire Says:

    Hey, Just a quick email to say your sites not showing correctly on the Android mobile, great read anyways.

    • brunocornec Says:

      What should be done to make the rendering correct for Android users ? I tried to use a basic theme, and I do not control the way WordPress works here. But maybe it should be reported to WordPress developers as well.

  8. Rod Says:

    Hi Bruno

    Some working 2010.0 auto_inst files can be seen here
    http://users.on.net/~emerson/mdv2010.0/

  9. Christian Says:

    The xdm is indeed caused by checking for autologin.

    You can disable it by setting

    ‘rpmsrate_flags_chosen’ => { CAT_X => 0 },

  10. A Mageia based Firewall with auto_inst and lots of other stuff like chrooted squid « Bruno Cornec’s Blog Says:

    […] to the Mageia wiki from the Mandriva wiki, itself from the Mandrka version. Remember, auto_inst was Mandriva’s best kept secret ! Hopefully, it will change with Mageia […]

  11. Contributor and evangelist: Bruno Cornec | Mageia Blog (English) Says:

    […] Also I added a page on the wiki about auto_inst, coming from Mandriva, and adapted it a bit so it was accurate for Mageia. I use automatic deployment a lot and think this is a Mageia feature not well enough known (as it was in Mandriva) […]

  12. Colaborador y evangelista: Bruno Cornec | Mageia Blog (Español) Says:

    […] También he añadido una página en el wiki sobre auto_inst, procedentes de Mandriva, y la adapté un poco para Mageia. Yo uso bastante el despliegue automático y creo que esta es una característica de Mageia que no se conoce suficientemente bien (como lo fue en Mandriva) […]

  13. Contributeur et prosélyte : Bruno Cornec | Mageia Blog (Français) Says:

    […] J’ai également ajouté une page sur le wiki à propos de auto_inst, qui vient de Mandriva, et je l’ai adapté un peu pour Mageia. J’utilise beaucoup le déploiement automatique et je pense que c’est une fonctionnalité de Mageia qui mériterait d’être mieux connue (comme elle l’était pour Mandriva). […]

  14. Contribuitor și evanghelist: Bruno Cornec | Mageia Blog (Română) Says:

    […] Am mai adăugat și o pagină pe wiki despre auto_inst, provenind de la Mandriva, pe care am adaptat-o un pic pentru Mageia. Utilizez foarte mult distribuția automată și cred că este o funcționalitate Mageia nu prea cunoscută (cum era în Mandriva). […]

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.