9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] naive 9vx/fossil question
@ 2008-07-02 17:28 lejatorn
  2008-07-02 17:49 ` David Leimbach
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: lejatorn @ 2008-07-02 17:28 UTC (permalink / raw)
  To: 9fans

Hello,

I have a plan9/linux dual boot on my machine. Is there any way I can
access (i.e: read and/or write) the fossil partition of my plan9
install from 9vx on linux?
Actually, is there any way at all I can access that partition from
linux?

I'm just looking for an easy way to transfer some of the conf files I
have on the native plan9 to the 9vx on linux. Of course I can boot
plan9 and mount one of my linux ext partitions and use it as a transfer
partition but that's not very convenient.

With 9vx I can now easily try some plan9-ish stuff without losing the
ability to ... listen to music on my computer. ☺ 
Yes, as silly as it sounds, it's actually a big win for me and I'm
really glad 9vx exists just for that. So, thanks a lot Russ.

Cheers,
Mathieu.




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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 17:28 [9fans] naive 9vx/fossil question lejatorn
@ 2008-07-02 17:49 ` David Leimbach
  2008-07-02 17:54 ` Anthony Martin
  2008-07-02 18:03 ` Russ Cox
  2 siblings, 0 replies; 10+ messages in thread
From: David Leimbach @ 2008-07-02 17:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]

9vx is capable of communication over a unix domain socket, so it should work
with p9p programs.

That said, you *should* be able to access resources from 9vx via any p9p
supported platform.

If you just want to transfer files, why not just use the #Z device in 9vx
though to mount the host system's FS?

Works great here.

"bind '#Z/host/system/path' somewhere/in/Plan9"

etc.

On Wed, Jul 2, 2008 at 10:28 AM, <lejatorn@gmail.com> wrote:

> Hello,
>
> I have a plan9/linux dual boot on my machine. Is there any way I can
> access (i.e: read and/or write) the fossil partition of my plan9
> install from 9vx on linux?
> Actually, is there any way at all I can access that partition from
> linux?
>
> I'm just looking for an easy way to transfer some of the conf files I
> have on the native plan9 to the 9vx on linux. Of course I can boot
> plan9 and mount one of my linux ext partitions and use it as a transfer
> partition but that's not very convenient.
>
> With 9vx I can now easily try some plan9-ish stuff without losing the
> ability to ... listen to music on my computer. ☺
> Yes, as silly as it sounds, it's actually a big win for me and I'm
> really glad 9vx exists just for that. So, thanks a lot Russ.
>
> Cheers,
> Mathieu.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1577 bytes --]

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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 17:28 [9fans] naive 9vx/fossil question lejatorn
  2008-07-02 17:49 ` David Leimbach
@ 2008-07-02 17:54 ` Anthony Martin
  2008-07-02 18:03 ` Russ Cox
  2 siblings, 0 replies; 10+ messages in thread
From: Anthony Martin @ 2008-07-02 17:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I have a plan9/linux dual boot on my machine. Is there any way I can
> access (i.e: read and/or write) the fossil partition of my plan9
> install from 9vx on linux?
> Actually, is there any way at all I can access that partition from
> linux?

Russ added a loopback device to devsd a couple days ago. There
was a mail about it in the original 9vx thread.

Here's how you would use it, assuming your Plan 9 partition
shows up as /dev/sda in Linux:

term% bind '#Z' /n/unix
term% echo loop rw /n/unix/dev/sda >/dev/sdctl
term% disk/fdisk -p /dev/sd00/data >/dev/sd00/ctl
term% disk/prep -p /dev/sd00/plan9 >/dev/sd00/ctl

Then start your fossil with /dev/sd00.

	Anthony



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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 17:28 [9fans] naive 9vx/fossil question lejatorn
  2008-07-02 17:49 ` David Leimbach
  2008-07-02 17:54 ` Anthony Martin
@ 2008-07-02 18:03 ` Russ Cox
  2008-07-02 22:35   ` lejatorn
  2 siblings, 1 reply; 10+ messages in thread
From: Russ Cox @ 2008-07-02 18:03 UTC (permalink / raw)
  To: 9fans

>  have a plan9/linux dual boot on my machine. Is there any way I can
> access (i.e: read and/or write) the fossil partition of my plan9
> install from 9vx on linux?
> Actually, is there any way at all I can access that partition from
> linux?

You should be able to start fossil from inside 9vx,
though you will have to copy in some disk-related
binaries from a Plan 9 install CD, since I threw out a lot
of stuff to make the 9vx tree small (see next mail).

Then you should be able to do

	echo loop rw '#Z/dev/sda' > /dev/sdctl
	disk/fdisk -p /dev/sd00/data >/dev/sd00/ctl
	disk/prep -p /dev/sd00/plan9 >/dev/sd00/ctl
	ls -l /dev/sd00/ctl

You should see your fossil partition there.
Then you can start fossil manually:

	fossil/fossil -f /dev/sd00/fossil -c 'srv -A fossil' -c 'srv -p fscons'
	mount /srv/fossil /n/fossil

I haven't tried this, but it, or something like it, should work.
Also you might need to replace /dev/sda with whatever
Linux calls the appropriate hard disk.

One could also build a 9vx binary that included the things
a typical pcf kernel does and set up #S with the local disks
automatically, so that you could run "9vx -b" and tell it
you wanted to boot from local!#S/sd00/fossil.
There are lots of possibilities, and I hope some people
will explore in those dirctions and tell us what they find!

Russ



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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 18:03 ` Russ Cox
@ 2008-07-02 22:35   ` lejatorn
  2008-07-02 23:06     ` lejatorn
  0 siblings, 1 reply; 10+ messages in thread
