{"id":619,"date":"2012-09-30T06:06:45","date_gmt":"2012-09-30T06:06:45","guid":{"rendered":"https:\/\/trouble.org\/?p=619"},"modified":"2012-10-12T15:09:10","modified_gmt":"2012-10-12T15:09:10","slug":"hp-firmware-disks","status":"publish","type":"post","link":"https:\/\/trouble.org\/?p=619","title":{"rendered":"HP firmware disks"},"content":{"rendered":"<p>I&#8217;d been playing with them&#8230; and since I hadn&#8217;t seen this anywhere I&#8217;ll put it as a small hack o the day.<\/p>\n<p>The disks do what they say (e.g. &#8230; install firmware ;)) &#8211; basically you burn it to a cd, boot it up, and it has some sort of access to the system. Since I&#8217;ve been working with these sorts of things lately I was curious how they did this. I&#8217;d ripped apart the 870 version and was thinking of writing that up&#8230; but it was a bit messy&#8230; so I downloaded the 920 version and triviality stared me in the face, as it will yours as well.<\/p>\n<p>The very quick version; copy the ISO to a writeable spot, edit\u00a0&#8220;\/system\/isolinux.cfg&#8221; on the CD copy, change one line from:<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">append vmlinuz initrd=initrd.img media=cdrom rw root=\/dev\/ram0 ramdisk_size=302748 init=\/bin\/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent showopts TYPE=AUTOMATIC<\/div><\/div>\n<p>to (note the inclusion of &#8220;SHELL=initrd-shell&#8221;):<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">append vmlinuz initrd=initrd.img media=cdrom rw root=\/dev\/ram0 ramdisk_size=302748 init=\/bin\/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent showopts SHELL=initrd-shell TYPE=AUTOMATIC<\/div><\/div>\n<p>Burn it back to disc. You boot&#8230; and you get the shell; just root on the little booted CD, but it seems likely that SE&#8217;s and the like use such things.<\/p>\n<hr \/>\n<p>So &#8211; a bit more info on how this was discerned; it&#8217;s very simple. First, download the Smart Update Firmware DVD; they&#8217;re free, and I got mine from the\u00a0<a title=\"HP Web\" href=\"http:\/\/bizsupport1.austin.hp.com\/bizsupport\/TechSupport\/SoftwareDescription.jsp?lang=en&amp;cc=us&amp;prodTypeId=15351&amp;prodSeriesId=3884323&amp;swItem=MTX-086407a5fb694e798c4470c1a7&amp;prodNameId=3884324&amp;swEnvOID=2026&amp;swLang=13&amp;taskId=135&amp;mode=4&amp;idx=2 \" target=\"_blank\">HP website<\/a>.<\/p>\n<p>They&#8217;re zip files, so extract the ISO (and a couple of other files, md5, readme, etc.) ISO is named &#8220;FW920.2010_1021.49.iso&#8221;. I&#8217;m working on a mac, which on rare occasions actuallly work with me with what I want to do. Most linux\/*nix need to figure out the mount invocation, with a mac it&#8217;s just &#8220;open filename&#8221; and it gets mounted in \/Volumes\/[name].<\/p>\n<p>A quick copy cp files to writable work area&#8230; I&#8217;ll call mine zHP920. Just:<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">cp -r \/Volumes\/HPFWUP920 zHP920<\/div><\/div>\n<p>The initrd image is in the systems subdir; it&#8217;s a gzip&#8217;d cpio file, of all things. I&#8217;m sure you all remember your cpio format; you just (cpio probably now has bloated enough to include gzip in it like tar, but you know, I don&#8217;t really care):<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">gzip &lt; initrd.img &gt; \/tmp\/920initrd.img<br \/>\nmkdir \/tmp\/920cpio<br \/>\ncd \/tmp\/920cpio<br \/>\ncpio -i &lt; \/tmp\/920initrd.img<\/div><\/div>\n<p>After the trauma of figuring out how they did things in 870 it looked&#8230; damn, there&#8217;s nothing here. One squashed file system, an init file, some odds and ends&#8230;.<\/p>\n<p>I must confess&#8230; shell is one thing I don&#8217;t mind reading, I&#8217;ve written a lot of it in my day. So I see some lines&#8230; that&#8230; well:<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">if [ -n &quot;$(cat \/proc\/cmdline | grep 'initrd-shell')&quot; ] ; then<br \/>\n&nbsp; &nbsp; echo<br \/>\n&nbsp; &nbsp; echo &quot;Dropping to a shell. Good luck!&quot;<br \/>\n&nbsp; &nbsp; echo<br \/>\n<br \/>\nexec \/bin\/bash<br \/>\nfi<\/div><\/div>\n<p>Could it be that easy? Well&#8230; going back to the raw CD, edit the boot config&#8230; and edit &#8220;system\/isolinux.cfg&#8221; &#8211; change the line from:<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">append vmlinuz initrd=initrd.img media=cdrom rw root=\/dev\/ram0 ramdisk_size=302748 init=\/bin\/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent showopts TYPE=AUTOMATIC<\/div><\/div>\n<p>to this (note the inclusion of &#8220;SHELL=initrd-shell&#8221;) I figured, what the hell, it looks like it&#8217;d work from the context.<\/p>\n<div class=\"codecolorer-container text blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">append vmlinuz initrd=initrd.img media=cdrom rw root=\/dev\/ram0 ramdisk_size=302748 init=\/bin\/init loglevel=3 ide=nodma ide=noraid nopat pnpbios=off vga=791 splash=silent showopts SHELL=initrd-shell TYPE=AUTOMATIC<\/div><\/div>\n<p>Remake the dvd iso (I use something like &#8220;mkisofs -o ..\/zhp.iso -N -R -J -joliet-long -b system\/isolinux.bin -c system\/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .&#8221; in the main directory of the unpacked DVD), burn it, boot&#8230; and you get the shell.<\/p>\n<p>This is not root on the host computer or the BMC, just the CD booted image. However, it has some interesting tidbits for those intersted in such things (ok, yes, few are ;) But just in case there&#8217;s one more of me out there!)<\/p>\n<p><a href=\"https:\/\/trouble.org\/wp-content\/uploads\/2012\/09\/HP.jpg\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" title=\"HP\" src=\"https:\/\/trouble.org\/wp-content\/uploads\/2012\/09\/HP-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;d been playing with them&#8230; and since I hadn&#8217;t seen this anywhere I&#8217;ll put it as a small hack o the day. The disks do what they say (e.g. &#8230; install firmware ;)) &#8211; basically you burn it to a cd, boot it up, and it has some sort of access to the system. Since [&hellip;]<\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146,6],"tags":[161,160,334,159],"class_list":["post-619","post","type-post","status-publish","format-standard","hentry","category-hack","category-tech","tag-booting","tag-cheap-thrills","tag-hack","tag-hp"],"_links":{"self":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=619"}],"version-history":[{"count":30,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":661,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions\/661"}],"wp:attachment":[{"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}