disk size in pre script?

Colin Watson cjwatson at ubuntu.com
Fri Jan 11 00:45:46 GMT 2008


On Thu, Jan 10, 2008 at 12:16:59PM -0800, Ryan Lovett wrote:
> On Wed, Jan 09, 2008 at 05:17:36PM -0800, Ryan Lovett wrote:
> > Is it possible to fetch the size of the disk in the pre script?
> > list-devices and udevinfo return empty values. (maybe because /dev hasn't
> > been set up yet?)
> 
> It looks like this isn't possible because while udevd is running during
> %pre, the installer hasn't loaded the kernel modules for disks and what
> not so there aren't any relevant block devices up yet.

Right, %pre is just too early for that. Unfortunately.

> Maybe it'd be feasible to inject a script into a partman directory, but
> this is probably more trouble than its worth.

This is actually exactly what the implementation of the 'clearpart'
command does. You could look to it for an example.

Cheers,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the Ubuntu-installer mailing list