From: lejatorn @ 2008-07-02 22:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, Jul 02, 2008 at 02:03:40PM -0400, Russ Cox wrote:
> >  have a plan9/linux dual boot on my machine. Is there any way I can
> > access (i.e: read and/or write) the fossil partition of my plan9
> > install from 9vx on linux?
> > Actually, is there any way at all I can access that partition from
> > linux?
>
> You should be able to start fossil from inside 9vx,
> though you will have to copy in some disk-related
> binaries from a Plan 9 install CD, since I threw out a lot
> of stuff to make the 9vx tree small (see next mail).
>
> Then you should be able to do
>
> 	echo loop rw '#Z/dev/sda' > /dev/sdctl
> 	disk/fdisk -p /dev/sd00/data >/dev/sd00/ctl
> 	disk/prep -p /dev/sd00/plan9 >/dev/sd00/ctl
> 	ls -l /dev/sd00/ctl

All of those worked fine as far as I can tell:
term% ls -l /dev/sd00
--rw-r----- S 0 glenda glenda   104857600 Jul  1 11:42 /dev/sd00/9fat
--rw-r----- S 0 glenda glenda           0 Jul  1 11:42 /dev/sd00/ctl
--rw-r----- S 0 glenda glenda 69379563520 Jul  1 11:42 /dev/sd00/fossil
...


> You should see your fossil partition there.
> Then you can start fossil manually:
>
> 	fossil/fossil -f /dev/sd00/fossil -c 'srv -A fossil' -c 'srv -p fscons'

but that one failed:
term% fossil/fossil -f /dev/sd00/fossil -c 'srv -A fossil' -c 'srv -p
fscons'
fossil/fossil: bad config magic in /dev/sd00/fossil

then I wanted to check for something suspicious in my config:
term% fossil/conf /dev/sd00/fossil
config has bad header

Is that bad?

Gonna reboot to the native plan9 in the meanwhile to check if
everything's ok...

