Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jun 1997 15:26:46 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@FreeBSD.ORG, wosch@apfel.de
Cc:        joerg@FreeBSD.ORG
Subject:   Re: vnconfig and MSDOS FS
Message-ID:  <199706220526.PAA21334@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I made a backup of a MSDOS hard disk with dd(1) into 
>a single 425 MB large file. Now I want mount this file with vnconfig
>and mount_msdos, but it will not work:
>
># vnconfig -u /dev/vn0c
># vnconfig /dev/vn0c /usr/tmp/adk
># mount_msdos /dev/vn0c /mnt
>mount_msdos: /dev/vn0c: Invalid argument
>
>What's wrong? Does vnconfig not support MSDOS FS?

Hint: which slices are the DOS partition(s) on?  They probably aren't on
the whole disk slice.  You need to enable slices using `vnconfig ... -s
slices ...' (-s is documented only in the usage message and the slices
option isn't documented :-().

You shouldn't use /dev/vn0c, which is the the c partition for the first
FreeBSD slice, if slices are not enabled.   Use the whole disk device
/dev/vn0 if that is what you want.  /dev/vn0c happens to work because
of sloppy checking for aliases in the driver.  All minors for (non-raw)
vn0* devices are are aliases for each other.

For images on floppies, the problem is a litter harder to fix.  The MBR
overlaps the boot block and the boot block normally ends with 0xAA55
which is interpreted as a signature for a valid partition table.  You
have to either edit the boot block to destroy the signature or run
fdisk to fix the partition table.

I found some bugs in mkdosfs when I tested this on a floppy-sized file
system:

1) the file system is named msdos, but the program to create it is named
   mkdosfs.
2) mkdosfs doesn't clear all the directory entries.  For a 1200K file
   system, it writes malloced garbage to the last 7 sectors in the
   directory.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706220526.PAA21334>