{"id":3020,"date":"2011-06-03T11:30:51","date_gmt":"2011-06-03T03:30:51","guid":{"rendered":"http:\/\/www.janleow.com\/life\/?p=3020"},"modified":"2016-06-23T15:07:52","modified_gmt":"2016-06-23T07:07:52","slug":"installing-a-portable-ubuntu-linux-in-a-usb-thumbdrive","status":"publish","type":"post","link":"https:\/\/www.janleow.com\/life\/installing-a-portable-ubuntu-linux-in-a-usb-thumbdrive.html","title":{"rendered":"Installing a portable Ubuntu Linux in a USB Thumbdrive"},"content":{"rendered":"<p>I couldn&#8217;t wait for the price of 32GB USB thumb drive to come down and decided to get one. I think the current size of most USB drive is way more than enough for the average Joe&#8217;s but not for power users like me! It seems like Moore&#8217;s Law don&#8217;t seem to apply for the USB thumb drive anymore if there is a lower demand for more storage space in USB drive. It now takes ages for the prices to come down for USB drive and if you compare with say a portable hard drive, it sure is lagging behind!<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.janleow.com\/imgs\/wp\/sandisk-cruzer.jpg\" alt=\"SanDisk Cruzer - micro and standard.\" title=\"SanDisk Cruzer - micro and standard.\" \/><br \/>\n<!--more--><\/p>\n<p>Anyway, I bought myself the SanDisk Cruzer 32 GB, this was different from my SanDisk micro Cruzer 16 GB, as this one does not have U3 capability. Though I find the U3 feature rather useful in securing the thumbdrive content, not many people like to use it, so again due to demand and supply it is not easy to find a U3 thumbdrive. For securing files, SanDisk provides a software solution calling it the SanDisk Secure Access. I find SanDisk Secure Access to be less useful as I am not able to sync the file in the secure mode tuck away in a encrypted vault unlike using the U3 where the files acts like files and after ejecting, the U3 will lock the thumbdrive. Anyway, I found another solution using TrueCrypt so no problem for me. <\/p>\n<p>Meanwhile, 32 GB of storage space (actually you get about 29 GB due to the way the bytes are calculated) is rather ample and I decided to make my thumb drive work a little harder. Instead of carrying a bulkier portable drive with Ubuntu Linux installed, using a USB thumb drive with Ubuntu installed inside would be far handier.<\/p>\n<p>To prepare the thumb drive to boot up Linux requires partitioning preparation. You can&#8217;t use Windows to do the job. In fact, Windows is not able to recognize partitions in a thumbdrive, which makes me wonder why such a powerhouse like Windows (even the latest Windows 7) is so lacking. This is where Linux shine when it comes to efficiency and effectiveness. Just too bad it needs to get more polished to increase its user base and software supplier base.<\/p>\n<p>Do note that the Windows storage partition must be on the first section or Windows won\u2019t be able to find it as Windows cannot read more than one partition in the USB drive.<\/p>\n<p><strong>Partitioning the USB Thumb drive<\/strong><\/p>\n<p>To do all the preparation, you will need to boot up Ubuntu Linux live CD and fire up the Gnome Partition Manager or Gparted for short. This is the best partition manager that I have found so far ever since I learned about partition management way back when I was using PowerQuest Partition Manager. However, Gparted has a quirk. Could be due to the Linux kernel itself. I have a set of RAID drives and it could not access the partition and instead read each individual drive instead and reported them as unknown partition. Hmmm\u2026 maybe the kernel couldn&#8217;t recognize the old RAID card that I was using on one my old PC. Anyway I don&#8217;t use RAID nowadays.<\/p>\n<p>Gparted can resize the partition without clearing out your data. Of course the more data you have in your partition the slower the partitioning. Starting out clean would speed up the process a lot. Another one up of using Gparted against Windows Disk Manager, you can actually get to specify whether you want to create a partition as primary or in extended mode. Windows Disk Manager don\u2019t really give you this option and assumes all new partition are to be created in the extended volume. And of course using Gparted you could format it with NTFS, FAT 32, or its native Linux EXT format. And if you install additional module you could install other file formats apart from the those mentioned. Really handy!<\/p>\n<p><strong>How much storage space allocation for Ubuntu Linux?<\/strong><\/p>\n<p>The main purpose for my 32 GB SanDisk Cruzer USB drive is to store data. Unlike say a portable drive where you don&#8217;t have to worry about space constraint. On a 32 GB, you may want to have an efficient usage of data storage and Linux. The minimum required for Ubuntu is about 4 GB, the completed basic installation takes up about 2.5 GB of storage space and the extra is for additional software and data stored in the Linux format. I found I needed to allocate about 5 to 6 GB to cater for additional application software that I would install and make the portable Ubuntu Linux much more usable. After adding up the additional application software, my Ubuntu Linux has used up 3.5 GB leaving about 2 GB for future further expansion.<\/p>\n<p><strong>And what about the Linux Swap space size?<\/strong><\/p>\n<p>The basic rule of thumb is 2 times the memory of your computer memory. Digging around the internet, this idea was basically more for server installation. Linux is very memory efficient compared with Windows, and hardly ever need to swap any data onto the swap file. For a portable drive, I allocated about 4 GB mirroring my desktop PC RAM memory since portable drive got so much space available. However for a Linux workstation PC, you don&#8217;t really need much. And I came across some discussion that said they didn&#8217;t even need a swap space. Initially I went for 1 GB of swap file space in my SanDisk Cruzer, but checking with the Linux system monitor, hardly any data was written into the swap file space. So I decided to reduce the size to about 512 MB instead just in case I needed some swap space.<\/p>\n<p>So this is what I ended up with:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.janleow.com\/imgs\/wp\/partitioning.png\" alt=\"USB thumb drive primary partitioning with Windows, Linux and Linux Swap\" title=\"USB thumb drive primary partitioning with Windows, Linux and Linux Swap\" \/><\/p>\n<p>sdx1 &#8212; Windows \u2013 24 GB<br \/>\nsdx2 &#8212; Ubuntu \u2013 5.5 GB<br \/>\nsdx3 &#8212; Swap Space \u2013 512 MB<\/p>\n<p>Once got your partitioning done, you could proceed with installing Ubuntu Linux. To speed up the installation process, unhook your internet connection. You could always install the updates later. What you want is to quickly install Ubuntu asap and fire it up and see your handy work in action!<\/p>\n<p>Once your GRUB 2 is installed in the MBR and all other installation is done. It is time to fire it up! If you feel you need to adjust your partitioning to suit your storage\/linux requirement, do be careful as it might damage the GRUB boot loader (which unfortunately I did damage mine and had to reinstall GRUB 2 using command line to fix it).<\/p>\n<p>The Ubuntu Linux has proven to be very robust and was able to run in the several desktop PC\u2019s, laptops and netbook that I have. As I was using Ubuntu 11.04, the Unity desktop only had one hiccup on one of my older Pentium 4 PC due to lower video graphic card hardware specification. I was still able to run it on the classic interface. Frankly speaking, I still liked the older Ubuntu classic GUI, the newer Unity desktop needs a more powerful graphic card and sometimes I felt that it was a little laggy. Not sure it is because I install my Ubuntu onto my USB thumb drive is one of the contributing reason as well too.<\/p>\n<p>By installing my Ubuntu Linux into my thumb drive, I could dispense with having to install Ubuntu on each of my computers. It helps to save me time from having to install the same application on each of the computers. Now I just need to install the software applications into this little handy thumbdrive and I\u2019m good to go on any of the PC\u2019s!<\/p>\n<p>Related post:<br \/>\n<a href=\"http:\/\/www.janleow.com\/life\/dual-boot-ubuntu-and-puppy-linux-in-usb-pendrive.html\">Dual Boot Ubuntu and Puppy Linux in USB pendrive<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I couldn&#8217;t wait for the price of 32GB USB thumb drive to come down and decided to get one. I think the current size of most USB drive is way more than enough for the average Joe&#8217;s but not for power users like me! It seems like Moore&#8217;s Law don&#8217;t seem to apply for the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.janleow.com\/life\/installing-a-portable-ubuntu-linux-in-a-usb-thumbdrive.html\"> <span class=\"screen-reader-text\">Installing a portable Ubuntu Linux in a USB Thumbdrive<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[6],"tags":[46,50,51,92,112,115,135,139,163],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1bS5F-MI","jetpack-related-posts":[{"id":3167,"url":"https:\/\/www.janleow.com\/life\/dual-boot-ubuntu-and-puppy-linux-in-usb-pendrive.html","url_meta":{"origin":3020,"position":0},"title":"Dual Boot Ubuntu and Puppy Linux in USB Pendrive","author":"Jan","date":"14 November 2011","format":false,"excerpt":"How to dual boot Ubuntu and Puppy Linux in USB pendrive. It was actually rather easy although it took me a long while to figure it out. All along I was carrying two thumbdrive, one with Ubuntu Linux installed and the other with Puppy Linux. Why bring along so many\u2026","rel":"","context":"In &quot;Computer Devices&quot;","block_context":{"text":"Computer Devices","link":"https:\/\/www.janleow.com\/life\/category\/computer-devices"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3458,"url":"https:\/\/www.janleow.com\/life\/multi-boot-usb-linux-with-pendrive-linux-yumi-software.html","url_meta":{"origin":3020,"position":1},"title":"Multi Boot USB Linux with Pendrive Linux Yumi Software","author":"Jan","date":"3 February 2012","format":false,"excerpt":"Multi boot USB Linux comes in really handy and recently I just discovered this Yumi software by Lance of Pendrive Linux website that can be used for booting multiple live distros of Linux! Previously my linux project was to install linux itself into my SanDisk Ultra 64GB flash drive, however\u2026","rel":"","context":"In &quot;Computer Devices&quot;","block_context":{"text":"Computer Devices","link":"https:\/\/www.janleow.com\/life\/category\/computer-devices"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":100,"url":"https:\/\/www.janleow.com\/life\/red-fox-mp3-fm-modulator-player.html","url_meta":{"origin":3020,"position":2},"title":"Red Fox MP3 FM Modulator for playing MP3 files, Pt 2.","author":"Jan","date":"29 March 2008","format":false,"excerpt":"Judging from the number of comments that I received about this Red Fox MP3 FM modulator, I think I might put in a few pointer about using this device. The Red Fox MP3 modulator that I bought could use both the SD\/MMC Card as well as USB flash drive. The\u2026","rel":"","context":"In &quot;Computer Devices&quot;","block_context":{"text":"Computer Devices","link":"https:\/\/www.janleow.com\/life\/category\/computer-devices"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2972,"url":"https:\/\/www.janleow.com\/life\/usb-2-0-to-ide-sata-adapter.html","url_meta":{"origin":3020,"position":3},"title":"USB 2.0 to IDE \/ SATA Adapter","author":"Jan","date":"31 March 2011","format":false,"excerpt":"Finally went ahead to purchase this hardware - USB 2.0 to IDE \/ SATA Adapter. At about $15 (RM45) it is probably not comparable to say a portable hard drive or an external powered hard drive that you can get for about $33 (RM100) with more storage capacity. I have\u2026","rel":"","context":"In &quot;Computer Devices&quot;","block_context":{"text":"Computer Devices","link":"https:\/\/www.janleow.com\/life\/category\/computer-devices"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":55,"url":"https:\/\/www.janleow.com\/life\/format-usb-flash-drive-to-ntfs-file-system.html","url_meta":{"origin":3020,"position":4},"title":"Format USB flash drive to NTFS file system","author":"Jan","date":"3 October 2007","format":false,"excerpt":"I came across this from PC World and it looked intriguing. So I gave it a try and formatted my USB flash drive from FAT to NTFS file system. The steps were easy to follow, and by using NTFS I could get some additional features which the FAT or FAT32\u2026","rel":"","context":"In &quot;Computer Devices&quot;","block_context":{"text":"Computer Devices","link":"https:\/\/www.janleow.com\/life\/category\/computer-devices"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2876,"url":"https:\/\/www.janleow.com\/life\/micro-usb-data-cable.html","url_meta":{"origin":3020,"position":5},"title":"Micro USB Data Cable","author":"Jan","date":"11 December 2010","format":false,"excerpt":"Micro USB data cable is the current standard data cable for mobile phone connection to the PC. Each new computer device will come out with new kind of USB data connector. And so I have amassed quite a collection of USB data cable starting from the standard USB-A, to USB\u2026","rel":"","context":"In &quot;Computer Devices&quot;","block_context":{"text":"Computer Devices","link":"https:\/\/www.janleow.com\/life\/category\/computer-devices"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts\/3020"}],"collection":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/comments?post=3020"}],"version-history":[{"count":1,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts\/3020\/revisions"}],"predecessor-version":[{"id":3997,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts\/3020\/revisions\/3997"}],"wp:attachment":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/media?parent=3020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/categories?post=3020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/tags?post=3020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}