Hello all !!
I'm trying to create my own iso install, starting from a -pre3 image(or other version, whatever). I want anaconda NOT to partition all the disk, so that i can manually partition and use the rest of the disk the way i want. So i looked into the anaconda code, and found that i may do that by modifying the file
$ISO_ROOT/product/installclasses/smeinstallclass.py
, at the lines 167 and 168
#BEFORE
request = partRequests.LogicalVolumeRequestSpec(filesystem, format=1, grow=1,
mountpoint="/", size=1300, volgroup=201, lvname="lv_root")
#AFTER
request = partRequests.LogicalVolumeRequestSpec(filesystem, format=1, grow=0,
mountpoint="/", size=2000, volgroup=201, lvname="lv_root")
If i put grow to 0, anaconda will not grow the fs to the entire disk, and will format the fs with the specified size. That's what i understood.
After reading all the code of anaconda (mostly directory updates and smeinstallclass.py), i think this is the best way to tell anaconda to partition the disk the way i want. Correct me if i make a mistake.
To build the iso, i started looking into the CVS tree on sourceforge how the devs worked, particularly
http://cvs.sourceforge.net/viewcvs.py/smeserver/builds_bin/build_ISOTo do the modification, and test my changes, this is how i proceed on a debian classical system ( i'd like NOT to install a CentOS 4.2 for the moment to do so, i don't have a LOT of test machines)
mount -o loop smeserver.iso /media/loop
mkdir /tmp/myiso
cp -a /media/loop/* /tmp/myiso
cd /tmp/myiso
vi product/installclasses/smeinstallclass.py #apply my modification
mkcramfs product CentOS/base/product.img #replace the loopfs with my img
mkisofs -V "SME Server modified" -A "SME Server created on 20 mar 2006" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -r -o smeserver-7.0pre3-patched.iso . #create ISO
qemu -cdrom smeserver-7.0pre3-patched.iso -boot d -hda virtual_hd.img #test my iso with QEMU
I don't know if this procedure is correct, this is the best i've imagined with the documentation and scripts i had under the hand.
The problem is that when the install starts in qemu, the cd boots, asks for the language and keymap (as a normal install), but doesn't recognize my iso as a SME Server install iso, and asks me to insert the media (or try an http/ftp/nfs install). I don't get to the step "check the md5sum iso".
I'm really interested in hacking the SME install process to roll my own iso, but i'm kinda blocked here. My questions are:
- is there some documentation somewhere to do what i want (apart from rough cvs tree scripts) ? (please don't say me "use the procedure for sme6-iso-howto or the custom-anaconda-howto", i already read it, and they are for SME6)
- am i on the right way ?? (if so, where am i wrong ?)
- i can provide more debug info if someone is interested (anaconda logs, etc..)
- if i install a standard SME7 (plus some -devtools), can i roll more easily my own iso than on my debian system ? I don't think so, as i'm doing only a simple modification to the iso tree..
- What does running /usr/lib/anaconda-runtime/genhdlist produces ? A checksum of the iso/rpms/headers ?
- The size of the iso produced is very different from the std iso, but i only do a three-byte modification.. where does this come from ??
-rw-r--r-- 1 root root 453853184 2006-03-20 21:04 smeserver-7.0pre3-patched.iso
-rw-r--r-- 1 landry landry 449304576 2006-02-21 20:30 smeserver-7.0pre3.iso
Thanks for any help, and i'll particularly appreciate some help or comment on my problem (and the solution i proposed) from a sme developer.
Landry