Friday, February 26, 2010

Dual Booting an HP Mini 210 HD with Windows and Ubuntu 9.10 64-bit


So you just bought an HP Mini 210 HD netbook, and want to shrink the Windows partition so you can install Ubuntu 9.10 64-bit, eh? Well, you've come to the right place! I'll walk you through the process from booting it for the first time to tweaking both OS installs. I'll include some of my favorite Ubuntu tricks, but I won't bore you with trivial details, like how to unpack it, and where the power button is... just the important stuff for someone with some prior Linux (preferably Ubuntu) experience.

(most of this is broadly applicable, not just to netbooks, so don't stop reading just because you don't have my exact netbook!)

Windows Stuff
  • First, of course, turn it on, and go through all the normal Windows configuration stuff. I entered a few different users, but later decided I just wanted one user for the whole family. I was able to delete the other users and set a password under Settings... Control Panel... User Accounts.
  • Remove HP's pre-installed "crap ware" under Add Remove Programs.
  • Finish setting up Windows to your taste, installing software updates, etc...
Installing Ubuntu
  • Download the Ubuntu 9.10 64-bit iso.
  • Burn it to a USB flash drive by following the instructions on this page.
  • Go to this HP web page to see all of the boot-hotkeys, but to get into the BIOS, boot the system while holding the F10 key. Change the first boot device to a USB disk. Then reboot with your flash drive inserted. The Ubuntu installation menu should greet you.
  • Choose to boot into Ubuntu rather than install right away.
  • Double click on the installer on the desktop, and during installation, be careful to select the dual boot option when prompted.
  • In the partition setup, drag the slider down (which will be a pain, see below) so Windows has as much space as you think it needs (I chose 40 gigs, but you could probably get away with 30). I recommend leaving the file system as ext4, unless you have a reason to do otherwise.
  • After installation, don't reboot just yet. Make sure you have an ethernet cable plugged in, and when prompted, click "Continue Testing". Click the hardware icon on the top panel to select hardware drivers. Activate the Broadcom STA driver, but not the b43 driver. (Full disclaimer: It was significantly more challenging than this, but after much research, trial, and error, I'm pretty sure if you do it this way the first time, its'll "just work", and you won't have to futz around with it as much as I did.)
  • You'll notice the trackpad buttons have some issues, which will make adjusting the slider in the above step a pain. To fix this, after installing Ubuntu, launch a terminal, and do this:
> sudo su
> echo options psmouse proto=exps > /etc/modprobe.d/psmouse.modprobe
> reboot
  • Upon re-entering your fresh Ubuntu install, now would be a good time to go into Synaptic (System... Administration... Synaptic Package Manager), do a "Reload", then "Mark All Upgrades" and "Apply". This first software update is pretty extensive, so you'll have to reboot.
  • To use your webcam, install "cheese" through Synaptic. Cheese Webcam Booth will then show up under Sound & Video.
Space Efficiency
  • I encourage you to take a moment to customize the UI to best optimize your relatively small screen. Under Appearance Preferences... Interface... choose "Icons Only" for "Toolbar button labels". I like to consolidate down to just a single panel on the bottom of the screen, like Windows, and I set it to "Autohide". This setting can be found under Properties after right-clicking on it.
  • I also like to get rid of the Menu Bar on the panel, and instead replace it with the Main Menu, which is just a single icon. There are lots of other optimizations you can do with the items on the panel, just poke around and see what options you have.
  • I recommend going into System... Preferences... Keyboard Shortcuts and setting up shortcuts how you like. I have a strong preference for "ctrl + alt + ..." shortcuts. I do recommend that you make at least two; 1) Fullscreen: "ctrl + alt + f", and 2) Open Main Menu: "ctrl + alt + u". I know the main menu one is already defined, but this keyboard shortcut will prove very useful in the next step.
Fix the Main Menu Delay
  • You will notice a delay when clicking on the Main Menu icon for the first time after rebooting or re-logging in. This is because it doesn't properly cache its icons, and has to reload them at the beginning of each session. It is snappy after this first click, however. If this annoys you like it annoys me, you can fix it by following the next steps.
  • Note that this is probably only applicable to Ubuntu 9.10 and earlier. I've heard rumors that it is fixed in 10.04.
  • First, install the X-Virtual Keybaord via Synaptic (xvkbd). This allows you to execute keyboard commands from within scripts, and we're going to create one which quickly opens and closes the Main Menu behind the black login screen during the login process. You'll never notice it!
  • To do this, open System...Preferences...Startup Applications
  • Then add a new command to execute this:
sh -c "sleep 6 && xvkbd -text '\C\Au' && sleep 0.1 && xvkbd -text '\[Escape]'"
  • Whala! Reboot and check it out. No more delay on first-click! You may, however, need to tweak it a bit (the number of seconds in the sleep commands). It needs enough delay for Ubuntu to have loaded your keyboard shortcuts, but too much delay, and it'll be visible. It seems like there needs to be a delay before hitting "escape" to close the menu, to give the menu enough time to open, and 0.1 seconds seemed to work well for me.
Firefox
  • Since this is a 64-bit install, rather than going through Synaptic to install Adobe's Flash Player, you'll have to install it manually... but its simple! Download it here. Extract it, then install it with this command:
