Boot my plan9 today with my usb connected, it worked! Now i could access my files using my usb. on my system, if it can detect my usb during fresh boot why it can't detect while the system is already running? The introduction on operating system abstraction by Mr. Francisco Ballesteros is nice, very well explained that even a beginner like me could easily understand. thanks On 4/3/10, 9fans-request@9fans.net <9fans-request@9fans.net> wrote: > > Send 9fans mailing list submissions to > 9fans@9fans.net > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.9fans.net/listinfo/9fans > or, via email, send a message with subject or body 'help' to > 9fans-request@9fans.net > > You can reach the person managing the list at > 9fans-owner@9fans.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of 9fans digest..." > > > Today's Topics: > > 1. rc word splitting trouble (Ethan Grammatikidis) > 2. Re: rc word splitting trouble (erik quanstrom) > 3. Re: rc word splitting trouble (Ethan Grammatikidis) > 4. ktrans on p9p (Alex Lee) > 5. tinycore 9vx .tce on sources (ron minnich) > 6. Re: tinycore 9vx .tce on sources (EBo) > 7. Re: tinycore 9vx .tce on sources (Jack Johnson) > 8. cpuid (erik quanstrom) > 9. Re: using usb (ruel hernandez) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 3 Apr 2010 15:21:33 +0100 > From: Ethan Grammatikidis > Subject: [9fans] rc word splitting trouble > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> > Message-ID: <341DF8C2-A223-49A7-AA6C-65B7FB4C1CF5@fastmail.fm> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > I'm writing a little web server in rc. For the most part it's been > less trouble than setting up Apache to serve static files, but I've > run into an odd little problem where rc appears to be behaving > differently depending on whether it's run in a script or a terminal. > (Rc & 9term from p9p.) > > I'm testing with url: > http://analytical-reengineering.dre.am/one/two?three+four > > The script separates out the /one/two?three+four into a variable & > then splits that twice, first to get the 'file' part, which it does > correctly, then the arguments, which it has trouble with. You can see > the result at the url above. "three four" appear on 1 line where they > should be two. If I paste the same lines of code into a terminal, the > lines are split correctly: > > % fullloc = '/one/two?three+four' > % params = `{echo $fullloc | sed -e 's;.*\?;;' -e 's;\+; ;g'} > % for(param in $params) echo '
  • '$"param >
  • three >
  • four > > The 2nd and 3rd command lines are copied directly from the script, but > the script itself outputs the following: > >
  • three four > > The sed expressions appear to be working correctly, to my eyes, so I > don't understand what's going on. > > -- > Simplicity does not precede complexity, but follows it. -- Alan Perlis > > > > > ------------------------------ > > Message: 2 > Date: Sat, 3 Apr 2010 10:38:11 -0400 > From: erik quanstrom > Subject: Re: [9fans] rc word splitting trouble > To: 9fans@9fans.net > Message-ID: <79bfa351ebdb8906c17ec13976aa3e15@ladd.quanstro.net> > Content-Type: text/plain; charset="US-ASCII" > > > % fullloc = '/one/two?three+four' > > % params = `{echo $fullloc | sed -e 's;.*\?;;' -e 's;\+; ;g'} > > % for(param in $params) echo '
  • '$"param > >
  • three > >
  • four > > > > The 2nd and 3rd command lines are copied directly from the script, but > > the script itself outputs the following: > > > >
  • three four > > > > The sed expressions appear to be working correctly, to my eyes, so I > > don't understand what's going on. > > i suspect your ifs is set to something funky. > > inserting a "whatis params" in your script would be pretty > interesting. note that gnu sed will eat your regular expression > since you \? is their meta character. > > you can accomplish something that's equivalent in rc without > an explicit loop: > > echo '
  • ' ^ $params > > - erik > > > > ------------------------------ > > Message: 3 > Date: Sat, 3 Apr 2010 18:24:44 +0100 > From: Ethan Grammatikidis > Subject: Re: [9fans] rc word splitting trouble > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> > Message-ID: <11C11BC0-346A-4E77-9909-B87667FE6EF2@fastmail.fm> > Content-Type: text/plain; charset="us-ascii"; Format="flowed"; > DelSp="yes" > > > On 3 Apr 2010, at 15:38, erik quanstrom wrote: > > >> % fullloc = '/one/two?three+four' > >> % params = `{echo $fullloc | sed -e 's;.*\?;;' -e 's;\+; ;g'} > >> % for(param in $params) echo '
  • '$"param > >>
  • three > >>
  • four > >> > >> The 2nd and 3rd command lines are copied directly from the script, > >> but > >> the script itself outputs the following: > >> > >>
  • three four > >> > >> The sed expressions appear to be working correctly, to my eyes, so I > >> don't understand what's going on. > > > > i suspect your ifs is set to something funky. > > > > inserting a "whatis params" in your script would be pretty > > interesting. note that gnu sed will eat your regular expression > > since you \? is their meta character. > > sed is p9p sed, verified with which, but ty. > > You're right about ifs, "whatis ifs" showed it up. It is set to > newline-only for one line within the read loop, using the "var=foo > command" syntax, but "command" in this case is another assignment. > When I add a no-op command to the end (making it "assignment > assignment command") rc complains "params: not found" and fails to run > the loop properly. I don't know what kind of state the parser got into > to produce that error. > > Anyway, I've fixed it for now by re-setting ifs after the line in > question. > > I'm attaching the script; an embedded carriage-return makes a mess of > both pasting the line here and posting it in a pastebin. The problem > line is the first one in the while block. > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: web-script.rc > Type: application/octet-stream > Size: 1050 bytes > Desc: not available > URL: < > http://mail.9fans.net/private/9fans/attachments/20100403/bc5917ee/attachment-0001.obj > > > -------------- next part -------------- > > > > > > > > you can accomplish something that's equivalent in rc without > > an explicit loop: > > > > echo '
  • ' ^ $params > > Good to know. I haven't used it here because the for loop generates > nicer html from nicer source, if that makes sense. > > > > > - erik > > > > -- > Simplicity does not precede complexity, but follows it. -- Alan Perlis > > > ------------------------------ > > Message: 4 > Date: Sat, 03 Apr 2010 15:31:31 -0500 > From: Alex Lee > Subject: [9fans] ktrans on p9p > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> > Message-ID: <4BB7A5A3.4050402@fastmail.net> > Content-Type: text/plain; charset=UTF-8 > > Dear all, > > I've found ktrans to be extremely useful in 9vx (thanks, Kenji), and I'm > wondering now whether it would be possible to use it with plan9port (on > Linux). Mainly I would want this for acme -- would it make sense to > modify p9p acme to include ktrans within it? Or is there a better > approach? Any suggestions on how to go about this would be much > appreciated. > > Also, in case it is of use to anyone else, I modified ktrans to support > ancient/polytonic Greek, using betacode input: > http://bitbucket.org/alexlee/ktrans/ > And here is a ttf2subf'd version of DejaVu Sans, for better Greek glyph > coverage: > http://dl.dropbox.com/u/1734204/djsans.tar.gz > > Alex > > > > > ------------------------------ > > Message: 5 > Date: Sat, 3 Apr 2010 22:52:34 +0000 > From: ron minnich > Subject: [9fans] tinycore 9vx .tce on sources > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>, > ebo@sandien.com > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > --rw-r--r-- M 26 rminnich sys 8805 Apr 3 17:41 > /n/sources/contrib/rminnich/9vx.tce > > Note this is only the following: > -rwxr-xr-x root/root 61 2009-10-13 22:11:07 usr/local/bin/9vx > -rwxr-xr-x tc/staff 20 2009-10-14 03:38:18 usr/local/tce.flwm/9vx > -rw-r--r-- tc/staff 8580 2009-10-14 03:29:01 > usr/local/tce.icons/9ball.png > -rw-r--r-- tc/staff 48 2009-10-14 03:39:49 usr/local/tce.icons/9vx > -rw-r--r-- tc/staff 49 2009-10-14 03:31:19 usr/local/tce.menu/9vx > > If you drop this into the tce directory on tinycore, it will give you > the 9ball in the menu at the bottom and the flwm menu items on boot. > > The files look like this: > > tc@box:~$ cat usr/local/tce.menu/9vx > > 9vxr > > > tc@box:~$ cat usr/local/bin/9vx > #!/bin/sh > cd `cat /opt/.tce_dir`/../tc/plan9/9vx* > exec ./9vx > > tc@box:~$ ls -l usr/local/tce.flwm/9vx > -rwxr-xr-x 1 tc staff 20 Oct 14 03:38 > usr/local/tce.flwm/9vx > > tc@box:~$ cat usr/local/tce.flwm/9vx > #!/bin/sh > exec 9vxr > tc@box:~$ > > What's the 9vxr reference? Actually, I don't know. I have to go look! > > The 9ball.png is too small to look nice. However, we have a .svg > version of this now, see: http://swtch.com/~rsc/9ball.svg > > so you can make a bigger version. > > Obviously, this is incomplete. You need the root file system from 9vx. > The scripts are written so that if you put the 9vx-0.what into > > /tc/plan9/9vx-0.12 > > on the stick, all will work. You can use the tinycore scripts to build > a usb stick and then put these directories into place on it. > > Questions? Let me know. > > Thanks > > ron > > > > ------------------------------ > > Message: 6 > Date: Sat, 3 Apr 2010 17:21:03 MDT > From: "EBo" > Subject: Re: [9fans] tinycore 9vx .tce on sources > To: "ron minnich" , "Fans of the OS Plan 9 from > Bell Labs" <9fans@9fans.net>, > Message-ID: > > > > --rw-r--r-- M 26 rminnich sys 8805 Apr 3 17:41 > > /n/sources/contrib/rminnich/9vx.tce > > Thanks, I've downloaded this and will play with it later... > > > Questions? Let me know. > > will do. > > > Thanks > > Thank you! > > Laters, > > EBo -- > > > > > ------------------------------ > > Message: 7 > Date: Sat, 3 Apr 2010 15:39:01 -0800 > From: Jack Johnson > Subject: Re: [9fans] tinycore 9vx .tce on sources > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > On Sat, Apr 3, 2010 at 2:52 PM, ron minnich wrote: > > > --rw-r--r-- M 26 rminnich sys 8805 Apr 3 17:41 > > /n/sources/contrib/rminnich/9vx.tce > > > > Wild. I've been screwing around with a tinycore terminal server in a couple > of VMs and I was planning on building a TCE for 9vx after this weekend's > Easter festivities. Thanks! > > Maybe I should procrastinate more often.... > > -Jack > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.9fans.net/private/9fans/attachments/20100403/cdb16da8/attachment-0001.htm > > > > ------------------------------ > > Message: 8 > Date: Sat, 3 Apr 2010 22:43:00 -0400 > From: erik quanstrom > Subject: [9fans] cpuid > To: 9fans@9fans.net > Message-ID: <6ab0de93bd25fe99ee0ef00e07cb7b25@ladd.quanstro.net> > Content-Type: text/plain; charset="US-ASCII" > > i updated aux/cpuid to allow one to specify a mach on > which to run cpuid. unfortunately, /proc/%d/ctl doesn't > really guarentee when target will be running on the > requested mach. as a defense, sleep(1) is called > after wiring, but i'm not convinced that sleep must always > sched and thus potentially could return still on the wrong > mach. and there is no way for a proc to request its current > mach number to verifiy that it has been wired. (unless you > count picking through the binary /proc/%d/proc structure, > which seems too messy to count.) > > perhaps this is all just paranoia, but in order to get /dev/reboot > working reliably (ie. in a loop for more than 10 minutes), > loops like this were required: > > for(;;){ > procwired(up, n); > sched(); > if(m->machno == n) > break; > } > > perhaps a call from user space solves all these problems, but > /dev/reboot is esentially a call from user space, so if it does, > why that could be is not currently clear to me. > > perhaps it would make sense to add /proc/%d/mach or even > /dev/machno or even /dev/wire which would be in a position > to guarentee wiring. > > - erik > > > > ------------------------------ > > Message: 9 > Date: Sun, 4 Apr 2010 04:41:59 +0000 > From: ruel hernandez > Subject: Re: [9fans] using usb > To: 9fans@9fans.net > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > I'm sorry about yesterday sir, I forgot to edit the subject, anyway. > when I run; > % cat /dev/usb/ctl > % ep1.0 enabled control rw speed full maxpkt 64 pollival 0 samplesz 0 hz > 0 hub 0 port 0 busy > roothub csp 0x000009 port 3 > ep2.0 enabled control rw speed full maxpkt 64 pollival 0 samplesz 0 > hz > 0 hub 0 port 0 busy > > this is the same output even the usb is unplugged. by the way i'm using a > 2gb sd here, connected to a card reader + 3 port usb hub connected to my > computer usb port 1. any way after that i made some experiment and here are > the result. > reboot using a usb keyboard: > cpu0: 2019 mhz genuine intel pentium IV/Xeon cpuid: ax 0x0f27 dx 0xbfebfbff > ELCR:0A20 > pci routing:ignoring south bridge pci 0.0.01039/0650 > #u/usb/ep1.0:ohci:port 0xE0000000 irq9 > #u/usb/ep2.0:ohci:port 0xE0001000 irq11 > 224 memory: 92 M kernel data,132M user,507Mswap > usbd... usb/kb... root is > from(tcp,local)[local!#S/sdC0/fossil]panic:ohci:full > packet but cbp != 0 > panic:ohci: full packet but cbp != 0 > dump stack disabled > cpu: exiting > > reboot using usb mouse: > ....same as above here. > usbd.../boot/usbd: /dev/usb/cp3.0: warning: device with short descriptor > > > > > > On 4/3/10, 9fans-request@9fans.net <9fans-request@9fans.net> wrote: > > > > Send 9fans mailing list submissions to > > 9fans@9fans.net > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://mail.9fans.net/listinfo/9fans > > or, via email, send a message with subject or body 'help' to > > 9fans-request@9fans.net > > > > You can reach the person managing the list at > > 9fans-owner@9fans.net > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of 9fans digest..." > > > > > > Today's Topics: > > > > 1. Re: 9fans Digest, Vol 72, Issue 4 (ruel hernandez) > > 2. Re: 9fans Digest, Vol 72, Issue 4 (Francisco J Ballesteros) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Sat, 3 Apr 2010 03:30:25 +0000 > > From: ruel hernandez > > Subject: Re: [9fans] 9fans Digest, Vol 72, Issue 4 > > To: 9fans@9fans.net > > Message-ID: > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > In my case, when i run; > > > > %usbfat: > > %no usb disk > > > > what could be the problem? > > as of now i'm reading the intro to operating sysrems abstraction by > > Francisco Ballesteros from linux then try out the programs there > > in plan9. > > > > > > On 4/2/10, 9fans-request@9fans.net <9fans-request@9fans.net> wrote: > > > > > > Send 9fans mailing list submissions to > > > 9fans@9fans.net > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > http://mail.9fans.net/listinfo/9fans > > > or, via email, send a message with subject or body 'help' to > > > 9fans-request@9fans.net > > > > > > You can reach the person managing the list at > > > 9fans-owner@9fans.net > > > > > > When replying, please edit your Subject line so it is more specific > > > than "Re: Contents of 9fans digest..." > > > > > > > > > Today's Topics: > > > > > > 1. Re: using usb (kokamoto@hera.eonet.ne.jp) > > > 2. Re: using usb (erik quanstrom) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Fri, 2 Apr 2010 19:49:32 +0900 > > > From: kokamoto@hera.eonet.ne.jp > > > Subject: Re: [9fans] using usb > > > To: 9fans@9fans.net > > > Message-ID: <397333a85c5603c75c523f7226746e9b@hera.eonet.ne.jp> > > > Content-Type: text/plain; charset="US-ASCII" > > > > > > This machine is in my business room, and I cannot touch it until next > > > monday. > > > > > > So I cannot report the info of seE0part of this machine now. > > > However, I'll retry what happened here. > > > > > > 1) replaced only /sys/src/boot/pc/sdiahci.c from the format CDROM > > > to your 9atom CDROM. > > > 2) It booted nicely, meaning no long wait to detect and fail CDROM > > > 3) system came up safely, and I can do anything, but only no > > > /dev/sdE0/other > > > directory. > > > 4) Then, I dispatched the disk/prep command interacyively. > > > 5) Yes, it reports the right partition table including 'other' > > > 6) then, I wrote the table to the disk. > > > 7) exit disk/prep > > > 8) Now, I see /dev/sdE0/other directory. > > > 9) therefore, ofcourse, I can mount that partion safely. > > > 10) however, after end the session, and rebooted the system again, > then, > > > /dev/sdE0/other disappeared again. > > > > > > This the precise story I experienced. > > > > > > Kenji > > > > > > PS. I can see the list only after next Monday night. > > > > > > > > > > > > > > > ------------------------------ > > > > > > Message: 2 > > > Date: Fri, 2 Apr 2010 06:56:27 -0400 > > > From: erik quanstrom > > > Subject: Re: [9fans] using usb > > > To: 9fans@9fans.net > > > Message-ID: <963ad4156c2cc7d24cee0a0143fda9b8@ladd.quanstro.net> > > > Content-Type: text/plain; charset="US-ASCII" > > > > > > > 1) replaced only /sys/src/boot/pc/sdiahci.c from the format CDROM > > > > to your 9atom CDROM. > > > > 2) It booted nicely, meaning no long wait to detect and fail CDROM > > > > 3) system came up safely, and I can do anything, but only no > > > /dev/sdE0/other > > > > directory. > > > > 4) Then, I dispatched the disk/prep command interacyively. > > > > 5) Yes, it reports the right partition table including 'other' > > > > 6) then, I wrote the table to the disk. > > > > 7) exit disk/prep > > > > 8) Now, I see /dev/sdE0/other directory. > > > > 9) therefore, ofcourse, I can mount that partion safely. > > > > 10) however, after end the session, and rebooted the system again, > > then, > > > > /dev/sdE0/other disappeared again. > > > > > > > > This the precise story I experienced. > > > > > > you need to run prep every time you boot. > > > > > > - erik > > > > > > > > > > > > End of 9fans Digest, Vol 72, Issue 4 > > > ************************************ > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mail.9fans.net/private/9fans/attachments/20100403/86d46727/attachment.html > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Sat, 3 Apr 2010 12:24:12 +0200 > > From: Francisco J Ballesteros > > Subject: Re: [9fans] 9fans Digest, Vol 72, Issue 4 > > To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> > > Message-ID: > > > > Content-Type: text/plain; charset=UTF-8 > > > > What's /dev/usb/ctl > > on your system after plugging your disk? > > That may give a clue. > > > > > > On Sat, Apr 3, 2010 at 5:30 AM, ruel hernandez wrote: > > > In my case, when i run; > > > > > > %usbfat: > > > %no usb disk > > > > > > what could be the problem? > > > as of now i'm reading the intro to operating sysrems abstraction by > > > Francisco Ballesteros from? linux then try? out the programs there > > > in plan9. > > > > > > > > > On 4/2/10, 9fans-request@9fans.net <9fans-request@9fans.net> wrote: > > >> > > >> Send 9fans mailing list submissions to > > >> ?????? 9fans@9fans.net > > >> > > >> To subscribe or unsubscribe via the World Wide Web, visit > > >> ?????? http://mail.9fans.net/listinfo/9fans > > >> or, via email, send a message with subject or body 'help' to > > >> ?????? 9fans-request@9fans.net > > >> > > >> You can reach the person managing the list at > > >> ?????? 9fans-owner@9fans.net > > >> > > >> When replying, please edit your Subject line so it is more specific > > >> than "Re: Contents of 9fans digest..." > > >> > > >> > > >> Today's Topics: > > >> > > >> ??1. Re: using usb (kokamoto@hera.eonet.ne.jp) > > >> ??2. Re: using usb (erik quanstrom) > > >> > > >> > > >> ---------------------------------------------------------------------- > > >> > > >> Message: 1 > > >> Date: Fri, 2 Apr 2010 19:49:32 +0900 > > >> From: kokamoto@hera.eonet.ne.jp > > >> Subject: Re: [9fans] using usb > > >> To: 9fans@9fans.net > > >> Message-ID: <397333a85c5603c75c523f7226746e9b@hera.eonet.ne.jp> > > >> Content-Type: text/plain; charset="US-ASCII" > > >> > > >> This machine is in my business room, and I cannot touch it until next > > >> monday. > > >> > > >> So I cannot report the info of seE0part of this machine now. > > >> However, I'll retry what happened here. > > >> > > >> 1) replaced only /sys/src/boot/pc/sdiahci.c from the format CDROM > > >> to your 9atom CDROM. > > >> 2) It booted nicely, meaning no long wait to detect and fail CDROM > > >> 3) system came up safely, and I can do anything, but only no > > >> /dev/sdE0/other > > >> directory. > > >> 4) Then, I dispatched the disk/prep command interacyively. > > >> 5) Yes, it reports the right partition table including 'other' > > >> 6) then, I wrote the table to the disk. > > >> 7) exit disk/prep > > >> 8) Now, I see /dev/sdE0/other directory. > > >> 9) therefore, ofcourse, I can mount that partion safely. > > >> 10) however, after end the session, and rebooted the system again, > then, > > >> /dev/sdE0/other disappeared again. > > >> > > >> This the precise story I experienced. > > >> > > >> Kenji > > >> > > >> PS. I can see the list only after next Monday night. > > >> > > >> > > >> > > >> > > >> ------------------------------ > > >> > > >> Message: 2 > > >> Date: Fri, 2 Apr 2010 06:56:27 -0400 > > >> From: erik quanstrom > > >> Subject: Re: [9fans] using usb > > >> To: 9fans@9fans.net > > >> Message-ID: <963ad4156c2cc7d24cee0a0143fda9b8@ladd.quanstro.net> > > >> Content-Type: text/plain; charset="US-ASCII" > > >> > > >> > 1) replaced only /sys/src/boot/pc/sdiahci.c from the format CDROM > > >> > to your 9atom CDROM. > > >> > 2) It booted nicely, meaning no long wait to detect and fail CDROM > > >> > 3) system came up safely, and I can do anything, but only no > > >> > /dev/sdE0/other > > >> > directory. > > >> > 4) Then, I dispatched the disk/prep command interacyively. > > >> > 5) Yes, it reports the right partition table including 'other' > > >> > 6) then, I wrote the table to the disk. > > >> > 7) exit disk/prep > > >> > 8) Now, I see /dev/sdE0/other directory. > > >> > 9) therefore, ofcourse, I can mount that partion safely. > > >> > 10) however, after end the session, and rebooted the system again, > > then, > > >> > /dev/sdE0/other disappeared again. > > >> > > > >> > This the precise story I experienced. > > >> > > >> you need to run prep every time you boot. > > >> > > >> - erik > > >> > > >> > > >> > > >> End of 9fans Digest, Vol 72, Issue 4 > > >> ************************************ > > > > > > > > > > > > > > End of 9fans Digest, Vol 72, Issue 5 > > ************************************ > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.9fans.net/private/9fans/attachments/20100404/c62e1dfa/attachment.htm > > > > End of 9fans Digest, Vol 72, Issue 6 > ************************************ >