Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Embedded image disk parameters

    Scheduled Pinned Locked Moved Development
    2 Posts 2 Posters 2.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MrMoo
      last edited by

      From the build_embedded.sh script

      
      # Attach the md device
      DEVICE=`mdconfig -a -t vnode -f ${IMGPATH}`
      
      cat > ${TMPFILE} <<eof<br>a:	*	0	4.2BSD	1024	8192	99
      c:	${SECTS}	0	unused	0	0
      d:	${CONFSIZE}	*	4.2BSD	1024	8192	99
      EOF</eof<br> 
      

      Is there a particular reason for choosing 1024 fragment size, 8192 block size, 99 blocks per cylinder?  It appears compact flash defaults to 512 fragment size, 4096 block size, and the largest possible blocks per cylinder, whilst the bsdlabel man page recommends 512, 4096, 16.

      I am not sure how to calculate the blocks per cylinder as my guess at disk size / block size / cylinders (256 for 128MB disk) seems to be significantly lower than those created by fdisk/bsdlabel defaults (20,000-25,000).

      With 512 fragment size $SECTS and $CONFSIZE have to be doubled.  A lower block size allegedly helps reduce used disk space on smaller partition sizes.

      I presume the ordering of partitions and using d: instead of b: for the configuration is because you want a fixed configuration partition and the system partition to be automagically sized to the remainder of the disk.

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        Very good question.  I'll ask Dario to join us.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.