Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] An ocaml livecd

10 views
Skip to first unread message

Adrien

unread,
Jan 8, 2008, 9:59:29 AM1/8/08
to Caml Mailing List
Hi,

Some time ago there was a discussion about the usefulness of an ocaml livecd.
There is already Demolinux or Juppix but they both contain a lot of
data (.iso weigh about 700MB) and Demolinux is really aging.

So here is a test version for a new one.
The goal of the livecd is not to have java, eclipse or apache, it is
to provide a comfortable environment for ocaml but also general usage
while consuming few resources. Hopefully it is easy to plug-in modules
in the root filesystem whenever one wants (see
http://slax.hosting4p.com/modules.php ). This modular approach is
important as it reduces space usage (both on the cd and in memory)
while keeping all the functionnalities.

The base is slackware-current with linux-live scripts (1) and slax's
kernel (2) as a mysterious problem prevents me from using my owns.
The build process is pretty easy and reproductible by anybody within
two hours. Feel free to ask if you want the small scripts I've written
: one creates an iso from a subset of slackware-current, the other one
removes some files and move some others in order to create modules for
C development [headers and gcc data] and documentation.

(1) : http://www.linux-live.org
(2) : taken from slax6rc7 iso along with modules,
http://merlin.fit.vutbr.cz/mirrors/slax/SLAX-6.x/rc7/


The result is a 147MB iso file with a graphical environment which can
run on computers with 128MB of RAM. Right now this livecd features
xfce, ocaml-3.10.1-rc1, ledit, ocamlfind, gvim (vi is elvis though),
mousepad, gmplayer, pcmanfm (file-manager), emelfm (same), Thunar
(same). It also features fftw2 which I wanted for myself and I'll be
happy to include any other module one could want (I've forgotten
lablgtk2 for example).


Basic usage/advice is :
- upon boot, use <TAB> to edit the command-line and use vga=0x315 for
800x600 console display, vga=0x317 for 1024x768 and vga=0x31A for
1280x1024.
- log in as root (the filesystem is read-only), there is currently no password.
- use the startx command for the gui (vesa 1024x768 by default, works
for geforce go 7600, geforce 7600gt, radeon x300) and if you have a
weird terminal, quit xfce, run xorgsetup and use a higher color depth.
You may run xorgsetup anytime display is problematic in fact.
- ocaml with ledit and unix.cma is the yellow helmet on the left


There are already todo and fixme lists:
fixme, most being immediate to fix:
* higher default resolution for boot
* debug off for pcmanfm (its inotify debug is a real flood)
* /etc/group, I'm not sure of the proper syntax
* include the development and documentation modules (ocaml
documentation is not concerned, it is always there)
* lablgtk
* wput
* network which is available but not activated by default.

todo:
* emacs with tuareg is absent but only because I don't personnaly use
and can't make it properly (I've already found the friend I'm going to
work on this ;) )
* ndiswrapper with stripped driverpacks (
http://driverpacks.net/DriverPacks/DriverPack.php?pag=l ) to support
some wifi cards (as my bcm43xx for instance)
* drocaml but I would like to make it lighter otherwise it will have
troubles running
* cameleon2 which surprinsingly doesn't compile on my computer
* improved bootscreen (but don't be afraid, there'll be no ugly gfx ;) )
* copy2ram (copy data from cd or usb key to ram to improve performance)


The iso file can be downloaded at
http://ocaml.yaxm.org/files/llama/llama.iso and yes I really had no
idea for the name. ;p
Any feedback is highly appreciated.

PS: Am I allowed to redistribute the oreilly book in pdf format ?
What about the ocaml pdf by inria ?

---

Adrien Nader

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Jon Harrop

unread,
Jan 8, 2008, 10:25:59 AM1/8/08
to caml...@yquem.inria.fr
On Tuesday 08 January 2008 14:58:53 Adrien wrote:
> There are already todo and fixme lists:
> fixme, most being immediate to fix:
> * lablgtk
> ...

Great stuff!

You might like to quantify the most popular libraries among OCaml programmers
to make sure you provide what most people need. For example, the Ubuntu
package popularity contest gives:

