Wednesday, January 14, 2009

Fixing Your MBR After Ubuntu Overwrites It and more Fun with Installing Ubuntu on Netbooks!

So, I've been trying, for the past month or so, to get Ubuntu running on my two netbooks.  I can run Ubuntu 8.10 on my XO (done with instructions found here: http://www.olpcnews.com/forum/index.php?topic=4053.0 ) but my eee was being a bit harder.  I had somehow, months ago, managed to get a live CD of Xubuntu 7.10 installed onto an SD card.  The thing is, I couldn't get it to install onto another SD card--it just never worked.  Somewhere along the line I managed to get the SD card to think it wasn't a live CD anymore and suddenly I could write to it as though it had been properly installed.  Don't ask me how.  Somewhere around this point I discovered that I could no longer boot into XP.  The eee is my only XP machine and I need the XP part to keep running for various reasons.

However, at that moment, I decided to concentrate on Ubuntu since at least it was running.  I decided to upgrade to 8.04--of course, when I did, I discovered that I had lost my wifi driver.  Rather than trying to learn how to install the driver myself, I decided to stick to what I knew--now I really needed my XP boot again.  After a LOT of digging I learned it was the MBR, the Master Boot Record, that had been rewritten by Ubuntu.  It looked at the boot-device order I had set up in the eee's BIOS and got confused as to where Ubuntu was supposed to be installed.  So, it over wrote the part where the MBR tells the BIOS what OS to load off of which drive and where to look for which OS (yeah, it's confusing).  After even more digging, I found a post at Tuvaq.com (here: http://tuvaq.com/blog/index.php/2008/11/27/installing-ubuntu-8-10-on-a-usb-drive-me ) that explains it how to fix it with ease this way:


When I install Ubuntu 8.10 on a USB HD, it messes up my MBR. You can fix this directly from the Ubuntu terminal. You do not need to use the live CD if your Ubuntu system starts.

You need to install a little program called ms-sys. It will rewrite your Master boot record (http://ms-sys.sourceforge.net/). The ms-sys package you get directly from their site does not install on newer version of Ubuntu (apt-get install ms-sys). You will need to use the debian package http://packages.debian.org/etch/ms-sys

Once ms-sys is installed, you need to figure out on which partition is located Windows

   sudo fdisk-l

this will list the hard drives installed. You are looking for a line with NTFS as system. Something like:

   /dev/sda1 1 9327 74919096 83 NTFS

You need to replace /dev/sda in the following command line with your device Boot (without the number)

   sudo ms-sys -m /dev/sda

that's it! You can refer to the following page for more information:
http://www.arsgeek.com/2008/01/15/how-to-fix-your-windows-mbr-with-an-ubuntu-livecd/

This was the easiest part of this entire process.  This post really made it simple for me.  Hopefully, if you're having the same trouble, it will work this easily for you, too.

At this point, I've largely given up on running Ubuntu on my eee from an SD card.  The eee refuses to see any recently installed live USB stick.  Or maybe it's grub that refuses to see it?  Not sure.  Regardless, I've spent a long time getting it to work and it doesn't work yet, so I'll pass for now.  I may buy an external optical drive and try again, but I'm not sure how soon that will be.

If you have any questions about this or need help installing Ubuntu, check out Ubuntu.org or try IMing me or finding me on Twitter--or post a comment.  I can't promise anything, but I might be able to help.

Posted via email from thepete's posterous



Orignal From: Fixing Your MBR After Ubuntu Overwrites It and more Fun with Installing Ubuntu on Netbooks!

No comments: