Home > IT, linux, windows > First experiences with Portable Ubuntu and Upgrading from 8.04 to 8.10

First experiences with Portable Ubuntu and Upgrading from 8.04 to 8.10

2009/04/13

There is a new thing called “Portable Ubuntu”. Get it here:

http://portableubuntu.demonccc.com.ar/

It’s about 450MB download and its default size after unpacking is about 2GB.

It promises to be a Linux installation which runs side by side with your MS-Windows desktop. After you downloaded and unzipped the file to a location of your choice you can start Ubuntu from within your active Windows session by double-clicking the file run_portable_ubuntu.bat. That was easy, wasn’t it? You now have GNU/Linux!

Let’s do an update…

  1. Get a current version: System -> Administration -> Software Sources
  2. Choose a good location for “Download from” an the first tab
  3. Update everything. This will be a large download (in my case: ~200MB) and take some time
  4. Shutdown (click on the ‘red-arrow-exit-door-symbol’ on the right of the toolbar which appeared at the top) and Start the Portable Ubuntu application (double-click the run_portable_ubuntu.bat file).
  5. Everything should be fine at this state. Do not continue if something went wrong….

You now have a minimal up-to-date Ubuntu on your Windows box.

The following text will explain how to upgrade your minimal Ubuntu (version: 8.04 LTS) to the current version (8.10 and in a couple of days it will be 9.04).

First let’s setup usage for the current version, not the LTS=long term support version.  System -> Administration -> Software Sources. Select the third tab labelled “Updates”. At the bottom, select “Normal releases”; Then close the Software Sources GUI.

Now I will explain the approach I tried which will fail.

  1. System -> Administration -> Update Manager : It shows you that version 8.10 (or newer) is available -> click upgrade
  2. Again, click “Upgrade” after reading the release notice.
  3. This will fail !!

You will get an error message telling you that there is not enough disk space available. The reason being that the minimal Ubuntu installation only reserved appr.  2GB of space. And since this installation should not mess with your precious disk space, this is fine. Unless you want more GNU/Linux 😉

Increasing the disk space is not as difficult as you might imagine.

