Re: mount ffs partitions across endianess?

2017-08-11 Thread Theo de Raadt
> On Thu, Aug 10, 2017 at 11:42:46PM -0600, Theo de Raadt wrote:
> > No, OpenBSD does not have code to mount wrong-endian filesystems,
> > and to be frank ... not really that interested in having it either.
> > 
> > Same with disklabels.
> > 
> 
> I wasn't suggesting it is needed, nor need that myself either, so my
> mail was all about getting clue of reality above my vague memories,
> and to maybe get some discussion if "invalid argument." is enough of
> an error msg, when it seems it might possibly in some obscure case
> get further(? likely not), esp. if there's no flag in disklabel telling
> it has wrong-endian?

the mount system call returns a documented errno, sorry if it is a big
vague.

I'm not sure what else you expect.



Re: mount ffs partitions across endianess?

2017-08-11 Thread Artturi Alm
On Thu, Aug 10, 2017 at 11:42:46PM -0600, Theo de Raadt wrote:
> No, OpenBSD does not have code to mount wrong-endian filesystems,
> and to be frank ... not really that interested in having it either.
> 
> Same with disklabels.
> 

I wasn't suggesting it is needed, nor need that myself either, so my
mail was all about getting clue of reality above my vague memories,
and to maybe get some discussion if "invalid argument." is enough of
an error msg, when it seems it might possibly in some obscure case
get further(? likely not), esp. if there's no flag in disklabel telling
it has wrong-endian?
the disklabel output on amd64 did look close enough on first quick look,
that i wasn't doubting myself hard enough to go for a read @/sys/.

luckily i have only one octeon, or i'd be troubled for the fact i have
only two kinds of usb sticks in use, and they all look alike, so it's
easy to mix them laying on the desk waiting for use.. well, that's my prob.
-Artturi



Re: mount ffs partitions across endianess?

2017-08-10 Thread Theo de Raadt
No, OpenBSD does not have code to mount wrong-endian filesystems,
and to be frank ... not really that interested in having it either.

Same with disklabels.



mount ffs partitions across endianess?

2017-08-10 Thread Artturi Alm
Hi,

kind of lost here, is this supposed to work? i vaguely remember having
installed OpenBSD/octeon on usb, which i later either mounted directly
for nfs to export, or mounted and copied the install to a dir shared by
nfs-server running on amd64.

now, i can't mount anything but the msdos partition on amd64, and i tried
scan_ffs on one instance i had ran for a while w/octeon, and it failed
somewhere after having found first partition w/read: invalid argument. iirc..

here is last try w/fresh install to a usb-stick i had zeroed first 512mb,
and ran latest snap bsd.rd install->reboot cycle normally w/the usual
-stalls- w/installing sets but nothing else obviously 'wrong'. the try
on amd64:

aalm@tfort:~ $ doas disklabel /dev/sd4c
# /dev/sd4c:
type: SCSI
disk: SCSI disk
label: DataTraveler 2.0
duid: 54965209b567db0b
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 1898
total sectors: 30497664
boundstart: 1073742080
boundend: 30497664
drivedata: 0 

16 partitions:
#size   offset  fstype [fsize bsize   cpg]
  a:   99299265600  4.2BSD   2048 16384  7726 
  b:  1535460  1058592swap
  c: 304976640  unused
  d:  1343008  2594080  4.2BSD   2048 16384 10450 
  e:  1946944  3937088  4.2BSD   2048 16384 12958 
  f:  2528992  5884032  4.2BSD   2048 16384 12958 
  g:  1460032  8413024  4.2BSD   2048 16384 11361 
  h:  4515008  9873056  4.2BSD   2048 16384 12958 
  i:65536   64   MSDOS
  j:  2371456 14388064  4.2BSD   2048 16384 12958 
  k:  6840096 16759520  4.2BSD   2048 16384 12958 
  l:  6897888 23599616  4.2BSD   2048 16384 12958 
aalm@tfort:~ $ doas mount 54965209b567db0b.a /mnt
mount_ffs: 54965209b567db0b.a on /mnt: Invalid argument
aalm@tfort:~ $ doas mount /dev/sd4k /mnt  
mount_ffs: /dev/sd4k on /mnt: Invalid argument
aalm@tfort:~ $ doas mount /dev/sd4l /mnt 
mount_ffs: /dev/sd4l on /mnt: Invalid argument
aalm@tfort:~ $ doas mount /dev/sd4j /mnt 
mount_ffs: /dev/sd4j on /mnt: Invalid argument
aalm@tfort:~ $ doas mount /dev/sd4d /mnt 
mount_ffs: /dev/sd4d on /mnt: Invalid argument
aalm@tfort:~ $ doas mount /dev/sd4f /mnt 
mount_ffs: /dev/sd4f on /mnt: Invalid argument
aalm@tfort:~ $ doas mount /dev/sd4i /mnt 
aalm@tfort:~ $ ls /mnt  
  
bsdbsd.rd
aalm@tfort:~ $ doas umount /mnt


after above i plugged the usb stick back into edgerouter lite and it
booted w/o problems. i need root on nfs, because dwc2debug w/root on
usb is useless due overlyverbose netbsd style debugprintfs :D

-Artturi