$ grep ocaml by_inst | grep "\-dev"
9073 liblablgtk2-ocaml-dev 953 64 818 71 0 (Sven
Luther)
11206 libxml-light-ocaml-dev 575 6 523 45 1 (Unknown)
11359 libmad-ocaml-dev 555 5 530 20 0 (Samuel
Mimram)
11586 libpcre-ocaml-dev 527 9 474 43 1 (Stefano
Zacchiroli)
11627 libcameleon-ocaml-dev 522 28 457 37 0 (Unknown)
11675 libsdl-ocaml-dev 516 8 469 39 0 (Jerome
Marant)
12843 libocamlnet-ocaml-dev 399 9 355 34 1 (Stefano
Zacchiroli)
13677 libounit-ocaml-dev 335 5 308 22 0 (John
Goerzen)
14125 libzip-ocaml-dev 305 5 277 23 0 (Sven
Luther)
14168 libcamlimages-ocaml-dev 302 7 277 18 0 (Debian
Ocaml Maintainers)
14249 liblablgl-ocaml-dev 297 19 267 11 0 (Sven
Luther)
..

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e

Philippe Wang

unread,
Jan 8, 2008, 11:30:37 AM1/8/08
to caml...@yquem.inria.fr
Hi!

Maybe you should take a look at this page:

http://www-sysdef.lip6.fr/~gonzales/knoppix/index.php

(it's in French, and based on Knoppix 4 -- I see knoppix as the best
linux live CD, but I might be wrong...)

It has been made for undergrad students of Paris 6 University
(http://www.upmc.fr), I think you can ask the author
Christophe.Gonzales/*/lip6.fr if you want to customize it a bit more.

--
Philippe

> ...


>
> --
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com/products/?e
>
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

--
Philippe Wang
ma...@philippewang.info

--
Philippe Wang
ma...@philippewang.info

K.D.P.Ross

unread,
Jan 8, 2008, 11:54:20 AM1/8/08
to caml...@yquem.inria.fr
> Some time ago there was a discussion about the usefulness of an ocaml
livecd.
> There is already Demolinux or Juppix but they both contain a lot of
> data (.iso weigh about 700MB) and Demolinux is really aging.

I think the idea of an O'Caml live CD is fantastic! Would it be possible
to have
(or have options for) -- in addition to libraries -- all the O'Caml
"goodies"
like findlib, menhir, ledit, ocaml+twt, etc.? -or- Perhaps provide godi
and the
sources to compile / set up packages on demand?

-and- Would it also be possible to offer a choice between Taureg and the
O'Caml
Emacs mode (http://caml.inria.fr/pub/docs/u3-ocaml/emacs/ocaml.emacs.tgz)?

//cheers
-Kyle

Mehdi Dogguy

unread,
Jan 8, 2008, 3:07:53 PM1/8/08
to K.D.P.Ross, caml...@yquem.inria.fr
You can try to make it work using an usb key. And could possibly then
add/remove any package. If you are a Debian lover, you can test it with :
http://live.debian.net/debian-cd/4.0_r0-rc1/i386/usb-hdd/
or even
http://live.debian.net/debian-cd/4.0_r0-rc1/i386/iso-cd/ by editing ISOs

--
Mehdi Dogguy
http://www.pps.jussieu.fr/~dogguy/

Adrien

unread,
Jan 8, 2008, 3:35:47 PM1/8/08
to Philippe Wang, caml...@yquem.inria.fr
First, I encountered a bug with ocamlopt, ocamlopt.opt : they do not
run correctly and issue an "Input/Output error". The executables run
correctly on my hard drive-installed system though. ocaml runs well
though as the toplevel shows.
Also, I have forgotten to include the firefox package/module as I
don't use it myself (I don't like firefox that much...). The default
browser, midori, is nice but beta especially with a tab-related bug
(if you use only windows, not tab, you're safe). links is available if
needed.


2008/1/8, Jon Harrop <j...@ffconsultancy.com>:
> Great stuff!
Thanks. :)

> You might like to quantify the most popular libraries among OCaml
> programmers
> to make sure you provide what most people need. For example, the Ubuntu
> package popularity contest gives:

2008/1/8, K.D.P.Ross <ky...@osl.iu.edu>:


> I think the idea of an O'Caml live CD is fantastic! Would it be possible
> to have
> (or have options for) -- in addition to libraries -- all the O'Caml
> "goodies"
> like findlib, menhir, ledit, ocaml+twt, etc.? -or- Perhaps provide godi
> and the
> sources to compile / set up packages on demand?

At first, I did not want to have too many things but I then realized
ocaml libraries were usually small and installed in a clean way so
I'll probably add many libraries.

There won't be gl-related things though, or at least not now : gl
applications needs somethings as mesa, proper drivers and the most
difficult part, configuration. Currently the livecd uses vesa drivers,
resolution ranges from 640x480 to 1280x1024 without problems and
except for colour depth/xfce's terminal, display has worked everywhere
I tried.

Note findlib and ledit are already present but there is a bug I had
forgotten about : findlib seems to really insist on using /usr/local
which I don't want or fftw2 doesn't properly install (it gets
installed in its source directory). I can't pronounce myself right now
though.


2008/1/8, K.D.P.Ross <ky...@osl.iu.edu>:


> -and- Would it also be possible to offer a choice between Taureg and the
> O'Caml
> Emacs mode (http://caml.inria.fr/pub/docs/u3-ocaml/emacs/ocaml.emacs.tgz)?

Of course. Thanks for noticing me about the availability of the latter.


2008/1/8, Philippe Wang <ph...@philippewang.info>:


> Hi!
>
> Maybe you should take a look at this page:
>
> http://www-sysdef.lip6.fr/~gonzales/knoppix/index.php
>
> (it's in French, and based on Knoppix 4 -- I see knoppix as the best
> linux live CD, but I might be wrong...)
>
> It has been made for undergrad students of Paris 6 University
> (http://www.upmc.fr), I think you can ask the author
> Christophe.Gonzales/*/lip6.fr if you want to customize it a bit more.

If I'm not mistaken, this is "Juppix" : Paris 6 is also called
"Jussieu" and when you mix this name with "Knoppix", you get Juppix.
;)
However Juppix is too heavy for what I have in mind. Moreover I have
never been really happy with Knoppix or its derivatives : sure it is
great but its size is an obstacle too performance. If you use a cd and
especially on a laptop, you will nearly continuously hear the cd being
accessed.


