From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 18:32:33 2008 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E243B10656DF for ; Thu, 17 Jul 2008 18:32:33 +0000 (UTC) (envelope-from carton@Ivy.NET) Received: from sakima.Ivy.NET (sakima.Ivy.NET [IPv6:2610:1f8:dc:41:220:edff:fe27:e764]) by mx1.freebsd.org (Postfix) with ESMTP id 11BCA8FC08 for ; Thu, 17 Jul 2008 18:32:33 +0000 (UTC) (envelope-from carton@Ivy.NET) Received: from castrovalva.Ivy.NET (castrovalva.Ivy.NET [IPv6:2610:1f8:dc:c0::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sakima.Ivy.NET (Postfix) with ESMTP id 335B8A8069 for ; Thu, 17 Jul 2008 14:30:05 -0400 (EDT) Received: by castrovalva.Ivy.NET (Postfix, from userid 405) id 9EA0912FD0D; Thu, 17 Jul 2008 14:32:28 -0400 (EDT) To: freebsd-sparc64@freebsd.org References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> From: Miles Nordin MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Thu_Jul_17_14:32:18_2008-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 17 Jul 2008 14:32:28 -0400 In-Reply-To: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> (Didrik Madheden's message of "Thu, 17 Jul 2008 18:56:12 +0200 (CEST)") Message-ID: User-Agent: T-gnus/6.17.2 (based on No Gnus v0.2) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.4 (alpha--netbsd) MULE/5.0 (SAKAKI) Subject: Re: Sparc64 partitions compatible with PC? X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 18:32:34 -0000 --pgp-sign-Multipart_Thu_Jul_17_14:32:18_2008-1 Content-Type: text/plain; charset=US-ASCII >>>>> "dm" == Didrik Madheden writes: dm> I have a Sparc box that I use mainly as an FTP dm> server. (SunBlad 100 if it makes a ny difference) What I want dm> to do now is to move that disk to an x86 box. backup the disk label to a text file on the sparc box, and move it to the PeeCee OOB. then load the label onto the disk on the peecee. this writes to the disk, and may make it unreadable on both machines because it might go wrong, or general compatibility prudery and kludges on the peecee may eat up a larger fixed portion at the beginning of the disk making it impossible to line up the start of your first filesystem properly. It is possible to put plain BSD labels onto FreeBSD/i386 disks: pizarro:~$ uname -a FreeBSD pizarro 6.0-RELEASE FreeBSD 6.0-RELEASE #1: Tue Nov 8 20:23:54 UTC 2005 carton@cortez:/usr/src/sys/i386/compile/CORTEZ i386 pizarro:~$ df -k Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad4a 63214 34552 23606 59% / devfs 1 1 0 100% /dev /dev/ad4e 7615086 2864168 4141712 41% /usr devfs 1 1 0 100% /usr/var/chroot/named/dev see how my devices are ad4a instead of ad4s1a? The missing s1 means no MBR label. this is what you need to do, to make the SMD 'a' slice start in sector 0. (unless you were smart enough not to put your big FTP filesystem into the 'a' slice). The installer won't do this type of raw label, even if you set it to Dangerous Mode, so I expect FreeBSD to try to resist. I don't remember how I did it. definitely ``by hand'' and I remember some obstinance. maybe you should back up the first 1MB of the raw unpartitioned disk before you start. and for the love of god dont make any ``extended'' MBR partitions on the peecee because this scatters tiny labels all over the outer reaches of your disk, so the 1MB backup won't protect you. or, use Linux. it ``just works''. each labeling scheme is a ``kernel module''. You can build all the weird modules on Linux/i386, load them all, and read your Sun disklabel using the Sun disklabel Interpretation Kernel Module. It will print a vanity string in dmesg when it loads: Ability to Read Sun Disklabels translation module loaded. [(c) 1998 by darklightw4rriorz@pheerdoom.net] Then you can download some weird version of fdisk like sunfdisk2-ng or something, that's able to write Sun disklabels---this will let you edit the label on the disk, then call an ioctl to load the new label into the kernel. BSD has the foundations of a better architecture. there are ioctls in bsd to load the in-core disklabel without touching the on-disk label. There are userland programs to read bsd labels, bsd slices, smd labels, and mbr labels in BSD, which could be built on non-native architectures, to read the label and load it into the kernel without touching the disk. There is a whole geom framework for doing things more complicated than simple disklabels. but in my own experience, the right command line flags to do what you want just don't exist. --pgp-sign-Multipart_Thu_Jul_17_14:32:18_2008-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (NetBSD) iQCUAwUASH+QPInCBbTaW/4dAQIRDgP4uT5jmURpziCrDQ0+KHmxHzjWhODEeI3n dhSVDOX0sPqlKEwI87u7AuGxZOn3vPWlS/3oVFirKKbs8F97+m9yk+t+osUaKZcj sdqdFdbZYI9uZaE2jp6pHny+1qHamsXOx+bD05pKQwnDRhpBYv/i8QgeH7kPMCmN SksBkAZusg== =swvV -----END PGP SIGNATURE----- --pgp-sign-Multipart_Thu_Jul_17_14:32:18_2008-1--