*

Welcome, Guest. Please login or register.
Did you miss your activation email?

Check out the new and improved 2010 Xtra Ordinary OS for the XO laptop!
Pages: [1] 2 3 4 ... 7
Print
Author Topic: Installing Ubuntu using a disk image  (Read 82180 times)

Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 13, 2008, 06:53:08 PM

This topic is for installing Ubuntu using a disk image.  If you'd rather install Ubuntu using files, see the Installing Ubuntu using compressed files topic.  If you're not sure which install technique to use, see the Ubuntu Install Technique Comparison thread.

The installation instructions are the same as the official instructions, starting on page two: http://www.freelikegnu.org/?p=21&page=2

But, here are the instructions again:
Before you begin, you'll need at least three things:
1. A USB or SD drive that's at least 1.5 GB and has nothing on it you want to keep
2. The developer key for your XO (see here for how to get one)
3. A computer running Linux
Your XO will work for #3, but you'll need an additional drive that's at least 1.5 GB.  You could also use a Linux LiveCD.  OR, you can try the compressed files approach, which I'll hopefully post soon.  If you'd rather try the image or don't want to wait for the compressed files version, read on!

Since we'll need root privilege for some of the stuff below, let's gain root access right away.  If you're on the XO, just run: su -

Before we get started, it be good to know where your USB drive or SD card is.  To figure that out, see this post: http://olpcnews.com/forum/index.php?topic=1435.msg11484#msg11484

Download the image from the link above.  It'll be about 375 MB.  Let's pretend that you downloaded the file to /home/olpc:
cd /home/olpc
wget http://www.echo-flow.com/olpc/OLPCRoot.tar.bz2

Although this direct download is possible, the person hosting the file has asked that you download the file using bittorrent if possible.  You can download the torrent file here

See the New home for Ubuntu files? thread for more information.

Now, decompress the image, it'll be about 1.5 GB.  If you're using your XO, this should go on the secondary drive (not the one that the final image goes on).  Let's pretend that you want the file on /media/sdb1.  First, change into that directory, then decompress the file:
cd /media/sdb1
tar -jxf /home/olpc/OLPCRoot.tar.bz2

You should be left with OLPCRoot.raw in /media/sdb1.

You can now delete the downloaded file if you want:
rm /home/olpc/OLPCRoot.tar.bz2

Now we need to write that image onto the final drive.  Let's pretend that that drive is /dev/sda.  Before we start, make sure nothing on that drive is mounted! To check, run:
mount | grep /dev/sda | awk '{ print $1 }'
For every line that shows up, run:
umount device
where device is one of those lines that appeared.

Ok, now that that drive is unmounted, let's start writing to it.  I should probably remind you that you'll lose everything on this drive.
dd if=/media/sdb1/OLPCRoot.raw of=/dev/sda bs=1M
sync

Once that's done, make sure the drive hasn't been mounted again (follow the instructions above), then give that partition the correct name.  Remember to replace /dev/sda with whatever your drive actually was and don't forget to add a 1 to the end.
tune2fs /dev/sda1 -L OLPCRoot
If you're using an XO, you might need to type /sbin/tune2fs instead of tune2fs

Great!  Let's move on to getting the important files from our XO.  If you aren't already using your XO, it's time to start it up.  We're not ready to boot from our new drive just yet, so just boot into Sugar, Xfce or whatever else you happen to run on it.

Once it's loaded, issue the following commands:
cp -ra /boot /media/OLPCRoot/
cp -ra /lib/modules /media/OLPCRoot/lib/
cp -ra /lib/firmware /media/OLPCRoot/lib/
cp -ra /security /media/OLPCRoot/
cd /media/OLPCRoot/etc
mv modprobe.d modprobe.old
cp -ra /etc/modprobe.d /media/OLPCRoot/etc/modprobe.d
mv fstab fstab.old
cp -ar /etc/fstab /media/OLPCRoot/etc/fstab
cd X11
mv xorg.conf xorg.conf.old
wget http://dev.laptop.org/~cscott/xorg.conf
cd /media/OLPCRoot/boot
mv olpc.fth olpc.fth.nand


Now we need to set the correct /boot/olpc.fth file.  See this post for a multiboot olpc.fth file that should be used.  It appears to work better than the previously recommended: http://olpcnews.com/forum/index.php?topic=1525.0

We're done!  If you want to log into your new Xubuntu installation, just reboot, hold down the right game button (it looks like a check mark) until it tells you to release it, then let it boot up.  The username is olpc and the password is olpcolpc.  To start Xfce, after you log in, run startxfce4.