(The official doc is here: http://portableubuntu.demonccc.com.ar/ -> Documentation -> How to change the file system size)

But before we go on:

Files to edit:

config\portable_ubuntu.conf

Files to move/rename:

images\rootfs.img

Step-by-Step Instructions:

  1. Goto the image folder (cd image)
  2. Create a new image file (fsutil file createnew rootfs_.img 3758096384). The number at the end is a multiple of 1024.  An installation of  2GB is calculated as follows: 1024*2*1024*1024=2147483648. If you want  4GB space that would be 1024*4*1024*1024=4294967296.  This process is very fast.
  3. Now you must edit the file config\portable_ubuntu.conf.      Change the line “cobd3="D:\Documents and Settings\czw5hv\Application Data\Windux\images\root.img” to “cobd3=images\rootfs_.img
  4. Execute the script run_portable_ubuntu.bat (double-click the run_portable_ubuntu.bat file) NOTE: THIS CAN TAKE UP TO 5MIN!! If everything is OK, you will see the GNOME task bar at the top of your screen.
  5. Open a terminal:  Applications -> Accessories -> Terminal
  6. Switch to root user by typing: “sudo su” (your default password is 123456)
  7. Issue the dd command. This is the crucial part, because the command dd
    will copy byte-per-byte, no-matter-what, from if (input folder =
    /dev/cobd0) to the of (output folder = /dev/cobd3)
  8. dd if=/dev/cobd0 of=/dev/cobd3

If a simple restart of Portable Ubuntu works now, you can start upgrading from 8.04 to 8.10 without any disk space problems. Just repeat the 2 steps I mentioned above that failed because you did not have enough disk space.

You can now copy the folder to your USB stick.

Have fun!

Setting the correct time zone in Portable Ubuntu

For some reason I could not set the correct time zone using the GUI (System -> Administration -> Time and Date). Everything is grayed out (even though I had to enter the root password to open the Time&Date application).  I had to manually run

sudo dpkg-reconfigure tzdata

to set the correct time zone.

Advertisements
Categories: IT, linux, windows Tags: , , ,
  1. Frank
    2009/04/16 at 07:25

    Thanks for that, I had been wondering why I could not get the upgrade, or even octave, to work properly. Busy updating now.

  2. Venki Das
    2009/04/17 at 15:17

    root@pubuntu:/home/pubuntu# dd if=/dev/cobd0 of=/dev/cobd3
    dd: opening `/dev/cobd3′: No such device

    • draptik
      2009/04/17 at 16:37

      Did you maybe forget to create /dev/cobd3 as mentioned in step 3: Now you must edit the file config\portable_ubuntu.conf…?

  3. Frank
    2009/04/17 at 16:46

    Draptik, have you been able to get PU to mount more than the image and your C drive? I wish to mount another HDD (E:) and have been able to do so only at the expense of the C drive. I changed the config file so that cofs1=e: instead of cofs1=c:.

    • draptik
      2009/04/17 at 18:13

      Frank, your approach is correct (I just tried it).

      Just enter the directory /mnt/C once you’ve applied your change and take a look inside. It will actually be your drive E:.

      The directory name /mnt/C is only the name of the mount point. If you want to change this you have to

      1. create a folder /mnt/E with the correct permission (sudo mkdir /mnt/E && sudo chmod -R 777 /mnt/E) and then
      2a. edit the file /etc/fstab as root (replace /mnt/C with /mnt/E with an editor of your choice)
      OR
      2b. Another alternative is to add your drive E: in addition to the drive C:. For this just do not execute step 2a above. Instead add a line to /etc/fstab like this:


      cofs2 /mnt/E cofs user,dmask=0777,fmask=0666 0 0

      If you choose method 2b, you also have to add a line to your portable_ubuntu.conf file:


      cofs2=e:\

      Unless you are running Portable Ubuntu on a single machine I would advice against this approach. If you are working on different machines you can’t be sure there is a drive E: present.

      HTH

      draptik

      Also see my new post at: https://draptik.wordpress.com/2009/04/19/accessing-further-windows-partitions-with-portable-ubuntu/

  4. Frank
    2009/04/19 at 12:50

    Great, thanks Draptik, that works well and is very easy to do. Now, if I could only get it to keep the “Darklooks” theme and stop reverting to “Human”…

  5. Shumail Ahmad
    2009/04/21 at 15:56

    Hi,

    I’m a newbie when it comes to using Ubuntu, especially Portable one.

    The problem im facing is that my windows network is configured on a static ip address and it is not automatically assigned by DHCP.

    I wish to use the terminal to download toolkits necessary to run gnuradio. Which I cannot since the terminal is not ‘connected’ to the internet.

    This problem is not there in the standard ubuntu where in the network proxy they have that option to apply the settings within the whole system. Which is not the case here in the Portable Ubuntu.

  6. fubo
    2009/04/27 at 16:26

    Hi tried the sequence and on Friday I was quite successful, but I had to stop prematurely the update operation as it was too much slow and I had to leave my office.
    Today I removed everything and restarted again, but I’m not more able to see neither 8.10 or 9.04 in “Update manager”, also after switched to “Normal releases” in update panel.
    Any idea?

    • fubo
      2009/04/28 at 11:35

      Strange! I tried another couple of times and now I’m just upgrading to 9.04 ;P
      Perhaps what I did bad before is to stop download during first update step because server I chose was too slow.

  7. Frank
    2009/04/28 at 11:37

    I successfully upgraded to 9.04. No problems yet.

  8. Sam
    2009/05/23 at 12:13

    Running 9.04 on pubuntu. Loaded ubuntu tweak and i cant use package cleaner, source editor, third party sottware sources? Unlock brings error saying could not authenticate? How do i fix this?

    • draptik
      2009/05/23 at 15:34

      I have never used this application, so I just downloaded and installed it now. I can confirm that unlocking gives an authentication error. Sorry, I do not know how to fix this problem. Probably best if you ask the author of the package. But I’m pretty sure you can get all of this tweak-stuff done from the command line… Side note for other readers: ubuntu-tweak is not an official ubuntu package.

  9. Tom
    2009/05/23 at 22:18

    Hi Draptik!

    Thanks for the great tutorial. This was perfect for my “mostly Windows but need to test in Linux” development needs.

    I’ve run into a rather critical bug though, and was wondering if you had experience with it. When I set the memory in the PU config file to anything greater than 256M (my XP host machine has 3G) and try to start PU, it crashes the computer almost instantly. No bsod… just reboots.

    Any idea why this might be or how to fix it / work around it?

    ~Tom

    • Tom
      2009/05/23 at 23:35

      Hmmm… I may have figured it out. Apparently colinux has issues with multiples of 128M RAM at times. Also, removing the “initrd” line from the config after the first launch seemed to help.

  10. sam
    2009/05/23 at 23:08

    Thank you for all the other information you have posted

  11. 2009/06/04 at 11:03

    I don’t how to thank you enough.
    It has taken me two dys to find this post and I found it by accident as I entered:
    cobd3=”D:\Documents and Settings\czw5hv\Application Data\Windux\images\root.img

    into the search bar to try and make sense of the config entry. Found You.

    I cheated though by going to:

    http://gniarf.nerim.net/colinux/fs/

    to download a 4gb image.

    I am turning this app into a 9.04 server and require 1-2 gigs for the Web files.

    To be honest I did not have the confidence at the moment to try and compile this server with CoLinux and Cygwin.

    My last problems were time and date and disc space and you answered them both. I still have to get the server iso and website into the image but hey, I now have the disk space so only require a little more searching.

    I am not really great with command line and wanted a linux server with a GUI to run inside windows.

    I posted here:

    http://ubuntuforums.org/showthread.php?p=7359904#post7359904

    and will be putting a guide into this forum, (you will get a mention of course).

    All the CoLinux posts I read on expanding the image twisted my brains a little. This post made it simple. Hopefully my post will take this

    app to another level, (we will see).

    I had already upgraded within the current disk size by uninstalling all the unnecessary apps and using Synaptic Package manager/Status/Installed (upgradable) to update so far.

    Thanks again and for those who want a 9.04 Server with lamp and other goodies on a stick or wherever, watch the post above. Give it a couple more days though.

  12. 2009/06/04 at 13:28

    Got a bit confused, when restarting Ubuntu I found no change.

    So I changed the portable_ubuntu.conf file to:

    cobd0=images\rootfs_.img
    cobd3=images\rootfs.img

    Initially rootfs_ was 3 and 0 for rootfs

    This works as I had not adjusted time and date until I had finished copying. Of course time and date where not correct after making these changes in the config file.

    However when I go to Accessories/Disk Usage Analyzer the I get:

    Total file System Capacity 3.8gb
    Used 2.3 Available 1.5

    This I get on both files now when switching them around where previously I had just 1.8gb with .8 gb free.

    Also I look at GParted, (initially I had some notion I could merge my downloaded image with the current image),

    On the rootfs image I get the correct 1.8 gb
    On the rootfs_ image I get the correct 4.0 gb

    It seems my installation has grown.

    Any ideas?

  13. 2009/06/04 at 13:34

    One other thing I would not mind doing is making mounting the original image, (rootfs 1.8gb) within the App as a second hard drive and deleting the files and folders within it to have a blank image/hard drive, (or download another clean file).
    I am using FAT32 so it would not be wise to have anything over a 4gb image.

  14. Mapache
    2009/06/05 at 16:37

    I upgraded to 9.04 but it is incredible slow.
    Clicking the Application-Buttons takes 2 secs to show the menu.
    Using the menu is tedious. Applications need more than the double time to start up.
    What changes are made to the Ubuntu 8.04 to speed it up?

  15. 2009/06/10 at 18:32

    Upgrading to 9.04 makes no difference, but and it’s a big but.
    Follow this guide to cleaning up Ubuntu. Use everything demonstrated:

    http://www.ubuntugeek.com/cleaning-up-all-unnecessary-junk-files-in-ubuntu.html

    Also uninstall all apps that you do not need, why have them when you already have them in windows.

    Use portable apps on your USB, go to:

    http://winfoes.co.uk/html/portable_apps.html

    All the apps listed on the above link work on 98se and above.

    Oh and Frank.

    You missed out probably the most important two commands to be able to update this installation, after 8.

    9. fsck.ext3 -f /dev/cobd3
    10. resize2fs -f /dev/cobd3

    Without the last two all you get is a 4gb load of space with only 1.8gb worth of drive.

    Full Installation as follows:

    To create a (5gb) image copy and paste the following into windows command:

    fsutil file createnew rootfs_.img 5368741376

    To create a (4gb) image copy and paste the following into windows command:

    fsutil file createnew rootfs_.img 4294967296

    To create a (3gb) image copy and paste the following into windows command:

    fsutil file createnew rootfs_.img 3221257728

    To create a (2gb) image copy and paste the following into windows command:

    fsutil file createnew rootfs_.img 2147483648

    Examples Below for image size calculations:

    (5GB = 1024*1024*1024*5 + 63*512 = 5368741376B)

    (3GB = 1024*1024*1024*3 + 63*512 = 3221257728B)

    Expanding to 4gb IN WINDOWS, (this was on FAT32):

    This is putting contents of Existing file into a larger File. Free disk space required 4gb from above + 2gb spare = 6gb.
    If reading this prior to installation, then it will be existing 1.9gb + 4gb, (new disk size) + 2gb spare = 7.9gb):

    To add more space you need change the root image (File that contain the file system of Portable Ubuntu). For this you must follow the follow steps:

    If you are executing Portable Ubuntu, you must close it.

    Go to the folder C;\portable_ubuntu\images folder.

    Start/Run/ cmd (command; this will likely leave the image on your desktop to be cut and pasted into the Wubuntu/image folder).

    Create a new image file with:
    **********************************************

    fsutil file createnew rootfs_.img 4294967296

    **********************************************

    Now you must edit portable_ubuntu.conf file. It is in the config folder. Add, (paste over cobd3 line), or edit to the following line:
    **********************************************

    cobd3=images\rootfs_.img

    **********************************************

    Save, Close file, Close Explorer
    **********************************************

    Run Portable Ubuntu (Execute run_portable_ubuntu.bat)
    When Ubuntu is ready, copy or type into Applications/Accessories/Terminal:
    **********************************************

    sudo su

    **********************************************

    Enter your Password,then enter following commands and let them complete:
    **********************************************

    dd if=/dev/cobd0 of=/dev/cobd3

    **********************************************

    fsck.ext3 -f /dev/cobd3

    **********************************************

    resize2fs -f /dev/cobd3

    **********************************************

    Close Terminal, Exit Portable Ubuntu.

    Go back to the images folder and rename rootfs.img to rootfs.img.old and rootfs_img to rootfs.img.

    Remove the line that you had added in portable_ubuntu.conf file ( cobd3=images\rootfs_.img ).

    Execute Portable Ubuntu and check it, by again opening Terminal and typing in:
    **********************************************

    df -h

    **********************************************

    Size of ‘/dev/cobd0’ should be the size of the rootfs_img you created.
    If it works fine, you can delete the rootfs.img.old file.

    NEW SIZE

    root@pubuntu:/home/pubuntu# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/cobd0 4.0G 1.2G 2.8G 30% /
    varrun 126M 84K 126M 1% /var/run
    varlock 126M 0 126M 0% /var/lock
    udev 126M 132K 126M 1% /dev
    devshm 126M 12K 126M 1% /dev/shm
    /dev/cobd2 248M 2.1M 234M 1% /tmp
    cofs0 8.4G 6.0G 2.4G 72% /etc/portable_ubuntu
    cofs1 9.9G 7.8G 2.1G 80% /mnt/C

    OLD SIZE:

    root@pubuntu:~# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/cobd0 1.8G 1.2G 605M 66% /
    varrun 126M 84K 126M 1% /var/run
    varlock 126M 0 126M 0% /var/lock
    udev 126M 132K 126M 1% /dev
    devshm 126M 12K 126M 1% /dev/shm
    /dev/cobd2 248M 2.1M 234M 1% /tmp
    cofs0 18G 11G 7.4G 59% /etc/portable_ubuntu
    cofs1 18G 11G 7.4G 59% /mnt/C
    **********************************************
    **********************************************

  16. Rich
    2009/06/13 at 19:36

    Followed both Stgeorge and Draptik’s advice worked perfectly 🙂 Thanks guys.

    However I was unable to upgrade distribution to 8.10, could install updates however.

    After much faffing round and googling I added several exclusions to KIS 2009 trusted apps too not scan network traffic,
    probably didn’t need all exe’s but added the following just incase.

    Xming.exe
    colinux-slirp-net-daemon.exe
    colinux-console-nt.exe
    colinux-daemon.exe
    pulseaudio.exe

    After this upgrading works and the progress bars show real time progress.

  17. raizo
    2010/11/06 at 11:16

    my problem is pubuntu cant to run in ubuntu 10.04 lts .i use wine and try virtualbox install xp and try to run pubuntu i got some icon old man has a meditation….yoga????!!! pleaze anybody can help me?….my hard disk and my laptop has a problem that why i use ubuntu coz window cant to get in usb hard disk that now i use….my laptop i forgot bios and hard disk password….totally now im decide to use ubuntu in usb hard disk new that have buy…

  18. john house
    2012/08/24 at 05:27

    I could not get this to run on my Windows 7 64 bit machine. Even running the .bat file from command prompt I had opened with admin rights.

  19. zero
    2013/04/25 at 13:18

    Bro, The link is down. http://portableubuntu.demonccc.com.ar/
    You have any idea where this site was moved to?
    I’m searching for portable ubuntu. On sourceforge, i can only get remix version, which is just 36.2 MB. Where can i get the original file that is over 450MB?

  1. 2009/04/19 at 03:15
  2. 2009/04/22 at 17:17
  3. 2009/12/16 at 13:49
  4. 2012/05/31 at 17:32
Comments are closed.
%d bloggers like this: