Re: 2 ks.cfg files in syslinux.cfg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, let me try this. I'm working with initrd for another reason, see if I
understood it all... (Always in for a challenge...)

The Red Hat boot disk is an MS-DOS formatted disk with, among other things,
the Linux kernel and a file called initrd on it. The initrd file is the
"initial root disk", the root disk that is mounted by the Linux kernel
before it starts accessing the network and can mount the true root disk, or
can put something on a ram disk and use that as root.

The initrd is created by the following procedure (in general - details may
vary):

dd if=/dev/zero of=initrd.unzipped bs=1024 count=2048 (create a 2MB empty
file)
mke2fs initrd.unzipped (use the file as block device and put a filesystem
in it)
mkdir /mnt/initrd
mount -o loop -t ext2 initrd.unzipped /mnt/initrd (mount the filesystem)
(now copy all files over. You might want to take a look at a script called
mkpcinitrd - this does something similar but not exactly what you want
here)
umount /mnt/initrd
mount /mnt/floppy
gzip -9 < initrd.unzipped > /mnt/floppy/initrd

So, what Erik means is that you have to take the initrd file, uncompress
it, mount it and add/change any files on there. Then unmount it, zip it up
again and put it back on disk. And you probably need to do this scripted
instead of live, since you want to decide which ks file to use on boot...

To be honest, that's not something I would like to try. What I would do is
a. Make two different kickstart disks, each with a different ks.cfg file
and use one or the other as necessary, or
b. Make use of the nfs method that was described in any of the other
postings.

Hope this clears things up a bit.

Regards, Wouter.


Hi,

Erik, can you give me a more detailed explanation of your suggestion?  I'm
really
new to this so I'm not quite up to speed on things.  Like what do you mean
by
"unroll the initrd on the boot"?

Thanks for your help!



> I have two ks.cfg files(ks1.cfg and ks2.cfg) that install different sets
of
> packages.  I would like to be able to choose which set to install from
the
> kickstart screen.  Any suggestions on how to do this?   Below is my
> syslinux.cfg file.  I am not sure how to tell it to use either ks1.cfg or
> ks2.cfg.


You can't do quite what you want. You can unroll the initrd on the boot
disk, copy your files onto that filesystem, put the new initrd there, and
then use ks=file:/ks1.cfg or file:/ks2.cfg.Erik



_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list







[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux