9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] I can't make sdloop(3) work
@ 2021-05-29 20:34 adr
  2021-05-30  5:17 ` [9front] " Anthony Martin
  2021-05-30  9:53 ` [9front] " Alex Musolino
  0 siblings, 2 replies; 9+ messages in thread
From: adr @ 2021-05-29 20:34 UTC (permalink / raw)
  To: 9front

First of all hi to everyone.
I can't manage to make sdloop(3) work, I had to use dd to extract the partition a wanted to read.

; echo config switch on spec l type loop//n/data/plan9/9front-8392.16c5ead832f2.pi3.img!1024 >/dev/sdctl
echo: write error: sd type not found

Is there something wrong with my invocation? I'm on a rpi4.

Regars,
adr.

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

* [9front] Re: I can't make sdloop(3) work
  2021-05-29 20:34 [9front] I can't make sdloop(3) work adr
@ 2021-05-30  5:17 ` Anthony Martin
  2021-05-30  9:53 ` [9front] " Alex Musolino
  1 sibling, 0 replies; 9+ messages in thread
From: Anthony Martin @ 2021-05-30  5:17 UTC (permalink / raw)
  To: 9front

adr@SDF.ORG once said:
> First of all hi to everyone.
> I can't manage to make sdloop(3) work, I had to use dd to extract the partition a wanted to read.
>
> ; echo config switch on spec l type loop//n/data/plan9/9front-8392.16c5ead832f2.pi3.img!1024 >/dev/sdctl
> echo: write error: sd type not found
>
> Is there something wrong with my invocation? I'm on a rpi4.

Do you have sdloop compiled into your kernel?
It looks like it's not included by default in
the 9pi4 kernel.

Cheers,
  Anthony

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

* Re: [9front] I can't make sdloop(3) work
  2021-05-29 20:34 [9front] I can't make sdloop(3) work adr
  2021-05-30  5:17 ` [9front] " Anthony Martin
@ 2021-05-30  9:53 ` Alex Musolino
  2021-05-30 22:30   ` adr
  1 sibling, 1 reply; 9+ messages in thread
From: Alex Musolino @ 2021-05-30  9:53 UTC (permalink / raw)
  To: 9front

Looks like you have to add sdloop to the misc section of
/sys/src/9/bcm64/pi4.  Then rebuild your kernel.


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

* Re: [9front] I can't make sdloop(3) work
  2021-05-30  9:53 ` [9front] " Alex Musolino
@ 2021-05-30 22:30   ` adr
  2021-05-31 11:18     ` cinap_lenrek
  0 siblings, 1 reply; 9+ messages in thread
From: adr @ 2021-05-30 22:30 UTC (permalink / raw)
  To: 9front

On Sun, May 30, 2021 at 07:23:58PM +0930, Alex Musolino wrote:
> Looks like you have to add sdloop to the misc section of
> /sys/src/9/bcm64/pi4.  Then rebuild your kernel.

Thanks!, it is working now, but partitions aren't shown:

; echo config switch on spec l type loop//n/data/plan9/9front-8392.16c5ead832f2.pi3.img!1024 >/dev/sdctl
; disk/fdisk /dev/sdl0/data
cylinder = 4128768 bytes
 * p1                    0 50         (50 cylinders, 196.87 MB) FAT32
   p2                   50 957        (907 cylinders, 3.48 GB) PLAN9
>>> q
; ls /dev/sdl0/
/dev/sdl0/ctl
/dev/sdl0/data
/dev/sdl0/raw

Am I missing something?

Regards.

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

* Re: [9front] I can't make sdloop(3) work
  2021-05-30 22:30   ` adr
@ 2021-05-31 11:18     ` cinap_lenrek
  2021-05-31 14:00       ` adr
  0 siblings, 1 reply; 9+ messages in thread
From: cinap_lenrek @ 2021-05-31 11:18 UTC (permalink / raw)
  To: 9front

> Thanks!, it is working now, but partitions aren't shown:
> Am I missing something?

adding the partitions is done by userspace. the kernel doesnt parse
partition tables:

diskparts /dev/sdl0

--
cinap

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

* Re: [9front] I can't make sdloop(3) work
  2021-05-31 11:18     ` cinap_lenrek
@ 2021-05-31 14:00       ` adr
  2021-06-01 13:06         ` cinap_lenrek
  0 siblings, 1 reply; 9+ messages in thread
From: adr @ 2021-05-31 14:00 UTC (permalink / raw)
  To: 9front

On Mon, May 31, 2021 at 01:18:01PM +0200, cinap_lenrek@felloff.net wrote:
> > Thanks!, it is working now, but partitions aren't shown:
> > Am I missing something?
> 
> adding the partitions is done by userspace. the kernel doesnt parse
> partition tables:
> 
> diskparts /dev/sdl0
> 
> --
> cinap