You'll notice that I applied all modifications mentioned on the Xfce? thread (as of January 13, 2008).

Update: I created a battery monitor script for the Xfce panel.  See this post for more details: http://olpcnews.com/forum/index.php?topic=917.msg10648#msg10648

You may also want to check out the Beyond the Ubuntu Installation thread for some more information on getting started with your new Ubuntu installation.
« Last Edit: March 12, 2008, 07:51:57 AM by moocapiean » Logged

#1 Re: Installing Ubuntu using a disk image

newbie
Senior Contributor
**
Posts: 121

Don't know much about computers but LOVE my Olpc.


January 14, 2008, 09:13:07 AM

That sounds great! I have Xubuntu on an old laptop and am amazed how much better it is performing now (as compared to the old Windows 98 previously installed).

So do all Xubuntu-applications work on the XO? Open Office? Media Players? Do all the XO-specific buttons (brightness, flip screen, etc) still work? Is it hard to establish a wi-fi connection?

I haven't quite warmed up to sugar yet - this might be just what I was looking for.
Logged

#2 Re: Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 14, 2008, 09:31:04 AM

Anything that can run on Xubuntu can, in theory, run on the XO.  You may have a problem with not enough memory to run some things (like OpenOffice), but I haven't encountered that yet (I also didn't install OpenOffice, but if Firefox can run...).  If OpenOffice doesn't work, there's always alternatives like AbiWord (for word processing) and Gnumeric (for spreadsheet stuff).

Audacious (a music player) worked, but it might not be able to play mp3s:  See this for more information: https://help.ubuntu.com/community/RestrictedFormats

I set it up so that the brightness and the volume buttons work.  The button in the top right functions as the F11 key (which is the "fullscreen" button in some programs).  I didn't do anything with the other buttons because I wasn't sure what anyone wanted for the others.  If you want to set some of them yourself, have a look at these posts:
http://olpcnews.com/forum/index.php?topic=592.msg6317#msg6317
http://olpcnews.com/forum/index.php?topic=592.msg8882#msg8882
and feel free to ask any questions if you get stuck!

On my unencrypted wireless network, it was extremely simple.  I installed NetworkManager and the panel plugin so you should see a network icon in the bottom panel on the right-hand side.  Clicking on it will reveal all the wireless networks the XO can see.  Just select the one you want.  If you want to connect to a secure network, it'll probably ask you for the information, but I haven't tried that.
Logged

#3 Re: Installing Ubuntu using a disk image

Convex
Commenter

Posts: 8


January 14, 2008, 12:57:54 PM

i'm sorry, i'm a little rusty with all this stuff. i was programming on linux over two  decades ago, but its all forgotten.

when i tar the file i get OLPCRoot.raw not OLPCRoot and when i try to run the dd command i get '/xxx/xxx/ is a directory' error.

any help is appreciated
Logged

#4 Re: Installing Ubuntu using a disk image

Frank Scott
Senior Contributor
**
Posts: 115


1st Hour Donor, Rocklin, CA


January 14, 2008, 02:09:13 PM



I just came across this site that explains how to install various versions of Linux on pen drives (USB flash drives). Looks pretty interesting from what I've seen so far.

http://www.pendrivelinux.com/

Frank
Logged

#5 Re: Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 14, 2008, 02:30:37 PM

i'm sorry, i'm a little rusty with all this stuff. i was programming on linux over two  decades ago, but its all forgotten.

when i tar the file i get OLPCRoot.raw not OLPCRoot and when i try to run the dd command i get '/xxx/xxx/ is a directory' error.

any help is appreciated

Hmm, I got OLPCRoot.raw too, I guess I'll have to change the instructions.

As for your dd error, do you know which location it was complaining about?  Was it the /media/sdb1/OLPCRoot.raw file or the /dev/sda?  Did you change /media/sdb1 and /dev/sda to the directories you were dealing with?
Logged

#6 Re: Installing Ubuntu using a disk image

Convex
Commenter

Posts: 8


January 14, 2008, 06:20:01 PM


As for your dd error, do you know which location it was complaining about?  Was it the /media/sdb1/OLPCRoot.raw file or the /dev/sda?  Did you change /media/sdb1 and /dev/sda to the directories you were dealing with?
yes, i changed them to my directories. and it was the second one, the one i was putting the image in, that i got the error.
Logged

#7 Re: Installing Ubuntu using a disk image

mbs348
Contributor
*
Posts: 38


January 14, 2008, 07:21:28 PM

