FreeBSD custom installation CD/DVD

Hello all.
Can you help me by a tutorial or Step by step on how to create a FreeBSD custom installation CD/DVD?
I.E:
I have installed a fresh FreeBSD with some ports (Lighttpd, php, mc, mysql). so How can I create a CD/DVD installation from this install. thus When I install it I will not reinstall these ports.

Thank you in advance.
 
Thanks for the feedback. But I'm asking for something else (if I can call that "Like appliances"). I want, in the end, a CD or DVD that boots (like mfsBSD) with a script that I implement to install a whole OS (Some thing like pfSense or m0n0wall).

Thank you.
 
I've succeeded in creating a DVD that boots but at the moment of creating the MD0 it hangs mounting the filesystem, because there is no disk attached to it. in the attached image you will see:

Procedure that I've done:
All processes are done on a VMware workstation.
The VM for freebsd FreeBSD contains two hard disks, ad0, ad1.
  1. Installed a fresh minimal FreeBSD, deleted symbols in the kernel dirextory (*.symbols) and compressed kernel to kernel.gz.
    Note: the partitions (/usr, /var, /tmp) are installed under the root (/) on ad0s1a (no other partitions) and ad0s1b for the swap.
  2. for the disk ad1 I have only created a new file system for later use.
  3. Rebooted the machine to start with mfsBSD.
  4. Mounted the disks: ad0s1a under /mnt and ad1s1a under /media.
  5. Created a copy of the file system initially installed on ad0sa1.
    • Executed a command: du -hs /mnt to get the size of the file system.
    • Created a file named: disk-img.dd on the second HDD like this: dd if=/dev/zero of=/media/disk-img.dd bs=1k count = 358400 (the size is 350MB).
    • Created a directory called: /media/dz: mkdir /media/dz and mounted the dd disk as follows:
      mdconfig -a -t vnode -f /media/disk-img.dd (the md created is 1 i.e. md1)
      bsdlabel -w md1
      newfs md1a
      mount /dev/md1a /media/dz
    • Used cpdup to copy directory /mnt (which is the working Freebsd FreeBSD file system (ad0s1a)) to /media/dz (my disk image).
      cpdup -vv /mnt /media/dz
    • After copying is done I unmounted my dd disk:
      unmount /media/dz
      mdconfig -d -u 1
      gzipped it to: disk-img.dd.gz
    • Moved disk-img.dd.gz to a directory called: /media/RELEASE/
    • Copied /boot directory from the FreeBSD DVD to /media/RELEASE: cp -r /cdrom/boot /media/RELEASE/.
    • Modied loader.rc to as follows:
      Code:
      geom_uzip_load="YES"
      tmpfs_load="YES"
      mfs_load="YES"
      mfs_type="mfs_root"
      mfs_name="/disk-img.dd"
      ahci_load="YES"
      vfs.root.mountfrom="ufs:/dev/md0"
  6. Created an ISO image of the directory /media/RELEASE:
    mkisofs -b boot/cdboot -no-emul-boot -r -J -V GavarBSD -o /media/gvBSD.iso /media/RELEASE

Finally: it boots until it mounts the file system in md0; then the kernel panics.
 

Attachments

  • gvBSD-2014-10-07-14-04-56.PNG
    gvBSD-2014-10-07-14-04-56.PNG
    9.6 KB · Views: 332
Hello all.
Thanks for feedbacks.
I've resolved the problem :OOO
The solution is in the loader configuration as folow .

Code:
    geom_uzip_load="YES"
    tmpfs_load="YES"
    mfs_load="YES"
    mfs_type="mfs_root"
    mfs_name="/disk-img.dd"
    ahci_load="YES"
    # vfs.root.mountfrom="ufs:/dev/md0"
    vfs.root.mountfrom="ufs:/dev/md1a"
Thanks !
 
Back
Top