Re: Kickstart issues in RHEL6 Beta

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

 



One of the snippets in cobbler moved away from list-harddrives to using /proc/partitions to be more reliable.

Their old code looked like this:
-drives=$(list-harddrives | awk '{print $1}')
-for disk in $drives; do
-    DISKS="$DISKS $(fdisk -l /dev/$disk | awk '/^\/dev/{print $1}')"
-done

Their new code looks like this:
+DISKS=$(awk '{if ($NF ~ "^[a-zA-Z].*[0-9]$" && $NF !~ "c[0-9]+d[0-9]+$") print "/dev/"$NF}'  /proc/partitions)
+# In the awk line above we want to make list of partitions, but not devices/controllers
+# cciss raid controllers have partitions like /dev/cciss/cNdMpL, where N,M,L - some digits, we want to make sure 'pL' is there
+#

I hope this helps. The leading - and + are from the patch.


Bryan Schneiders

On 04/26/2010 11:55 PM, Chris Lumens wrote:
1) /tmp/netinfo is now gone.  This is one of the most widely
documented place to easily get the network info when doing a %pre or
%post script.  I guess I will write some new code to get the info
manually out of ifconfig etc.. but a note about this would be nice in
the EL6 release notes since lots of people probably use this today in
EL5 kickstart scripts.

/tmp/netinfo was an implementation detail and a bit of a hack - really,
a way for anaconda's stage2 to know what loader set up.  loader doesn't
set up networking anymore.  NetworkManager does that.  Therefore, we
don't require netinfo anymore.  anaconda can get all that from dbus
instead of having to write out a file and read it back in again later.

2) In the current EL6 beta, the "list-harddrives" command inside the
anaconda environment is totally broken if you have a CDROM drive.  It
crashes with an error of "unknown disk label" from the python code.  I
believe that this little utility was widely used in %pre and %post
scripts as well.   It was the quickest way to get a list of all the
disks on the system and their info.  I used it to verify the correct
drive sizes and to automatically choose the first correct disk to
install to in my kickstart.  I even used a formula based on the disk
size info from list-harddrives to calculate the size of the swap lv.

File a bug, but please don't use any of the command stubs unless you
absolutely have to.  They do not recieve much of any testing or fixing.

- Chris

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

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.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