# FreeBSD LiveCD



## sai (Nov 22, 2008)

Hi,

Is there an official (and as simple as possible) script that can build a customized FreeBSD 7.0 LiveCD system?

Thanks.


----------



## danger@ (Nov 23, 2008)

mfsBSD, developed by my friend, is very cool tool:
http://people.freebsd.org/~mm/mfsbsd/

There are also other options, to name one: http://www.freesbie.org/.

And I think http://www.desktopbsd.net/ has a live system as well (not sure though).


----------



## hitest (Nov 23, 2008)

danger@ said:
			
		

> And I think http://www.desktopbsd.net/ has a live system as well (not sure though).



Thanks for the link  Just read through the documentation and it does have live functionality.:beer


----------



## Oko (Nov 23, 2008)

sai said:
			
		

> Hi,
> 
> Is there an official (and as simple as possible) script that can build a customized FreeBSD 7.0 LiveCD system?
> 
> Thanks.



You have FreeSBIE tools in ports. FreeSBIE was and still is my 
favorite live FreeBSD distro.


----------



## tingo (Nov 23, 2008)

HeX is also built with the FreeSBIE tools.


----------



## tingo (Nov 23, 2008)

Another LiveCD is wifiBSD.


----------



## UNIXgod (Nov 24, 2008)

Looking to build a nice rescue cd/dvd or even thumb drive.

Does anyone have any info how to do it? I was playing with tinybsd with no luck.


----------



## tingo (Nov 24, 2008)

I have used the *iso2img.sh* script (described here) with some success to convert FreeBSD install iso images to a binary image that can be dd'ed to a usb flash drive. For some reason the livefs image didn't work.


----------



## Oko (Nov 24, 2008)

tingo said:
			
		

> I have used the *iso2img.sh* script (described here) with some success to convert FreeBSD install iso images to a binary image that can be dd'ed to a usb flash drive. For some reason the livefs image didn't work.



That is because USB has nothing to do with iso images for CD-ROM. USB
is for boot purposes the same thing as floppy disk although after the boot
the kernel sees it as SCSI HD. It is not very hard to use images of the bootable floppies and additional installation sets to crate the bootable USB. To create live USB is little bit more difficult but nothing complicated.

I am not sure if UNetBootin http://unetbootin.sourceforge.net/
is ported to FreeBSD but that would be the easiest way to create live USB with FreeBSD. If you want to learn just google OpenBSD +live USB and there are lots of posts OpenBSD users about this topic and how the thing can be done.


----------



## malcarada (Nov 29, 2008)

Frenzy is based on FreeBSD too, in case is of any help:

Frenzy

And TrueBSD, live DVD:

TrueBSD


----------



## ale (Dec 8, 2008)

malcarada said:
			
		

> Frenzy is based on FreeBSD too, in case is of any help:
> 
> Frenzy


Yesterday a new version has been released.
Sadly it's the final one.
http://frenzy.org.ua/en/releases/1.1/download.shtml


----------



## morbit (Jan 8, 2009)

There was also WarBSD.


----------



## morbit (Jan 9, 2009)

http://warbsd.eurisko.ws/


----------



## ericbsd (Jan 9, 2009)

we have http://www.rofreesbie.org/ to:


----------



## nocomp (Feb 21, 2009)

*livecd script*

hi,
thx for this topic.
i am looking for a set of script for fbsd (7.1)  forcreate a custom livecd.
I thought to use freesbie (specially because i ve been part of the project) but the new fersion freesbie2 fails.
i ve also found in sysutils a livecd port, but it seems obsolete and jsut fail directly.
i used to be a fbsd user (branch 4.1 - > 5) and now it seems i am out of date with the 7.1 branch.
Is there a tool that exist for create livecd for ver 7.1 ?
best rgeards
thx for helping


----------



## ale (Feb 21, 2009)

nocomp said:
			
		

> I thought to use freesbie (specially because i ve been part of the project) but the new fersion freesbie2 fails.


Where does it fail?
Can [thread=1525]this thread[/thread] be of any help?


----------



## nocomp (Feb 21, 2009)

hi,
it seems i have the same prob, i ve delete log files.
i gonna rerun a freesbie session.
in what file do you comment this option?
thx for your time
best regards


----------



## ale (Feb 21, 2009)

nocomp said:
			
		

> in what file do you comment this option?


I think that the file you have to edit is /usr/local/share/freesbie/conf/i386/FREESBIE


