Sunday, June 19, 2011

Install Ubuntu 11.04 / 11.10 / 12.04 / 12.10 on an Asus Eee PC 701 4G

Ever since I got my iPad last summer, my grand-daddy of all netbooks, the Asus Eee PC 701 4G, has become somewhat... neglected.  These days it serves as a test bed for various flavors of linux and their respective updates.  I've run the default Xandros, XP Pro (full installation, compressed), Fedora, Ubuntu, and Joli OS (Jolicloud).  Even with XP Pro, all updates, I never had an issue installing any OS within the confines of the tiny 4GB SSD that is soldered on the board of this device.

Leave it to a bug in the latest version of Ubuntu (11.04) to ruin that perfect record.  An issue that I ran into, and subsequently found information about at Ubuntu in Launchpad, is that the Ubiquity installer imposes an arbitrary minimum hard disk size when the actual final installed size of the OS is far below that limit.  Observe.

After creating a bootable USB key with the Universal USB Installer from Pendrive Linux, boot from the key, and at the Installer boot menu, choose Select Run Ubuntu from this USB to boot into a live session of the OS:
Double-click on the icon to Install Ubuntu 11.04.  At the Welcome window, Select your language, and use Alt-Left Click anywhere in the window to drag it up to click the Forward button, since the massive 800x480 resolution of the Eee PC isn't QUITE able to fit it all on-screen.

On the Preparing to install Ubuntu window, you'll see the specifications that you'll need "For best results" including:
  • has at least 4.4 GB available drive space
  • is plugged in to a power source
  • is connected to the Internet
This time, when you Alt-Left Click-and-Drag the window up, you'll find that the Forward button is greyed out.  So really instead of being suggestions for best results, these are actually requirements to even continue with the installer!  Finks.
Click the Quit button to return to the Ubuntu desktop.  Hit Alt+F2 and type:
  • gksu gedit /usr/lib/ubiquity/plugins/ubi-prepare.py
Then on line 310 of that file, change the "fudge factor" from
  • min_disk_size = size * 2
to
  • min_disk_size = size * 1.4
Update: For Ubuntu 11.10, the same bug rears its ugly head, but instead of line 310, it's now on line 250.
Update 2: For Ubuntu 12.04, the file is now /usr/lib/ubiquity/ubiquity/misc.py, line 796.
Update 3: For Ubuntu 12.10, the file is still /usr/lib/ubiquity/ubiquity/misc.py.


Click the Save button, exit the editor, and then double-click on the icon to Install Ubuntu 11.04 again.  Proceed through all the same windows, and this time you should find that the Forward button is no longer greyed out.  Hey, would you look at that!
Feel free to check the boxes to "Download updates while installing" and "Install this third-party software," and click the Forward button.  Once you finally get to the point where you get the Installation Complete message, click on the Restart Now button, go ahead and restart.  Once you login for the first time, run the Update Manager for any additional updates that didn't get picked up during the course of the installation.  When you open up a Terminal window, and run:
  • df -h
  • cat /proc/cpuinfo 
you will notice a few things.  First, the final installed size of the OS is actually only around 2.7 GB instead of the 4.4 GB that the installer was requiring .  Second, even though the processor in this netbook is a Celeron M 900, it is downclocked to 630 MHz.  This is fairly common, also happened by default with XP.  In both cases, additional utilities are required to get that back up to 900 or higher for better performance, but poorer battery life obviously.

Not that I'm playing favorites or anything, but for comparison purposes, a Fedora 15 installation on the same hardware comes out to a final installed size of 2.5 GB, and a clockspeed of the full 900 MHz, out of the box.

Anyway, hope that helps if there's any of you out there that are like me, a closet hoarder of technology, always looking to repurpose older tech, rather than dispose of or recycle it.  You can have my gadgets... if you can pry them from my cold dead fingers!

