error when trying to mount ext2fs harddisk

2003-10-11 Thread Torben Brosten
Hi,

I'm trying to mount an ext2fs formatted harddisk on freebsd 4-8 stable, but am getting an error.

huey# mkdir /aduni
huey# mount_ext2fs -o rdonly /dev/ad1s1 /aduni
mount_ext2fs: /dev/ad1s1: Invalid argument
Same error when trying: mount -t ext2fs /dev/ad1s1 /aduni

The kernel DUEY has the 'option EXT2FS' compiled in it.
$ uname -a
FreeBSD huey.dekka.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Fri Oct 10 03:02:30 PDT 2003
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/DUEY  i386
huey# more /etc/fstab
# DeviceMountpoint  FStype  Options DumpPass#
/dev/ad0s1b noneswapsw  0   0
/dev/ad0s1a /   ufs rw  1   1
/dev/ad0s1e /area2  ufs rw  2   2
/dev/acd0c  /cdrom  cd9660  ro,noauto   0   0
/dev/acd1c  /cdrom1 cd9660  ro,noauto   0   0
proc/proc   procfs  rw  0   0
Here's the related boot messages.
huey# more /var/log/dmesg.today
...
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ad0: 19092MB WDC WD200EB-00BHF0 [38792/16/63] at ata0-master UDMA66
ad1: 76319MB WDC WD800BB-60CJA0 [155061/16/63] at ata0-slave UDMA66
acd0: CD-RW LITE-ON LTR-52246S at ata1-slave PIO4
Mounting root from ufs:/dev/ad0s1a
DEPENDENCY NOTE: portmap will be enabled to support NFS
swapon: adding /dev/ad0s1b as swap device
Automatic boot in progress...
/dev/ad0s1a: 
FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s1a: 
clean, 599013 free 
(31701 frags, 70914 blocks, 0.6% fragmentation)
/dev/ad0s1e: 
FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s1e: 
clean, 1488769 free 
(7137 frags, 185204 blocks, 0.2% fragmentation)
ext2fs: 
/dev/ad1s1a
: 
DEPENDENCY NOTE: portmap will be enabled to support NFS
Skipping disk checks ...
Doing initial network setup:
hostname
.

When I installed the system via /stand/sysinstall, I had changed the ext2fs 
partition's disktype
in an effort to get freebsd to mount the disk using menu driven process from these 
windows:
huey# /stand/sysinstall/

- custom	Begin a custom installation
- partition	Allocate disk space for FreeBSD
- selected drive 
  [ ]ad0
  [x]ad1 
Disk name: ad1
Disk Geometry: 9729 cyls/255 heads/63 sectors = 156296385 sectors (76316MB)

Offset| Size(ST)  | End| Name| PType  | Desc| Subtype  | Flags
0 | 63| 62 | -   | 6  | unused  | 0| 
63| 156296322 | 1566296384 | ad1s1   | 1  | ext2fs  | 131  | = 
156296385 | 5103  | 156301487  | -   | 6  | unused  | 0| 

One of the commands supported:   T = Change Type

What could be causing this problem. Hints, suggestions etc welcome!

Torben



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: error when trying to mount ext2fs harddisk, wrong magic nbr??

2003-10-11 Thread Torben Brosten
After rebooting, tried again:

huey# mount -t ext2fs /dev/ad1s1 /aduni
ext2fs: #ad/0x2000a: wrong magic number 0x8b6 (expected 0xef53)
ext2fs: /dev/ad1s1: Invalid argument


I'm trying to mount an ext2fs formatted harddisk on freebsd 4-8 stable, 
but am getting an error.

huey# mkdir /aduni
huey# mount_ext2fs -o rdonly /dev/ad1s1 /aduni
mount_ext2fs: /dev/ad1s1: Invalid argument
Same error when trying: mount -t ext2fs /dev/ad1s1 /aduni
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: error when trying to mount ext2fs harddisk, wrong magic nbr??

2003-10-11 Thread Torben Brosten
I'm trying to decipher the error message:

ext2fs: #ad/0x000a: wrong magic number 0x8b6 (expected 0xef53)

I've been reading

man magic
man file
but I have limited C experience. I see the references to ext2 in 
/usr/share/misc/magic, particularly:

0x43a  leshort  ^0x001 (mounted or unclean)

Since 0x8b6 is much greater than 0x43a, am I to conclude that the drive was 
umounted incorrectly? If so, is there a way to use 'file' or some other utility 
to edit the offending magic number to 0xef53?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: error when trying to mount ext2fs harddisk, wrong magic nbr??

2003-10-11 Thread Torben Brosten
After reading more man pages and the chapter Adding a Disk from UNIX System
Administration Handbook, 3rd ed. by Nemieth, Snyder, Seebass and Hein,  I 
realize that this ext2fs harddrive will best be fixed by putting back into a 
linux environment and proceeding with fdisk + fsck etc.

cheers

Torben Brosten wrote:
I'm trying to decipher the error message:

ext2fs: #ad/0x000a: wrong magic number 0x8b6 (expected 0xef53)

I've been reading

man magic
man file
but I have limited C experience. I see the references to ext2 in 
/usr/share/misc/magic, particularly:

 0x43a  leshort  ^0x001 (mounted or unclean)

Since 0x8b6 is much greater than 0x43a, am I to conclude that the drive 
was umounted incorrectly? If so, is there a way to use 'file' or some 
other utility to edit the offending magic number to 0xef53?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]