initrd: read file from flash
Martin Langhoff
martin.langhoff at gmail.com
Wed Mar 10 09:25:34 EST 2010
On Wed, Mar 10, 2010 at 6:12 AM, Esteban Bordón <ebordon.uy at gmail.com> wrote:
> In that case I should modify bitfrost code, right?
Just use it as a reference ;-)
>> If your file is in /boot or anywhere else in what becomes the "root"
>> partition, you have to navigate the /versions directory and follow the
>> 'current' symlinks.
>
> Could I navigate these directories as any python program
> (open('/versions/boot/current/myfile', 'r')) ?
Yes. IIRC, the python code uses "with" blocks that look like
with blk_mounted(x,y,z):
and
with root_mounted(x,y):
which means that the partition is unmounted when the block exits (inc
via an exception). Every mount of / is very costly in time, so you
want to add your code to the existing "with xxx_mounted()" block to
avoid slowing down boot times.
cheers,
m
--
martin.langhoff at gmail.com
martin at laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
More information about the Devel
mailing list