----------



## nocomp (Feb 21, 2009)

thx a lot, i ll check that 
have a good week end!
best regards


----------



## nocomp (Feb 23, 2009)

*when a bug chase another one*

thxx a lt for your advice ale, it worked.
but now i am facing another bug  freesbie 1.* was far less worry  would like to know why they changed it all
here is my error log in case you have any ideas:

#### Building kernel for i386 architecture ####
>>> Kernel build for FREESBIE started on Sun Feb 22 22:15:23 UTC 2009
>>> stage 1: configuring the kernel
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3.1: making dependencies
>>> stage 3.2: building everything
>>> Kernel build for FREESBIE completed on Sun Feb 22 23:37:10 UTC 2009
#### Installing world for i386 architecture ####
>>> Making hierarchy
>>> Installing everything
#### Installing kernel for i386 architecture ####
>>> Installing kernel
#### Running plugins ####
-> customroot
Copying content of extra/customroot directory to the livefs
-> installports
Mounting ports' tree in the livefs chroot
mount_devfs: not found
*** Error code 127

Stop in /usr/local/share/freesbie.
shackbox# 



thxxx for helping
best regards


----------



## ale (Feb 23, 2009)

Can you try replacing _mount_devfs_ with _mount -t devfs_ in/usr/local/share/freesbie/extra/installports.sh ?


----------



## nocomp (Feb 23, 2009)

hummmmm
i just followed your advice, this is what i got now
shackbox# make iso
#### Running plugins ####
-> customroot
Copying content of extra/customroot directory to the livefs
-> installports
Mounting ports' tree in the livefs chroot
mount_nullfs: Resource deadlock avoided
*** Error code 1

Stop in /usr/local/share/freesbie.
shackbox# 


here is the file i ve mod

--------------------------------------------

#!/bin/sh
#
# Copyright (c) 2005 Dario Freni
#
# See COPYING for licence terms.
#
# $FreeBSD$
# $Id: installports.sh,v 1.4 2007/01/04 18:28:56 saturnero Exp $
#
# Remount the ports' tree under ${BASEDIR}/usr/ports and install ports
# listed in the INSTALL_PORTS variable in the usual category/portname
# form, e.g.: x11/nvidia-driver audio/emu10kx ...

set -e -u

if [ -z "${LOGFILE:-}" ]; then
	echo "This script can't run standalone."
	echo "Please use launch.sh to execute it."
	exit 1
fi

INSTALL_PORTS=${INSTALL_PORTS:-}

