From hamzy at us.ibm.com Fri Jun 8 20:39:50 2012 From: hamzy at us.ibm.com (Mark Hamzy) Date: Fri, 8 Jun 2012 15:39:50 -0500 Subject: [PATCH] Add leavebootorder option (pykickstart) Message-ID: <1339187990-28148-1-git-send-email-hamzy@us.ibm.com> https://bugzilla.redhat.com/show_bug.cgi?id=827116 The default on PowerPC machines is to change the boot order to boot into the newly installed drive. There are install scenarios where this is not preferable. So, I have added a new boot commandline and kickstart option called leavebootorder. --- pykickstart/commands/bootloader.py | 19 +++++++++++++++++++ pykickstart/handlers/control.py | 2 +- 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/pykickstart/commands/bootloader.py b/pykickstart/commands/bootloader.py index bb40a18..2268a68 100644 --- a/pykickstart/commands/bootloader.py +++ b/pykickstart/commands/bootloader.py @@ -234,6 +234,25 @@ class F17_Bootloader(F15_Bootloader): op.add_option("--boot-drive", dest="bootDrive", default="") return op +class F18_Bootloader(F17_Bootloader): + def __init__(self, writePriority=10, *args, **kwargs): + F17_Bootloader.__init__(self, writePriority, *args, **kwargs) + + self.leavebootorder = kwargs.get("leavebootorder", False) + + def _getArgsAsStr(self): + ret = F17_Bootloader._getArgsAsStr(self) + + if self.leavebootorder: + ret += " --leavebootorder" + + return ret + + def _getParser(self): + op = F17_Bootloader._getParser(self) + op.add_option("--leavebootorder", action="store_true", default=False) + return op + class RHEL5_Bootloader(FC4_Bootloader): removedKeywords = FC4_Bootloader.removedKeywords removedAttrs = FC4_Bootloader.removedAttrs diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py index 6fe7c10..4a7b41e 100644 --- a/pykickstart/handlers/control.py +++ b/pykickstart/handlers/control.py @@ -890,7 +890,7 @@ commandMap = { "authconfig": authconfig.FC3_Authconfig, "autopart": autopart.F17_AutoPart, "autostep": autostep.FC3_AutoStep, - "bootloader": bootloader.F17_Bootloader, + "bootloader": bootloader.F18_Bootloader, "btrfs": btrfs.F17_BTRFS, "cdrom": method.F14_Method, "clearpart": clearpart.F17_ClearPart, -- 1.7.7.6 From sr at genyosha.net Fri Jun 8 23:00:47 2012 From: sr at genyosha.net (Steve Rikli) Date: Fri, 8 Jun 2012 23:00:47 +0000 (UTC) Subject: how to tell when biosboot partition is needed? Message-ID: Is there some programmatic way within Kickstart %pre to determine if a "biosboot" partition is needed, or at least if it is an available option/fstype? Like many folks, we create a "/tmp/partitions.inc" sort of %include file in %pre, to partition the disk. Starting in Fedora16 a "part biosboot ..." partition is required, and ideally we'd like to be able to use the same %pre script to setup partitions on all the different Linux versions we need. We would be okay with "wasting" 1MB and always creating a biosboot partition for any Linux, but it's not a supported type prior to Fedora16, so that isn't an option. Thanks, sr. From balaji.parthasarathy at hp.com Mon Jun 18 20:34:00 2012 From: balaji.parthasarathy at hp.com (Parthasarathy, Balaji (BCS, Cupertino, USA)) Date: Mon, 18 Jun 2012 20:34:00 +0000 Subject: How to get a shell when kickstart install fails/hangs Message-ID: <774A286A68497042B74D49490106082E35B7253D@G4W3203.americas.hpqcorp.net> I have been experimenting with some kickstart files to automate installs (it also includes Cobbler snippets). But I get failures about errors in kickstart files when Anaconda launches. I want to get a shell to troubleshoot the problem. How do I do that? Right now I have a screen that says: The system will be rebooted when you press Ctrl+C or Ctrl+Alt+Del. The message also says that the Anaconda version is 13.21.149. I'm trying to install RHEL 6.2 Server. Thanks Balaji -------------- next part -------------- An HTML attachment was scrubbed... URL: From kspargur at redhat.com Mon Jun 18 20:59:42 2012 From: kspargur at redhat.com (Kevin Spargur) Date: Mon, 18 Jun 2012 16:59:42 -0400 (EDT) Subject: How to get a shell when kickstart install fails/hangs In-Reply-To: <774A286A68497042B74D49490106082E35B7253D@G4W3203.americas.hpqcorp.net> References: <774A286A68497042B74D49490106082E35B7253D@G4W3203.americas.hpqcorp.net> Message-ID: <6F49E60D-D1EA-44FB-BBD2-1F0C6573E078@redhat.com> Alt-F2 will get you to a prompt. -Kevin On Jun 18, 2012, at 4:39 PM, "Parthasarathy, Balaji (BCS, Cupertino, USA)" wrote: > I have been experimenting with some kickstart files to automate installs (it also includes Cobbler snippets). But I get failures about errors in kickstart files when Anaconda launches. I want to get a shell to troubleshoot the problem. How do I do that? Right now I have a screen that says: > > The system will be rebooted when you press Ctrl+C or Ctrl+Alt+Del. > > The message also says that the Anaconda version is 13.21.149. I?m trying to install RHEL 6.2 Server. > > Thanks > Balaji > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcoffman at ticom-geo.com Mon Jun 18 21:59:08 2012 From: dcoffman at ticom-geo.com (Dewey Coffman) Date: Mon, 18 Jun 2012 16:59:08 -0500 Subject: How to get a shell when kickstart install fails/hangs References: <6F49E60D-D1EA-44FB-BBD2-1F0C6573E078@redhat.com> Message-ID: <0A5FE2F1C1F58D4B9A821C362DA7C5E3020BCA20@roswell.ticom-geo.com> You need to be installing in ?text? mode to make that work. From: kickstart-list-bounces at redhat.com [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Kevin Spargur Sent: Monday, June 18, 2012 4:00 PM To: Discussion list about Kickstart Cc: kickstart-list at redhat.com Subject: Re: How to get a shell when kickstart install fails/hangs Alt-F2 will get you to a prompt. -Kevin On Jun 18, 2012, at 4:39 PM, "Parthasarathy, Balaji (BCS, Cupertino, USA)" wrote: I have been experimenting with some kickstart files to automate installs (it also includes Cobbler snippets). But I get failures about errors in kickstart files when Anaconda launches. I want to get a shell to troubleshoot the problem. How do I do that? Right now I have a screen that says: The system will be rebooted when you press Ctrl+C or Ctrl+Alt+Del. The message also says that the Anaconda version is 13.21.149. I?m trying to install RHEL 6.2 Server. Thanks Balaji _______________________________________________ Kickstart-list mailing list Kickstart-list at redhat.com https://www.redhat.com/mailman/listinfo/kickstart-list -------------- next part -------------- An HTML attachment was scrubbed... URL: From balaji.parthasarathy at hp.com Mon Jun 18 22:13:17 2012 From: balaji.parthasarathy at hp.com (Parthasarathy, Balaji (BCS, Cupertino, USA)) Date: Mon, 18 Jun 2012 22:13:17 +0000 Subject: How to get a shell when kickstart install fails/hangs In-Reply-To: <0A5FE2F1C1F58D4B9A821C362DA7C5E3020BCA20@roswell.ticom-geo.com> References: <6F49E60D-D1EA-44FB-BBD2-1F0C6573E078@redhat.com> <0A5FE2F1C1F58D4B9A821C362DA7C5E3020BCA20@roswell.ticom-geo.com> Message-ID: <774A286A68497042B74D49490106082E35B72632@G4W3203.americas.hpqcorp.net> Thank you Kevin and Dewey. Alt-F2 worked. I had to do another little bit of figuring out to send that command through Proliant?s iLO interface by configuring hotkeys. Balaji From: kickstart-list-bounces at redhat.com [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Dewey Coffman Sent: Monday, June 18, 2012 2:59 PM To: Discussion list about Kickstart Subject: RE: How to get a shell when kickstart install fails/hangs You need to be installing in ?text? mode to make that work. From: kickstart-list-bounces at redhat.com [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Kevin Spargur Sent: Monday, June 18, 2012 4:00 PM To: Discussion list about Kickstart Cc: kickstart-list at redhat.com Subject: Re: How to get a shell when kickstart install fails/hangs Alt-F2 will get you to a prompt. -Kevin On Jun 18, 2012, at 4:39 PM, "Parthasarathy, Balaji (BCS, Cupertino, USA)" > wrote: I have been experimenting with some kickstart files to automate installs (it also includes Cobbler snippets). But I get failures about errors in kickstart files when Anaconda launches. I want to get a shell to troubleshoot the problem. How do I do that? Right now I have a screen that says: The system will be rebooted when you press Ctrl+C or Ctrl+Alt+Del. The message also says that the Anaconda version is 13.21.149. I?m trying to install RHEL 6.2 Server. Thanks Balaji _______________________________________________ Kickstart-list mailing list Kickstart-list at redhat.com https://www.redhat.com/mailman/listinfo/kickstart-list -------------- next part -------------- An HTML attachment was scrubbed... URL: From balaji.parthasarathy at hp.com Wed Jun 20 23:54:53 2012 From: balaji.parthasarathy at hp.com (Parthasarathy, Balaji (BCS, Cupertino, USA)) Date: Wed, 20 Jun 2012 23:54:53 +0000 Subject: How to determine "internal" disk dynamically in kickstart/cheetah snippet Message-ID: <774A286A68497042B74D49490106082E35B74A67@G4W3203.americas.hpqcorp.net> Hi, When I install a system using Cobbler using kickstart/snippet, I want to only do the partitioning of 1. Internal only disk 2. Only one disk, if multiple exist 3. Handle RAID/non-RAID scenarios Is there a good/reliable way in Linux (RHEL and Fedora specifically) to determine #1? Since we are in the installation environment, some commands (like lsscsi) aren't available. Here's what I'm using in my snippet currently. ======== BEGIN SNIPPET ============ # Look for any 'scsi' or 'cciss' device; weed out output with partitions of those # devices (part) and cd/dvd devices (sr); grab the first line of the remaining output. # Assumption is first scsi device is "internal" disk. We want to partition only # the first internal disk. ls_output=\$(ls -l /dev/disk/by-path/pci* | grep -i -e scsi -e cciss | grep -v -i -e part -e sr | head -n 1) # If we did not get any proper data for disk devices, just let anaconda do auto partitioning # and use all/whatever disks anaconda finds, rather than throw an error. if [[ -z "$ls_output" ]] then ks_partition_cmd="" else # NOTE: we are parsing a output that looks like this: # lrwxrwxrwx. 1 root root 9 Jun 18 13:01 /dev/disk/by-path/pci-0000:0c:00.0-scsi-0:0:0:1 -> ../../sda device_symlink=\$(echo \$ls_output | awk '{print \$11}') if [[ ! -z \$(echo \$device_symlink | grep -i sd) ]] then # The first internal disk is a non-RAID disk. # Remove the "../../" prefix in "../../sda" first_internal_disk_name=\${device_symlink\#\#*/} else # The first internal disk is a RAID disk. # Remove the "../../" prefix in "../../cciss/c0d0" first_internal_disk_name=\$(echo \$device_symlink | awk -F'/' '{print \$(NF-1)"/"\$NF}') fi ks_partition_cmd="ignoredisk --only-use=\$first_internal_disk_name" fi # Allow anaconda to partition the system as needed # using just the first disk cat < /tmp/partition_info autopart $ks_partition_cmd PART_EOF ======== END SNIPPET ============ Thanks Balaji -------------- next part -------------- An HTML attachment was scrubbed... URL: From timm at fnal.gov Tue Jun 26 19:13:17 2012 From: timm at fnal.gov (Steven Timm) Date: Tue, 26 Jun 2012 14:13:17 -0500 Subject: Disable NetworkManager during kickstart? Message-ID: According to the RHEL6 kickstart documention, Anaconda uses NetworkManager to determine details about network interfaces. I am wondering if it is possible to disable NetworkManager while the kickstart is executing. Right now it appears that NetworkManager is correctly detecting, via DHCP, the correct IP, gateway, etc. but then is exiting with an exception claiming that the correct network driver is not loaded in my initrd.img and bringing up a menu to load a network driver disk. Is there any way to disable NetworkManager entirely during the kickstart execution? Steve Timm ------------------------------------------------------------------ Steven C. Timm, Ph.D (630) 840-8525 timm at fnal.gov http://home.fnal.gov/~timm/ Fermilab Computing Division, Scientific Computing Facilities, Grid Facilities Department, FermiGrid Services Group, Group Leader. Lead of FermiCloud project.