Navigation

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

    Resizing embedded image to full disk size on first boot

    Development
    3
    3
    2854
    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

      Not much of an issue for typical m0n0wall, pfSense, or FreeNAS deployments, but if you were using packages, or in my case storing TFTP boot files in the config partition it would be nice to utilize the full space available.

      A thread on FreeBSD small questions raised the tool growfs, so technically you could have a fixed image, e.g. 64MB, then on first boot discover the real disk parameters, re-define the fdisk and bsdlabel parameters and grow the UFS file system to the full disk size.

      I will try this out soon as I had to do it the tedious way with a 512MB card to fit in some amd64 boot images.  The most difficult thing with BSD seems to be determining the disk parameters and ones that keep the UFS label, although some patches made it into CVS fixing some of them.

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

        This might help.

        http://pfsense.com/cgi-bin/cvsweb.cgi/tools/builder_scripts/mkflash_new.sh?rev=1.1;content-type=text%2Fplain

        1 Reply Last reply Reply Quote 0
        • V
          Vescovo last edited by

          BTW your diagram on the BSD boot process is very useful!

          Scott's reply probably solves your probelm.

          You are right that some of the CHS boot parameters are very confusing. In addition you may find this useful.  My problem was setting up a 4 partiton BSD dev system and using an image utility to transfer between partitons. The```
          bsdlabel -R ad0s1 savedlabel

          using the * options in fields where new values have to be calculated worked very well for me. It recalculates all of the correct parameters and re-writes to "savelabel". I cannot supply you an example because all of the label were re-witten without my knowledge.
          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Products

          • Platform Overview
          • TNSR
          • pfSense Plus
          • Appliances

          Services

          • Training
          • Professional Services

          Support

          • Subscription Plans
          • Contact Support
          • Product Lifecycle
          • Documentation

          News

          • Media Coverage
          • Press
          • Events

          Resources

          • Blog
          • FAQ
          • Find a Partner
          • Resource Library
          • Security Information

          Company

          • About Us
          • Careers
          • Partners
          • Contact Us
          • Legal
          Our Mission

          We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

          Subscribe to our Newsletter

          Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

          © 2021 Rubicon Communications, LLC | Privacy Policy