9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] usb/disk nvram and pxeload
@ 2011-02-27  0:38 Skip Tavakkolian
  2011-02-27  2:07 ` Gorka Guardiola
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2011-02-27  0:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

if i pxeload a cpu and want to be able to use an nvram partition on a
usb disk (i.e. nvram=/dev/sdXX/nvram - once it is partitioned &
formated). it seems i also must change boot/boot.c to add the 'partfs
&& fdisk -p && prep -p' after usbd has started. is this correct?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] usb/disk nvram and pxeload
  2011-02-27  0:38 [9fans] usb/disk nvram and pxeload Skip Tavakkolian
@ 2011-02-27  2:07 ` Gorka Guardiola
  2011-02-27  2:21 ` ron minnich
  2011-02-27  2:41 ` Gorka Guardiola
  2 siblings, 0 replies; 7+ messages in thread
From: Gorka Guardiola @ 2011-02-27  2:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sun, Feb 27, 2011 at 1:38 AM, Skip Tavakkolian
<skip.tavakkolian@gmail.com> wrote:
> if i pxeload a cpu and want to be able to use an nvram partition on a
> usb disk (i.e. nvram=/dev/sdXX/nvram - once it is partitioned &
> formated). it seems i also must change boot/boot.c to add the 'partfs
> && fdisk -p && prep -p' after usbd has started. is this correct?
>
>

There are two alternatives.
Be wary, I am writing this by looking at the manual and from
what I remember from the code, but they should be *almost* right.

One is run
usb/usbd
mount /srv/usb /n/usb
#now you have /n/usb/sdU0.0 for example there
#here there are two alternatives, you can use partfs or fs, depending
#on your needs.

#with partfs *simpler but slower*
disk/partfs /n/usb/sdU0.0
cd /dev/sdXX
disk/fdisk -p data > ctl
disk/prep -p plan9 > ctl

#alternatively to partfs
#with fs
{
    echo disk sdXX 512 /n/usb/sdU0.0/data
   disk/fdisk -p /n/usb/sdU0.0/data
   disk/prep -p /n/sdXX/plan9

} > /dev/fs/ctl


G.

--
- curiosity sKilled the cat



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] usb/disk nvram and pxeload
  2011-02-27  0:38 [9fans] usb/disk nvram and pxeload Skip Tavakkolian
  2011-02-27  2:07 ` Gorka Guardiola
@ 2011-02-27  2:21 ` ron minnich
  2011-02-27  2:41 ` Gorka Guardiola
  2 siblings, 0 replies; 7+ messages in thread
From: ron minnich @ 2011-02-27  2:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sat, Feb 26, 2011 at 4:38 PM, Skip Tavakkolian
<skip.tavakkolian@gmail.com> wrote:
> if i pxeload a cpu and want to be able to use an nvram partition on a
> usb disk (i.e. nvram=/dev/sdXX/nvram - once it is partitioned &
> formated). it seems i also must change boot/boot.c to add the 'partfs
> && fdisk -p && prep -p' after usbd has started. is this correct?
>
>

When it gets this complicated I much prefer a pcfs kernel. That lets
me run a full up script. I have even adapted pcfs for arm so I can
have usb disk root.

I can find that script but maybe this is enough to get you going.

ron



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] usb/disk nvram and pxeload
  2011-02-27  0:38 [9fans] usb/disk nvram and pxeload Skip Tavakkolian
  2011-02-27  2:07 ` Gorka Guardiola
  2011-02-27  2:21 ` ron minnich
@ 2011-02-27  2:41 ` Gorka Guardiola
  2011-02-27  4:15   ` Skip Tavakkolian
  2 siblings, 1 reply; 7+ messages in thread
From: Gorka Guardiola @ 2011-02-27  2:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sun, Feb 27, 2011 at 1:38 AM, Skip Tavakkolian
<skip.tavakkolian@gmail.com> wrote:
> if i pxeload a cpu and want to be able to use an nvram partition on a
> usb disk (i.e. nvram=/dev/sdXX/nvram - once it is partitioned &
> formated). it seems i also must change boot/boot.c to add the 'partfs
> && fdisk -p && prep -p' after usbd has started. is this correct?
>
>

On second thought, if you are only going to use it for nvram,
you can cook something fast with bind slashn and aux/stub
using the whole usb disk data file.

--
- curiosity sKilled the cat



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] usb/disk nvram and pxeload
  2011-02-27  2:41 ` Gorka Guardiola
