% disk/fdisk -baw /dev/sdU4.0/data
adding part failed: plan9: permission denied
?warning: partitions could not be updated in devsd
I get similar issues when trying to use prep. If I rerun
fdisk or prep it seems to read the previously configured
data back, and other systems (ie. winxp) see the partitions
I edited in plan9, but my /dev/sdU4.0 directory does not
get "plan9" or other partition files (just ctl, data, raw).
What gives?
Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
it occurred to me that I am using a slightly old dist and
usb has churned a bit, so I did a pull, then rebuilt my kernel,
installed it and rebooted using it.. and now it seems worse
- when I plug in device it no longer prints "usb/disk..."
or whatever it used to print
- when I mount /srv/usb I only see usbctl, no sd*
this is in vmware, so its possible vmware is acting up (it happens
at times)... is anyone else using thumb drives with current
plan9 sources successfully?
Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
Regarding the problem with current sources, it's weird.
What do you see in #u/usb/ctl when you plug your
disk into?
What does usbd say when you run it with debug enabled?
Is there any message in the console?
Do you get a timeout shortly after you plug the device in and usbd
shows it as detected? I use "usbdebug" in plan9.ini, so I may be
getting more diagnostics than you do, but this seems to be the general
effect from about a month ago, at least on the various bits of
hardware I have around here. I haven't tried VMware of late.
++L
if you can tell me an interval when
the thing broke for your devices I
can try to guess why and do
something.
> [/mail/box/nemo/msgs/200911/1515]
usb/disk should return "bad process or channel control request"
rather than "permission denied".
with contrib quanstro/sd, one can use sdloop(3).
there are two things i like about sdloop
it saves one round-trip to user space over partfs.
since it's just a driver, i'm pretty sure one could
just drop in in a standard kernel.
- erik
Hmm.. Here is what I would like to do. I would like to put
a FAT32 and a fossil (or kfs) filesystem on a usb flash drive
and use the FAT32 for botting and the fossil as my root
filesystem.
Lets say that the usb disk did support partitioning, or I used
the entire usb disk as a single filesystem, is there any
way to specify to mount /srv/usb's sdU4.0/data (or whatever name)
as root? Or would I have to hack a mount of /srv/usb into
/sys/src/9/boot and specify something like "local!/dev/sdU4.0/data"?
If I use something like partfs, I would have to hack this
into the /sys/src/9/boot stuff, right?
Is there any long term desire to allow booting off of USB drives?
Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
i haven't written a sdorion 9load driver, so i cheat in
a similar way. replace sda0 with the appropriate.
; cat `{pxeof chula} | grep 'part|loop'
sda0part=plan9 63 976752000/9fat 63 20543/nvram 20543 20544
loopdev=l!/usr/bootes/data!1024
- erik
I'm talking to nemo about what we should do to partition USB devices.
I'm not using 9load, anyway. This machine has OFW and I'm
using a small forth script in place of 9load.
> - erik
Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
the same cheat would work. the plan 9 kernel doesn't
partition disks. it parses the variables at CONFADDR
to find partitions. your forth script could just add
the appropriate configuration like 9load does.
- erik
fwiw, I'm using the attached patch to /sys/src/9/pc/boot
to mount my usb drive as root partition, now.
The rootspec I'm using is "local!/dev/sdXX/fossil".
It relies on adding yet more binaries to the ramdisk: partfs,
fdisk and prep. It calls partfs to get a partitionable device,
then runs fdisk and prep to read the existing partitions and
write them back, forcing partfs to see them. Finally I had
to patch the "local" connect method to not replace the
existing /dev, since thats where /dev/sdXX appears.
oh yah, my simple hack just guesses two possible locations
for the USB disk to appear...
Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
with my changes [1] to boot(8), you could just use !rc as the root and
you'd be dropped to rc(1) and could try your setup without having to
change the actual sources.
iru
[1] http://src.oitobits.net/9null
Erm, every USB thumb drive, SD card, or CF card I've used has had a
partition table. Memories of mounting the things under Windows are
too distant to be useful, but OS X not only expects a partition
table, I don't think it can 'prepare' a USB disk without one. Linux
automounters expect a partition table too, whether the kernel-based
automounter or whatever Gnome uses.
Am I off target by a country mile here?
usb/disk was intended, not "Usb disks". the filesystem usb/disk presents
does not do partitions. of course the disk drive itself doesn't know or care
it's been partitioned.
- erik
Regarding partitions, usb/disk does not know how to
handle partitions. And it's likely it will never do.
The plan is to use a different driver that knows how
to handle partitions and use that driver for everything.
But it's still ongoing.
> Ah, I wondered if it might be that, but I had to check. So, no fixing
> usb/disk?
>
>
>
i've been using the sdloop driver.
- erik
Ah, I wondered if it might be that, but I had to check. So, no fixing
usb/disk?
> usb/disk knows how to handle units.
> Some devices provide their units to handle parts.
>
> Regarding partitions, usb/disk does not know how to
> handle partitions. And it's likely it will never do.
> The plan is to use a different driver that knows how
> to handle partitions and use that driver for everything.
> But it's still ongoing.
ahh, ok, that makes sense.