how to compile minix3 and make a bootable iso

3,022 views
Skip to first unread message

thinker

unread,
Jun 3, 2011, 6:52:46 AM6/3/11
to minix3
Hi,

I want to compile the minix3 source code and make a bootable iso file
so that I can install it with vmware and then run it, modify it and
test it. But I haven't got a clue. Is there anyone can give me some
hints ?

I read the minix3 docs, maybe I can compile it. But I don't know how
to build a file system and make a bootable iso. That is the most
important part.

I would be very appreciated if someone can give me some help.

Vivek Prakash

unread,
Jun 3, 2011, 7:23:13 AM6/3/11
to min...@googlegroups.com
Hi,

> I read the minix3 docs, maybe I can compile it. But I don't know how
> to build a file system and make a bootable iso. That is the most
> important part.

You can download the iso images of Minix at www.minix3.org/download
and use them directly for installing Minix. If you want to dive
deeper, you can have a look at /usr/src/tools/release.sh in the Minix
source code. .

Regards,
~
Vivek Prakash

thinker

unread,
Jun 5, 2011, 4:56:28 AM6/5/11
to minix3
Thank you very much.
Maybe I don't make myself clear.
I want to do the following things:
1. download the minix3 source code (done)
2. compile the kernel, libraries and other tools, get a kernel image
3. build a file system, get a root file system
4. wrap them up and create a bootable iso file
5. use vmware and the iso file to install a minix os

The iso file is exactly the same as the iso file which I download from
www.minix3.org.
I don't want to use the downloaded iso file to install a minix os or
just recompile the kernel.
I want to create my own iso file to install a minix os and runs it.

More specifically, assuming that I only have the minix3 source code
and a ubuntu system,
how can I build a minix system ?


Best regards,
Ben

Erik van der Kouwe

unread,
Jun 5, 2011, 5:07:21 AM6/5/11
to minix3
Hi,

> Thank you very much.
> Maybe I don't make myself clear.
> I want to do the following things:
> 1. download the minix3 source code (done)
> 2. compile the kernel, libraries and other tools, get a kernel image
> 3. build a file system, get a root file system
> 4. wrap them up and create a bootable iso file
> 5. use vmware and the iso file to install a minix os
>
> The iso file is exactly the same as the iso file which I download fromwww.minix3.org.
> I don't want to use the downloaded iso file to install a minix os or
> just recompile the kernel.
> I want to create my own iso file to install a minix os and runs it.
>
> More specifically, assuming that I only have the minix3 source code
> and a ubuntu system,
> how can I build a minix system ?