if [ ! -z "${INSTALL_PORTS}" ]; then
	echo "Mounting ports' tree in the livefs chroot"
	set +e
	if ! kldstat -v | grep -q nullfs; then
		if ! kldload nullfs; then
			echo "Cannot find nullfs support in kernel and cannot find the proper module, aborting"
			exit 1
		fi
	fi
	set -e

	mkdir -p ${BASEDIR}/usr/ports ${BASEDIR}/usr/src
	mount_nullfs ${PORTSDIRusr/ports} ${BASEDIR}/usr/ports
	mount_nullfs ${SRCDIRusr/src} ${BASEDIR}/usr/src
	mount -t devfs none ${BASEDIR}/dev

	print_error_umount() {
		echo "Something went wrong, check errors!" >&2
		[ -n "${LOGFILE:-}" ] && \
			echo "Log saved on ${LOGFILE}" >&2
		umount_null
		kill $$ # XXX exit 1 won't work.
	}

	umount_null() {
		umount ${BASEDIR}/usr/ports;
		umount ${BASEDIR}/usr/src;
		umount ${BASEDIR}/dev;
	}

	trap "umount_null; exit 1" INT

	tmpmakeconf=$(TMPDIR=${BASEDIR}/tmp mktemp -t make.conf)
	envvars="BATCH=true"
	if [ ! -z "${MAKE_CONF:-}" ]; then
		cat ${MAKE_CONF} > ${tmpmakeconf}
		envvars="${envvars} __MAKE_CONF=${tmpmakeconf#$BASEDIR}"
	fi

	for i in ${INSTALL_PORTS}; do
		echo "Compiling ${i}"
		(script -aq ${LOGFILE} chroot ${BASEDIR} make -C /usr/ports/${i} \
			${envvars} clean install clean || print_error_umount | grep '^===>'
	done

	umount_null
	trap "" INT
fi

cd ${LOCALDIR}
------------------------------------------


thxx a lot for your time.
best regards


----------



## ale (Feb 23, 2009)

What is the output of mount?
Maybe something has been mounted by the previous run but, as it failed, it has not been umounted?


----------



## nocomp (Feb 23, 2009)

dunno if it exactly what you wanted but here are the lines:
shackbox# mount -t devfs /usr/ports/ /dev
shackbox# umount /ev
umount: /ev: statfs: No such file or directory
umount: /ev: unknown file system
shackbox# umount /dev
shackbox# 


best regards


----------



## ale (Feb 23, 2009)

nocomp said:
			
		

> dunno if it exactly what you wanted


Just type _mount_ and press enter.


----------



## nocomp (Feb 23, 2009)

here we go 
sorry for precedent msg

shackbox# mount
/dev/ad2s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad2s4d on /usr (ufs, local, soft-updates)
/dev/ad2s3d on /var (ufs, local, soft-updates)
/usr/ports on /usr/local/freesbie-fs/usr/ports (nullfs, local)
/usr/src on /usr/local/freesbie-fs/usr/src (nullfs, local)
shackbox# 


hope it ll help!

thxx for helping

best regards


----------



## ale (Feb 23, 2009)

nocomp said:
			
		

> here we go
> sorry for precedent msg


no problem!



			
				nocomp said:
			
		

> shackbox# mount
> /dev/ad2s1a on / (ufs, local)
> devfs on /dev (devfs, local)
> /dev/ad2s4d on /usr (ufs, local, soft-updates)
> ...


I think that my suspect was correct.
You see the mounts on red?
Try unmounting at start again from where you left.


----------



## nocomp (Feb 23, 2009)

hi ale,
the scripts seems to run,
i let you know how it goes.
thxx a lot for your time
best regards
herve


----------



## nocomp (Feb 24, 2009)

this new version of freesbie is quite a nightmare for me, i don t recognize the efficient freesbie  use to have, i mean the 1.* versions.
ok it all compiled, thks god to ale for his help, but now, what ever the package is, i get errors like for the sattrack packet:

 Generating temporary packing list
===>  Checking if astro/sattrack already installed
===>   sattrack-3.1.6_2 is already installed
Something went wrong, check errors!
Log saved on /usr/obj/usr/local/share/freesbie/.tmp_extra
*** Signal 15

Stop in /usr/local/share/freesbie.
shackbox# 

So what i tried is to deinstall or install the packets on my bsd box in case it would help, but it doesn t.........it s seems that you can compile an iso without been able to custom it

here is a tail of the log file.

shackbox# tail /usr/obj/usr/local/share/freesbie/.tmp_extra
===>  Checking if astro/sattrack already installed
===>   sattrack-3.1.6_2 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of astro/sattrack
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/astro/sattrack.
shackbox# 


any idea how add packages?

here is my conf file for the packages
#######################modif herve shackbox ######################
PORTSDIR=/usr/ports
EXTRA="customroot installports adduser customscripts l10n rootmfs etcmfs varmfs"
INSTALL_PORTS="astro/sattrack x11-wm/windowmaker/ audio/xanalyser audio/xoscope cad/basicdsp comms/acfax comms/geoid comms/gmfsk comms/gnuradio comms/gpredict"



what else can i try?
thxx for helping
best regards


----------



## ale (Feb 24, 2009)

nocomp said:
			
		

> here is my conf file for the packages
> #######################modif herve shackbox ######################
> PORTSDIR=/usr/ports
> EXTRA="customroot installports adduser customscripts l10n rootmfs etcmfs varmfs"
> INSTALL_PORTS="astro/sattrack x11-wm/windowmaker/ audio/xanalyser audio/xoscope cad/basicdsp comms/acfax comms/geoid comms/gmfsk comms/gnuradio comms/gpredict"


Are you sure this is a valid configuration file for _freesbie2_?
Maybe I'm wrong, I've never tried to build an image with freesbie, I've just used some 1.x versions years ago.
But from the few docs I can find, there is no option to build ports (I can't find _INSTALL_PORTS_), but you have to provide a list of packages to install. I'm not sure if the packages from the list are built again, do you know more?


			
				someone in the freesbie mailing list said:
			
		

> # Set PKGFILE variable to a text file containing a list of packages to
> # install in the built system. This file can be either a pkg_info(1)
> # like output either a list of packages without version number. Please
> # note that this file will be rewritten if you run `make pkgselect'
> ...



You can run pkg_create with _-b_ option to create packages from the "locally" installed ones. Refer to the man page for more.

Try also looking in the attached file.


----------



## nocomp (Feb 25, 2009)

*tutorial*

hi ale,
i got inspired from this tutorial in fact:
http://www.unixgarden.com/index.php/distribution/realiser-son-propre-livecd-avec-un-systeme-freebsd

the attached file are php files from archive.org, can t use them, .
i ve ben to archive.org, nothing abou freesbie 
do you think that freesbie might still work?
best regards


----------



## ale (Feb 25, 2009)

What problem do you have with the attached files?
Can't you open it with a browser?

Anyway that wasn't the one I want to show you.
Try looking at freesbie2-arch.htm in the attachement.


----------



## nocomp (Feb 25, 2009)

what i don t get ale,is that if you can t add pkg names in a conf file, how do you add extra package for custom your livecd?
freesbie2 is sooo different from freesbie1 dunno why they did these changed.
do you have the 1* version script? can t find them anywhere
best regards


----------



## nocomp (Feb 25, 2009)

ur message crossed mine, i have a look
thx


----------



## ale (Feb 25, 2009)

I've found this patch, maybe you have to apply it manually.
It seems that you can add pre-built packages specifying the path where they are (PKGPATH).
http://uyota.asablo.jp/blog/2008/02/27/2668676


----------



## nocomp (Feb 25, 2009)

thx a lot, but the thing is:
ok you tell where the tgz are, but what hapends with the deps?
they also get installed like if it was in the port collection?
thxx for helping
herve


----------



## ale (Feb 25, 2009)

Your question make sense but I have no answer.


----------



## nocomp (Feb 25, 2009)

well, i guess that freesbie is dead for me 
none of the staff answer to my mail,used to be friends, so i guess they are not reading it,they turned the page....
if you know where to score the 1.* scripts version i would be please to give it a try
thxx for your time!


----------



## ale (Feb 25, 2009)

Who did you tried to contact?
One of the developer is still accredited as the maintainer for some ports.
Try `$ cd /usr/ports/mail/proxsmtp/ && make maintainer`.
I really don't think you will have better luck with the 1.* scripts as they are intended for FreeBSD releases now too old.

EDIT:
If I'm not wrong, even the author of this post (it's a motorbike ng) was a member of _gufi_
Maybe you can get the email address and politely ask him some info.


----------



## nocomp (Feb 25, 2009)

well i tried to contact rionda or david with who i used to be in touched on #irc.
maybe i should download a 4.* branch of fbsd and do it with it 
in compare, with linux, i tried remastersys, so easy, create awesome custom livecd in a snap,that s what we can call progress!


----------



## knotabot (May 13, 2009)

A new BSD Live CD is available, based on OpenBSD though.

BSDanywhere



> What is the primary focus of BSDanywhere?
> 
> A mostly unmodified OpenBSD kernel and userland, combined with useful, graphical as well as console-based applications. This allows for complete hardware testing, including X, as well as systems recovery and mobile usage in murky environments.


----------



## gnemmi (May 13, 2009)

Thanks *_a_lot_* for that link !
It's *_exactly_* what I was looking for !
Downloading right now =D

If I can get my Dell 1318 to suspend to ram/disk and resume ok, then I'm not only moving to Open, I'm buying the cds as well !

Best regards and thank you once again !


----------



## knotabot (May 15, 2009)

It detected my Realtek 8187B wlan card no problem, didn't work but detected at least. Maybe some configuration or driver needs tweaking.

Something I found different. OpenBSD lables the hardware by manufacturer, instead of eth0, re0 (re=Realtek). No pciconf either, weird. A whole new world.

For FreeBSD, the #1 recommended LiveCD seems to be PC-BSD.
Will keep looking.


----------



## Panarchy (Jul 23, 2009)

Any chance of FreeBSD incorporating an official LiveCD?


----------



## DutchDaemon (Jul 23, 2009)

There are livefs.iso files on the FreeBSD site.


----------



## ericbsd (Jul 24, 2009)

I start a project call ghostbsd its a live cd base on FreeBSD Freesbie Gnome whit an installer. I try to put finstall on but I have some error to fix. But I have an idea rofreesdie use bsd installer.
all work whit shell script more easy to me to work with shell sript then python.


----------

