[arch-releng] [RFC] [archiso] Populate /run/aif/AIF_IGNORE_DEVS with archiso virtual devices

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sun Feb 5 10:20:55 EST 2012


On 02/05/2012 12:01 PM, Thomas Bächler wrote:
> Am 05.02.2012 15:51, schrieb Gerardo Exequiel Pozzi:
>> On 02/05/2012 08:32 AM, Thomas Bächler wrote:
>>> The file /run/aif/AIF_IGNORE_DEVS can be used by AIF to filter
>>> the device list in the "Prepare Hard Drives" step.
>>> ---
>>>    archiso/hooks/archiso          |    4 ++++
>>>    archiso/hooks/archiso_loop_mnt |    2 ++
>>>    2 files changed, 6 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
>>> index 2635a4c..6d2eb07 100644
>>> --- a/archiso/hooks/archiso
>>> +++ b/archiso/hooks/archiso
>>> @@ -19,6 +19,8 @@ _make_loop_dev() {
>>>        local img="${1}"
>>>        mknod /dev/loop${loop_dev_count} b 7 ${loop_dev_minor}&>   /dev/null
>>>        losetup /dev/loop${loop_dev_count} "${img}"&>   /dev/null
>>> +    mkdir -p /run/aif/
>>> +    echo /dev/loop${loop_dev_count}>>   /run/aif/AIF_IGNORE_DEVS
>>>        echo /dev/loop${loop_dev_count}
>>>    }
>>>
>>> @@ -58,6 +60,8 @@ _mnt_fs() {
>>>        rw_dev=$(_make_loop_dev
>>> "/run/archiso/cowspace/${cow_directory}/${img_name}.cow")
>>>
>>>        echo "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev}
>>> ${cow_persistent} 8" | dmsetup create ${dm_snap_name}
>>> +    mkdir -p /run/aif/
>>> +    echo /dev/mapper/${dm_snap_name}>>   /run/aif/AIF_IGNORE_DEVS
>>>
>>>        msg ":: Mounting '/dev/mapper/${dm_snap_name}' to
>>> '${newroot}${mnt}'"
>>>        if ! mount "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" ; then
>>> diff --git a/archiso/hooks/archiso_loop_mnt
>>> b/archiso/hooks/archiso_loop_mnt
>>> index e52dc69..b326092 100644
>>> --- a/archiso/hooks/archiso_loop_mnt
>>> +++ b/archiso/hooks/archiso_loop_mnt
>>> @@ -28,6 +28,8 @@ archiso_loop_mount_handler () {
>>>            losetup -d ${_dev_loop}
>>>            umount /run/archiso/img_dev
>>>        else
>>> +        mkdir -p /run/aif/
>>> +        echo ${_dev_loop}>>   /run/aif/AIF_IGNORE_DEVS
>>>            echo ${_dev_loop}>   /run/archiso/img_dev_loop
>>>        fi
>>>    }
>> This does not fit with future "[archiso] Refactor: Use losetup from
>> util-linux" [#1].
> That wasn't on the main archiso tree.
>
>> I guess should also add device node where /dev/disk/by-label/ARCH_
>> points to.
> Yes, the boot device should be added as well.
>
>> Anyway, I prefer to call /run/archiso/block_devices (or
>> something like that)
> AIF is not supposed to depend on archiso, so an aif-specific path like
> /run/aif/ would be best IMO.
>
AIF is supposed to run on any enviroment. Is the work of AIF to find how 
each enviroment is setup.
You can run any installer inside archiso (there are some interesting and 
simple scripts contributed in our community).

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-releng mailing list