A bootable MINIX ISO image can only be made from MINIX itself, not
from any other operating system. It is possible to compile MINIX from
Linux (see http://wiki.minix3.org/en/DevelopersGuide/NewBuildSystem),
though the branch to do that is currently a bit outdated.

If you don't want to install a binary that you haven't compiled
yourself on your system, this would be the way to do this:
- Download the latest ISO image
- Install it on top of a hypervisor (on Ubuntu I would recommend KVM)
- Update to the latest version from Git (see
http://wiki.minix3.org/en/DevelopersGuide/TrackingCurrent)
- Reboot just to be sure
- Run the release.sh script in the tools subdir of the source
directory, I recommand adding "-p" to make an image without packages
- Copy the resulting ISO image to Ubuntu (using for example scp)
- Burn it onto a CD-ROM
- Boot from that CD-ROM to install your home-compiled MINIX

With kind regards,
Erik

Vivek Prakash

unread,
Jun 5, 2011, 5:20:08 AM6/5/11
to min...@googlegroups.com
Hi,

On Sun, Jun 5, 2011 at 2:26 PM, thinker <cnh...@gmail.com> wrote:
> More specifically, assuming that I only have the minix3 source code
> and a ubuntu system,
> how can I build a minix system ?

You are talking about cross compilation of Minix here. You can
certainly have a look at
http://wiki.minix3.org/en/DevelopersGuide/NewBuildSystem . A
discussion on mailing list can be found at
http://groups.google.com/group/minix3/browse_thread/thread/56588fc81f593fb2/d0e7fea89a3ca9b2
. There are few other discussions regarding it on the google group
which you can find by searching it.


Regards,
~
Vivek Prakash

Bengang Yu

unread,
Jun 5, 2011, 5:24:58 AM6/5/11
to min...@googlegroups.com
Thank you very much.
I will try.

Best regards,
Ben



Regards,
~
Vivek Prakash

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to min...@googlegroups.com.
To unsubscribe from this group, send email to minix3+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/minix3?hl=en.


Niek Linnenbank

unread,
Jun 5, 2011, 7:29:22 AM6/5/11
to min...@googlegroups.com
Hi,

I was just seeing this thread come by, and thought it was interesting.
Perhaps somebody can modify the build system such that it can use mkisofs
for building ISO's when on Linux/BSD? I know other custom OS's which do the same
and it should be a small change :-)

Niek

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to min...@googlegroups.com.
To unsubscribe from this group, send email to minix3+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/minix3?hl=en.

Erik van der Kouwe

unread,
Jun 5, 2011, 12:11:46 PM6/5/11
to minix3
Hi Niek,

> I was just seeing this thread come by, and thought it was interesting.
> Perhaps somebody can modify the build system such that it can use mkisofs
> for building ISO's when on Linux/BSD? I know other custom OS's which do the
> same
> and it should be a small change :-)

Sounds good, you're more than welcome to do it ;)

We've tried to make it into a GSoC project but IIRC received no good
applications for this project unfortunately.

With kind regards,
Erik

Tomas Hruby

unread,
Jun 5, 2011, 3:24:32 PM6/5/11
to min...@googlegroups.com
> We've tried to make it into a GSoC project but IIRC received no good
> applications for this project unfortunately.

