[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Can the install method be contained within a kickstart file that is referenced via a %include option
- From: Matthew Richards <Matthew Richards contentkeeper com>
- To: <anaconda-devel-list redhat com>
- Subject: Re: Can the install method be contained within a kickstart file that is referenced via a %include option
- Date: Mon, 22 Sep 2008 22:47:41 +1000
Hi Jerry,
Thanks for the suggestion, I'll give it a whirl.
One question that springs to mind , do you know if identifying the USB drive
via its label (which is how I am identifying it in my %pre script
coincidentally) will prevent Anaconda from seeing the USB drive as a viable
install target? Do you think I should also include an option of (ignoredisk
--drives=LABEL="name") in the kickstart file, and is that syntax even
supported?
Just some thoughts . . . as I say, I will give it a whirl.
Thanks again.
Matt.
----------------------- Original Message -----------------------
From: Jerry Vonau <jvonau shaw ca>
To: Discussion of Development and Customization of the Red Hat Linux Installer
<anaconda-devel-list redhat com>
Cc:
Date: Mon, 22 Sep 2008 07:31:57 -0500
Subject: Re: Can the install method be contained within a kickstart file that
is referenced via a %include option
Matthew Richards wrote:
> Apologies in advance for the long post, and if this question is being posted
in
> the wrong place. It is rather kickstart oriented but I think this is the
right
> place for it.
>
> Short version:
>
> In a kickstart install, can the install method (specifically 'harddrive') be
> contained within a file that is referenced via a %include option in the main
> kickstart file?
>
> Long Version:
>
> I am re-spinning CentOS 5.2 (Anaconda 11.1.2.113-1) with the aim of making it
> install unattended from a USB flash drive.
>
> The USB drive is identified differently depending upon the hardware
> configuration of the system with which it is booted. Generally speaking if
the
> system has only IDE disks then the USB drive becomes /dev/sda. If the system
> has a SCSI or SATA disk then the USB drive becomes /dev/sdb, etc.
>
> The problem I face is that Anaconda sees the USB drive as a viable install
> target and bootloader option. To prevent Anaconda from installing to the USB
> drive I am using the harddrive, ignoredisk and bootloader kickstart options,
> e.g.
>
> harddrive --partition=/dev/sda1 --dir=/iso
> ignoredisk --drives=sda
> bootloader --driveorder=hda,hdb,hdc,hdd,sda,sdb,sdc,sdd --location=mbr
>
> (Ok, I know the configuration of the bootloader option is ugly but it meets
my
> requirements for now and my respun distro will probably never be installed on
a
> system with more than 3 local disks)
>
> I cannot hard code these kickstart options because the USB drive identity
> changes with each different hardware configuration, so I have used a similar
> approach to the dynamic partitioning example given in the %pre section of the
> kickstart doco. That is, I am using the %pre section to probe the install
> target and identify the USB drive and then generate a kickstart file-part
that
> contains the appropriate harddrive, ignoredisk and bootloader options as
> outlined above. The kickstart-part is then included in the main kickstart
file
> via the %include option.
>
> It seems that when the install method is not in the main kickstart file that
> Anaconda prompts for the install method. I believe this is because it does
not
> run the scripts in the %pre section until after it has loaded the stage2
image,
> for which it needs to know the install method which is why it prompts the
user
> and puts and end to the whole unattended experience. My kickstart file looks
> something like this:
>
> %include /tmp/ks-part
> %include /tmp/ks-common # this has all of my other kickstart options in it.
> %pre
> # shell script to identify USB drive and echo 'harddrive' and 'ignoredisk'
> options to /tmp/ks-part
>
> Can anyone suggest a way around this or an alternative solution please?
>
> Two that have come to mind while writing this post are (1) use custom udev
> rules added via the initrd.img file to ensure that usb drive is always
mounted
> as /dev/sdX and then hard code this setting into the kickstart file, (2) use
a
> custom anaconda installer update (e.g. kickstart.py) to perform the dynamic
USB
> drive identification and exclusion, instead of using the %pre section of
> kickstart.
>
> Thanks.
>
> Matt
You can try labeling the usb drive, then use that label to identify the
usb drive at the boot prompt with ks=LABEL="name":/ks.cfg. and
method=hd:LABEL="name"/
Not sure if your version of anaconda will support that syntax.
Jerry
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list redhat com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]