From owner-freebsd-sparc64@FreeBSD.ORG Mon Jul 14 11:07:06 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 2091D1065674 for ; Mon, 14 Jul 2008 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 14F158FC17 for ; Mon, 14 Jul 2008 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6EB750u014560 for ; Mon, 14 Jul 2008 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6EB759L014556 for freebsd-sparc64@FreeBSD.org; Mon, 14 Jul 2008 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Jul 2008 11:07:05 GMT Message-Id: <200807141107.m6EB759L014556@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-sparc64@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-sparc64@FreeBSD.org 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: Mon, 14 Jul 2008 11:07:06 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o sparc/71729 sparc64 printf in kernel thread causes panic on SPARC o sparc/80410 sparc64 [netgraph] netgraph is causing crash with mpd on sparc o sparc/80890 sparc64 [panic] kmem_malloc(73728): kmem_map too small running o sparc/95297 sparc64 vt100 term does not work in install o sparc/104428 sparc64 [nullfs] nullfs panics on E4500 (but not E420) o sparc/105048 sparc64 [trm] trm(4) panics on sparc64 f sparc/105607 sparc64 [modules] modules on sparc64 don't work with >= 4GB f sparc/106251 sparc64 [libmalloc] malloc fails > for large allocations s sparc/107087 sparc64 system is hinged during boot from CD o sparc/109908 sparc64 apache22 mod_perl issue on sparc64 o sparc/113556 sparc64 panic: trap: memory address not aligned; Rebooting... o sparc/118932 sparc64 7.0-BETA4/sparc-64 kernel panic in rip_output o sparc/119017 sparc64 7.0 Beta won't install on U60 s sparc/119239 sparc64 gdb coredumps on sparc64 o sparc/119244 sparc64 X11Forwarding to X11 server on sparc crashes Xorg 15 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- f sparc/105157 sparc64 No reply to ping on Sparc64 f sparc/108732 sparc64 ping(8) reports 14 digit time on sparc64 o sparc/119240 sparc64 top has WCPU over 100% on UP system 3 problems total. From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 17:19:46 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 E969610657C8 for ; Thu, 17 Jul 2008 17:19:46 +0000 (UTC) (envelope-from didrik@kth.se) Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by mx1.freebsd.org (Postfix) with ESMTP id A91AB8FC1D for ; Thu, 17 Jul 2008 17:19:46 +0000 (UTC) (envelope-from didrik@kth.se) Received: from localhost (localhost [127.0.0.1]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 5B9FB157012 for ; Thu, 17 Jul 2008 18:56:15 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([127.0.0.1]) by localhost (smtp-1.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id kYefiLasN0mS for ; Thu, 17 Jul 2008 18:56:12 +0200 (CEST) Received: from webmail.sys.kth.se (unknown [IPv6:2001:6b0:1:1300:214:38ff:fec5:5a2d]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 72235156FF2 for ; Thu, 17 Jul 2008 18:56:12 +0200 (CEST) Received: from 91.95.8.243 (SquirrelMail authenticated user didrik) by webmail.sys.kth.se with HTTP; Thu, 17 Jul 2008 18:56:12 +0200 (CEST) Message-ID: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> Date: Thu, 17 Jul 2008 18:56:12 +0200 (CEST) From: "Didrik Madheden" To: freebsd-sparc64@FreeBSD.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Subject: 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 17:19:47 -0000 I have a Sparc box that I use mainly as an FTP server. (SunBlad 100 if it makes a ny difference) What I want to do now is to move that disk to an x86 box. The disk is partitioned in the following way: A single big native partition, with a number of labels. (Or are disklabels the native partitioning on Sparc? I don't remember) Anyway, I have a couple of small labels for the usual system stuff and a big one for storage. What I want to do is wipe the system related labels and only keep the one used for storage. (And consequently do a fresh install on the PC) My concern however is that the Sun partitioning will be incompatible with PC partitioning. If so, can anyone give advice on how to move the disk to a PC? Since it's a big disk, I'd like to avoid mirroring it. /Didrik Madheden From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 17:52:35 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 0DB971065672 for ; Thu, 17 Jul 2008 17:52:35 +0000 (UTC) (envelope-from tnelson@fudnet.net) Received: from zmail.rockbochs.com (zmail.rockbochs.com [208.79.71.66]) by mx1.freebsd.org (Postfix) with ESMTP id A5CE28FC31 for ; Thu, 17 Jul 2008 17:52:33 +0000 (UTC) (envelope-from tnelson@fudnet.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.rockbochs.com (Postfix) with ESMTP id 3B20E367575 for ; Thu, 17 Jul 2008 12:29:41 -0500 (CDT) X-Virus-Scanned: amavisd-new at X-Spam-Flag: NO X-Spam-Score: -0.869 X-Spam-Level: X-Spam-Status: No, score=-0.869 tagged_above=-10 required=6.6 tests=[AWL=0.569, BAYES_00=-2.599, RCVD_IN_PBL=0.905, RDNS_DYNAMIC=0.1, SUBJECT_FUZZY_TION=0.156] Received: from zmail.rockbochs.com ([127.0.0.1]) by localhost (zmail.rockbochs.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MpA-ZdVZA1Oo for ; Thu, 17 Jul 2008 12:29:39 -0500 (CDT) Received: from zmail.fudnet.net (97-112-96-100.dlth.qwest.net [97.112.96.100]) by zmail.rockbochs.com (Postfix) with ESMTP id 4FCD3367574 for ; Thu, 17 Jul 2008 12:29:39 -0500 (CDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.fudnet.net (Postfix) with ESMTP id A9E6010AC1F0 for ; Thu, 17 Jul 2008 12:30:57 -0500 (CDT) X-Virus-Scanned: amavisd-new at Received: from zmail.fudnet.net ([127.0.0.1]) by localhost (zmail.fudnet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N-ZLOVfwE3Sp for ; Thu, 17 Jul 2008 12:30:57 -0500 (CDT) Received: from zmail.fudnet.net (zmail.fudnet.net [192.168.2.5]) by zmail.fudnet.net (Postfix) with ESMTP id 1B3C510AC1EF for ; Thu, 17 Jul 2008 12:30:57 -0500 (CDT) Date: Thu, 17 Jul 2008 12:30:56 -0500 (CDT) From: Tim Nelson To: freebsd-sparc64@FreeBSD.org Message-ID: <23079290.21216315856959.JavaMail.root@zmail.fudnet.net> In-Reply-To: <8599571.01216315819690.JavaMail.root@zmail.fudnet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.2.2] Cc: 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 17:52:35 -0000 IIRC... there are some oddities between the disk labels having to do with the big and little "endian-ness" (if that's a word?!?) on each of the architectures. I tried using a SPARC partitioned drive on an x86 machine a while back and never was able to access the data. Hopefully someone else has had a better experience with it... --Tim ----- Original Message ----- From: "Didrik Madheden" To: freebsd-sparc64@FreeBSD.org Sent: Thursday, July 17, 2008 11:56:12 AM GMT -06:00 US/Canada Central Subject: Sparc64 partitions compatible with PC? I have a Sparc box that I use mainly as an FTP server. (SunBlad 100 if it makes a ny difference) What I want to do now is to move that disk to an x86 box. The disk is partitioned in the following way: A single big native partition, with a number of labels. (Or are disklabels the native partitioning on Sparc? I don't remember) Anyway, I have a couple of small labels for the usual system stuff and a big one for storage. What I want to do is wipe the system related labels and only keep the one used for storage. (And consequently do a fresh install on the PC) My concern however is that the Sun partitioning will be incompatible with PC partitioning. If so, can anyone give advice on how to move the disk to a PC? Since it's a big disk, I'd like to avoid mirroring it. /Didrik Madheden _______________________________________________ freebsd-sparc64@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-sparc64 To unsubscribe, send any mail to "freebsd-sparc64-unsubscribe@freebsd.org" 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-- From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 19:35: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 82833106564A for ; Thu, 17 Jul 2008 19:35:33 +0000 (UTC) (envelope-from didrik@kth.se) Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by mx1.freebsd.org (Postfix) with ESMTP id 07DEF8FC17 for ; Thu, 17 Jul 2008 19:35:32 +0000 (UTC) (envelope-from didrik@kth.se) Received: from localhost (localhost [127.0.0.1]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 8193C14EAEA; Thu, 17 Jul 2008 21:35:01 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([127.0.0.1]) by localhost (smtp-2.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lKHpEoel606F; Thu, 17 Jul 2008 21:34:59 +0200 (CEST) Received: from webmail.sys.kth.se (unknown [IPv6:2001:6b0:1:1300:214:38ff:fec5:5a2d]) by smtp-2.sys.kth.se (Postfix) with ESMTP id A677414D7A7; Thu, 17 Jul 2008 21:34:57 +0200 (CEST) Received: from 91.95.8.243 (SquirrelMail authenticated user didrik) by webmail.sys.kth.se with HTTP; Thu, 17 Jul 2008 21:34:59 +0200 (CEST) Message-ID: <64373.91.95.8.243.1216323299.squirrel@webmail.sys.kth.se> In-Reply-To: References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> Date: Thu, 17 Jul 2008 21:34:59 +0200 (CEST) From: "Didrik Madheden" To: "Miles Nordin" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-sparc64@freebsd.org 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 19:35:33 -0000 A note to Tim: Endianness (Without the dash) is a word. ;) >>>>>> "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. ... > 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. Could it be that there's some sort of sector offset when reading the disk on the PC compared to when reading on the Sparc? Doesn't sound logical, but you never know? Reason I'm asking is because if possible I'd prefer making the backup on a PC, since I only have one Sparc installation, and it was a hell to get the install CD to boot correctly correctly. (As you might remember from about a year ago) If I'm not totally mistaken, the backup process is as easy cat /dev/ad0 > backupfile and then ^C when backupfile is big enough. Off-topic rant: But something I've been thinking about is that some people seems to prefer something like dd if=/dev/ad0 of=bakfile even for simple stream copying, when it could evidently be done just as easily with cat. Or am I missing something? > > 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. I did disklabel -e ad0 on the Sparc and got this: # size offset # ---------- ---------- a: 20972448 0 b: 2097648 41612 c: 54757584 0 d: 20972448 20806 e: 737378208 43693 Size in sector, Hmm... Do the values > > > 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. > From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 19:42:37 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 BBFC8106567E for ; Thu, 17 Jul 2008 19:42:37 +0000 (UTC) (envelope-from dwiest@vailsys.com) Received: from cprobd02.vailsys.com (cprobd02.vailsys.com [63.210.102.130]) by mx1.freebsd.org (Postfix) with ESMTP id 912918FC27 for ; Thu, 17 Jul 2008 19:42:37 +0000 (UTC) (envelope-from dwiest@vailsys.com) Received: from dpfuser01.vail (dpfuser01.vail [192.168.129.103]) by cprobd02.vailsys.com (Postfix) with ESMTP id 6B58FCE636 for ; Thu, 17 Jul 2008 14:23:47 -0500 (CDT) Received: from dfwdamian.vail (dfwdamian.vail [192.168.129.233]) by dpfuser01.vail (Postfix) with ESMTP id 4F8955CB0 for ; Thu, 17 Jul 2008 14:23:47 -0500 (CDT) Received: (from dwiest@localhost) by dfwdamian.vail (8.13.8/8.13.8/Submit) id m6HJNlMU011845 for freebsd-sparc64@freebsd.org; Thu, 17 Jul 2008 14:23:47 -0500 (CDT) (envelope-from dwiest@vailsys.com) X-Authentication-Warning: dfwdamian.vail: dwiest set sender to dwiest@vailsys.com using -f Date: Thu, 17 Jul 2008 14:23:47 -0500 From: Damian Wiest To: freebsd-sparc64@freebsd.org Message-ID: <20080717192347.GT63814@dfwdamian.vail> References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i 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 19:42:37 -0000 On Thu, Jul 17, 2008 at 02:32:28PM -0400, Miles Nordin wrote: [snip] > 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. I would be extremely careful when doing this with removable disks (ie. external USB drives) as I've had other systems wipe out my data/label when mounting such a drive. Some time ago I had a USB drive with just a BSD label and ufs filesystems; everything worked fine on my FreeBSD workstation. When I attempted to mount the thing on a box running OS X (Tiger) the system locked up. I moved the disk back to my workstation only to discover that the BSD label had been wiped out. Now, that's not FreeBSD's fault, but I'd be careful when moving such disks between systems. -Damian From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 20:17:08 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 A182F1065672 for ; Thu, 17 Jul 2008 20:17:08 +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 BFCFE8FC31 for ; Thu, 17 Jul 2008 20:17:07 +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 3E509A8069 for ; Thu, 17 Jul 2008 16:14:42 -0400 (EDT) Received: by castrovalva.Ivy.NET (Postfix, from userid 405) id E544012FD0D; Thu, 17 Jul 2008 16:17:05 -0400 (EDT) To: freebsd-sparc64@freebsd.org References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> <64373.91.95.8.243.1216323299.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_16:16:55_2008-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 17 Jul 2008 16:17:05 -0400 In-Reply-To: <64373.91.95.8.243.1216323299.squirrel@webmail.sys.kth.se> (Didrik Madheden's message of "Thu, 17 Jul 2008 21:34:59 +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 20:17:08 -0000 --pgp-sign-Multipart_Thu_Jul_17_16:16:55_2008-1 Content-Type: text/plain; charset=US-ASCII >>>>> "dm" == Didrik Madheden writes: dm> dd if=/dev/ad0 of=bakfile dd if=/dev/ad0 of=bakfile bs=512 count=$(( 2 * 1024 )) dd if=bakfile of=/dev/ad0 bs=512 conv=notrunc the 'notrunc' is unnecessary for a hard disk 'of' but makes the restore scheme work also if ad0 is an image of a disk as you'd use with vnd instead of a block device. dm> even for simple stream copying, I use dd from habit. For big copies on ATA disks, bs=$(( 56 * 1024 )) makes the copy go faster, so that is merit to 'dd'. For recovering bad disks, 'bs=512 conv=noerror,sync' allows replacing unreadable blocks with zeroes which cat cannot do. For properly working disks I think cat is likely to work fine but...ymmv. I'm not sure why dd is so habitual. For tape, in my experience with ancient DAT, you must always use dd because the ``files'' on tapes are not ordinary ordered-sequence-of-octets files. They have a block size recorded on the tape, and they can only be read with the same block size with which they were written. If you don't know at what block size the tape was written, it can actually be difficult to read the tape, though there is probably some trick to it. If the tape is written like this: tar cf - . | gzip > /dev/nrst0 you may never figure out how to read it because gzip will write blocks of various random sizes, so you need to: tar cf - . | gzip | dd of=/dev/nrst0 bs=5120 or let tar invoke gzip with the z flag which will do this implicitly IIRC. Disks can be read at a variety of block sizes, but depending on the driver some OS's may be more obstinate than others, so I think it might be best to always use dd, and use with a block size that's a multiple of 512 for disks and 2048 for CD's. If you want to use gzip, do it as so: dd if=/dev/ad0a bs= | gzip > file gunzip < file | dd of=/dev/ad0a bs= The last command, I don't fully understand its quirks. I've actually had problems with dd through ssh pipes saying things like gunzip < backup | ssh "dd of=/dev/ad0 bs=$(( 56 * 1024 ))" 2+520894 blocks input 520896+0 blocks output which means I think it may have written garbage all over ad0, by splitting the output stream into 56k chunks arbitrarily depending on how TCP broke up dd's reads of stdin. I would expect this problem to happen with conv=sync, but it might happen other times, depending on your dd version. I think QNX might have been involved which in my experience has a lot of bugs. I forget what I did to fix it. I remember trying things like: gunzip < backup | ssh "dd ibs=1000 obs=$(( 56 * 1024 )) | dd of=/dev/ad0 bs=$(( 56 * 1024 ))" but I don't know what finally got my disk properly restored, nor how much of the problem was my not understanding the ways of dd, how much was getting lucky using one OS improperly while another is less forgiving, and how much was QNX bugs. I was really impatient and didn't fully understand what was going on. If someone knows how to tell dd, ``please keep reading the input file until you get either a full obs block, or an EOF. Do not write anything to the output file until one of those two things, EITHER of those things, has happened,'' I would like to hear it. but in practice, stumbling along seems to work ok, for me, if I go back and check my work with md5sum or 'mount ...; pax -w /mnt > /dev/null' before deleting the backup file. HTH. :( --pgp-sign-Multipart_Thu_Jul_17_16:16:55_2008-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (NetBSD) iQCVAwUASH+owYnCBbTaW/4dAQJUXgP/arnOQvOYq2U+WZ+yrX9reL9ZfYGkLJYd UdtrtoQ0+5wmghjilqa7xeo2WYU5O8BJxmKPFSbbw4RCBV0zujN4ypnG8xbCFpRz AKCq9UeIalWXkHoybemYh26gVNwe6OtRq3m0wI6nWufXRUKOC5nL2Y83n7yOGq0w +chm6xuFQgA= =n5sM -----END PGP SIGNATURE----- --pgp-sign-Multipart_Thu_Jul_17_16:16:55_2008-1-- From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 17 20:45:24 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 39D97106564A for ; Thu, 17 Jul 2008 20:45:24 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout014.mac.com (asmtpout014.mac.com [17.148.16.89]) by mx1.freebsd.org (Postfix) with ESMTP id 1B4118FC1B for ; Thu, 17 Jul 2008 20:45:24 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp014.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0K4600JU44BJ9140@asmtp014.mac.com> for freebsd-sparc64@FreeBSD.org; Thu, 17 Jul 2008 13:45:20 -0700 (PDT) Sender: xcllnt@mac.com From: Marcel Moolenaar To: Didrik Madheden In-reply-to: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> X-Priority: 3 (Normal) References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> Message-id: <039F6F4D-3758-45A2-9D9C-02562F3EF27D@mac.com> Date: Thu, 17 Jul 2008 13:45:19 -0700 X-Mailer: Apple Mail (2.928.1) Cc: freebsd-sparc64@FreeBSD.org 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 20:45:24 -0000 On Jul 17, 2008, at 9:56 AM, Didrik Madheden wrote: > I have a Sparc box that I use mainly as an FTP server. (SunBlad 100 > if it > makes a ny difference) What I want to do now is to move that disk to > an > x86 box. > The disk is partitioned in the following way: A single big native > partition, with a number of labels. (Or are disklabels the native > partitioning on Sparc? I don't remember) > Anyway, I have a couple of small labels for the usual system stuff > and a > big one for storage. What I want to do is wipe the system related > labels > and only keep the one used for storage. (And consequently do a fresh > install on the PC) > My concern however is that the Sun partitioning will be incompatible > with > PC partitioning. If so, can anyone give advice on how to move the > disk to > a PC? > Since it's a big disk, I'd like to avoid mirroring it. FreeBSD 7-STABLE supports sparc64 labeling, aka vtoc8. This is done with gpart. You can build and load the geom_part_vtoc8 kernel module and it'll automatically detect the partitioning of the disk. You can use the gpart(8) tool to look at the partitioning and even relabel the disk. I don't know if UFS is going to give you problems with the endianness though... FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-sparc64@FreeBSD.ORG Fri Jul 18 21:34:36 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 2814E1065670 for ; Fri, 18 Jul 2008 21:34:36 +0000 (UTC) (envelope-from didrik@kth.se) Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by mx1.freebsd.org (Postfix) with ESMTP id A39B48FC1D for ; Fri, 18 Jul 2008 21:34:35 +0000 (UTC) (envelope-from didrik@kth.se) Received: from localhost (localhost [127.0.0.1]) by smtp-1.sys.kth.se (Postfix) with ESMTP id EFDFC234E95; Fri, 18 Jul 2008 23:34:03 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([127.0.0.1]) by localhost (smtp-1.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QJ6PLp8FHbdM; Fri, 18 Jul 2008 23:34:02 +0200 (CEST) Received: from webmail.sys.kth.se (unknown [IPv6:2001:6b0:1:1300:214:38ff:fec5:5a2d]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 61780234E8C; Fri, 18 Jul 2008 23:33:55 +0200 (CEST) Received: from 91.95.8.243 (SquirrelMail authenticated user didrik) by webmail.sys.kth.se with HTTP; Fri, 18 Jul 2008 23:34:02 +0200 (CEST) Message-ID: <49814.91.95.8.243.1216416842.squirrel@webmail.sys.kth.se> In-Reply-To: <64373.91.95.8.243.1216323299.squirrel@webmail.sys.kth.se> References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> <64373.91.95.8.243.1216323299.squirrel@webmail.sys.kth.se> Date: Fri, 18 Jul 2008 23:34:02 +0200 (CEST) From: "Didrik Madheden" To: "Didrik Madheden" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-sparc64@freebsd.org 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: Fri, 18 Jul 2008 21:34:36 -0000 I wish to apologoize for me previous mail. For some reason I pressed some key and managed to send it before I was done with it. Lousy custom university webmail. They're getting rid of it just now in favour for SquirrelMail... Not a day too early. Anuway... > I did disklabel -e ad0 on the Sparc and got this: > > # size offset > # ---------- ---------- > a: 20972448 0 > b: 2097648 41612 > c: 54757584 0 > d: 20972448 20806 > e: 737378208 43693 > This was the output disklabel -e ad0 (On the Sparc, running the existing installation of 6.2) This is where things are starting to get fishy... I noticed the file opened in vi, and to quit, I accidently did :wq instead of :q. The program then complained that the slices reached outside of the partition. (Or something to that effect; don't remember exactly now) Is that a warning sign? I also noticed there's a partition too much. From the sizes, I recognice a and d as my system partitions, b as my swap and e as my big storage drive. But what the heck is c? It's not the sume of the sizes of the other labels either. It just doesn't make sense from any angle. I guess I messed around in the label editor when oing the Sparc installation, but I don't see how I could've ended up with the final result as shown above. I'm currently in 7.0 installation mode on Mr Pee-C. What I've done so far is create a partition covering the whole disk. (DD mode, then no, which covered the same range as teh previously existing partition) I've tried recreating slices a, b, d and then pressing C to see what size the editor would suggest. What it suggested was 737380224, which is exactly 2016 blocks too long. So my dilemma now is this: Where does label really begin? *Is it perhaps so that the FreeBSD style partition used a little more overhead, so I should make the previos partitions 2016 blocks longer to compensate for the offset, and make the label the same length it used to be? *Or is it perhaps so that my PC thinks that the disk is 2 sectors/cylinders (Which unit?) well, 2 somethings longer than the Sparc, and that the spot i hit after creating the three other labels is in fact the right one. *Does it really matter? will FreeBSD perhaps compensate for the offset and still work? How fuzzy is it? And a question of importance! How to make sure the area I want to save doesn't get overwritten? I suppose T for toggle newfs=N will do the job, but I'm paranoid, so I want a second opinion. Anything more I need to do? >> 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. If I interpret this correctly: There's no good way to pop the disk into a box with an existing installation and type the magic command to mount blocks X to Y on the disk as an imaginary, ro file system? /Didrik Madheden From owner-freebsd-sparc64@FreeBSD.ORG Sat Jul 19 17:45:01 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 C3E951065671 for ; Sat, 19 Jul 2008 17:45:01 +0000 (UTC) (envelope-from didrik@kth.se) Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by mx1.freebsd.org (Postfix) with ESMTP id 3D0EA8FC1A for ; Sat, 19 Jul 2008 17:45:01 +0000 (UTC) (envelope-from didrik@kth.se) Received: from localhost (localhost [127.0.0.1]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 9987714DB04; Sat, 19 Jul 2008 19:44:29 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([127.0.0.1]) by localhost (smtp-2.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FCVVPQAGXRWS; Sat, 19 Jul 2008 19:44:25 +0200 (CEST) Received: from webmail.sys.kth.se (unknown [IPv6:2001:6b0:1:1300:214:38ff:fec5:5a2d]) by smtp-2.sys.kth.se (Postfix) with ESMTP id D335F14D7A7; Sat, 19 Jul 2008 19:44:19 +0200 (CEST) Received: from 91.95.8.243 (SquirrelMail authenticated user didrik) by webmail.sys.kth.se with HTTP; Sat, 19 Jul 2008 19:44:25 +0200 (CEST) Message-ID: <61163.91.95.8.243.1216489465.squirrel@webmail.sys.kth.se> In-Reply-To: <49814.91.95.8.243.1216416842.squirrel@webmail.sys.kth.se> References: <57797.91.95.8.243.1216313772.squirrel@webmail.sys.kth.se> <64373.91.95.8.243.1216323299.squirrel@webmail.sys.kth.se> <49814.91.95.8.243.1216416842.squirrel@webmail.sys.kth.se> Date: Sat, 19 Jul 2008 19:44:25 +0200 (CEST) From: "Didrik Madheden" To: "Didrik Madheden" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-sparc64@freebsd.org Subject: Sparc64 partitions compatible with PC? (Problem solved, sort of) 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: Sat, 19 Jul 2008 17:45:01 -0000 So, I might've reached a solution of sorts. I've swore and torn my hair while trying to get FBSD on the PC to detect my file system. So now I've reinstalled FBSD on the Sparc, where I entered the values from my text file, and instead of saying "Invalid parameter" or whatever it said before, it now started fsck_ffs which finished without errors, and my files seem to be intact, so everything is now fine and dandy. I think I've given up the idea of trying to reuse the same fs, so I'm now going to back up the data over FTP and create a whole new fs on the PC. Among the many things I've done the last 24 hours I've tried a demo version of some recovery software which asked me whether the partition I was looking for was from an x86 or Sparc installation, suggesting there might be differences, most probably endianness. So I guess that's the end of this problem. Oh, and thanks Miles for all the info, especially the response to my mini rant about dd. And all other people as well of course. Here's what I've learned today: (OpenBoot commands) nvalias cdrom /pci@1f,0/ide@cdrom@X,0:f nvramrc (Don't know if this one is actually needed) boot cdrom Where X=0 for pri master up to 3 for sec slave. I always had this idea that cdrom always pointed to an auto-detected cdrom drive. Even so I think the drive that came with my box is a bit shaky. /Didrik Madheden