{"id":221,"date":"2009-06-08T22:44:43","date_gmt":"2009-06-08T12:44:43","guid":{"rendered":"http:\/\/brnz.org\/hbr\/?p=221"},"modified":"2009-06-08T22:44:43","modified_gmt":"2009-06-08T12:44:43","slug":"arbitrary-problem-solving","status":"publish","type":"post","link":"https:\/\/brnz.org\/hbr\/?p=221","title":{"rendered":"Arbitrary problem solving"},"content":{"rendered":"<p>Spending a few days at the in-laws, I&#8217;ve lugged along the PS3 so that I can continue my attempts at hacking on a DirectFB driver.\u00a0 Unfortunately, I&#8217;d left it configured as it had been on my home network &#8211; using wired networking.<\/p>\n<p>There&#8217;s no way to run network cables around this house without causing massive inconvenience, and there&#8217;s actually no cables to run.\u00a0 Let&#8217;s just configure this thing for wireless networking. Except I don&#8217;t have a USB keyboard.<\/p>\n<p>Buggr.<\/p>\n<p>Ok, what do we have?\u00a0 A short piece of CAT5 that connects a VoIP box to the wireless router.\u00a0 That&#8217;s a start.\u00a0 I can boot it on the wired network, connect remotely, find the IP via the router&#8217;s DHCP report (fortunately that has default login credentials), ssh in, make the changes and get on with whatever it was I was going to do.<\/p>\n<p>So, I plug it in (unplugging the VoIP box), boot the PS3, look up the IP, enter username and password and then fail to be allowed access.\u00a0 What?\u00a0 Oh, I&#8217;m trying to log into the dropbear sshd that comes with petitboot &#8211; I&#8217;ve not made it past the boot screen because I didn&#8217;t specify a timeout for picking a boot option.<\/p>\n<p>Grr.<\/p>\n<p>Ok.\u00a0 Next option?\u00a0 Is the CF card that I was booting from recently still in the CF slot? *opens door* Aha!\u00a0 It is!\u00a0 Not of immediate help, because it doesn&#8217;t have a default option either, but if I can find a Linux machine to plug this into I can set one&#8230;<\/p>\n<p>Grab card reader from camera bag, reboot laptop (wifi adapter for laptop is flakey under Linux atm, not sure why), insert card, mount device, add missing boot lines to kboot.conf (which are, I hope, correct)<\/p>\n<blockquote>\n<pre>default=ouros\r\ntimeout=5<\/pre>\n<\/blockquote>\n<p>save, unmount, CF card into PS3, boot and wait&#8230;. (five seconds seems like a long time).<\/p>\n<p>And it boots!\u00a0 ssh login (from putty on restarted laptop), mount \/boot, modify kboot.conf in the same way, shutdown, remove card, boot, wait . . . . .<\/p>\n<p>Huzzah!\u00a0 Problem solved.\u00a0 Now for some hackery :D<\/p>\n<p>Oh, wait, that wasn&#8217;t the problem.\u00a0 *sigh*.\u00a0 The PS3 still isn&#8217;t speaking wifi.<\/p>\n<p>Boot PS3 (after shutting it down expecting to be able to relocate it further away than the short blue tether that I&#8217;d been using), ssh in again and make changes to \/etc\/network\/interfaces.<\/p>\n<p>I&#8217;m not normally a wifi user nor a debian user so this is where it gets a little tricky.\u00a0 The network I&#8217;m trying to connect to is WEP, and the debian wiki doesn&#8217;t want to tell me how to set that up in case I hurt myself.\u00a0 Fine.\u00a0 A little more googling, and I find what appears to be a suitable incantation :<\/p>\n<blockquote>\n<pre>wireless_essid in_laws\r\nwireless_key manycharactersthataddlittlesecurity<\/pre>\n<\/blockquote>\n<p>Good.\u00a0 So I uncomment the wlan0 section and add those two lines.<\/p>\n<p>Playing with networking configs over ssh is where things get fun.<\/p>\n<blockquote>\n<pre>\/etc\/init.d\/networking restart<\/pre>\n<\/blockquote>\n<p>Did it work?\u00a0 Actually, I think it did &#8211; eth0 re-DHCPs, and then wlan0 does, b0rking (it would seem) access via eth0.<\/p>\n<p>Bah.<\/p>\n<p>Reboot.\u00a0 The same thing happens &#8211; eth0 comes up ok, and then wlan0 confuses the matter (the PS3&#8217;s two interfaces share a lot in common, so you can&#8217;t configure them both like this without hassle.\u00a0 It would seem)<\/p>\n<p>Ok, so what do I have now?\u00a0 A machine that won&#8217;t boot to having a functional network connection, no keyboard, and I can&#8217;t boot it back up from the CF (I think) because the internal HDD is set with a timeout and (I expect) will take precedence over the config on the CF because the HDD was the last used boot device.<\/p>\n<p>Expletive.<\/p>\n<p>Wait, what happens if I unplug the CAT5?\u00a0 Reboot, wait.\u00a0 Nothing.\u00a0 Nothing.\u00a0 No response to pings.\u00a0 Nothing.\u00a0 Nothing.\u00a0 Ping!\u00a0 DHCP times out on eth0 and then wlan0 starts up correctly.\u00a0 Diggity!\u00a0 So all appears to be (sufficiently) functional for now.<\/p>\n<p>Why was I doing this again?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spending a few days at the in-laws, I&#8217;ve lugged along the PS3 so that I can continue my attempts at hacking on a DirectFB driver.\u00a0 Unfortunately, I&#8217;d left it configured as it had been on my home network &#8211; using wired networking. There&#8217;s no way to run network cables around this house without causing massive &hellip; <a href=\"https:\/\/brnz.org\/hbr\/?p=221\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Arbitrary problem solving&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,8],"tags":[],"_links":{"self":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts\/221"}],"collection":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":7,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brnz.org\/hbr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}