Mathieu.




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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 22:35   ` lejatorn
@ 2008-07-02 23:06     ` lejatorn
  2008-07-02 23:12       ` erik quanstrom
  0 siblings, 1 reply; 10+ messages in thread
From: lejatorn @ 2008-07-02 23:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Jul 03, 2008 at 12:35:19AM +0200, lejatorn@gmail.com wrote:
> On Wed, Jul 02, 2008 at 02:03:40PM -0400, Russ Cox wrote:
> > >  have a plan9/linux dual boot on my machine. Is there any way I can
> > > access (i.e: read and/or write) the fossil partition of my plan9
> > > install from 9vx on linux?
> > > Actually, is there any way at all I can access that partition from
> > > linux?
> >
> > You should be able to start fossil from inside 9vx,
> > though you will have to copy in some disk-related
> > binaries from a Plan 9 install CD, since I threw out a lot
> > of stuff to make the 9vx tree small (see next mail).
> >
> > Then you should be able to do
> >
> > 	echo loop rw '#Z/dev/sda' > /dev/sdctl
> > 	disk/fdisk -p /dev/sd00/data >/dev/sd00/ctl
> > 	disk/prep -p /dev/sd00/plan9 >/dev/sd00/ctl
> > 	ls -l /dev/sd00/ctl
>
> All of those worked fine as far as I can tell:
> term% ls -l /dev/sd00
> --rw-r----- S 0 glenda glenda   104857600 Jul  1 11:42 /dev/sd00/9fat
> --rw-r----- S 0 glenda glenda           0 Jul  1 11:42 /dev/sd00/ctl
> --rw-r----- S 0 glenda glenda 69379563520 Jul  1 11:42 /dev/sd00/fossil
> ...
>
>
> > You should see your fossil partition there.
> > Then you can start fossil manually:
> >
> > 	fossil/fossil -f /dev/sd00/fossil -c 'srv -A fossil' -c 'srv -p fscons'
>
> but that one failed:
> term% fossil/fossil -f /dev/sd00/fossil -c 'srv -A fossil' -c 'srv -p
> fscons'
> fossil/fossil: bad config magic in /dev/sd00/fossil
>
> then I wanted to check for something suspicious in my config:
> term% fossil/conf /dev/sd00/fossil
> config has bad header
>
> Is that bad?
>
> Gonna reboot to the native plan9 in the meanwhile to check if
> everything's ok...

Native plan9 still booting fine, and here's the configuration for
/dev/sdE0/fossil if it's of any relevance:
fsys main config /dev/sdE0/fossil
fsys main open -V -c 3000

Also, so far only /dev/sda was rw for disk group so I've set /dev/sda1
(which is the whole plan9 partition) to rw as well for disk group, to
no avail.

Mathieu.




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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 23:06     ` lejatorn
@ 2008-07-02 23:12       ` erik quanstrom
  2008-07-03  8:49         ` lejatorn
  0 siblings, 1 reply; 10+ messages in thread
From: erik quanstrom @ 2008-07-02 23:12 UTC (permalink / raw)
  To: 9fans

> Native plan9 still booting fine, and here's the configuration for
> /dev/sdE0/fossil if it's of any relevance:
> fsys main config /dev/sdE0/fossil
> fsys main open -V -c 3000
>
> Also, so far only /dev/sda was rw for disk group so I've set /dev/sda1
> (which is the whole plan9 partition) to rw as well for disk group, to
> no avail.

almost sounds like an offset problem.  do the partition
definitions (cat /dev/sd??/ctl) differ between plan 9 native
and 9vx?

- erik




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

