{"id":406,"date":"2009-07-14T19:16:32","date_gmt":"2009-07-14T23:16:32","guid":{"rendered":"http:\/\/www.timelordz.com\/blog\/?p=406"},"modified":"2009-07-15T16:35:09","modified_gmt":"2009-07-15T20:35:09","slug":"lint-mint-6-xfce-on-olpc","status":"publish","type":"post","link":"https:\/\/www.timelordz.com\/blog\/2009\/07\/lint-mint-6-xfce-on-olpc\/","title":{"rendered":"Lint Mint 6 XFCE on OLPC"},"content":{"rendered":"<p>A while back when <a title=\"Linux Mint Site\" href=\"http:\/\/www.linuxmint.com\/index.php\" target=\"_blank\">Linux Mint<\/a> 6 XFCE (based on Ubunut Intrepid) was released and reviewed on <a title=\"The Linux Action Show\" href=\"http:\/\/www.jupiterbroadcasting.com\/\" target=\"_blank\"><em>The Linux Action Show<\/em><\/a> I thought of what a good platform it could be for the OLPC. (The Linux Action show is a great pod cast by the way!) I had previously installed Ubuntu Hardy on the OLPC, but the extras the Linux Mint guys added to XFCE sounded pretty cool. Especially considering I am thinking of giving the OLPC away to someone who is a newer Linux user, having Mint as the OS was pretty appealing. And oh, my old Hardy install was utterly nuked on the SD card anyway &#8211; who knows. I might have tried to recover the partition tables with TestDisk, etc. but really &#8211; who cares. Time for a new OLPC adventure anyway!<\/p>\n<p>In fact I had hardly touched my OLPC in nearly a year, since buying my Acer Aspire One &#8211; which I really love. And although the Aspire One is obviously far better performance wise, there are certain characteristics of the OLPC that I really like, such as:<\/p>\n<p>Monochrome Screen Mode: This is absolutely awesome. The screen back light turns completely off saving big time power. Sunlight goes through the LCD and is reflected off a panel, making the screen extremely readable in direct sunlight. It is really fantastic and I wish ALL netbooks had this feature. It is hard to describe how legible it is, even in harsh direct light.<\/p>\n<p><em>Battery Life:<\/em> Especially when running in monochrome mode, battery life is quite good.<\/p>\n<p><em>Mesh Networking:<\/em> Interesting stuff &#8211; and oh, the wireless net supports injection. Hacking opportunities for kids the world round.<\/p>\n<p><em>Case Design:<\/em> Everything folds up to protect ports. Integrated carrying handle.<\/p>\n<p><em>Open Firmware:<\/em> Yea, it&#8217;s kind of different and fun to play with. Similar to the Open Firmware in the pre-Intel Macs, but far more fun than that was. Since we will be seeing a lot more systems using Open Firmware in the future it is good to play with it now. By by BIOS &#8211; you served us well.<\/p>\n<p><em>Philosophy:<\/em> Providing technology that would otherwise be unavailable to kids in remote places does not at all seem like a bad idea to me.<\/p>\n<p><em>HAM Radio:<\/em> I am thinking the OLPC, with the above features, seems a perfect candidate to use with packet radio. Communicate with friends after the coming apocalypse. Run it for years, and never worry about the back light burning out &#8211; you don&#8217;t need it.<\/p>\n<p>(As a note: It was great seeing a few people recently at <a title=\"Toorcamp was a blast\" href=\"http:\/\/www.toorcamp.org\/\" target=\"_blank\">Toorcamp<\/a> with their OLPCs &#8211; I saw two or three there, as well as two OLPC billboards on the trip to Seattle.)<\/p>\n<p>Okay &#8211; enough extolling the OLPC virtues. How to install Linux Mint on it.<\/p>\n<h2><span style=\"color: #3366ff;\">How to Install <span style=\"color: #339966;\">Linux Mint<\/span> 6 XFCE on the OLPC<\/span><\/h2>\n<p><span style=\"color: #00ccff;\">0) Pre-install Steps<\/span><\/p>\n<p>0) First off, you do not need to go through exotic hoops to get this to work. Some guys have <a title=\"Hardy and Mint combo install\" href=\"http:\/\/forums.linuxmint.com\/viewtopic.php?f=49&amp;t=9050&amp;p=56211&amp;hilit=olpc#p56211\" target=\"_blank\">had success<\/a> installing Mint onto an SD card first and then <a title=\"OLPC Ubuntu Install\" href=\"http:\/\/wiki.laptop.org\/go\/Ubuntu_On_OLPC_XO\" target=\"_blank\">installing Hardy<\/a> over the top of it and ended up with a working Mint install. Using the following method you can simply install Mint and it should work fine. (If you do want to install a vanilla Hardy, I would highly recommend using <a title=\"OLPC Ubuntu from compressed files\" href=\"http:\/\/wiki.laptop.org\/go\/Installing_Ubuntu_using_Compressed_Files\" target=\"_blank\">this method<\/a> using compressed files instead.)<\/p>\n<p>00) I suggest you<a title=\"Update OLPC\" href=\"http:\/\/wiki.laptop.org\/go\/Olpc-update\" target=\"_blank\"> update the OLPC<\/a> firmware and Fedora base OS before installing Mint. Simply connecting to a wireless network and running #olpc-update as root will download all updates and update the firmware as well. (Have it pluged into AC or the firmware upgrade will be skipped.) BE PATIENT &#8211; the upgrade rsyncs several hundred megs over your wireless connection. It takes a very long time.<\/p>\n<p><!--more--><\/p>\n<p><span style=\"color: #00ccff;\">1) Install Linux Mint from .iso to SD Card<\/span><\/p>\n<p>Using another system (I used my Aspire One) perform a normal install of Linux Mint 6 XFCE to the target SD card. In my case I hooked up a USB CD rom, downloaded the Mint .iso and simply booted it on my notebook. It detected the SD card fine and I had no trouble installing to it.<\/p>\n<p>* Although normally on netbooks you don&#8217;t really need a swap space, you may want to consider it on the OLPC due to its extremely low memory. If using a 4GB or more SD card, you can likely spare a bit of room anyway.<\/p>\n<p>*\u00a0 Under Advanced Options: Take care you do not accidentally install Grub over your existing Grub on your system. You can install grub on the SD card if you like, but it is not needed as open firmware on the OLPC will handle the boot process. (But if you think you might want to boot to the SD card on another netbook, then go ahead and install grub to it. )<\/p>\n<p>* <em>Aspire One Users:<\/em> Even if you install grub to the SD, you will not be able to boot to it. Asus, for reasons only know to God and the wind devils, did not provide a BIOS capable of booting to SD cards. Insane, I know. While you <em>could<\/em> work around this by placing the kernel and initrd on the internal SSD drive and simply pointing root in grub to the UUID of the SD card &#8211; which will work fine and load the kernel, you will not be able to activate the root file system. Reason: The kernel and initrd Mint ships with do not have the drivers for the SD \/ mmcblk devices, and thus booting halts at that point. If you wanted to be ambitious you could create a new initrd that has the required driver (its pretty easy in Virtual box to do so), but this guide is for installing Mint on the OLPC and such is not needed in that case.<\/p>\n<p><span style=\"color: #00ccff;\">2) Copy over needed OLPC files to SD<\/span><\/p>\n<p>Once the install is complete boot up the OLPC and insert the SD card. You have to copy over some files from the OLPC side to the Mint side. Also, you must ensure the SD Card label is OLPCRoot. Also, you will need a developer key to unlock the OLPC and allow it to boot to the SD card.<\/p>\n<p>* Rename the SD card label:<\/p>\n<p><code>$ sudo tune2fs \/dev\/sdb1  -L OLPCRoot<\/code><\/p>\n<p>* Copy over required files:<\/p>\n<p>I found <a title=\"Rsync OLPC Files\" href=\"http:\/\/sprocket.io\/blog\/2008\/05\/ubuntu-hardy-heron-on-the-olpc-xo-1\/\" target=\"_blank\">this method<\/a> of using just one rsync command to be the most effecient:<br \/>\n<code># rsync -vaR \/security \/boot \/lib\/modules \/lib\/firmware \/media\/OLPCRoot\/<\/code><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># mv \/media\/OLPCroot\/etc\/modprobe.d \/media\/OLPCroot\/etc\/modprobe.old<\/span><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># cp -ra \/etc\/modprobe.d \/media\/OLPCRoot\/etc\/modprobe.d<\/span><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># mv \/media\/OLPCroot\/fstab \/media\/OLPCroot\/fstab.old<\/span><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># cp -ar \/etc\/fstab \/media\/OLPCroot\/etc\/fstab<\/span><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># cp \/etc\/X11\/xorg.conf \/media\/OLPCroot\/etc\/X11\/xorg.olpc<\/span><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># wget http:\/\/dev.laptop.org\/~cscott\/xorg.conf -O \/media\/OLPCroot\/etc\/X11\/xorg.conf<\/span><\/p>\n<p><span style=\"font-family: 'Courier New',monospace;\"># cp \/media\/OLPCroot\/boot\/olpc.fth \/media\/OLPCroot\/boot\/olpc.fth.nand<\/span><\/p>\n<p><span style=\"color: #00ccff;\">3) Fix the Ubuntu \/ OLPC upstart init booting bug<\/span><\/p>\n<p>This one had me puzzled for a few minutes. If you try to boot now you it should find the kernel and initrd on the SD card and start to load. However, when init runs you will get this error message:<\/p>\n<p><code>init: invalid option: --init Try init --help for more options<\/code><\/p>\n<p>What the hell is that about? Well, I found <a title=\"Upstart OLPC boot hanging init\" href=\"https:\/\/bugs.launchpad.net\/upstart\/+bug\/160150\" target=\"_blank\">the exact explanation here<\/a>. I thought that updating the OLPC kernel to the latest build would likely fix this issue, but even after doing so, and rsyncing the newest kernel to the SD card side, this still occurred. Very strange. (This same issue is also reference hidden in <a title=\"OLPC Ubuntu Install\" href=\"http:\/\/wiki.laptop.org\/go\/Ubuntu_On_OLPC_XO\">official OLPC site<\/a> page for installing Ubuntu, but the above link has more explanation of why this bug occurs, and what the problem is.)<\/p>\n<p>The solution is simply to apt-get install sysvinit in the new Mint install. Herein you may encounter a chicken and the egg scenario: How to do get Mint to boot, so you can install sysvinit when it won&#8217;t boot? In my case I couldn&#8217;t boot using my Aspire One due to the above BIOS not allowing booting to SD devices and I also didn&#8217;t want to build an initrd that would see my SD slots. I tried booting it using a USB SD reader, but no luck. Good grief, what a catch 22 right?<\/p>\n<p>No problem. The answer came to me in a flash &#8211; chroot!<\/p>\n<p>* Boot the OLPC into Fedora &amp; Sugar. Open a terminal and become root ($sudo bash -l)<\/p>\n<p>* Ensure you have Internet connectivity at this point, you will need it once you chroot.<\/p>\n<p>* Verify that the SD card is mounted, likely as \/media\/OLPCRoot<\/p>\n<p>* Chroot into the Mint environment: <code>#chroot \/media\/OLPCRoot<\/code><\/p>\n<p>A bunch of text may scroll off the screen but you should then see the Mint bash start with the funny random fortune welcome message (if you enable this during your install.)<\/p>\n<p>Now, run the following commands:<\/p>\n<pre lang=\"text\">bash: \/dev\/null: Permission denied\r\nbash: \/dev\/null: Permission denied\r\n ________________________________________\r\n( Your lucky number is 3552664958674928. )\r\n( Watch for it everywhere.               )\r\n ----------------------------------------\r\n  o\r\n   o   \\_\\_    _\/_\/\r\n    o      \\__\/\r\n           (oo)\\_______\r\n           (__)\\       )\\\/\\\r\n               ||----w |\r\n               ||     ||\r\n\r\nroot@paracelsus-laptop \/ # ls \/boot\r\nabi-2.6.27-7-generic\t\t\t       olpcrd-2.6.22-20080312.2.olpc.f3687aa7e09fd65.img\r\nactos.zip\t\t\t\t       olpcrd-2.6.25-20090223.1.olpc.69098d87d56945c.img\r\nactrd.zip\t\t\t\t       olpcrd.img\r\nboot\t\t\t\t\t       os.zip\r\nbootfw.zip\t\t\t\t       rd.zip\r\nconfig-2.6.22-20080312.2.olpc.f3687aa7e09fd65  runos.zip\r\nconfig-2.6.25-20090223.1.olpc.69098d87d56945c  runrd.zip\r\nconfig-2.6.27-7-generic\t\t\t       System.map-2.6.22-20080312.2.olpc.f3687aa7e09fd65\r\ngfxmenu\t\t\t\t\t       System.map-2.6.25-20090223.1.olpc.69098d87d56945c\r\ngrub\t\t\t\t\t       System.map-2.6.27-7-generic\r\ninitrd.img-2.6.27-7-generic\t\t       vmcoreinfo-2.6.27-7-generic\r\nmemtest86+.bin\t\t\t\t       vmlinuz\r\nolpc_build\t\t\t\t       vmlinuz-2.6.22-20080312.2.olpc.f3687aa7e09fd65\r\nolpc.fth\t\t\t\t       vmlinuz-2.6.25-20090223.1.olpc.69098d87d56945c\r\nolpc.fth.nand\t\t\t\t       vmlinuz-2.6.27-7-generic\r\n\r\nroot@paracelsus-laptop \/ # mount \/proc\/\r\n\r\nroot@paracelsus-laptop \/ # route\r\nKernel IP routing table\r\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface\r\n192.168.2.0     *               255.255.255.0   U     2      0        0 ath0\r\nlink-local      *               255.255.0.0     U     1000   0        0 ath0\r\ndefault         192.168.2.1     0.0.0.0         UG    0      0        0 ath0\r\n\r\nroot@paracelsus-laptop \/ # host google.com\r\n\r\n#If you can't host a name and resolve it you need to create an \/etc\/resolv.conf file and have it contain this line:\r\nnameserver 4.2.2.2\r\n#After that you should be able to resolve domain names, which you will need to run apt\r\n\r\nroot@paracelsus-laptop \/ # vim \/etc\/resolv.conf\r\n(Add the nameserver line above into this file)\r\n\r\nroot@paracelsus-laptop \/ # host google.com\r\ngoogle.com has address 74.125.127.100\r\ngoogle.com has address 74.125.45.100\r\n\r\n#Networking and name resolution now work! Now for the magic that is apt:\r\n\r\nroot@paracelsus-laptop \/ # apt-get install sysvinit\r\nReading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nThe following packages will be REMOVED:\r\n  friendly-recovery startup-tasks system-services ubuntu-minimal upstart upstart-compat-sysv upstart-logd\r\nThe following NEW packages will be installed:\r\n  sysvinit\r\n0 upgraded, 1 newly installed, 7 to remove and 155 not upgraded.\r\nNeed to get 116kB of archives.\r\nAfter this operation, 721kB disk space will be freed.\r\nDo you want to continue [Y\/n]? y\r\nWARNING: The following packages cannot be authenticated!\r\n  sysvinit\r\nAuthentication warning overridden.\r\nGet:1 http:\/\/archive.ubuntu.com intrepid\/main sysvinit 2.86.ds1-59ubuntu13 [116kB]\r\nFetched 116kB in 3s (34.3kB\/s)\r\nsh: cannot create \/dev\/null: Permission denied\r\nsh: cannot create \/dev\/null: Permission denied\r\ndpkg-preconfigure: unable to re-open stdin:\r\nCan not write log, openpty() failed (\/dev\/pts not mounted?)\r\n(Reading database ... 97079 files and directories currently installed.)\r\nRemoving friendly-recovery ...\r\nRemoving ubuntu-minimal ...\r\nRemoving startup-tasks ...\r\nRemoving system-services ...\r\nRemoving upstart-logd ...\r\nRemoving upstart-compat-sysv ...\r\nRemoving upstart ...\r\nProcessing triggers for man-db ...\r\nCan't open \/dev\/null: Permission denied\r\nCan not write log, openpty() failed (\/dev\/pts not mounted?)\r\nSelecting previously deselected package sysvinit.\r\n(Reading database ... 97025 files and directories currently installed.)\r\nUnpacking sysvinit (from ...\/sysvinit_2.86.ds1-59ubuntu13_i386.deb) ...\r\nProcessing triggers for man-db ...\r\nCan't open \/dev\/null: Permission denied\r\nCan not write log, openpty() failed (\/dev\/pts not mounted?)\r\nSetting up sysvinit (2.86.ds1-59ubuntu13) ...\r\nsysvinit: creating \/dev\/initctl\r\ninit: timeout opening\/writing control channel \/dev\/initctl\r\n\r\nroot@paracelsus-laptop \/ # apt-get install sysvinit\r\nReading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nsysvinit is already the newest version.\r\n0 upgraded, 0 newly installed, 0 to remove and 155 not upgraded.\r\n\r\n#upstart has now been replaced with sysvinit. You can exit the chroot environment by typing: quit<\/pre>\n<p><span style=\"color: #00ccff;\">4)What olpc.fth to use?<\/span><\/p>\n<p>There is a special file used by open firmware to determine how to boot the system. There are different version of this file depending on if you want to boot to SD, USB, etc. The file must exist and be called \/boot\/olpc.fth regardless of which version is used. I found however that simply rsyncing over the default olpc.fth from an 802 OLPC install worked the best for me. (You should have copied this already in step 2 above. If you need other versions of the olpc.fth to use, you may get them from <a title=\"Install Guide and olpc.fth files\" href=\"http:\/\/www.freelikegnu.org\/?p=21&amp;page=2\" target=\"_blank\">here<\/a>.)<\/p>\n<p><span style=\"color: #00ccff;\">5) Boot your new Linux Mint from SD!<\/span><\/p>\n<p>You should now be able to reboot the OLPC into Mint. On mine I have to hold the right game pad key (marked with a check mark) or the boot loader hangs. After that you should see the boot messages and it should load the kernel. Init will run properly now and booting should continue fully to the XFCE desktop. Wireless and sound work out of the box. Contrast and sound adjustment keys do not &#8211; I&#8217;ll post the fix when I find it.<\/p>\n<p><span style=\"color: #00ccff;\">6) Tune your system<\/span><\/p>\n<p>There are quite a few services you can turn off to improve performance (You really don&#8217;t need cups running do you? etc.) I&#8217;ll make note of things here soon to turn off to help get the best gains.<\/p>\n<p>Good luck and I hope you enjoy Linux Mint on your OLPC!<\/p>\n<p><span style=\"color: #00ffff;\">References:<\/span><\/p>\n<p>If you get stuck see the links referred to above. In particular I found the second page of <a href=\"http:\/\/www.freelikegnu.org\/?p=21&amp;page=2\" target=\"_blank\">this<\/a> article and <a href=\"http:\/\/sprocket.io\/blog\/2008\/05\/ubuntu-hardy-heron-on-the-olpc-xo-1\/\" target=\"_blank\">this one<\/a> to be very helpful. Together with the above you should be able to achieve a working Mint install.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while back when Linux Mint 6 XFCE (based on Ubunut Intrepid) was released and reviewed on The Linux Action Show I thought of what a good platform it could be for the OLPC. (The Linux Action show is a great pod cast by the way!) I had previously installed Ubuntu Hardy on the OLPC, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6,9],"tags":[18,17,16,15,20,19,21],"class_list":["post-406","post","type-post","status-publish","format-standard","hentry","category-it-adventures","category-linux","category-netbooks","tag-boot-hanging","tag-init-error","tag-linux-mint","tag-olpc","tag-replace-upstart","tag-sysvinit","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/comments?post=406"}],"version-history":[{"count":5,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/406\/revisions"}],"predecessor-version":[{"id":411,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/406\/revisions\/411"}],"wp:attachment":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/media?parent=406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/categories?post=406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/tags?post=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}