IIRC there was no interest in this project at all :( T.

thinker

unread,
Jun 6, 2011, 12:08:29 AM6/6/11
to minix3
Hi,

I download minix_R3.1.8-r8398.iso and install it with vmware.
After login, I do the following things:
# cd /usr/src/tools
# ./release.sh -p

But error occurs:
Note: this script wants to do svn operations.
*Cleanup old files
umount: Device not mounted
umount: Device not mounted
umount: No such file or directory
umount: Not a mount point
* Transfering bootstrap dirs to /usr/r-staging
* Doing new svn export
svn: not found
svn: not found
Dong svn export of revision from .
svn: not found

Of course, if I run this script with no '-p', it will download lots of
packages from the svn.
This will take a long time and I don't want to wait. So I'm not sure
it will create a bootable iso.
Then I tried '-p -c', it generates a file :
minix3_1_8_ide_copy.iso.bz2
But the problem is this file can't be unzipped.
I tried to unzip it in minix3 and windows ( 7zip, winrar), but it
can't be unzipped.



On Jun 5, 5:07 pm, Erik van der Kouwe <erik...@gmail.com> wrote:
> Hi,
>
>
>
>
>
>
>
>
>
> > Thank you very much.
> > Maybe I don't make myself clear.
> > I want to do the following things:
> > 1. download the minix3 source code (done)
> > 2. compile the kernel, libraries and other tools, get a kernel image
> > 3. build a file system, get a root file system
> > 4. wrap them up and create a bootable iso file
> > 5. use vmware and the iso file to install a minix os
>
> > The iso file is exactly the same as the iso file which I download fromwww.minix3.org.
> > I don't want to use the downloaded iso file to install a minix os or
> > just recompile the kernel.
> > I want to create my own iso file to install a minix os and runs it.
>
> > More specifically, assuming that I only have the minix3 source code
> > and a ubuntu system,
> > how can I build a minix system ?
>
> A bootable MINIX ISO image can only be made from MINIX itself, not
> from any other operating system. It is possible to compile MINIX from
> Linux (seehttp://wiki.minix3.org/en/DevelopersGuide/NewBuildSystem),
> though the branch to do that is currently a bit outdated.
>
> If you don't want to install a binary that you haven't compiled
> yourself on your system, this would be the way to do this:
> - Download the latest ISO image
> - Install it on top of a hypervisor (on Ubuntu I would recommend KVM)
> - Update to the latest version from Git (seehttp://wiki.minix3.org/en/DevelopersGuide/TrackingCurrent)

Erik van der Kouwe

unread,
Jun 6, 2011, 12:55:57 AM6/6/11
to minix3
Hi,

> * Doing new svn export
> svn: not found
> svn: not found
> Dong svn export of revision from .
> svn: not found

You need to install Subversion to run it like this. These commands
should do that (IIRC):

pkgin up
pkgin in subversion-base

> Of course, if I run this script with no '-p', it will download lots of
> packages from the svn.
> This will take a long time and I don't want to wait. So I'm not sure
> it will create a bootable iso.
> Then I tried '-p -c', it generates a file :
> minix3_1_8_ide_copy.iso.bz2
> But the problem is this file can't be unzipped.
> I tried to unzip it in minix3 and windows ( 7zip, winrar), but it
> can't be unzipped.

Use bunzip2. This is available on MINIX and should be available on any
Unix system. You can get it for Windows with Cygwin. 7zip should also
be able to extract it IIRC.

How are you transferring the file? Please note that if you use ASCII
without switching to binary mode you are likely to corrupt it.

With kind regards,
Erik

thinker

unread,
Jun 6, 2011, 2:05:00 AM6/6/11
to minix3
Well, I use tar and 7zip to unzip it. You are right, I should use
bunzip2.
I transfer it with ftp.I switch ftp mode to binary.
Now I use bunzip2 to unzip this file. It is 113 MB (119,431,168 bytes)
after I unzip it.
I install the bootable iso file with vmware in my computer. It works
well.
Thank you very much.
Thanks everyone who helps me.
I am very glad I successfully made a bootable os cd myself. It feels
good.
Thank you.

Best regards,
Ben

Antoine LECA

unread,
Jun 6, 2011, 4:27:24 AM6/6/11
to min...@googlegroups.com
Niek Linnenbank wrote:
> I was just seeing this thread come by, and thought it was interesting.
> Perhaps somebody can modify the build system such that it can use mkisofs
> for building ISO's when on Linux/BSD? I know other custom OS's which do the
> same and it should be a small change :-)

There are a number of things to say about that.

First, as pointed out by Erik and Thomas, you really need to prove it
can be done: MINIX project resources are so scarce that they cannot
divert them just to help you (of course, proving it can be done is just
a part of the job, it does not guarantee it will be incorporated later.)

Also creating the ISO9660 image is just a little part of producing a
self-contained MINIX system.

But my main question is, why is writeisofs bad, and should be replaced
by mkisofs?

Okay, using mkisofs will make your cross-compiling a little bit easier,
on your set-up. Perhaps it would make it easier (by just a little bit)
for other people too; certainly not everybody though.

Then there is something which is worrying me, but I can only speculate
as I do not know mkisofs enough to be sure: can mkisofs as it stands
create the special ISO image that is using MINIX (with two file system
images and a partition table pointing to them embedded in first quarter
of sector 0, which is otherwise reserved; this is the small change you
are referring above.)

I agree that /usr might probably be a iso9660 file system instead
(another small change), but I do not think it would be that easy with /

And if by chance you end with a custom version of mkisofs for MINIX,
then will face the same problem than we have with e.g. GRUB: your custom
copy and their patches are MINIX-specific, so require special versions
of the otherwise basic tools: this effectively nullifies a fair part of
the possible advantages to drop the ad-hoc MINIX tools.

As I said, these are pure speculations. But I feel this should be make
clear before anybody start looking into changing the build process (and
the setup process) to use mkisofs instead of writeisofs.

Antoine

Reply all
Reply to author
Forward
0 new messages