From owner-freebsd-questions@FreeBSD.ORG Fri Feb 8 13:53:45 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B409B92; Fri, 8 Feb 2013 13:53:45 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 682DA79E; Fri, 8 Feb 2013 13:53:45 +0000 (UTC) Received: from irix.bris.ac.uk ([137.222.10.39] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1U3oOE-0005bs-8U; Fri, 08 Feb 2013 13:53:44 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1U3oOD-0005lZ-M9; Fri, 08 Feb 2013 13:53:17 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6) with ESMTP id r18DrHkB035062; Fri, 8 Feb 2013 13:53:17 GMT (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6/Submit) id r18DrHRW035061; Fri, 8 Feb 2013 13:53:17 GMT (envelope-from mexas) Date: Fri, 8 Feb 2013 13:53:17 GMT From: Anton Shterenlikht Message-Id: <201302081353.r18DrHRW035061@mech-cluster241.men.bris.ac.uk> To: bonomi@mail.r-bonomi.com, freebsd-questions@freebsd.org, freebsd-sparc64@freebsd.org, mexas@bristol.ac.uk Subject: Re: mount: /dev/da0p1: Invalid argument In-Reply-To: <201302081322.r18DMgVi060782@mail.r-bonomi.com> X-Spam-Score: -3.4 X-Spam-Level: --- X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2013 13:53:45 -0000 From bonomi@mail.r-bonomi.com Fri Feb 8 13:27:49 2013 > From: Anton Shterenlikht > Subject: Re: mount: /dev/da0p1: Invalid argument > > From kostikbel@gmail.com Fri Feb 8 12:25:21 2013 > > On Fri, Feb 08, 2013 at 12:01:41PM +0000, Anton Shterenlikht wrote: > > I need to transfer some files from sparc64 -current > > box onto amd64 9.1-RELEASE laptop. > > The amd64 laptop has no network connection yet, > > so I'm trying to achive this with a USB flash drive.=20 > >=20 > > The problem is that I always end up with > >=20 > > # mount /dev/da0p1 /mnt/ > > mount: /dev/da0p1: Invalid argument > > #=20 > >=20 > > If I do newfs on the sparc64 box, then I can't > > mount it on the amd64 box, and vice versa. > >=20 > > I tried just "newfs /dev/da0", and using gpart, > > e.g.: > >=20 > > # gpart show /dev/da0 > > =3D> 34 4029373 da0 GPT (1.9G) > > 34 2048 1 freebsd-ufs (1.0M) > > 2082 4027325 - free - (1.9G) > >=20 > > # > >=20 > > and then "newfs /dev/da0p1", or similar, > > but no luck. > >=20 > > I tried sparc64 VTOC8 partition scheme too - no help. > >=20 > > I can mount the device and use it as expected, > > i.e. copy files to/from it on either box, but > > the other box doesn't seem to understand the file > > system. > >=20 > > I tried loading various modules in desperation, > > e.g. on the sparc64 side: > >=20 > > # kldstat=20 > > Id Refs Address Size Name > > 1 9 0xc0000000 a80e58 kernel > > 2 1 0x101bca000 104000 geom_part_mbr.ko > > 3 1 0x101cce000 110000 geom_label.ko > > 4 1 0x101dde000 108000 geom_part_gpt.ko > > #=20 > >=20 > > but still no use.=20 > >=20 > > Am I missing something simple? > > UFS on FreeBSD is not endian-agnostic. It uses the host byte order > for multibyte values. > > As result, you can share UFS volumes only between hosts with the same > endianess, like i386/amd64/ia64 little endian or sparc64/mips big endian. > AFAIK, NetBSD has such support. > > Wow... I didn't realise that. > I thought UFS (1 or 2) takes all care > of endian-ness. Do you mean that even > I had say a SCSI internal disk with UFS2, > I couldn't move it between a little and > a big endian freebsd boxes? > > So what is the advice for transferring data > via USB in such cases? Any other gpart partition > I could use? you could use zfs. easier is to use the media as src/dest for tar/gtar/bsdtar/etc. tar is endian-agnostic, although there may be endian-ness issues with binary data in files inside the tarball. Yes, tar works, e.g. on sparc64 side: # tar -cf - /home/mexas/ftree.gv | dd of=/dev/da0 tar: Removing leading '/' from member names 20+0 records in 20+0 records out 10240 bytes transferred in 0.214031 secs (47844 bytes/sec) # Then on amd64 side: #dd if=/dev/da0 | tar -xf - I've got my file. The only problem is that the last command never stopped. I had to terminate it with CTRL/C. Is that the right syntax at all? Thanks Anton