• mkinitcpio with the mdadm_udev hook vs update-initramfs -u


    In the Debian world, I know how to create an mdadm array, format the file system and mount it. I was doing the same in Antergos while following the Arch wiki and things sort of went off the rails when I got towards the end.

    In Debian, to save the array layout, you use: sudo update-initramfs -u

    In Antergos/Arch, I guess that step is replaced with mkinitcpio and that mdadm-udev hook. When I got to that spot in the arch Wiki, the commands I was asked to type gave me bash errors so I manually edited the mdadm.conf file and added:

    ARRAY /dev/md0 metadata=1.2 name=gene-antergos:0 UUID=0078e14e:6ce6b00e:598d3151:beeb6694

    then edited fstab.conf and added:
    /dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0

    My array is mounted at every boot and appears to be running AOK but since I didn’t do anything with mkinitcpio, did I miss some crucial step?

    That wiki ( https://wiki.archlinux.org/index.php/RAID#Update_configuration_file ) is easy enough to follow but after the steps about creating the array, it jumps to installing Arch ONTO the array. To a newbie, it seems to go sideways when telling you what to do after the array is created and what you need to do to save the layout.

    Looking at the mkinitcpio wiki ( https://wiki.archlinux.org/index.php/mkinitcpio#Installation ) , do I just issue the following command: mkinitcpio -c /etc/mkinitcpio-custom.conf -g /boot/linux-custom.img
    … and add that mdadm_udev hook?

    Or, since I have the array mounting at boot, is everything “OK” and even though I didn’t use mkinitcpio, just leave it alone?

  • @RoadHazard I went ahead and executed: sudo mkinitcpio -c /etc/mkinitcpio.conf -g /boot/linux-custom.img and added mdadm_udev to the hooks section and everything looks good?!

    I noticed there were a few more images in the /boot folder. fallback, lts, etc. Do I need to update those images with mkinitcpio?

    I believe all I’m doing is creating a boot image that has built in support for mounting my RAID at startup, correct? If so, this isn’t a boot array or anything, just data for my Plex server so some worse case scenario my array doesn’t get mounted at startup, it isn’t the end of the world for me. Just means I’ll have to come back here and ask for help. :)

hook4 mkinitcpio2 mdadmudev1 Posts 2Views 556
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.