57 comments:

  1. Thanks for this. It worked! Ubuntu 11.04 is much better than the pre-installed OS.

    ReplyDelete
  2. This is probably a daft question, but I don't know Ubuntu and I can't seem to get from typing the ubiquity command after pressing alt and f2 to the bit where you edit the line of code. I double clicked and the file just span round a bit and did nothing. What am I missing?

    ReplyDelete
  3. Hi Dave, I'm not sure where or why you're double-clicking, but after typing that ubiquity line into the command form field, you should just hit Enter to start up the editor. Hope that helps! -Stuart

    ReplyDelete
  4. I tried hitting enter and it just goes back to the main screen. I get the white activity dial but nothing else seems to happen. Any advice?

    ReplyDelete
  5. I just ran through this process again this morning, and I did get the spinning activity dial, but only for a few seconds before the editor started up. If it's just not coming up for you, there are always other options. For example, you could open up Terminal, "sudo su" and hit Enter to get a root shell (which you will need in order to edit that file), "gedit /usr/lib/ubiquity/plugins/ubi-prepare.py" and hit Enter, or you could even use "vi" if you're comfortable with a more text-based approach. Let me know if any of those works for you.

    ReplyDelete
  6. Okay that's interesting. It said there was no such file when I tried to do it through the terminal, which is weird. I have been trying to do this via a USB key that I created in Windows so not sure if that's where the problem lies.

    ReplyDelete
  7. I'm using the same method (USB created via Windows). What happens when in Terminal, you "cd" into that folder with "cd /usr/lib/ubiquity/plugins/" and then "ls ubi-*" ? Do you see the file listed? If worse comes to worst, I would suggest recreating your USB key again using the link I provided at the beginning of the post, or even trying a different USB key altogether to rule out a hardware issue.

    ReplyDelete
  8. Thnx for the info. Gedit is not installed on Lubuntu live. So I had to use VI. For VI instructions:
    http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html

    Simple instructions: use INS to edit text and use : to go to the command mode, use wq in command mode to save and exit

    ReplyDelete
  9. In 11.10 it seems the partioner creates a 1.8 GB partition, giving the rest to swap, so manual partitioning might be necessary. Thanks for the fudge factor fix, very helpful.

    ReplyDelete
  10. Thanks a lot for sharing this useful information with the rest of the world. I found out that this also works for Lubunto 11.10.

    ReplyDelete
  11. OK got to the fudge factor, I used a previous version to partition hd on netbook dell atom, however after running install again I don't think the 8 gig sd hard drive is being seen...

    ReplyDelete
  12. I lowered fudge factor to 1.0 and it still gave me the same problem

    ReplyDelete
  13. I want to install Swedish BankID on my Ubuntu, thanks already to guide how to install.

    ReplyDelete
  14. You can also plug in an external USB drive to give the installer enough space to continue.

    ReplyDelete
  15. I am using Windows 7 on a desktop,
    but no matter what number i chose, that doesn't work,
    I still couldn't install ubuntu, (even "size * 0".)
    Would you give me a few advices please? Thanks!

    ReplyDelete
  16. works also with 12.04 alpha 1 (somewhere about line 250)

    ReplyDelete
  17. Silly question. I am trying this with Ubuntu 12.04 on the 701 and there is no line min_disk_size in ubi_prepare.py . Do you know where they moved this to?

    Thanks

    ReplyDelete
  18. Update 2 just added above should answer your question. They basically moved that setting to an entirely new file, /usr/lib/ubiquity/ubiquity/misc.py, line 796. I made the same change as mentioned previously, and am now in the process of installing. I did also create one large 4 GB partition, mounted as /, with no swap partition, just to be on the safe side. We'll see how it goes... :)

    ReplyDelete
    Replies
    1. Looks like a final install size of only 2.4 GB with third-party software, but WITHOUT updates yet. Installing updates now...

      Delete
    2. 21 updates (75 MB downloaded) later, and I'm sitting at a final install size of 2.7 GB again, just like the previous versions. Fits just fine on the 4 GB SSD. :)

      Delete
  19. Thanks for this tip, I'm actually posting this comment on a 701. I had to tweak some other file to have Unity 2D as my default session though, but that's another story.

    If I may leave a tip of my own: when editing the misc.py file in Nano, one can use CTRL+W (where is) and find "min_disk_size" so you don't have to count the lines any more.

    Cheers!

    ReplyDelete
  20. Tried the update 2, but unfortunately,the misc.py-files seems to be empty... I wrote: gksu gedit /usr/lib/ubiquity/misc.py which is correct, isn't it?

    ReplyDelete
    Replies
    1. I think you missed a ubiquity in there. there's two levels of directories named ubiquity. :)

      Delete
  21. yes, you were right. Thank you for that. I found the line. Anyway - installation crashed and then the system told me 1. I don't have enough space on my system and 2. can't edit misc.py because the file is already in use in a non-edit way... what a pity, it looked very promising in the beginning. Any idea what that means?

    ReplyDelete
    Replies
    1. Only thing I can think of is you allowed it to do an automatic partitioning instead of a manual. You'll need to do a manual one to prevent it from creating a swap partition (bad for SSD life anyway). I just created a single partition of the entire 4GB, ext4, mounted at /.

      Delete
  22. Many thanks - solved my problem in one shot. Firefox in original software had screwed up on update, so took opportunity to upgrade to Ubuntu 11.10. Met just this problem of the space constraint. Now up and running and so much better than the original software. Great!

    ReplyDelete
  23. You are a life saver! Thanks. :)

    ReplyDelete
  24. Hi, it says I do not have permission to change the file. How would I go about this? Thank you!

    ReplyDelete
    Replies
    1. You should be able to bring up Terminal, get root access with "sudo su", and then try again?

      Delete
    2. sudo su then what?
      still cant not

      Delete
  25. Hi there,

    I am trying to install Fedora 17 in my EEE 701 but it says there is not enough space. Can I do the same editing that you did for Ubuntu?

    Thanks!

    ReplyDelete
    Replies
    1. Not sure, I haven't really played with Fedora 17 on this thing yet. But Ubuntu 12.10 is now working great!

      Delete
  26. Hello.
    First of all, great tutorial. Congratulations.
    Yet, I cannot seem to be able to save the .py file after editing it. He says I have no permission.
    Any ideas?!

    Thank you.

    ReplyDelete
    Replies
    1. You should be able to bring up Terminal, get root access with "sudo su", and then try again?

      Delete
  27. Just an idea, how about installing Ubuntu 12.04 on SD Card Drive,and latter installing Windows XP Home on the main SSD. Therefore we can have dual OS, which is flexible and cool.

    ReplyDelete
  28. Brilliant info! Installing Xubuntu 12.04 on my 701 as I type. I used sudo and nano as my editor, but otherwise followed your post.

    Wonder if those mentioning no permission to save are using gksu or sudo? Unless you have "super user" permissions, you can't save the edits.

    ReplyDelete
  29. Great tutorial!
    Just said: "Second, even though the processor in this netbook is a Celeron M 900, it is downclocked to 630 MHz. This is fairly common, also happened by default with XP. In both cases, additional utilities are required to get that back up to 900 or higher for better performance, but poorer battery life obviously".
    What additional utilities can i use in Ubuntu 12.04 to get 900 MHz?

    Many thanks, Jorge Rocha

    ReplyDelete
    Replies
    1. Hmm, there used to be a utility called eee-control, but that looks to be gone now. Here's a link that may have some useful information, but use it at your own risk! https://help.ubuntu.com/community/EeePC/Using

      Delete
  30. Hi and thanks.

    I have a problem : at the and of the installation (12.04 lts on eeepc 701 4g); just before restart i think, a black screen appears.....i don't know what to do?
    Thanks if you have an answer.

    ReplyDelete
  31. Hey everyone... honestly i dont know what is happening... because i put the code gksu gedit /usr/lib/ubiquity/ubiquity/misc.py and that dont work... i'm installing version 12.04..

    ReplyDelete
  32. Thank you Stuart for this article.
    I also had trouble with the gedit command and found that Xubuntu 12.04 uses leafpad so I substituted that in the command line but left out gksu. I could open the misc.py file but the editor wouldn't allow me to save the changes. I opened the terminal and used the following line:

    sudo leafpad /usr/lib/ubiquity/ubiquity/misc.py

    This time I could save the edited file.

    ReplyDelete
  33. Thank you. This has breathed new life to my eee 701 4G. I'm using it as an online media player (music only!).

    Props to you for helping maintain existing gadgets, when everyone only wants to sell and comment on new ones.

    ReplyDelete
  34. thanks, really...

    I suggest to you to add the command for the new versions of Ubuntu and Xubuntu 13.04!

    For Ubuntu 13.04:
    gksu gedit /usr/lib/ubiquity/ubiquity/misc.py

    For Xubuntu 13.04:
    gksu mousepad /usr/lib/ubiquity/ubiquity/misc.py

    ReplyDelete
  35. Thanks, Awesome tutorial. Had a slight issue with the Distro I was using as Gedit was not installed. Quickly fixed this in the terminal using:

    $ sudo su
    $ get-apt install gedit

    Cheers

    ReplyDelete
  36. I had some problem getting this to work.

    On my 4G the ubuntu and debian did not install. I could make the change in de misc script but restarting the installation did not work a second time. All was painfully slow.

    I ended up using lubuntu which took some time too, but is mutch more suiteable i think.

    Had to make the same change in de misc.py script.

    By the way, I used an Xterm and nano to make the change in the script.

    ReplyDelete
  37. Not able to even run Ubuntu 12.04.03 in my EEE PC 701; it complains that PAE feature is missing. Any clue ?

    ReplyDelete
  38. Asus makes some great products, whenever I'm looking for a new device....
    Asus Technical Support please visit the link.

    Thankyou
    Lacy Brown

    ReplyDelete
  39. Hi there,
    It still works with Xubuntu 14.04.1 on my EeePC 701 4G, you need to go to line 859 by now :)

    ReplyDelete
  40. BRILLIANT. Thanks so much from a non techy techie

    ReplyDelete
  41. it works also to peppermint 5 /usr/lib/ubiquity/ubiquity/misc.py

    ReplyDelete
  42. Thanks. This is great. I had been looking for this solution for a while. It worked on elementary OS Freya 0.3.1.

    ReplyDelete
  43. well written article, thanks for posting.

    My Recent Post aquaris m10 fhd ubuntu tech specs

    ReplyDelete