I see, I had the impression by sdloop(3) that the behavior will be the same
as when you attach a disk device. Knowing This command solved the issue of changing
the sd card, although I suppose this device should be treated as removable device.

Now, diskparts on a sdloop device doesn't configure the plan9 partitions:

; echo config switch on spec l type loop//n/data/plan9/9front-8392.16c5ead832f2.pi3.img!1024 >/dev/sdctl
; diskparts /dev/sdl0
; ls /dev/sdl0
/dev/sdl0/ctl
/dev/sdl0/data
/dev/sdl0/dos
/dev/sdl0/raw

Reading diskparts(8) I noticed partfs(8):

; disk/partfs /n/data/plan9/9front-8392.16c5ead832f2.pi3.img
; ls /dev/sdXX
/dev/sdXX/ctl
/dev/sdXX/data

In this case diskparts does what is expected:
; diskparts /dev/sdXX
; ls /dev/sdXX
/dev/sdXX/ctl
/dev/sdXX/data
/dev/sdXX/dos
/dev/sdXX/fs
/dev/sdXX/nvram
/dev/sdXX/plan9

Was sdloop written for something different I was supposing?
Now that I know of partfs, what is the common use of sdloop?

Last time I used Plan9 (9front) was almost a decade ago, sorry
for the mess.

Regards,
adr.

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

* Re: [9front] I can't make sdloop(3) work
  2021-05-31 14:00       ` adr
@ 2021-06-01 13:06         ` cinap_lenrek
  2021-06-02 15:58           ` adr
  0 siblings, 1 reply; 9+ messages in thread
From: cinap_lenrek @ 2021-06-01 13:06 UTC (permalink / raw)
  To: 9front

> Was sdloop written for something different I was supposing?
> Now that I know of partfs, what is the common use of sdloop?

I don't know. i have never used sdloop.

> I see, I had the impression by sdloop(3) that the behavior will be the same
> as when you attach a disk device. Knowing This command solved the issue of changing
> the sd card, although I suppose this device should be treated as removable device.

???? what is a removable device?

> Now, diskparts on a sdloop device doesn't configure the plan9 partitions:

> ; echo config switch on spec l type loop//n/data/plan9/9front-8392.16c5ead832f2.pi3.img!1024 >/dev/sdctl
> ; diskparts /dev/sdl0
> ; ls /dev/sdl0
> /dev/sdl0/ctl
> /dev/sdl0/data
> /dev/sdl0/dos
> /dev/sdl0/raw

could it be the 1k sector size you'r forcing? can you compare the size of the
dos partition? compare output of:

disk/fdisk -p /dev/sdl0/data

vs.

disk/fdisk -p /dev/sdXX/data

have you tried omiting the !1024? it should then default to 512 byte sectors.

--
cinap


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

* Re: [9front] I can't make sdloop(3) work
  2021-06-01 13:06         ` cinap_lenrek
@ 2021-06-02 15:58           ` adr
  2021-06-03  7:40             ` hiro
  0 siblings, 1 reply; 9+ messages in thread
From: adr @ 2021-06-02 15:58 UTC (permalink / raw)
  To: 9front

On Tue, Jun 01, 2021 at 03:06:24PM +0200, cinap_lenrek@felloff.net wrote:
> > Was sdloop written for something different I was supposing?
> > Now that I know of partfs, what is the common use of sdloop?
> 

Sorry, I thought that the context was sufficient. I mean removable
media, with the reader attached to the computer but the storage
not necessary present. If I change the sd card, the old partitions
are shown as present. This doesn't seams _to_me_ to be a good idea.
At least with diskparts now I can refresh them. Also I'm booting
from a usb drive but I have to insert a sd card to avoid the annoying
messages of emmc errors wich also slow down the boot process.

> have you tried omitting the !1024? it should then default to 512 byte sectors.

Yes, it was that, thanks.

The thing is that with sdloop been part of the sd driver partfs
looks _to_me_ redundant, that is why I was asking the
difference between them, curiosity of a newcomer.

Thanks again,
adr.

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

* Re: [9front] I can't make sdloop(3) work
  2021-06-02 15:58           ` adr
@ 2021-06-03  7:40             ` hiro
  0 siblings, 0 replies; 9+ messages in thread
From: hiro @ 2021-06-03  7:40 UTC (permalink / raw)
  To: 9front

do sd cards actually have 512 byte sectors ?

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

end of thread, other threads:[~2021-06-03  8:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29 20:34 [9front] I can't make sdloop(3) work adr
2021-05-30  5:17 ` [9front] " Anthony Martin
2021-05-30  9:53 ` [9front] " Alex Musolino
2021-05-30 22:30   ` adr
2021-05-31 11:18     ` cinap_lenrek
2021-05-31 14:00       ` adr
2021-06-01 13:06         ` cinap_lenrek
2021-06-02 15:58           ` adr
2021-06-03  7:40             ` hiro

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git