2008/1/8, Mehdi Dogguy <Mehdi....@pps.jussieu.fr>:


> You can try to make it work using an usb key. And could possibly then
> add/remove any package. If you are a Debian lover, you can test it with :
> http://live.debian.net/debian-cd/4.0_r0-rc1/i386/usb-hdd/
> or even
> http://live.debian.net/debian-cd/4.0_r0-rc1/i386/iso-cd/ by editing ISOs

You can make more than trying : you can make it. ;)
I know many people who are using usb keys instead of CD/DVDs : they
have a better throughput, are tinier and survive longer.
Usb keys are nice when it comes to saving work you've done but, at
least in its current implementation, this can also lead to problems
when you try to have your changes automatically recorded (this is not
available in this livecd atm). Hopefully this only happens after
several times and hand-copying a package/module or saving a file won't
do any damage.

As for this cd, this is an excerpt of the build script:
> echo "* run $CDDATA/$LIVECDNAME/make_iso.bat to create ISO image"
> echo "* or copy content of $CDDATA to your USB device"
> echo "and run ./boot/bootinst.sh (from the device!) to setup boot sector"
If you try, please, don't forget the "from the device!" part. ;)

---

Adrien Nader

Adrien

unread,
Jan 8, 2008, 3:58:08 PM1/8/08
to Philippe Wang, caml...@yquem.inria.fr
Quick update,

2008/1/8, Adrien <camar...@gmail.com>:


> First, I encountered a bug with ocamlopt, ocamlopt.opt : they do not
> run correctly and issue an "Input/Output error". The executables run
> correctly on my hard drive-installed system though. ocaml runs well
> though as the toplevel shows.

Booting from the livecd on my laptop and desktop, everything works
fine. For now, I'll say the person sitting next to me when I
encountered this problem has a bad karma.
It may also be the computer's fault or a incompatibility between the
computer and the livecd but I think the bad karma solution is much
more realistic.
I first posted this because I thought ocaml mixed-mode binaries could
have been stripped but it now seems this is not the problem.

Mehdi Dogguy

unread,
Jan 8, 2008, 4:01:58 PM1/8/08
to Adrien, caml...@yquem.inria.fr
Do you use SquashFS on your LiveCD ?
It's usually the case on LiveCDs ... but squashfs is a compressed
read-only filesystem and I think we don't want to have such a fs on
our usb key.