for the SD install, for the last and final wget, do we do a similar mv command (similar to the usb stick instructions)? where should the file we downloaded be going on the sd card, or should it just being going on the main olpc nandflash?

Thanks for the clarification!

Max
Logged

#8 Re: Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 14, 2008, 07:32:25 PM

Yep, similar command.  The instructions are for both USB and SD.  I just use USB as the examples because that's what I was using.  So, anything for USB you should also do for SD (I'll make any notes of when you do something different).
Logged

#9 Re: Installing Ubuntu using a disk image

admdvs
Commenter

Posts: 29


January 15, 2008, 07:51:12 AM

Thanks!  It worked first time.  but what is the root password?
..adam
Logged

#10 Re: Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 15, 2008, 10:44:01 AM

I don't think there is one (it's an Ubuntu thing), so if you want root power, you have to preface your command with sudo.  So, if you wanted to edit a file in /usr/bin (usually only root can do that), you'd have to do:
sudo nano /usr/bin/adjust_brightness.sh
It'll prompt you for your password, not root's.

That said, there are some ways around this.  I think the most popular is to do:
sudo su
Which will give you root permission until you decide you no longer want it.  Since I'm more used to the traditional approach of just using su, I gave root a password.  I can't remember the command, but I think if you did:
sudo su
passwd

you'd be able to switch to root just by doing:
su
(then entering root's password).
Logged

#11 Re: Installing Ubuntu using a disk image

jmdeschamps
Commenter

Posts: 18


January 15, 2008, 05:57:47 PM

HUmmm, reading all this , I'm wondering about installing Ubuntu on my very recently arrived XO
Question(s): Is this install recipe over-writing XO firmware?

Is it *easy* toi restore the firmware and native XO enviroinment afterwards?

Sorry if the question seem naive, I'm but an egg in linux!
Logged

#12 Re: Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 15, 2008, 06:07:33 PM

HUmmm, reading all this , I'm wondering about installing Ubuntu on my very recently arrived XO
Question(s): Is this install recipe over-writing XO firmware?

Nope, after copying some files off of the internal drive, it never touches the drive again!  You can, of course, let it touch the drive while you're using Ubuntu, but it doesn't by default.

Is it *easy* toi restore the firmware and native XO enviroinment afterwards?

It's extremely easy, just remove your USB/SD drive Wink.

Sorry if the question seem naive, I'm but an egg in linux!

No need to apologize, I think plenty of people here are new to Linux.
« Last Edit: January 15, 2008, 06:11:20 PM by moocapiean » Logged

#13 Re: Installing Ubuntu using a disk image

jmdeschamps
Commenter

Posts: 18


January 15, 2008, 06:50:19 PM

thank you very much for a very fast (and nice) answer!

So from your answer I gather that
a- installing Ubuntu is done on a key drive
b- booting when the key is in place will start off the keyed system (ubuntu)
c- that just restarting the system will make my XO boot from XO-Fedora-Sugar

Sorry to ask again, just wanting to make sure here!
Logged

#14 Re: Installing Ubuntu using a disk image

moocapiean
Master Contributor
***
Posts: 330


January 15, 2008, 07:38:42 PM

thank you very much for a very fast (and nice) answer!

So from your answer I gather that
a- installing Ubuntu is done on a key drive
b- booting when the key is in place will start off the keyed system (ubuntu)
c- that just restarting the system will make my XO boot from XO-Fedora-Sugar

Sorry to ask again, just wanting to make sure here!

a - Yep
b - Yes, but don't forget to hold down the right game button (it looks like a check mark), otherwise you won't see anything
c - Yes, as long as the key is not in a drive
Logged
Pages: [1] 2 3 4 ... 7
Print
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
February 08, 2010, 10:29:38 PM

Login with username, password and session length
Recent Topics
[February 06, 2010, 08:21:34 PM]

[February 06, 2010, 01:30:32 PM]

[February 06, 2010, 04:14:13 AM]

[February 05, 2010, 05:14:11 PM]

[February 05, 2010, 02:35:40 PM]

[February 04, 2010, 07:21:32 PM]

[February 04, 2010, 01:50:58 PM]

[February 02, 2010, 07:37:01 PM]

[February 02, 2010, 12:28:12 PM]

[February 02, 2010, 10:55:23 AM]
Members
Total Members: 4128
Latest: divinegrace29
Stats
Total Posts: 30200
Total Topics: 3647
Online Today: 82
Online Ever: 220
(February 05, 2009, 11:29:32 AM)
Users Online
Users: 0
Guests: 56
Total: 56