* Re: [9fans] naive 9vx/fossil question
  2008-07-02 23:12       ` erik quanstrom
@ 2008-07-03  8:49         ` lejatorn
  2008-07-03 11:06           ` Russ Cox
  0 siblings, 1 reply; 10+ messages in thread
From: lejatorn @ 2008-07-03  8:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, Jul 02, 2008 at 07:12:56PM -0400, erik quanstrom wrote:
> > Native plan9 still booting fine, and here's the configuration for
> > /dev/sdE0/fossil if it's of any relevance:
> > fsys main config /dev/sdE0/fossil
> > fsys main open -V -c 3000
> >
> > Also, so far only /dev/sda was rw for disk group so I've set /dev/sda1
> > (which is the whole plan9 partition) to rw as well for disk group, to
> > no avail.
>
> almost sounds like an offset problem.  do the partition
> definitions (cat /dev/sd??/ctl) differ between plan 9 native
> and 9vx?

aha, thanks Erik; those definitions indeed differ:

from plan9:
inquiry HITACHI HTS541616J9SA00
model	HITACHI HTS541616J9SA00
serial	SB2441GB2441GJJG4K3E
firm	SB4IC7UP
smart	disabled
flag	llba smart power nop
reg	task 50 cmd c017 serr 0  ci 0 is 0; sig 101 sstatus 0113
geometry 312581808 512
part data 0 312581808
part plan9 63 136760400
part 9fat 63 204863
part nvram 204863 204864
part fossil 204864 135711824
part swap 135711824 136760400
part linux 136760400 138756240
part linux1 138756240 148523760
part linux2 148523823 287189280
part linux3 287189343 291090240
part linux4 291090303 310625280
part linux5 310625343 312575760

from 9vx:
loop rw #Z/dev/sda
part plan9 63 136760400
part linux 136760400 138756240
part linux1 138756240 148523760
part linux2 148523823 287189280
part linux3 287189343 291090240
part linux4 291090303 310625280
part linux5 310625343 312575760
part 9fat 0 204800
part nvram 204800 204801
part fossil 204801 135711761
part swap 135711761 136760337

The "global" plan9 one (sda1) seem to be the same in both cases, as well
as the other sda* ones (linux), but the subpartitions (not sure they're
called that way) inside differ.
I suppose the correct one is the plan9 one, i.e 9fat should start at the
beginning of the plan9 one (at 63), and not at 0, right? Hence the reason
why everything has an offset of 63 inside the plan9 part, I guess.

So, what should I do? Is it a bug in 9vx, or is it something wrong in my
partitions that I have to correct?

Mathieu.




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

* Re: [9fans] naive 9vx/fossil question
  2008-07-03  8:49         ` lejatorn
@ 2008-07-03 11:06           ` Russ Cox
  2008-07-03 15:34             ` lejatorn
  0 siblings, 1 reply; 10+ messages in thread
From: Russ Cox @ 2008-07-03 11:06 UTC (permalink / raw)
  To: 9fans

> The "global" plan9 one (sda1) seem to be the same in both cases, as well
> as the other sda* ones (linux), but the subpartitions (not sure they're
> called that way) inside differ.
> I suppose the correct one is the plan9 one, i.e 9fat should start at the
> beginning of the plan9 one (at 63), and not at 0, right? Hence the reason
> why everything has an offset of 63 inside the plan9 part, I guess.
>
> So, what should I do? Is it a bug in 9vx, or is it something wrong in my
> partitions that I have to correct?

Notice that you've lost your data partition
and you don't have a geometry line.
That suggests you are running 0.12,
which does not contain Erik's bug fix.
If you rebuild 9vx from hg I think things will
work better.

Russ



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

* Re: [9fans] naive 9vx/fossil question
  2008-07-03 11:06           ` Russ Cox
@ 2008-07-03 15:34             ` lejatorn
  0 siblings, 0 replies; 10+ messages in thread
From: lejatorn @ 2008-07-03 15:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Jul 03, 2008 at 07:06:59AM -0400, Russ Cox wrote:
> > The "global" plan9 one (sda1) seem to be the same in both cases, as well
> > as the other sda* ones (linux), but the subpartitions (not sure they're
> > called that way) inside differ.
> > I suppose the correct one is the plan9 one, i.e 9fat should start at the
> > beginning of the plan9 one (at 63), and not at 0, right? Hence the reason
> > why everything has an offset of 63 inside the plan9 part, I guess.
> >
> > So, what should I do? Is it a bug in 9vx, or is it something wrong in my
> > partitions that I have to correct?
>
> Notice that you've lost your data partition
> and you don't have a geometry line.
> That suggests you are running 0.12,
> which does not contain Erik's bug fix.
> If you rebuild 9vx from hg I think things will
> work better.

Indeed, works like a charm with the build from hg. Thanks.

Mathieu.




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

end of thread, other threads:[~2008-07-03 15:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-02 17:28 [9fans] naive 9vx/fossil question lejatorn
2008-07-02 17:49 ` David Leimbach
2008-07-02 17:54 ` Anthony Martin
2008-07-02 18:03 ` Russ Cox
2008-07-02 22:35   ` lejatorn
2008-07-02 23:06     ` lejatorn
2008-07-02 23:12       ` erik quanstrom
2008-07-03  8:49         ` lejatorn
2008-07-03 11:06           ` Russ Cox
2008-07-03 15:34             ` lejatorn

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).