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

Resizing embedded image to full disk size on first boot

Development
3
3
3.2k
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 Feb 11, 2007, 3:08 PM

    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 Feb 11, 2007, 5:57 PM

      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 Feb 11, 2007, 6:10 PM

        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
        2 out of 3
        • First post
          2/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.