>Number:         162503
>Category:       misc
>Synopsis:       makefs creates a bad image for UFS2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 12 17:40:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     subbsd
>Release:        9.0-RC2
>Organization:
>Environment:
>Description:
Looks like makefs(8) tools creates incorrect image with UFS2 file system.
UFS1 is ok, for example:

# makefs /tmp/test1.img /bin

# file -s /tmp/test1.img 
/tmp/test1.img: Unix Fast File system [v1] (little-endian), last mounted on , 
last written at Sat Nov 12 21:34:57 2011, clean flag 1, number of blocks 1296, 
number of data blocks 1255, number of cylinder groups 1, block size 8192, 
fragment size 1024, minimum percentage of free blocks 8, rotational delay 0ms, 
disk rotational speed 60rps, TIME optimization

All fine.
Try to use makefs for UFS2:

# makefs -t ffs -o version=2 -o label=ROOTFS /tmp/test1.img /bin

# file -s /tmp/test1.img
/tmp/test1.img: data

Try use mdconfig and newfs instead of makefs:
# truncate -s 100m /tmp/testme
# newfs -L ROOTFS `mdconfig -a -t vnode -f /tmp/testme`

# file -s /tmp/testme 
/tmp/testme: Unix Fast File system [v2] (little-endian) last mounted on , 
volume name ROOTFS, last written at Sat Nov 12 17:38:29 2011, clean flag 1, 
readonly flag 0, number of blocks 25600, number of data blocks 25095, number of 
cylinder groups 4, block size 32768, fragment size 4096, average file size 
16384, average number of files in dir 64, pending blocks to free 0, pending 
inodes to free 0, system-wide uuid 0, minimum percentage of free blocks 8, TIME 
optimization


All fine.

With this problem it is impossible to create UFS2 (which support LABEL) image 
which it is possible to use as mfsroot image at loading on UFS Label through

rootfs_type="mfs_root"
rootfs_name="/boot/mfsroot"
vfs.root.mountfrom="ufs:/dev/ufs/ROOTFS"


>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to