On 06/20/10 11:18 PM, Pranay Kumar Shrivastava wrote:
Well.. I've not done much yet in this, currently gathering the info required to 
build a custom opensolaris iso image. So here is my understanding so far and 
how I intent to go about this...

 From the information you provided, I'm thinking the image is actually a 
loopback mount of a file which has a geometry of a Disc? Everything is written 
to this using something like dd? And rest of it is configured by the scripts 
like the bootsector etc for this disc?

So...

1. After building the kernel from sources, you said that it'll build a repo 
locally, so if that's the case this should be based on the current system 
configuration I've?

Yes, see the ON IPS FAQ[1] for more info.

2. I specify this repo in the manifest file as the main repo and the 
pkg.opensolaris.org/dev or release as the alternate repo.  But which packages 
should I specify if I'm looking to build a very small image. Basically I wanna 
get rid of everything that end user may not use like development etc and web 
servers, all of these. I just want a minimal iso image so that user can chose 
the rest of packages by himself later.

There's no precise solution to that question yet. I know there are a number of different users who have been looking into what exactly is needed for a "minimized install." As a starting point, you could look at the "JeOS" work done[2]

3. In case the repo isn't created from the kernel build process is there any 
other way to specify that my kernel should go in this iso image rather than the 
one pulled in from the opensolaris repo?

You can add a custom script at any point in the DC build process by specifying it in the DC manifest. The link[3] I mentioned earlier in this thread has some info on how to insert a custom script. If you went this route, you'd want to put yours in right after the "im-pop" finalizer script, and copy it to the <build_area>/proto/pkg_image area. If you run DC and have it pause after the im-pop step (using the '-p' flag), you can see that the area in question looks like a full image.

4. (Not that important...)Is there anyway I can configure the preferred repo to 
point at my server by default?

Absolutely. Just modify the DC manifest to point at your repo as the primary publisher using the "pkg_repo_default_authority" element and as many "pkg_repo_addl_authority" elements as needed. DC will, during its build process, search the publishers in the order given - the first publisher with a matching package is where that one will get installed from.

- Keith

[1]http://hub.opensolaris.org/bin/view/Community+Group+on/ON+IPS+FAQ
[2]http://hub.opensolaris.org/bin/view/Project+jeos/
[3]http://dlc.sun.com/osol/docs/content/dev/DistroConst/scripts.html


-----Original Message-----
From: Keith Mitchell [mailto:[email protected]]
Sent: Friday, June 18, 2010 10:27 PM
To: Pranay Kumar Shrivastava
Cc: caiman-discuss
Subject: Re: [osol-discuss] Specifying the kernel in my image.

You're correct in that the distro_const scripts themselves don't contain
the kernel image - the distro_const command makes use of IPS to install
a base image. The SUNWcs and SUNWcsd packages specified in the manifest
are pulled from the given IPS repository. Those packages contain the
kernel (among many other things), and include definitions for the
initial directory structure.

How are you building the kernel? If it's based off of a recent version
of ON, an appropriate IPS repository with many of the needed packages
gets built along with it. However, some required packages would still
need to be compiled separately or pulled in from
http://pkg.opensolaris.org/dev (this is all assuming a baseline of
development build 134). (I'm trying to understand what you've done so
far and where you're going with this so I can provide a bit better
guidance...)

- Keith

On 06/18/10 05:59 AM, Pranay Kumar Shrivastava wrote:
Hi,

For the first solution
I'm not sure about what you mean by appropriate directories. I was trying to 
search for a package named kernel or something but didn't found any on my 
machine from pkg list command. I'm a newbie so I'll require a bit more help.

For the second solution, now since the online repo is timing out, what I tried 
was to create a repo of my own, with a dummy package. (Only 1). Now when I 
tried to build my image, obviously no programs would be there, I got errors , 
I've turned off errors just to see exactly what goes on with the scripts.

Now the scripts require that pkg_img contains the required directories. I'm 
assuming that this happens while installing the packages that they unpack and 
create the required directories? But if that's the case, the scripts themselves 
don't contain the kernel image that needs to go in this live iso image (or does 
it?). Now where is this being specified? The manifest for distro_const? I 
didn't saw any entry for ai_x86_image.xml that specifies the kernel image.

I hope you understand what I'm trying to do here... Thanks very much for the 
response.



-----Original Message-----
From: Keith Mitchell [mailto:[email protected]]
Sent: Thursday, June 17, 2010 8:10 PM
To: Pranay Kumar Shrivastava
Cc: [email protected]; caiman-discuss
Subject: Re: [osol-discuss] Specifying the kernel in my image.

(Cross-posting to caiman-discuss)

If you've compiled the kernel sources, you have 2 options:

1) Publish them as the appropriate IPS package to a (local) repository,
and use that as the preferred publisher / authority for the distro_const
(DC) build.
2) Add a finalizer script, immediately after the "im-pop" finalizer,
that copies the binary into the correct location in the proto/pkg_image
area of the build*.

* See: http://dlc.sun.com/osol/docs/content/dev/DistroConst/scripts.html

On 06/17/10 04:26 AM, Pranay Srivastava wrote:

Hi,
I've been experimenting with [u][b]distro_const[/b][/u], the manifest file ( 
Mostly same i actually copied from AI installer for x86).

The question is if say i've compiled a the kernel sources and they reside in 
the platform/build-18..... some directory. So how and where do i specify that 
this kernel binary should be used instead? I've seen the 
[u][b]boot_root[/b][/u] section and in there i see two entries...

[i][u][b]<base_include type="dir">kernel</base_include>
<base_include type="dir">platform</base_include>[/b][/u][/i]

I'm guessing that these are supposed to tell which kernel should go in the iso 
right? however actually which one is it?  The the /kernel is the current 
current not the one i compiled.

So which one of these is to be used?

Thanks for ur help


DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

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




_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to