[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.

Thierry Vignaud thierry.vignaud at gmail.com
Tue Dec 20 13:20:25 CET 2011

On 20 December 2011 12:59, Colin Guthrie <colin at mageia.org> wrote:
> 'Twas brillig, and Thierry Vignaud at 20/12/11 11:42 did gyre and gimble:
>>>>> +    # Start up udev and trigger cold plugs
>>>>> +    run_program::run("mount", "-t", "devtmpfs", "-o", "mode=0755,nosuid",
>>>>> "devtmpfs", "/dev");
>>>>> +    mkdir "/dev/pts", 0755;
>>>>> +    run_program::run("mount", "-t", "devpts", "-o",
>>>>> "gid=5,mode=620,noexec,nosuid", "devpts", "/dev/pts");
>>>>> +    mkdir "/dev/shm", 0755;
>> This one should be better included in stage1 with other /dev stuff IMHO
>> See images/make_boot_img
> With my earlier comment about stage1+dracut, I would tend to agree.
> Perhaps all this stuff can be in stage1 instead?


>>>>> +    run_program::run("udevadm", "trigger", "--type=subsystems",
>>>>> "--action=add");
>>>>> +    run_program::run("udevadm", "trigger", "--type=devices",
>>>>> "--action=add");
>> Since this will forces us to wait, you should either display a "please
>> wait dialog"
>> or better not run this as we'll only look at block devices quite a lot later
>> after accepting license & loading disks modules
> Technically true, although this requires me to have a bit more
> understanding of how things work with the installer which I'd ideally
> like to avoid!.... :p

here we initialize the installer then loop over the steps (see
- choose language
- accepting license
- THEN load hd which will triggers udev to scan for LV or the like

So it's useless & not user friendly to force waiting for LVs here when
we know none will be found

>>> Cool, thanks. I'm not a perl-master so feel free to tidy this commit up
>>> a bit if you have time, otherwise I'll try and tidy up my mess this
>>> evening :)
>> There's no urgency so it's better if done by you so that
>> you eventually became a co maintainer of drakx :-)
> I have a funny feeling that I'm being tricked into something here.... :p

It's not that hard :-)

>> BTW you may eventually include udev in rescue too
>> (but only once it's done in stage2)
>> See rescue/ && rescue/devices.pl
> Yeah it's needed in rescue too as I think I mentioned in an earlier
> email, but this is easier to get working I think.

BTW if you could look at those LVM/DM bugs in rescue:

More information about the Mageia-dev mailing list