Preseeding debian with software RAID (The kernel was unable to re-read the partition table … Invalid argument)

This is a problem I’ve been occasionally going back to for a couple months now. The problem is that I’m using preseed.cfg to perform a fully unattended debian installation via netboot and I keep hitting my head on this one obnoxious warning message “The kernel was unable to re-read the partition table on /dev/md2 (Invalid argument)”… which turns out doesn’t even matter. If you just hit “Ok” the installation goes through and succeeds just fine.

Today I spent hours researching preseed answers and all the processes and scripts involved in rendering these dialogs back to the user looking for any desperate means to abolish this message, when I got this other desperate idea…. cat /dev/mem > /mnt/mem . Yeah that’s right. I am going to personally read my RAM.

A quick search using less brought me to this section of the file:

T high partman/exception_handler_note
IPTION The kernel was unable to re-read the partition table on /dev/md2 (Invalid argument).  This means Linux won't know anything about the modifications you made until you reboot.  You should reboot your computer before doing anything w
ith /dev/md2.

And of course what stands out is high partman/exception_handler_note

A quick google search for “partman/exception_handler_note preseed.cfg” turns out a handful of samples where the line d-i partman/exception_handler_note note shows up in other folks’ configs. Why it was so difficult to track down this particular question for preseed is beyond me, but I suppose I’m just glad I didn’t give up on my roundabout detective work.

So the partition region of my preseed file looks like this:

d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true

d-i partman-auto/disk string /dev/sdb
d-i partman-auto/method string raid

d-i partman-auto/expert_recipe string                   \
      multiraid ::                                      \
              500 1000000001 1000000000 raid                    \
                      $primary{ } method{ raid }                       \
              .                                         \
              512 513 512 raid                          \
                      $primary{ } method{ raid }        \
              .                                         \
              512 513 512 raid                          \
                      $primary{ } method{ raid }        \

d-i partman-auto-raid/recipe string             \
    1 1 0 ext3 /                                \
          /dev/sdb1                             \
    .                                           \
    1 1 0 ext3 /mnt/utility                     \
          /dev/sdb2                             \
    .                                           \
    1 1 0 swap -                                \
          /dev/sdb3                             \

d-i partman/exception_handler_note note
d-i partman-md/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

Now of course I need to toss up some sort of disclaimer. The question “partman/exception_handler_note” is not very specific of course, and implies that this could be used for other unforeseeable problems. I’m comfortable using this because I’m in a controlled environment where I’m using the same distribution, installer version and same hardware across the board, but of course if you do this, you’re doing it at your own risk. I just have to say I’m so glad this is over.


About andyortlieb

I've been a tinkerer and a lazy ideologist since I gained my first personal computer in 1989. I have an aversion to formal education and I prefer to learn things by experimentation. That is not a brag, it has not been a particularly helpful set of traits. My primary goals are to increase my safety, pleasure and usefulness as I work to build and modify technologies that will bring those same attributes to the masses irrespective of government. This is the documentation of my attempt at that journey.
This entry was posted in Admin, Computer. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s