{"id":504,"date":"2011-10-20T23:20:56","date_gmt":"2011-10-20T23:20:56","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=504"},"modified":"2015-03-03T04:54:23","modified_gmt":"2015-03-03T04:54:23","slug":"hp-t5325-thin-client-hacked-to-full-debian-system","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2011\/10\/hp-t5325-thin-client-hacked-to-full-debian-system\/","title":{"rendered":"HP t5325 thin client hacked to full Debian system"},"content":{"rendered":"<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2-764x1024.jpg\" alt=\"\" title=\"hpthin\" width=\"630\" height=\"844\" class=\"aligncenter size-large wp-image-507\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2-764x1024.jpg 764w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2-224x300.jpg 224w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2.jpg 968w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>I&#8217;ve been hacking around with a HP t5325 thin client. This post describes how to convert it from a dumb terminal in to a full desktop system (for more general information see <a href=\"http:\/\/41j.com\/blog\/2015\/03\/hp-t5325-thin-client-information-manuals\/\">here<\/a>.<\/p>\n<p>The client is designed primarily to connect to Windows Terminal Servers, though it can also run ssh and XSessions natively. But basically it&#8217;s a dumb terminal&#8230; Unless it&#8217;s connected to a more powerful terminal server it can&#8217;t do anything useful.<\/p>\n<p>I previously posted about the device internals <a href=\"http:\/\/41j.com\/blog\/2011\/10\/hp-t5325-pcb\/\">here<\/a>. As you can see it only has passively cooled components, which means it&#8217;s totally silent:<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_t5325_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_t5325_3-1024x764.jpg\" alt=\"\" title=\"hp_t5325_3\" width=\"630\" height=\"470\" class=\"aligncenter size-large wp-image-495\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_t5325_3-1024x764.jpg 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_t5325_3-300x224.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>The processor is a Maxell 1.2GHz ARM Processor, it also has a XGI Volari GPU. For a ARM device this is a pretty powerful system, and it only consumes 8 Watts!<\/p>\n<p>Anyway, when it boots it clearly shows a Linux boot process, so I thought it might be fun to see if it could be hacked into a full desktop Linux system. Turns out it&#8217;s not hard at all! In fact, it&#8217;s basically running a \/slightly\/ modified version of ARM Debian! (Lenny).<\/p>\n<p>Here&#8217;s the process I went through to get things up and running:<\/p>\n<p>1. While booting hit Ctrl-C \/a lot\/ this crashes the boot process, and stops X11 from loading. You should see a login prompt:<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_thin_login.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_thin_login-1024x750.jpg\" alt=\"\" title=\"hp_thin_login\" width=\"630\" height=\"461\" class=\"aligncenter size-large wp-image-508\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_thin_login-1024x750.jpg 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_thin_login-300x219.jpg 300w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hp_thin_login.jpg 1040w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>Neat. HP in their abundant wisdom decided that the root password should be &#8220;root&#8221;. It was at least easy to guess! Login as root.<\/p>\n<p>3. Remove S95hptc-thinslate-dm:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nrm \/etc\/rc7.d\/S95hptc-thinslate-dm\r\n<\/pre>\n<p>5. Remove all the annoying hptc stuff:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd \/\r\nfind . -name K*hptc* | xargs rm\r\n<\/pre>\n<p>6. Start tmpfs&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/etc\/init.d\/tmpfs-links start\r\n<\/pre>\n<p>7. Edit \/etc\/fstab to make the rootfs readwrite (actually this doesn&#8217;t work, but it&#8217;s as well to set it up here). Change the list reading &#8220;aufs \/ aufs noauto,ro&#8230;&#8221; to &#8220;aufs \/ aufa noauto,rw&#8230;&#8221;.<\/p>\n<p>8. Mount the root filesystem as read-write manually:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmount -oremount,rw \/\r\n<\/pre>\n<p>9. Make a bunch of directories to get apt working correctly, and remove the HP utilities:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# Sometimes, tmpfs dies. If it has we need to create the tmpfs dirs too. As long as apt-get doesn't complain you're ok. If it crashes, apt-get will tell you which directories are missing.\r\n\r\nmkdir \/tmp\/tmpfs\/var\/lib\r\nmkdir \/tmp\/tmpfs\/var\/lib\/apt\r\nmkdir \/tmp\/tmpfs\/var\/lib\/apt\/lists\r\nmkdir \/tmp\/tmpfs\/var\/cache\/apt\r\n\r\nmkdir \/var\/cache\/apt\/archives\r\nmkdir \/var\/cache\/apt\/arhcives\/partial\r\nmkdir \/var\/lib\/apt\/lists\r\nmkdir \/var\/lib\/apt\/lists\/partial\r\nmkdir \/var\/log\/apt\r\n\r\napt-get remove hptc* # press Y a couple of times to remove all the packages.\r\n<\/pre>\n<p>This didn&#8217;t work the first time&#8230; you need to do the following:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ntouch \/sbin\/hptc-sudo-edit\r\nchmod 777 \/sbin\/hptc-sudo-edit\r\ntouch \/etc\/init.d\/mdaemon\r\n<\/pre>\n<p>Edit \/var\/lib\/dpkg\/info\/hptc-control-center.postrm (using vi, it&#8217;s installed by default) find &#8220;exit 1&#8221; and change it to &#8220;exit 0&#8221;.<\/p>\n<p>Try again:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt-get remove hptc*\r\napt-get -f install\r\n<\/pre>\n<p>10. Fiddle around with rcS&#8230; (it&#8217;s broken&#8230;)<\/p>\n<p>Touch rcS:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ntouch \/etc\/default\/rcS\r\n<\/pre>\n<p>11. At this point you can use startx, to startx but there&#8217;s no window manager&#8230;<\/p>\n<p>12. Let&#8217;s get the debian repositories back up and running!<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/sources.jpeg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/sources-1024x172.jpg\" alt=\"\" title=\"sources\" width=\"630\" height=\"105\" class=\"aligncenter size-large wp-image-510\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/sources-1024x172.jpg 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/sources-300x50.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>Edit \/etc\/apt\/sources.list. The lines for the debian repository (remove the #). Add a # to the line which reads &#8220;ftp.hp.com&#8221;.<\/p>\n<p>13. Add a startup command to remount the filesystem read-write on boot. Because changing it in fstab doesn&#8217;t work. Edit \/etc\/rc.local add the following line:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmount -oremount,rw \/\r\n<\/pre>\n<p>14. Bring up networking. DHCP will currently be broken. So you&#8217;ll need to configure the device with a static IP address first. But we&#8217;ll put a dhcp based configuration in place.<\/p>\n<p>Create \/etc\/network\/interfaces with the following contents:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nauto eth0\r\niface eth0 inet dhcp\r\n<\/pre>\n<p>Create some missing files:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmv \/etc\/network\/run \/etc\/network\/run.old\r\nmkdir \/etc\/network\/run\r\ntouch \/etc\/network\/run\/ifstate\r\n<\/pre>\n<p>Now bring up the interface statically:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nifconfig eth0 192.168.1.35 # You'll need to use an IP address on your own local network\r\nroute add default gw 192.168.1.1 # Again, your local network default gw\r\n<\/pre>\n<p>Edit \/etc\/resolv.conf to read as follows:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nnameserver 8.8.8.8\r\n<\/pre>\n<p>ping google to test it:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nping www.google.com\r\n<\/pre>\n<p>Check that you see ping replies, then hit Ctrl-C.<\/p>\n<p>We should now be able to access the Debian repositories, this means we can reinstall a new dhcp client&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt-get remove dhcp3-client\r\napt-get install dhcp-client\r\nrm \/etc\/init.d\/network-manager\r\ntouch \/etc\/init.d\/network-manager\r\n<\/pre>\n<p>15. Get X windows working:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt-get remove xserver-xorg\r\napt-get remove xfwm4\r\nmv \/etc\/X11 \/etc\/X11.old\r\napt-get install xserver-xorg\r\napt-get install icewm\r\n<\/pre>\n<p>Edit \/etc\/lsb-base-logging.sh and remove line 270 which reads:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n( &#x5B; -x $SPC_UPD || return 1; ]\r\n<\/pre>\n<p>Install gdm<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt-get install gdm\r\n\/etc\/gdm restart\r\n<\/pre>\n<p>gdm should now start and you should see a login screen! You need to configure gdm to allow root logins (you could of course add another user if you wanted to too):<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/gdm_conf.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/gdm_conf-1024x764.jpg\" alt=\"\" title=\"gdm_conf\" width=\"630\" height=\"470\" class=\"aligncenter size-large wp-image-509\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/gdm_conf-1024x764.jpg 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/gdm_conf-300x224.jpg 300w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/gdm_conf.jpg 1296w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>GDM will fail to start the window manager and give you a failsafe terminal. But you can start icewm from here. Just type &#8220;icewm&#8221;.<\/p>\n<p>Iceweasel should already be installed and you can fire it up from the Applications menu!<\/p>\n<p>So there you go! A fully running Debian system! There are lots of tweaks you can now do. For example you&#8217;ll probably want to set gdm to start at boot, and get the window manager loading correctly. But the system is now up and running!<\/p>\n<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2-764x1024.jpg\" alt=\"\" title=\"hpthin\" width=\"630\" height=\"844\" class=\"aligncenter size-large wp-image-507\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2-764x1024.jpg 764w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2-224x300.jpg 224w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2011\/10\/hpthin2.jpg 968w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been hacking around with a HP t5325 thin client. This post describes how to convert it from a dumb terminal in to a full desktop system (for more general information see here. The client is designed primarily to connect to Windows Terminal Servers, though it can also run ssh and XSessions natively. But basically [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-504","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-88","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":8,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/504\/revisions"}],"predecessor-version":[{"id":512,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/504\/revisions\/512"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}