> sudo cp libflashplayer.so /usr/lib/mozilla/plugins/
  • Restart Firefox, and you're set!
  • To further optimize your precious screen realestate, you should turn off the status bar (View...Status Bar), and install Tree Style Tabs, which makes much better use of the excess horizontal space available with the wide-screen display.
Multimedia File Support
  • To get movies and other multimedia files playing, do this:
> sudo apt-get install vlc ubuntu-restricted-extras
> sudo /usr/share/doc/libdvdread4/install-css.sh
  • I recommend using .iso files as your default movie file type. They are the raw binary data ripped straight from a DVD using Ubuntu's built-in DVD burning ability (right click on a mounted DVD on your desktop, then choose "Copy Disk", and copy it as an .iso file).
  • I then recommend setting VLC as your default movie viewer for .iso files by right clicking on a .iso file, choose Properties... Open With, then add VLC, and choose it as your default.
Customized Boot Menu
  • I like to customize my grub (boot) splash screen. To do that, I followed this guide.
  • I also like to reduce the grub menu timer to 5 seconds (instead of 10 seconds). You can do this by modifying the line "GRUB_TIMEOUT=10" to say "GRUB_TIMEOUT=5" in the file /etc/default/grub. Be sure to "sudo update-grub" after changing the file.
Install software not found in default repositories
  • To install Google Earth, follow the instructions found in my previous blog entry
  • A nice, screen-space-efficient browser alternative is Google Chromium. You can add the daily-build to your software repositories by following the instructions here.
  • If you have a digital camera and like to process RAW files, I recommend RawStudio. You can add the daily-build to your repositories here.
Conclusion

This stuff was pretty easy, eh? Not too technical, but there is a lot to do after a fresh install. It only takes a few hours, and should make your computing experience that much more enjoyable. Happy Ubuntuing!

PS: I've tested every last little bit of hardware on this netbook, and every single thing works.... the headset jack (for integrated microphone ear-bud hands-free headsets), the speakers, the wifi, the webcam, everything. I'm impressed. It can sometimes be a bit of a challenge to get everything working under 64-bit Ubuntu.

    8 comments:

    Rendzu said...

    I have, in fact, just purchased a HP Mini 210 HD and your guide came in very handy.

    I am a newbie to Ubuntu and I appreciated all the tips, especially the ones about making the most of the screen real estate.

    Thanks!

    outspoken said...

    I would follow the above steps if you provide instructions on how to remove the Linux system if I no longer need it :)
    Just a little scared, I have no access to a External CD drive, Hence no recovery CD burned till now. So have to rely on recovery partition.

    Summary : Would be glad if you showed how to restore Win7 boot loader using recovery partition only.

    stan said...

    HELP. It didn't work for me.

    I have an HP Mini 210 1070nr that came with a 250 GB drive and Windows 7 Starter.

    The drive has four PRIMARY partitions:
    - a 200 MB boot partition (which I think is the Win7 recovery partition)
    - a 211 GB Win7 c: partition
    - an HP_TOOLS partition (which I think has the HP software for diagnostics and recovery to factory state)
    - a Recovery partition (which I think has the data needed for recovery to factory state)

    I can reduce the size of the Win7 c: partition from within Win7 with Disk Manager, but, because I already have four primary partitions, I can't create any more partitions to install unbuntu

    Did you manage to do it, or did your Mini come with less than four primary paratitions?

    --stan

    Scott said...

    I'm with Stan, what do you do if there are already 4 partitions? I still want win7 and the splashtop to work right.

    stan said...

    I found a way, but I'm not sure it won't bite me later.

    I did a Macrium backup of the Win7 c: primary partition onto an external USB drive. Then I did a restore of that same partition.

    As part of the restore Macrium asked if I wanted the partition to be active, primary, or logical. I chose logical, and Macrium converted the Win7 c: partition from primary to extended and logical. That got me past the four primary partitions limit.

    Next, I booted into Win7 (which still worked as a logical partition), launched Win7 Disk Manager, and shrunk the Win7 partition by 100 GB. It wouldn't shrink to max, but 100 GB was enough.

    Then I installed ubuntu desktop into the free 100 GB, and I have a working dual boot system.

    --stan

    Keith said...

    You can back up the content of HP_TOOLS partition and the remove that partition.

    Then you can use the space freed by shrinking the win7's partition to install ubuntu. We will not be able to use that 1xxMb space of HP_TOOLS. No problem for me.

    If you ever need the HP_TOOLS again, create a fat32 partition with the name HP_TOOLS. Then restore the content.
    Search the web, there would be more detailed information on this.

    John said...

    Many thanks! I've done Ubuntu installs before, but never dual-boot Windows on a netbook, and this came in very handy. Had me up and running in no time (once I was past the partition fiddling, argh)

    Jagath Buddhika Kumara said...

    Hi,
    I have something similar problem as above.
    I bought a HP Pavilian dv4-2100 laptop with Windows 7 and HP-quick web feature. I try to install Ubuntu 10.04 for separate partition in it. What I did was, shrink the windows system partition and make some space as un-partition.
    Now partition table as follows;
    SYSTEM : 199MB (NTFS)
    C : 249.66GB (NTFS)
    UNALLOCATED : 29.3GB
    RECOVERY : 18.83GB (NTFS)
    HP TOOL : 103MB (FAT32)

    My problem is when I try to install Ubuntu it did not show my system partition table correctly. That means, it did not show that un-partition free space to install Ubuntu.
    Please help me to overcome this problem.

    Regards,
    Jagath