# Problem increasing the size of the installer img file



## fl1pper (May 10, 2016)

Hi,

I am in the process of creating a custom FreeBSD installer using bsdinstall() and the /etc/installerconfig file. All was fine until I ran out of space within the file system of the installer.

Initially to get round this, I created a new 2G image file using `dd`, attached the image as a memory disk, wrote a disk label to the disk, formatted it as UFS and recursively copied the files from the original img file to the new, larger one. The new image boots but then halts with the infamous Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19..

I then tried following the same procedure but instead of creating a new file system, I `dd`ed the original one onto the new larger one and then expanded the filesystem using `growfs`. Again it boots but halts with the same issue.

At this point, if I manually type ufs:/dev/ada1 at the "multiroot" prompt, the installation continues as normal.

I am guessing the issue is the relationship between ufs:/dev/ufs/FreeBSD_Install and ufs:/dev/ada1 but I've been unable to figure it out. There is no difference between the original img file and the new one other than it is bigger.

Any ideas on what I am missing would be gratefully received.

Cheers

Andy


----------



## SirDice (May 10, 2016)

I highly recommend you read release(7).


----------



## fl1pper (May 10, 2016)

SirDice said:


> I highly recommend you read release(7).



Thanks for the reply. I have read release(7), but I don't understand how building a pristine image from source helps me.

Care to elaborate?

Cheers

Andy


----------



## SirDice (May 10, 2016)

Using release(7) you can build your own customized installer image. You can incorporate your custom install and build a proper image with the size and additions you need.


----------



## fl1pper (May 11, 2016)

First off, in answer to my own initial question, FreeBSD_Install is the volume label of the installer image. I haven't checked but I suspect my mistake was not to set that when I generated the larger img file.

Secondly, thank you SirDice for pointing me at release(7). I am now building my image that way and it is generated as large as it needs to be and does not produce the original error. My only issue now is that to get my own installerconfig into the generated distribution, I have to place it in /usr/src/etc and edit /usr/src/etc/Makefile to get it included. It works but it feels a little bit of a hack.

Cheers

Andy


----------