@ 2011-02-27  4:15   ` Skip Tavakkolian
  2011-02-27  8:51     ` Gorka Guardiola
  0 siblings, 1 reply; 7+ messages in thread
From: Skip Tavakkolian @ 2011-02-27  4:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

That was the approach i was taking when ... ( i only need 512 bytes
after MBR, what could possibly go wrong?!) I destroyed some
memorabilia on that flash. Oh well; no big loss.

for some reason setting nvram='#u/usb/ep6.0/data" nvroff=513 (is it 0
or 1 origin?) nvrlen=512 didn't work. i guessed it might have been the
fact that usbd started usb/disk; i was getting device busy.

On Sat, Feb 26, 2011 at 6:41 PM, Gorka Guardiola <paurea@gmail.com> wrote:
> On Sun, Feb 27, 2011 at 1:38 AM, Skip Tavakkolian
> <skip.tavakkolian@gmail.com> wrote:
>> if i pxeload a cpu and want to be able to use an nvram partition on a
>> usb disk (i.e. nvram=/dev/sdXX/nvram - once it is partitioned &
>> formated). it seems i also must change boot/boot.c to add the 'partfs
>> && fdisk -p && prep -p' after usbd has started. is this correct?
>>
>>
>
> On second thought, if you are only going to use it for nvram,
> you can cook something fast with bind slashn and aux/stub
> using the whole usb disk data file.
>
> --
> - curiosity sKilled the cat
>
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] usb/disk nvram and pxeload
  2011-02-27  4:15   ` Skip Tavakkolian
@ 2011-02-27  8:51     ` Gorka Guardiola
  2011-02-27 16:49       ` Skip Tavakkolian
  0 siblings, 1 reply; 7+ messages in thread
From: Gorka Guardiola @ 2011-02-27  8:51 UTC (permalink / raw)
  To: Skip Tavakkolian; +Cc: Fans of the OS Plan 9 from Bell Labs

G.


On 27/02/2011, at 05:15, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:

> That was the approach i was taking when ... ( i only need 512 bytes
> after MBR, what could possibly go wrong?!) I destroyed some
> memorabilia on that flash. Oh well; no big loss.
>
> for some reason setting nvram='#u/usb/ep6.0/data" nvroff=513 (is it 0
> or 1 origin?) nvrlen=512 didn't work. i guessed it might have been the
> fact that usbd started usb/disk; i was getting device busy.

No, that is wrong. I meant the data file of the disk  That data (of
the endpoint) is a communication
channel of the endpoint. The you need to speak the protocol... Which
is what usb/disk does.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] usb/disk nvram and pxeload
  2011-02-27  8:51     ` Gorka Guardiola
@ 2011-02-27 16:49       ` Skip Tavakkolian
  0 siblings, 0 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2011-02-27 16:49 UTC (permalink / raw)
  To: Gorka Guardiola; +Cc: Fans of the OS Plan 9 from Bell Labs

I see it now; thanks!

On Sun, Feb 27, 2011 at 12:51 AM, Gorka Guardiola <paurea@gmail.com> wrote:
> G.
>
>
> On 27/02/2011, at 05:15, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>
>> That was the approach i was taking when ... ( i only need 512 bytes
>> after MBR, what could possibly go wrong?!) I destroyed some
>> memorabilia on that flash. Oh well; no big loss.
>>
>> for some reason setting nvram='#u/usb/ep6.0/data" nvroff=513 (is it 0
>> or 1 origin?) nvrlen=512 didn't work. i guessed it might have been the
>> fact that usbd started usb/disk; i was getting device busy.
>
> No, that is wrong. I meant the data file of the disk  That data (of
> the endpoint) is a communication
> channel of the endpoint. The you need to speak the protocol... Which
> is what usb/disk does.
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-27 16:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-27  0:38 [9fans] usb/disk nvram and pxeload Skip Tavakkolian
2011-02-27  2:07 ` Gorka Guardiola
2011-02-27  2:21 ` ron minnich
2011-02-27  2:41 ` Gorka Guardiola
2011-02-27  4:15   ` Skip Tavakkolian
2011-02-27  8:51     ` Gorka Guardiola
2011-02-27 16:49       ` Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).