Discussion:
[Sisuite-devel] RE : [sisuite-users] systemimager-4.3.0-0.3 (kernel 3.7.2, hpsa, bnx2, ...) (For testing purpose).
LAHAYE Olivier
2013-01-24 17:10:22 UTC
Permalink
Hi,

Thanks a lot for all your debugging.
1/ I'll add your patch regarding the rsync as on normal systems, there are no links, so it will only increase the initrd size if your are using HP patches.
Is the HP hpsa driver very different from the one included in the standard kernel? I mean, is it usefull to use a proprietary driver for just imaging a drive?

As for the other problem, I must admit that I'm a little bit scared, as it seems to involve udev, and the latest udev can't be built easily on centos-6 :-( deps on util-linux or the like if my memory is correct. I hope it is not incompatible with kernel 3.7.2 .... I thought upgrading kernel to latest version would help having new exotic drivers available like 10Gb ethernet cards or latests raid controler, but it seems that it is a somewhat bad idea.
What I'm missing is that disk drivers and net drivers don't get loaded automaticaly when udev starts.... I've also noted that /etc/udev/rules.d is missing... IMHO, that may help in drivers loading if this directory is present. Need to have a look at why it is missing.

A few mail before, I said that I can't test anything at the moment, but this should change early next week I think, so I should be able to fix those things once for all again.
the dhclient problem is due to the dhcp update, so it should be easy to fix.

For the hpsa.ko module not loaded, a temporary workaround should be to modprobe it in the preinstall script.

For the firmware, it seems that they are not all built when building kernel. The copy workaround is not beautifull as it requires that firmware not needed on the imaging server must be installed if an imaged system requires it, but in the meantime, it's BTN (Better Than Nothing). So I'll include it asap.

Stay tuned, I'm working an this :-)

Best regards.

--
Olivier LAHAYE
CEA DRT/LIST/DCSI/DIR
________________________________
De : ***@cn.ca [***@cn.ca]
Date d'envoi : jeudi 24 janvier 2013 17:03
À : LAHAYE Olivier
Objet : Fw: [sisuite-users] systemimager-4.3.0-0.3 (kernel 3.7.2, hpsa, bnx2, ...) (For testing purpose).


Olivier,

Just received a reply from the list saying the post exceeded the limit and it needs to be approved by the moderator ...
In the meantime her is the post sent directly to you !

I was running out the door last night when I posted and forgot to answer your question :

- I included the rsync -L option(as described below with a snippet from my original post) because
unfortunately this is the default result when applying the HP spp(firmware and driver updates) to an HPserver.
The first time an spp is applied to a server the HP updated driver is applied correctly to the /lib/modules/kernel
tree. If you subsequently upgrade your kernel and then apply an spp again then the a link is made rather
then the module being copied(as shown below). Yes I could fight HP/redhat on this however I don't
have the time or energy ...

- Needed modules(ie hpsa) as symbolic links under /lib/modules/(uname -r)
ex
[***@scdev ~]# ls -al /lib/modules/2.6.32-220.4.2.el6.i686/weak-updates/hpsa/hpsa.ko
0 lrwxrwxrwx 1 root root 50 Mar 5 04:05 /lib/modules/2.6.32-220.4.2.el6.i686/weak-updates/hpsa/hpsa.ko -> /lib/modules/2.6.32-71.el6.i686/extra/hpsa/hpsa.ko
[***@scdev ~]#
This results in the modules not being copied correctly in the generated initrd.
I resolved this by modifying the UseYourOwnKernel.pm rsync invocations
to copy the resultant files(the L rather then the l option. I include the diff
below.


David K Livingstone
CN Signals and Communications
10229 127 Avenue floor 2
Walker Operations East Building
Edmonton, AB, T5E 0B9
Ph : 780 472-3959 Fax : 780 472-3046
Email: ***@cn.ca
----- Forwarded by David Livingstone/LIVING03/CNR/CA on 2013/01/24 08:51 -----
From: David Livingstone/LIVING03/CNR/CA
To: sisuite-***@lists.sourceforge.net
Date: 2013/01/23 16:51
Subject: Re: [sisuite-users] systemimager-4.3.0-0.3 (kernel 3.7.2, hpsa, bnx2, ...) (For testing purpose).

________________________________


Olivier,

I just attempted to load an x86_64 machine using your previous build with my changes applied as described in my email below. I haven't
yet had a chance to look at your new build.

- I attempted a boot using the standard kernel/initd and :
- the dhclient DEVICE failed. Later in the shell with "dhclient -v eth1) it turns out the interface was not up. After doing a "ifconfig eth1 up"
the dhclinet eth1 is now is successful however now it attempts to write the lease into /var/db/dhclient.leases rather then
the expected /var/state/dhcp/... Did you ever get a dhclient boot to work ?
- also during booting requested firmware was hanging ie netxen_nic:...: firmware: requesting phanfw.bin
See below with uyok.
- I eventually tried setting all the IP parameters and IMAGESERVER in the pxelinux.cfg file which
bypasses dhclient. At this point we now fail because there is no hpsa module loaded and no
disks are visible.

-The uyok load fails as once again numerous firmware files fail to load. This problem did not happen
with my initial test setup using the 4.1.99.svn4556_bli-1 packages but does with 4.3.0-0.2.el6.
In this case the firmware files are in the initrd however what appears to have changed is
that the firmware loading code changed from a shell script (firmware.sh) to a binary.

See https://bugzilla.redhat.com/show_bug.cgi?id=560031

The 4.1.99.svn4556_bli-1 package systemimager-i386initrd_template-4.1.99.svn4556_bli-1.noarch
has :
[***@nasedm udev]# pwd
/usr/share/systemimager/boot/i386/standard/initrd_template/lib/udev
[***@nasedm udev]# ls
total 132
12 ata_id* 8 collect* 12 edd_id* 12 path_id* 24 scsi_id* 12 vol_id* 4 write_net_rules*
8 cdrom_id* 12 create_floppy_devices* 4 firmware.sh* 4 rule_generator.functions 16 usb_id* 4 write_cd_rules*
[***@nasedm udev]#


And the systemimager-x86_64initrd_template-4.3.0-0.2.el6.noarch has :
[***@wild1 udev]# pwd
/usr/share/systemimager/boot/x86_64/standard/initrd_template/lib/udev
[***@wild1 udev]# ls
total 356
24 ata_id* 12 collect* 20 edd_id* 20 fstab_import* 36 path_id* 40 usb_id* 4 write_cd_rules*
36 cdrom_id* 44 create_floppy_devices* 44 firmware* 32 input_id* 32 scsi_id* 8 v4l_id* 4 write_net_rules*
[***@wild1 udev]#

The original firmware.sh is invoked in the /usr/share/systemimager/boot/i386/standard/initrd_template/etc/udev/rules.d/80-programs.rules :

[***@nasedm udev]# rpm -qf /usr/share/systemimager/boot/i386/standard/initrd_template/etc/udev/rules.d/80-programs.rules
systemimager-i386initrd_template-4.1.99.svn4556_bli-1.noarch
[***@nasedm udev]# cd /usr/share/systemimager/boot/i386/standard/initrd_template/etc/udev/rules.d
[***@nasedm rules.d]# ls
total 56
4 00-init.rules 4 30-cdrom_id.rules 4 61-persistent-storage-edd.rules 4 75-cd-aliases-generator.rules 4 90-modprobe.rules
4 05-options.rules 4 60-cdrom_id.rules 4 65-persistent-input.rules 4 75-persistent-net-generator.rules 4 99-udevmonitor.rules
4 20-names.rules 4 60-symlinks.rules 4 65-persistent-storage.rules 4 80-programs.rules
[***@nasedm rules.d]# grep -i firmw *
80-programs.rules:# firmware class requests
80-programs.rules:SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"







David K Livingstone
CN Signals and Communications
10229 127 Avenue floor 2
Walker Operations East Building
Edmonton, AB, T5E 0B9
Ph : 780 472-3959 Fax : 780 472-3046
Email: ***@cn.ca


From: LAHAYE Olivier <***@cea.fr>
To: "sisuite-***@lists.sourceforge.net" <sisuite-***@lists.sourceforge.net>
Date: 2013/01/23 03:49
Subject: [sisuite-users] systemimager-4.3.0-0.3 (kernel 3.7.2, hpsa, bnx2, ...) (For testing purpose).

________________________________


David,

I've updated my rpms 4.3.0-0.3 (currently being built).

- I've applyed your patch regarding the udev start.
- Regarding the firmwares, they were missing for unknown reason. Since I've upgraded the kernel to 3.7.2 and enabled many more drivers for disks (hpsa and more) and network devices (bnx2, ...), the firmwares that you were missing seems to be present in the image.
- Regarding UseYourOwnKernel, I didn't copy the firmwares as with the new kernel config, they seem to be included.
- I didn't had a look at the UYOK which doesn't copy the kernel and initrd.img.
- As for the -L option in rsync, I don't know if it's usefull as there are no links in the templates trees. If you use another tree, though, I'm not sure if the -L option is the way to fixe the issue you are seeing as it may result in bigger initrd with duplicate materials. at least a hard link could be a solution, though in the 1st place, the issue is caused by a missplaced thing and a trick is to create a softlink to hide the issue. Can't you have a tree with no soft links?

Could you give a test to these rpms and and test with default kernel?

Many thanks for your help.

Best Regards.

RPMS:
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-bittorrent-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-client-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-common-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-flamethrower-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-i386boot-standard-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-i386initrd_template-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-server-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-x86_64boot-standard-4.3.0-0.3.el6.noarch.rpm
http://olivier.lahaye1.free.fr/RPMS/noarch/systemimager-x86_64initrd_template-4.3.0-0.3.el6.noarch.rpm

SRPMS:
http://olivier.lahaye1.free.fr/SRPMS/systemimager-4.3.0-0.3.el6.src.rpm

Scrips:
http://olivier.lahaye1.free.fr/RPMS/extra/si_scripts.tar.bz2
--

Olivier LAHAYE

CEA DRT/LIST/DCSI/DIR







De : ***@cn.ca [***@cn.ca]

Date d'envoi : mercredi 16 janvier 2013 23:38

À : sisuite-***@lists.sourceforge.net

Objet : Re: [sisuite-users] RE : Which version ?






Olivier,


Thanks. So far I have installed the rpm's on a dl380G7 with rhel6.3 x86_64 and both prepared the image(uyok) and retrieved from




a similar server with the server packages loaded.Next step will be to test load the image on another server using both the standard and uyok

( I'm a little gun shy tryingto load back to the same server incase there are problems).



I also re-applied the changes I've itemized below for the same reasons - btw the change below to rcS(start udev BEFORE load_my_modules) might



address why you had similar problems ie needing the pre-install script to load the modules).







-



David K Livingstone

CN Signals and Communications

10229 127 Avenue floor 2

Walker Operations East Building

Edmonton, AB, T5E 0B9

Ph : 780 472-3959 Fax : 780 472-3046

Email: ***@cn.ca












From:
LAHAYE Olivier <***@cea.fr>



To:
"sisuite-***@lists.sourceforge.net" <sisuite-***@lists.sourceforge.net>



Date:
2013/01/07 02:05


Subject:
[sisuite-users] RE : Which version ?








Hi,



You can try the 4.3.0-0.1svn version, it worked for me. You'll need pre and post-install scripts available here:


http://olivier.lahaye1.free.fr/RPMS/extra/


Cheers,




--




Olivier LAHAYE

CEA DRT/LIST/DCSI/DIR



De : ***@cn.ca [***@cn.ca]


Date d'envoi : mercredi 19 décembre 2012 00:09


À : sisuite-***@lists.sourceforge.net


Objet : [sisuite-users] Which version ?




I have been using a modified version of 4.1.99.svn4556_bli-1 to load my i386 rhel6.x servers as




described below. I am now looking at imaging similar machines but now with the x86_64 version


of rhel6.3 so I need like initrd_template( and boot_standard if it works) packages.



What versions should I be trying ?

http://olivier.lahaye1.free.fr/RPMS/noarch/
??

Thanks





David K Livingstone




CN Signals and Communications

10229 127 Avenue floor 2

Walker Operations East Building

Edmonton, AB, T5E 0B9

Ph : 780 472-3959 Fax : 780 472-3046

Email: ***@cn.ca

----- Forwarded by David Livingstone/LIVING03/CNR/CA on 2012/12/18 16:00 -----






From:

David Livingstone/LIVING03/CNR/CA



To:

sisuite-***@lists.sourceforge.net



Date:

2012/03/29 09:41



Subject:

Loading RHEL 6.2 using 4.1.99.svn4556_bli-1









Using systemimager 4.1.99.svn4556_bli-1(ext4 enabled version) I have successfully imaged a




RHEL 6.2 image to HP DL380G7 hardware(p410 array controllers). I was considering using SALI


however for RHEL6.x grub2 is not an issue and ext4 support is included in 4.1.99.svn4556_bli-1.



The setup I was imaging is a Proliant DL380G7 server with two p410 controllers(p401i and p410)



with raid1 for root/boot/swap on the p410i and raid5 for /data on the p410. The system is running


the latest RHEL 6.2.



The attempted to image the system in two ways:



1. standard kernel


2. uyok


1. standard kernel




I eventually got this to work but only after major modifications to the install script and manually


setting up grub. The major issue here is that the default kernel uses the cciss driver and


device naming(ex /dev/cciss/c0d0p2) and the RHEL6.x uses the hpsa driver(scsi naming ex /dev/sda).


See http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02677069/c02677069.pdf
.

In general RHEL 5.x and before uses the cciss driver and RHEL6.x uses the hpsa when possible.


I presume the standard kernel could be built with the hpsa module and some version logic


applied to resolve this.


2. uyok



This worked successfully after making some changes to address :


- Needed modules(ie hpsa) as symbolic links under /lib/modules/(uname -r)


ex
[***@scdev ~]# ls -al /lib/modules/2.6.32-220.4.2.el6.i686/weak-updates/hpsa/hpsa.ko


0 lrwxrwxrwx 1 root root 50 Mar 5 04:05 /lib/modules/2.6.32-220.4.2.el6.i686/weak-updates/hpsa/hpsa.ko -> /lib/modules/2.6.32-71.el6.i686/extra/hpsa/hpsa.ko


[***@scdev ~]#


This results in the modules not being copied correctly in the generated initrd.


I resolved this by modifying the UseYourOwnKernel.pm rsync invocations


to copy the resultant files(the L rather then the l option. I include the diff


below.




- Numerous /lib/firmware files were missing in the initrd. By default the


bnx2 nic driver(driver for the four nic's on the motherboard) as well as


others in the RHEL6.2 kernel request firmware which is missing in the


uyok initrd. I got this to work by :


- modifying UseYourOwnKernel.pm to copy /lib/firmware to the initrd.


Unfortunately this copies all of firmware as I couldn't figure out how to


dynamically copy what was needed.


- modified rcS under the std template to start udev BEFORE the modules


are inserted.


- rcS : start udev before loading modules.


- under the std template :


/usr/share/systemimager/boot/i386/standard/initrd_template/etc/init.d/rcS


- The ramdisk_size must be set high enough to accept the larger initrd.


- I had to si_cpimage as part of testing and noted that for yuok the


kernel and initrd.img files are not copied. They had to be copied manually.




Notes :



When creating the image initially I also had to change si_prepareclient to use parted rather then sfdisk. I believe a bug


was submitted on this a long time ago which was never applied. parted supports gpt


partitions and sfdisk does not.


[***@nasmtl sbin]# diff si_prepareclient si_prepareclient.orig.4.1.99.svn4556_bli



969,971c969,971

< # if($arch eq "i386") {


< # $preferred_tool = 'sfdisk';


< # }

---
if($arch eq "i386") {
$preferred_tool = 'sfdisk';
}
- Diff for UseYourOwnKernel.pm



[***@nasmtl SystemImager]# diff UseYourOwnKernel.pm UseYourOwnKernel.pm.orig


152c152

< $cmd = qq(rsync -aL --exclude=build --exclude=source ) .


---
$cmd = qq(rsync -a --exclude=build --exclude=source ) .
159c159

< $cmd = qq(rsync -aLR $module $staging_dir);


---
$cmd = qq(rsync -aR $module $staging_dir);
223,225d222

< #

< # Copy /lib/firmware file to initrd


< #

227,233d223

< if (-d "/lib/firmware") {


< # copy entire firmware tree to new initrd.


< $cmd = qq(rsync -aLR /lib/firmware $staging_dir);


< !system( $cmd ) or die( "Couldn't $cmd." );


<

< }

<


- Diff for rcS :


[***@nasmtl init.d]# diff rcS rcS.orig


45,47d44

< # Start udev BEFORE load_my_modules so the modules can load firmware if needed.


< start_udevd

<

49a47,48
start_udevd
David K Livingstone


CN Signals and Communications

10229 127 Avenue floor 2

Walker Operations East Building

Edmonton, AB, T5E 0B9

Ph : 780 472-3959 Fax : 780 472-3046

Email: ***@cn.ca

------------------------------------------------------------------------------

Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,

MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current

with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft

MVPs and experts. SALE $99.99 this month only -- learn more at:

http://p.sf.net/sfu/learnmore_122412


_______________________________________________

sisuite-users mailing list

sisuite-***@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/sisuite-users

Loading...