> I saw your email in one of the RedHat newsgroups. > Can I ask you a couple of questions? Sure. I'm copying kickstart-list@xxxxxxxxxx too. > In one of your emails you had the %pre section after the > %post, is this > significant? > I cannot get my %pre section to run! %pre first exists with Red Hat Linux 7. It's essentially a bash shell that runs right before loader (the text mode stage of the installer that probes for devices and insmod's kernel modules) passes control over to anaconda (the text/GUI mode rest of the installer). Most people don't need to have stuff in %pre. Erik added it because enough people do need it. It lets you fix up stuff that loader may not have gotten right for your particular install before anaconda starts. I use it on IA-64 because I've got some strange partition assumptions that anaconda can't deal with otherwise. > Also is there any information available on the environment at > the time %pre > is executed? > Such as what devices exist, what drives are mounted. For > example I notice an > image > exists as /mnt/runtime does this get transferred to the final > image or is it > temporary so if > I write stuff here will it be discarded. The best way to see what the environment looks like is to have this: %pre read word Then, when loader runs %pre, it'll pause waiting for user input. Switch to VT2 (there'll be a bash prompt there) and you can go root around and see what's set up. Your disk and network modules be set up, but the installer hasn't touched your disks yet. /mnt/runtime is the file system with the rest of the anaconda code in it. See RedHat/instimage on the CD for exactly what's there. /mnt/sysimage is your actual hard disk root partition, but I don't think it's mounted at this point yet. > Finally the reason for my interest - have you played with > hardware RAID and > kickstart because I cannot get the partitioning commands to > do much at all. > Full auto-allocation > and --onprimary seem to work but that's all. For large > multiple disks I want > to have control > not have filesystems splattered all over the place. We sell a large portion of our servers with hardware RAID. You have to have the logical drives created before kickstart runs (we use a BIOS or DOS utility that sets up the logical disks prior to starting the Linux install). Then the installer needs to know about your hardware (do you have the right drivers included in the installer, is it finding and loading them?). Sounds like yes. Then, we tend to explicitly lay out the file system. Here's an example: zerombr yes clearpart --linux part /boot --size 20 --ondisk sda part /usr --size 2048 --ondisk sda part / --size 1024 --ondisk sda part swap --size 512 --ondisk sda part /var --size 256 --ondisk sda part /usr2 --size 1 --grow --ondisk sda part /tmp --size 512 --ondisk sda That's sufficient for installing everything onto the first logical drive (sda). If you've got additional logical drives, you can force new partitions to be created there. If you've got a variable number of additional logical drives, you can write code in %post to create new partitions and file systems on those drives. > Thanks, > > Ian Packer. > EDS E-Solutions, Stockley Park. Hope this helps. Kickstart-list and archives are really helpful, as is the Red Hat Linux 7 Resource Guide, which explains in some detail how kickstart works, and will improve in future releases. :-) Thanks, Matt -- Matt Domsch Dell Linux Systems Group Linux OS Development www.dell.com/linux