[arch-releng] archiso's (?) /dev/dm-* and /dev/loop devices and how to ignore them in AIF

Dieter Plaetinck dieter at plaetinck.be
Tue Dec 27 13:08:14 EST 2011

in aif we switched approaches to list all possible block devices the user can install Arch to.
at first, we listed blockdevices directly in /dev, by having some expressions like /dev/hd*, /dev/sd*, then later we needed to add /dev/vd*, /dev/xvd* and more
to support all kinds of hardware and virtualisation solutions.  This was a bit of a kludge, so we approached the problem from the other direction:
Now we go over everything in /sys/block and filter _out_ the stuff we _don't_ want. (such as devices with size 0 - empty card readers - type 5 - cdrom drives) etc.
see https://github.com/Dieterbe/aif/blob/develop/src/core/libs/lib-blockdevices-filesystems.sh#L215
This seems to work at least a tiny bit better, even though the problem is similar (we need to maintain filters to remove what we don't want..)
I think the final filter we need to add is for the following devices:

are these all created by archiso? what exactly are they for?
does anyone know what is the best way to ignore them?
* some property in /sys/block/<dev>/ ?
* how about just maintaining a list of exactly all these filenames .. or:
* how about having archiso maintain a file called /var/aif-blockdevices or something? then aif can read that file and ignore blockdevices based on what it finds there.
(just don't call it archiso-blockdevices or something, because AIF is supposed to be able to run in several environments)

More information about the arch-releng mailing list