Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Landry on March 20, 2006, 09:40:08 PM
-
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_ISO
To 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
-
Hello,
I can not help you in your way of trying the custom install, I tried my own one with a quickstart file , still experiencing issue
with rc1 (see bug 962), but your error message is straight forward the box :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".
Your copy miss the .discinfo
file, it is not handle by the command you issue (cp -a /media/loop/* /tmp/myiso ).
Also be aware that this is not your FS size you have to take care of, but the logical volume one.
If you ar looking forward having a different FS for /home for instance, you have to create another lvol on which you'll
be able to create the new FS.
Gaston
-
Damn, you're right, the .discinfo file is missing in my iso.
If that is the only issue stopping me from rolling my iso, i owe you a :pint: !!
I try it, and i'll tell you.
If i manage to create and boot my image, i'll surely post a howto on the wiki.
The creation of the fs after the install is not a problem, i know how to use fdisk/sfdisk, mdadm, lv* and mkfs.* tools :) :)
-
Thanks a lot gaston for your indication, that was only it. I hacked a little more the smeinstallclass.py, and managed to install SME on a a part of my disk, leaving free space to be manuallty partitionned as i wanted.
I'll make a howto, hope this will be useful to some SME fellows !!
-
Hello Landry and Gaston94
Your post is very interesting, i would like to do the same modification using your method, but i have a checksum error when i boot on the modified boot CD of SME 7.0.
Have you any other tips to help us/me ?
Gaston94,
you said that you have performed a customized installation of SME7.0 with a quick start file.
Have you a sample of a quick start file that contains another partition /LVM organisation ? and the associate information to use it during the installation of SME.
Thank's in advance ( and sorry for my english, i'm french )
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_ISO
To 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
-
@lauradsl: i'm planning to write a howto-custom-partitionning-on-install when i'll have time :)
The checksum error is normal on your modified iso, as you changed files, the checksum is not the same as the original one.
I see two options:
- modifiying smeinstallclass.py and re-roll the iso. That's the hard way.
- with a standard iso, on boot, hold on shift to get access to the lilo prompt, and type 'partition'. This will present you the manual partitionning tool during the install, but this one is quite hard to use.
- you can also use the anaconda kickstart.cfg file, but there is doc only on centos/redhat sites, you'll have to adapt it to fit your needs.. i don't have more info on anaconda.
hope this helps !! :)
-
Hello,
the method I used was to regenerate an iso file with the custom kickstart and isolinux/isolinux.cfg files included (I did not know about the "old shift" tip landry mentionned)
The problem I raised (bug #962) looks to be fixed for next RC2 - not crossed check yet - but the workaround described works fine for RC1. you can find there a kickstart sample.
So you have many choice now
G.