[Novalug] Mounting an NFS share during the post-install phase of a Fedora 6 kickstart install

Peter Larsen plarsen@famlarsen.homelinux.com
Mon Jul 7 22:58:18 EDT 2008


> My goal is to come up with a method by which I can perform a Fedora install on a headless (no KVM) machine by doing nothing other than putting a floppy disk in it's drive and pressing the reset button.  Needs to be via floppy as I still have some older machines that won't boot off CD unless I use smart boot manager, which is a manual process which would require a KVM.
> 

The default should be pretty straight forward. There are many guides out there explaining basic kickstart setups.
But I think you're approaching it from an angle that's making things a lot more complicated than it has to be.
The installer supports installing from NFS, HTTP, FTP and even SMB if I remember right. There's no real need to reinvent that.
You need to load the network boot install image from your PXE boot, as the boot parameter pass in the location of the 
server to install from (PXE boot options are plentiful out there). If you don't have PXE, it's still just a kernel parameter.
So like you load the install kernel with "ks=kickstartfile" you simply add the source for the install, being NFS, HTTP etc.

See http://fedoraproject.org/wiki/Anaconda/Kickstart

Where you seem to be complicating things is, thinking you need the ISO. You don't - it's actually meant to NOT use the ISO. 
Instead the installer expects a full directory structure as found on the CD/DVD. In essence, your ks will command anaconda to
include specific packages, and then anaconda will download package by package from the source you give it. It doesn't load 
the ISO at all making the load much faster - you only download what you need and not a complete multitude of mega/giga bytes
of data your installer will ignore after all.

Another advantage of this approach is, that you can update your install image so you install the absolute latest release 
instead of the old initial image. rsync is made for this, so a simple cron-job on your image server will keep things updated. 
And, post install, you can point your yum to your own repository making updates local too.

As an answer to your question, you have to remember that during install you're running a minalistic kernel and chrooted.
http://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_5._Post-installation_Script has some more issues about pre-reqs.


> %post --log=/mnt/sysimage/tmp/postlog.mgg --erroronfail --nochroot
> mkdir /mnt/sysimage/tempmount
> /mnt/sysimage/bin/mount -t nfs 10.192.130.140:/isos /mnt/sysimage/tempmount
> 

You're chrooted - there's no /mnt/sysimage. It's chrooted to your new root directory. So in other words, you need to
mkdir /tmp/mount and then mount -t nfs <ip>:bla /tmp/mount

However, you don't want to access the ISO that way. It's way WAY too slow. See above.


-- 
Peter Larsen <plarsen@famlarsen.homelinux.com>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20080707/85e448c6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20080707/85e448c6/attachment.asc>


More information about the Novalug mailing list