# How to  remake ISO for move from Virtual to Real Machine



## Ozyart (Oct 21, 2016)

Hi, I have virtualized FreeBSD 11 with Xfce on VirtualBox and I personalized it with the vertex-maia theme. 

I have installed software tools, and now I want to make an ISO and move it for PC, has default system, not virtualized. 

Can help me?  
Thanks.


----------



## SirDice (Oct 21, 2016)

Have a look at the scripts in /usr/src/release and the release(7) man page.


----------



## Ozyart (Oct 21, 2016)

SirDice said:


> Have a look at the scripts in /usr/src/release and the release(7) man page.


I have nothing at /usr/src/release
can you send me more info how install and use it?
Thanks


----------



## SirDice (Oct 21, 2016)

`svnlite https://svn.freebsd.org/base/releng/11.0/ /usr/src/`

Handbook: A.3. Using Subversion


----------



## Ozyart (Oct 21, 2016)

Ok. Now, I have /usr/src/ and go study how to make my "release"
Thanks


----------



## Ozyart (Oct 24, 2016)

I try:
sudo su
cd /usr/src/release
sh release.sh
( after some time compiling, the machine reboot, during the boot, I see the message of "savecore: reboot after panic", but initialize well.)

Can help me?


----------



## wblock@ (Oct 25, 2016)

Why would you make an ISO?  Back up the VM, back up the host, restore the VM backup on the host.


----------



## Ozyart (Oct 25, 2016)

I prefer install.iso, it's more interesting to install on several machines like a normal installation.


----------



## SirDice (Oct 25, 2016)

Here's how I build mine, I update /usr/src/ and run the whole installkernel/installworld stanza to update the host itself. Then:

```
cd /usr/src/release
make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" release
make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" DESTDIR=/storage/release/11-stable install
```

This will give me various image files in /storage/release/11-stable. It will also create a nice directory for use with FTP. Adjust what you need. Read the /usr/src/release/Makefile for other options you can set.


----------



## Ozyart (Oct 25, 2016)

cd /usr/src/release


SirDice said:


> make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" release


when I try this, give me:

```
sh: cc: not found
make[4]: "/usr/src/share/mk/bsd.compiler.mk" line 145: Unable to determine compiler type for CC=cc .  Consider setting COMPILER_TYPE.
```
I try install gcc and cc It's installed, but this problem persist. 
I need change line 145 ?


----------



## SirDice (Oct 25, 2016)

No, you don't need to change anything. Did you buildworld?

Handbook: 23.6. Rebuilding World


----------



## Ozyart (Oct 26, 2016)

SirDice said:


> Did you buildworld?


No. I'm noob on BSD

I go try this

```
cd /usr/src/
make buildworld
make installworld
cd /usr/src/release
make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" release  #( now this work )
make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" DESTDIR=/newdisk/freeBSD install
```
# Now I see this in the last command:

```
mkdir -p /newdisk/freeBSD
cp -a ftp /newdisk/freeBSD/
cp: ftp: No such file or directory
*** Error code 1
```


----------



## SirDice (Oct 26, 2016)

I suggest you read the handbook chapter I linked earlier.

To get the whole thing working:

```
svnlite update /usr/src 
cd /usr/src
make buildworld
make buildkernel
cd /usr/src/release
make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" release  #( now this work )
make -DNOPORTS -DNOPKG -DNODOC KERNCONF="GENERIC VBOX" DESTDIR=/newdisk/freeBSD install
```


----------



## Ozyart (Oct 26, 2016)

ok, I will go study ( always we want the most simple and fast way ).


----------



## SirDice (Oct 26, 2016)

I would suggest doing a few practice runs doing a source update (aka building world) as explained in the handbook. The procedure to create a release(7) will become more clear once you've done the source update a few times. It's basically just an extension to the 'normal' procedures.


----------



## Ozyart (Oct 26, 2016)

_The biggest problem for me with the "handbook", is to understand English at 100%, it isn't my mother tongue. _
I will try understand and apply the steps of handbook.


----------



## Ozyart (Nov 2, 2016)

someone can explain step by step the process to remake ISO?


----------



## ASX (Nov 2, 2016)

Ozyart said:


> Hi, I have virtualized FreeBSD 11 with Xfce on VirtualBox and I personalized it with the vertex-maia theme.
> 
> I have installed software tools, and now I want to make an ISO and *move it for PC*, has default system, not virtualized.


The simplest path to achieve that result is performing a backup, some manual partitioning and a restore from backup, plus installing a boot loader.

Making a ISO is entirely different story, much more complex.

FreeBSD provide tools to make customized ISOs, like the previously mentioned release(7), but using that alone you will not be able to replicate your vbox install, more customization would be needed, like preparing your own packages ... in short it is a complex and very wide task.

As far as I'm aware there are no tools like Linux's "remasterme' or 'mylivecd' to simply prepare an ISO from a running system.  Even when such tools exists, their use should be limited to restoring the original system, using them to deploy ISO images like if was an OS for itself is an error by design: too much things (settings and config files) are bound to the source machine, and distributing them is going to cause problems.

If your goal is to have the system on your PC, use backup/restore method, if instead your goal is to make your own ISO, that will require lot of work from you, it is not possible to provide step by step guidance without knowing exactly all details, and even if we know all details that would require a book: unlikely to happen.


----------



## ANOKNUSA (Nov 2, 2016)

Ozyart said:


> someone can explain step by step the process to remake ISO?



No. If you can't understand the man page, it's because you don't understand the system itself well enough to accomplish what you want to do, and there's already a basic "beginner's guide" for the system lots of folks worked hard on. 

I'm with ASX on this one. Creating a release ISO would basically require you to build and configure an entirely new system from scratch. There's nothing that will simply spit out a file for you. Back up the data and copy it to bare metal. Heck, I presume this is a virtual machine you've only been using for testing, so you could just back up the configuration files and perform a clean install, create your user, then copy over your configurations.


----------



## hotaronohanako (Nov 2, 2016)

Ozyart said:


> Hi, I have virtualized FreeBSD 11 with Xfce on VirtualBox and I personalized it with the vertex-maia theme.
> 
> I have installed software tools, and now I want to make an ISO and move it for PC, has default system, not virtualized.
> 
> ...


I think you have to look for some options ..
it is possible going from a VM to a physical hardisk. U need to convert your virtual machine hard disk into a raw format first..
something like ...

VBoxManage clonehd /path/to/src.vdi /path/to/disk.img --format RAW

and option if make use of dd command in order to clone exporte you img file into a physical hard drive..
something like:

dd if=disk.img of=/dev/disk

 you of course need to have another disk with enough space.

maybe checking in the documentation you'll have some other options. I made this a while ago and is kind of slow but is possible.


----------



## Ozyart (Nov 3, 2016)

Thank you for attention, both options, backup or ISO are validated, backup seems simple and fast to solve the problem. 
Now, more and more, I'm interested to learn how to make a ISO,
but for start, I think I have to study a lot about BSD. 
Once again, thank you for your attention.


----------

