[9fans] fs(3) not bound at boot - Plan9

This is a discussion on [9fans] fs(3) not bound at boot - Plan9 ; In /sys/src/9/boot/local.c^connectlocal we have: if(bind("#k", "/dev", MAFTER) I am booting locally off a fossil partition, so I'm pretty sure this is the right code path. The bind seems to work (I stuck a test right after that in my local ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: [9fans] fs(3) not bound at boot

  1. [9fans] fs(3) not bound at boot

    In /sys/src/9/boot/local.c^connectlocal we have:
    if(bind("#k", "/dev", MAFTER)<0)
    I am booting locally off a fossil partition, so I'm pretty
    sure this is the right code path. The bind seems to
    work (I stuck a test right after that in my local local.c),
    but by the time it gets around to starting venti, venti
    can't see a file in /dev/fs. When booting finishes, the
    file's in #k/fs, but #k isn't mounted anywhere.

    Anyone know where/why this is getting lost? I'd like
    to boot off a fs(3)-backed venti. I also tried telling
    venti to get its arenas directly from #k/fs/arenas, but
    that went poorly.
    Anthony




  2. Re: [9fans] fs(3) not bound at boot

    On the machines where it matters, mostly file servers, we have

    bind -a '#k' /dev

    in /cfg/$sysname/namespace. There's a newns() in init.c, at least.



  3. Re: [9fans] fs(3) not bound at boot

    Right, but how do you get your root file system if it's on a fs(3)
    device? It looks like it should work, with connectlocalfossil
    just a few lines after the bind in connectlocal, but that doesn't
    seem to actually work for me. init.c (and thus /cfg/*) are much
    later in the process.
    Anthony


  4. Re: [9fans] fs(3) not bound at boot

    did you write the config?


    On Tue, May 6, 2008 at 9:01 PM, wrote:
    > Right, but how do you get your root file system if it's on a fs(3)
    > device? It looks like it should work, with connectlocalfossil
    > just a few lines after the bind in connectlocal, but that doesn't
    > seem to actually work for me. init.c (and thus /cfg/*) are much
    > later in the process.
    > Anthony
    >
    >
    > ---------- Forwarded message ----------
    > From: geoff@plan9.bell-labs.com
    > To: 9fans@9fans.net
    > Date: Tue, 6 May 2008 14:13:27 -0400
    > Subject: Re: [9fans] fs(3) not bound at boot
    > On the machines where it matters, mostly file servers, we have
    >
    > bind -a '#k' /dev
    >
    > in /cfg/$sysname/namespace. There's a newns() in init.c, at least.
    >
    >



  5. Re: [9fans] fs(3) not bound at boot

    Hrm. This looks familiar, and I think I had a similar problem a long
    time ago when I was trying to do the same. I think I had to modify
    local.c. I can't check right now, but I will later this evening. If
    you haven't found a solution, I'll let you know.

    On 5/6/08, a@9srv.net wrote:
    > Right, but how do you get your root file system if it's on a fs(3)
    > device? It looks like it should work, with connectlocalfossil
    > just a few lines after the bind in connectlocal, but that doesn't
    > seem to actually work for me. init.c (and thus /cfg/*) are much
    > later in the process.
    > Anthony
    >
    >
    > ---------- Forwarded message ----------
    > From: geoff@plan9.bell-labs.com
    > To: 9fans@9fans.net
    > Date: Tue, 6 May 2008 14:13:27 -0400
    > Subject: Re: [9fans] fs(3) not bound at boot
    > On the machines where it matters, mostly file servers, we have
    >
    > bind -a '#k' /dev
    >
    > in /cfg/$sysname/namespace. There's a newns() in init.c, at least.
    >
    >



    --
    Christopher Nielsen
    "They who can give up essential liberty for temporary
    safety, deserve neither liberty nor safety." --Benjamin Franklin


  6. Re: [9fans] fs(3) not bound at boot

    Yes. When the system come up, #k/fs/arenas exists, showing
    fs(3) is getting initialized from the disk partition with its config,
    and 'venti/conf '#k'/fs/arenas' give the expected results.
    Anthony



+ Reply to Thread