Forcing a disk rescan after %pre

Eugeny Zadevalov lists at zadevalov.com
Thu Oct 2 13:46:15 UTC 2008


Dag Wieers wrote:
> On Thu, 2 Oct 2008, Paul Malinowski wrote:
> 
>> Try to use partprobe to re-read available disks/partitions. I'm not 
>> sure is it available when %pre script runs, but anaconda does that 
>> somehow during the partitioning section so I guess it's possible. In 
>> the worst case scenario I would add reboot at the end of creation of 
>> raid config in the %pre script - so that it would reboot if change in 
>> config occured. I know that its rather a nasty hack, not a proper 
>> solution, but please keep in mind that anaconda has some limits.
> 
> The reboot is what I am planning to do, but I prefer to look first at a 
> better option instead of settling for this because I don't know better :-)
> 
> I fear that anaconda's data-structure is not updated and the scan for 
> disks has already happened before the %pre. Because after my RAID 
> scripts has run, I do have /dev/sda available to the system, but 
> anaconda behaves as if there were no disks found.
> 

Dag, if you're using "--onbiosdisk=XX" in your "part" anaconda commands 
that's the case.
Avoid it and switch to "$(list-harddrives)"+"--ondisk=" method.

Hope that helps,
Thanks!




More information about the Kickstart-list mailing list