Problems with ext2fs mount. Was: FreeBSD 7 Install on an older
Mac Mini
Nathan Whitehorn
nwhitehorn at freebsd.org
Wed Feb 4 15:55:07 PST 2009
Colin Dick wrote:
> Hey all,
> I have successfully got my hosting server up and running. As Garance suggested once it was installed and you know how
> to boot by breaking into OFW and issuing the appropriate boot command, the rest runs just like the i386 FreeBSD system.
> I have upgraded my kernel, installed exim/vexim, mysql, apache, php, roundcube, bind and a few other ports with no
> issues at all. I have moved over my few domains from my i386 server and everything seems to be working just fine.
> Thanks to everyone who helped to get me going.
>
> Now I am having trouble with something else. I don't know/think this is PPC related, but more FreeBSD users.
> However, excuse my non-desire to signup to yet another mailing list in hopes someone here has run into this issue
> before... and who knows, maybe it *is* PPC specific? I couldn't find a suitable answer in Google.
>
> I had an ext2 disk in my i386 system and I want to mount it in FreeBSD-ppc. I have recompiled the kernel with:
>
> options EXT2FS
>
> I have loaded the ext2 disk into an external USB chassis and plugged it in:
>
> Feb 4 21:54:47 macmini kernel: umass0: <vendor 0x05e3 USB TO IDE, class 0/0, rev 2.00/0.33, addr 2> on uhub5
> Feb 4 21:54:47 macmini root: Unknown USB device: vendor 0x05e3 product 0x0702 bus uhub5
> Feb 4 21:54:47 macmini kernel: da0 at umass-sim0 bus 0 target 0 lun 0
> Feb 4 21:54:47 macmini kernel: da0: <Maxtor 6 Y160P0 0811> Fixed Direct Access SCSI-0 device
> Feb 4 21:54:47 macmini kernel: da0: 40.000MB/s transfers
> Feb 4 21:54:47 macmini kernel: da0: 156334MB (320173056 512 byte sectors: 255H 63S/T 19929C)
>
> I see /dev/da0 and /dev/da0s1 now exist. I have installed the sfdisk port and with "sfdisk /dev/da0" I see:
>
> Disk name: da0 FDISK Partition Editor
> DISK Geometry: 19929 cyls/255 heads/63 sectors = 320159385 sectors (156327MB)
>
> Offset Size(ST) End Name PType Desc Subtype Flags
> 0 63 62 - 12 unused 0
> 63 320159322 320159384 da0s1 13 unknown 0
> 320159385 13671 320173055 - 12 unused 0
>
>
> However, when I try to mount, I see:
>
> [root at macmini ~]# mount -t ext2fs /dev/da0s1 /mnt
> mount: /dev/da0s1 : Invalid argument
>
> In /var/log/messages, this appears:
>
> Feb 4 21:56:30 macmini kernel: ext2fs: da0s1: wrong magic number 0x53ef (expected 0xef53)
>
> Can someone explain what this means and how I can get the 'magic number' from 0x53ef to the expected 0xef53 which I
> hope will solve my problem. Thanks in advance.
>
The problem here is that x86 is little endian, and PowerPC is
big-endian, so the on-disk structures are all in the opposite byte order
(0x53ef to 0xef53, for instance), which will make the disk unreadable.
Transferring your files over the network or reformatting the disk as FAT
are probably your best options.
-Nathan
More information about the freebsd-ppc
mailing list