Ubuntu Setup on persitent Live USB pendrive


To make a live usb pendrive persitent, you can use several tools. I use unetbootin, because it is stalbe in the first place, and also the bootup menu looks good enough, compared to other tools. Don't forget to make it persistent when you used unetbootin. https://unetbootin.github.io/

For ubuntu I use 14.04LTS, because it occupy 1.5GB only on your pendrive. My pendirve is only 4GB, so I have to use it carefully regarding the limitation.

I have to point out a couple of things from my experiences. Possibly it save a lot of time, since I, say, wasted a lot of time to reach this conclusion.

  1. I have a couple of 32GB pendrive, but somehow it works really slow. to be honest, unbearably slow, so I have to give up. It stops, say, 30 seconds, and come backs, but it happens so frequently.
  2. Also I use the installation disk as it is, without installing the system. There is also a reason for it. I tried, say, ubuntu installation, 10 times.
    1. 18.04LTS: installation failed, unless you have to create a small partition at the beginning. It happend after it takes 5 hours to install it.
    2. 16.04LTS: installation was successuful, but it becomes really slow as I mentioned above.
    3. 14.04LTS: there is no problem with installaion. I once used 8GB ADATA memory, it worked pretty fine, even after installation. but I lost the pendrive. Thus I have to find another one.
    4. I thought it should be easy. I bought a couple of 32GB pendrive. Installation takes 5 hours. After a successful installation, unlike 18.04LTS, it booted very slow and runs very slow. I had no idea why it happened.
    5. I made a try and error like I installed various version of ubuntu more than 10 times, and I found installaion disk installed by unetbootin on Toshiba 4GB memory runs pretty fast. I started to keep using it, with persistent options for web development.
    6. First I thought it had 2.5GB free on the pendrive, I thought, which is enough. It turned out it is not true. I used the ubuntu system fully; I installed anything I need. It gets super slow and I found the system was full.
    7. I needed to make a format and make the pendrive all over again. And finally I reached this solution. Use installaion disk on Toshiba 4GB memory although it is a limitation in size, thus limited install of applications.
    8. Update: it worked for two weeks, but 4GB is too small and even just public_html development, it soons run out of the space. (My page is as big as 150MB without subversion.) It seems 1% is consumed every 2nd times of svn update. So now I came back to my old HDD, the one mentioned below, with a modified partition.
    9. I even tried a usb HDD. it is really comfortable since it runs really fast. But it does not boot up in a shared PC. I use a shared PC booted by the drive, to make this website. a shared PC is sometime pretty old one; linux usually runs fast on these old machines. It turned out an old bios on an old PC do not recognize a partition after 1023 cylinder(I don't know this number is accurate). Ubuntu on my external HDD booted on a PC used for an installation but it did not boot on another machine due to it.

      /dev/sdc5 is with linux. sdc4 is a extended partition which contains two logical partions of sdc5 and sdc6, which is linux swap. sdc1 is a windows recovery partition. sdc2 is unknown but it was there from the beginning. sdc3 is main windows partition. It is an old hdd, 230GB. It was originly an internal hdd of a laptop computer. It was exchanged with 500GB, then 1TB and now 2TB. (medical lectures are big in size, and I gradually need a bigger and bigger disk.)

      windows partiotion is now less than half space occupied. it had been almost full, but sdc5 partition is too far from the head thus the partition is not recognized by some old machine with old bios, meaning not bootable.

      Windows partition was previously full and 230GB but it was shrunk to create the space for ubuntu installation. It took more time than I expected; 40 mins according to the screenshot above. I deleted many files to create the space, meaning the free space was splitted in many chunk and it should be united to create one big space, which took time. This is done on the ubuntu installation disk gparted.

      This time 130 to 50GB. I used defrag on Windows because I thought it would be faster. But it takes time as on gparted.

      To solve this problem, I planned to make a big enough free space on the partition sdc3 and make a partion sdc7 to move sdc1, sdc2, sdc3 to the space one by one. Then I can make a free space at the beginning of the hdd, to which the linux partition can be moved. Now the linux parttion is very close to the beginning of the disk, which is bootable even with an old bios.

      I made a big free space on the partition sdc3. It is now a time to make a partition sdc7 by gparted. But gparted complained that primary partitions can be made maxmimum only 4, not more. The extended partition sdc4 is a primary partition. It is now stacked!!

      I thought it is a good time to give up. I decided to come back to 4GB Toshiba pendrive...

  3. df shows 2.5GB free space in the pendrive, or 5% is used at the beginning. The /cow mounted on / is the persistent pertition and it is eaten up when you install something.
  4. After setting up apache2, emacs, subversion for web development + check out the content of website, the use become 30% and 1.7GB free.
  5. There is still 1.7GB free. Thus it will be enough to continue developping my website.
  • User Setup: Follow the instructions by the system. The second command you, here the user doctor, become a member of "sudo" group, which enables you to use sudo command. practically you are a root.
    $ sudo adduser doctor.
    $ sudo adduser doctor sudo. 
    
  • logout the default user, to make the system lighter. Some computers I use is shared and old and slow. It works good, when you save your memory. On the right upper corner, "the sytem setting" icon, you can see doctor as a user, the user which you just created above. Click it. there will be a login screen. You can turn back with the default user screen by hitting Ctrl-Alt-F7, and logout. Then back to your own user screen by hitting Ctrl-Alt-F8. It is also good to know you can go to a shell line by hitting Ctrl-Alt-F1/2/3 and so on.
  • After this, you can do whatever you would like to do, as if it is a installed version of ubuntu. This is great. Enjoy!


    Go back to Computer

    20181218