>
> 2008/1/8, Mehdi Dogguy <Mehdi....@pps.jussieu.fr>:
> > You can try to make it work using an usb key. And could possibly then
> > add/remove any package. If you are a Debian lover, you can test it with :
> > http://live.debian.net/debian-cd/4.0_r0-rc1/i386/usb-hdd/
> > or even
> > http://live.debian.net/debian-cd/4.0_r0-rc1/i386/iso-cd/ by editing ISOs
>
> You can make more than trying : you can make it. ;)
> I know many people who are using usb keys instead of CD/DVDs : they
> have a better throughput, are tinier and survive longer.
> Usb keys are nice when it comes to saving work you've done but, at
> least in its current implementation, this can also lead to problems
> when you try to have your changes automatically recorded (this is not
> available in this livecd atm). Hopefully this only happens after
> several times and hand-copying a package/module or saving a file won't
> do any damage.
>
> As for this cd, this is an excerpt of the build script:
> > echo "* run $CDDATA/$LIVECDNAME/make_iso.bat to create ISO image"
> > echo "* or copy content of $CDDATA to your USB device"
> > echo "and run ./boot/bootinst.sh (from the device!) to setup boot sector"
> If you try, please, don't forget the "from the device!" part. ;)
>

--
Mehdi Dogguy
http://www.pps.jussieu.fr/~dogguy/

_______________________________________________

Adrien

unread,
Jan 8, 2008, 4:13:43 PM1/8/08
to Mehdi Dogguy, caml...@yquem.inria.fr
2008/1/8, Mehdi Dogguy <meh...@gmail.com>:

> Do you use SquashFS on your LiveCD ?
> It's usually the case on LiveCDs ... but squashfs is a compressed
> read-only filesystem and I think we don't want to have such a fs on
> our usb key.

It's SquashFS with LZMA compression plus AUFS (UnionFS redesigned from scratch).
http://en.wikipedia.org/wiki/UnionFS

The read-only filesystems are in fact .lzm files which are mounted as
loop-device. As a matter of fact the filesystem where they really
reside doesn't matter much.
I won't give you further information though because, as I'm not fond
of the idea of making a ro filesystem writable, I've not spent much
time on the topic and therefore can't be sure to properly answer.


---

Adrien Nader

Dominique Martinet

unread,
Jan 9, 2008, 3:22:47 PM1/9/08
to Adrien, caml...@yquem.inria.fr
Alright.

As Adrien said, Slax indeed is read-only. However, there are quite a
few tricks, and you can set up some saving without too much trouble,
and I personally set the slax on my usb stick to save my cookies
because I'm somewhat lazy.
I usually have a messy home, so I don't save it, but you could as well
(I think there are already some works on it, I remember reading a
"persistent" function somewhere, but I didn't try it myself), by
simply editing your /etc/rc.d/rc.6 and rc.0 (shutdown and reboot
scripts) to copy the data to your usb pen before shutting down, and
slax has a directory they copy straight to your / during the boot
process.

For larger or other saves, you would probably want to make a module,
and it's not really hard as long as you don't install many things at
once, since AUFS has got a directory (here, /mnt/live/memory/changes)
which keeps tracks of the change, and you can simply copy a bunch from
here to get all your updates at once without much cleanup afterwards.

I don't know how knoppix or other liveCD distributions manage modules
or user modifications, but I really do think that slax fits quite well
on an usb pen.

---

As a side note, I think I'm the one supposed to add emacs to this
system - adding both tuareg and caml modes shouldn't be a problem, as
long as he gets me interested *coughs*

Thomas Fischbacher

unread,
Jan 9, 2008, 3:30:21 PM1/9/08
to Adrien, Caml Mailing List

Concerning all this livecd talking, I should maybe point out that one
can just download the knoppix-based(*) nmag live-cd from
http://nmag.soton.ac.uk and, after booting, use the (somewhat ad-hoc)
"knopper" and "unknopper" commands to dump the contents of the CD onto
some harddisk partition from which the de-compressed(!) Knoppix system
can then be booted directly. By using aptitude, one can then adjust the
package selection and easily repack the whole lot using the (well, yes,
somewhat ad-hoc) "knopper" command from my "knopper" Debian package,
wihch also is installed on the CD.

(*) We had a lot of trouble booting Ubuntu on some hardware, hence our
decision in favour of Knoppix.

--
best regards,
Thomas Fischbacher
t...@functionality.de

0 new messages