Home
Forum
Help
Login
Register
XO Laptop Shop
Forum Staff
OLPC News
OLPC News Forum
»
XO Laptop
»
XO Hacks
»
Other Operating Systems
»
Installing Ubuntu using compressed files
Welcome,
Guest
. Please
login
or
register
.
Get your own OLPC -
Buy an XO laptop on eBay
!
Pages:
1
...
15
16
17
[
18
]
19
20
21
...
24
« previous
next »
Print
Author
Topic: Installing Ubuntu using compressed files (Read 268241 times)
#255
Re: Installing Ubuntu using compressed files
moocapiean
Master Contributor
Posts: 330
April 02, 2008, 05:42:27 PM
You don't have to use the kernel I compiled, but I'd recommend using the ones that OLPC makes available instead of the ones from kernel.org. I don't know if the ones at kernel.org support the hardware that OLPC uses. I've been meaning to post how I compiled the kernel and modules, but I haven't had the time lately. You can piece together the steps from these pages on the wiki:
http://wiki.laptop.org/go/Kernel_Building
http://wiki.laptop.org/go/Rebuilding_OLPC_kernel
http://wiki.laptop.org/go/Kernel
I'd recommend downloading a kernel from the stable builds since I had problems when I tried one from the master.
Logged
#256
Re: Installing Ubuntu using compressed files
moocapiean
Master Contributor
Posts: 330
April 02, 2008, 07:59:33 PM
So, here's how I created the new kernel and made it ready for Ubuntu. You don't need to worry about doing this if you don't want to compile your own kernel. It's actually possible to just copy over the kernel and some supporting files from your XO whenever you update the kernel on that. Because of the XO's special hardware, I doubt you'd be able to do this with a normal Linux kernel.
Anyway, much of the information below comes from these three wiki pages, plus some extra glue to put the pieces together:
http://wiki.laptop.org/go/Kernel_Building
http://wiki.laptop.org/go/Rebuilding_OLPC_kernel
http://wiki.laptop.org/go/Kernel
For the instructions below, I'll assume you're doing this on an Ubuntu installation (such as the one for your XO), but most of the instructions are generic enough for any distro. While you could do this on your XO, it's better if you could do this on another Linux computer. Flash drives have a limited number of writes and compiling something, especially something as large as the kernel, can cause a lot of writes. As long as you don't compile the kernel too often, you should be fine. The other reason you may not want to do this on the XO is that the kernel can take awhile to compile, so a more powerful computer would be faster, but compiling shouldn't take too long on the XO.
Anyway, enough with the "warnings", let's get started!
I tried downloading the source code from git, but I couldn't boot from it, so I tried the latest version in the master branch, but that also wouldn't boot. So, I ended up using the stable branch, picking the version that I knew should boot: the one I was booting on my XO! My problems with the other sources could have been just bad luck, so feel free to explore! Instructions on getting the source code from any source can be found at:
http://wiki.laptop.org/go/Kernel
But, I'm going to assume you want to use the same version I did, kernel-2.6.22-20071231.2.olpc.83e0631da83a269, which is available in the stable branch.
Open a terminal and download the source code package:
Code:
wget http://dev.laptop.org/~dilinger/stable/kernel-2.6.22-20071231.2.olpc.83e0631da83a269.src.rpm
You'll need root privilege for most of the instructions below, so just become root now:
sudo su
Those that are familiar with Linux may notice that this is an rpm package, not a tarball or deb package. For those that aren't familiar, rpm packages are used for RedHat-based Linux distros; Ubuntu uses dep packages. Tarballs are just compressed files and can be used in any distro. So, what this means is we have to convert the rpm into something we can use. To do that, we can convert the rpm into a deb package by using the alien package. So, let's install that:
apt-get install alien
Now, convert the package into a deb package:
alien -k kernel.rpm
This will create the file kernel_2.6.22-20071231.2.olpc.83e0631da83a269_i386.deb in the directory you're in.
If you're on your XO and want to "install" the source code, run:
Code:
mkdir /usr/src/olpc-kernel
dpkg --instdir=/usr/src/olpc-kernel -i kernel_2.6.22-20071231.2.olpc.83e0631da83a269_i386.deb
This will install the source code into /usr/src/olpc-kernel. But if you're using another computer, or don't want to install the source code, just run:
Code:
dpkg-deb --extract kernel_2.6.22-20071231.2.olpc.83e0631da83a269_i386.deb olpc-kernel
This will extract the package into the olpc_kernel subdirectory.
Now, move into the directory you just created:
cd /usr/src/olpc-kernel
if you installed the source code. If you extracted the files instead:
cd olpc-kernel
Now we need to decompress the source code:
tar -jxf olpc-2.6.tar.bz2
This will create the linux-2.6.22 directory that contains all the source code, so lets move into that:
cd linux-2.6.22
Now we can finally start playing with our kernel. First, create the config settings that OLPC uses for their official kernels:
make ARCH=i386 olpc_defconfig
Now, if you want to, open the config menu and start selecting or deselecting (if you're feeling adventurous) various features. If you don't want to make any changes (you might want to hold off on making changes until you know that the kernel boots with the original settings), skip down to compiling the kernel. To get to the menu, run:
make menuconfig
Once you're done making changes, you can exit the menu (being sure to save any changes you made).
The first time you run
make menuconfig
, you may get some errors, saying that things are missing. If that's the case, run:
apt-get install build-essential libncurses-dev
This should install the missing files that you'll need to create the menu. You only need to run this if you get the error.
Now, you're ready to compile. Just run:
make
That'll compile your kernel and its modules. The kernel will be placed in arch/i386/boot/bzImage and can be copied to its final location. The modules need to be installed.
If you're using your XO's Ubuntu distribution, follow these instructions, if not, skip down to the next set.
If you're using your XO Ubuntu installation, run
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.22-
personal_version
where
personal_version
is up to you. This is really just in case you decide to compile a new kernel and don't want to replace the one you just made. I typically number mine, starting at zero.
You'll also need to install the modules. This can be done by running
make modules_install
Now update the symlink to your kernel:
cd /boot
ls -l vmlinuz
rm -r vmlinuz
ln -s vmlinuz-2.6.22-
personal_version
vmlinuz
That second instruction (
ls -l vmlinuz
) will show you what vmlinuz currently points to. This can be important if you want to go back to the old kernel.
You're almost done! Just skip past the instructions for non-XO computers.
If you're not using your XO Ubuntu installation, you'll first have to insert the drive with your XO's Ubuntu distro on it into the computer. I'm going to assume it's mounted on /media/OLPCRoot.
Let's copy the kernel into the boot directory:
cp arch/i386/boot/bzImage /media/OLPCRoot/boot/vmlinuz-2.6.22-
personal_version
where
personal_version
is up to you. This is really just in case you decide to compile a new kernel and don't want to replace the one you just made. I typically number mine, starting at zero.
You'll also need to install the modules. This can be done by running
make INSTALL_MOD_PATH=/media/OLPCRoot modules_install
Now update the symlink to your kernel:
cd /media/OLPCRoot/boot
ls -l vmlinuz
rm -r vmlinuz
ln -s vmlinuz-2.6.22-
personal_version
vmlinuz
That second instruction (
ls -l vmlinuz
) will show you what vmlinuz currently points to. This can be important if you want to go back to the old kernel.
Now we're just about done. We still need to update the initial ramdisk with the new modules. I forgot to do this at one point and didn't run into any problems, but it's safer if we do this. One way to get around having to do this is if you compile everything into the kernel instead of compiling them as modules. Anyway, let's get started.
Create a new directory somewhere else and move into it. I'm going to create it in the /tmp directory, but that gets cleaned every time Ubuntu starts up, so if you want to save this for after you restart, you could create it in your home directory instead.
mkdir /tmp/initrd
cd /tmp/initrd
If you're using your XO, run this set of instructions:
zcat /boot/olpcrd.img | cpio -i
rm -r lib/modules
cp -r /lib/modules lib/
find . -print | cpio -H newc -o | gzip -9 > /boot/olpcrd-2.6.22-
personal_version
.img
if you're on another computer, run the modified version:
zcat /media/OLPCRoot/boot/olpcrd.img | cpio -i
rm -r lib/modules
cp -r /media/OLPCRoot/lib/modules lib/
find . -print | cpio -H newc -o | gzip -9 > /media/OLPCRoot/boot/olpcrd-2.6.22-
personal_version
.img
Now, move back to the boot directory (not shown) and update the link:
ls -l olpcrd.img
rm olpcrd.img
ln -s olpcrd-2.6.22-
personal_version
.img olpcrd.img
That's it! You can delete or uninstall the source code now. If you installed it, to uninstall it, run:
dpkg -r kernel
and if you just extracted it, you can just delete the directory you created.
In either case, you can also delete the rpm and the deb packages you created, even if you choose to keep the source code installed/extracted.
Good luck!
«
Last Edit: April 12, 2008, 07:51:24 PM by moocapiean
»
Logged
#257
SOLVED Re: Installing Ubuntu using compressed files
ashtond33
Contributor
Posts: 85
April 03, 2008, 08:55:57 AM
What is the best way to distribute things which we add to the kernel? For instance, I've enabled bluetooth, and I'm sure others will do similar things for other devices. Is there away for others to conveniently update these things without recompiling like an rpm or something?
«
Last Edit: April 03, 2008, 10:15:57 AM by ashtond33
»
Logged
#258
Re: Installing Ubuntu using compressed files
moocapiean
Master Contributor
Posts: 330
April 03, 2008, 10:16:32 AM
Towards the end, I realized I should have just said at the beginning, "You'll need root privilege for most of this, so just become root now:
sudo su
"
I'll fix the instructions.
Basically, the problem you're having is that you don't have permission to write to /media/OLPCRoot/boot/olpcrd-2.6.22-0002.img. The sudo's permissions end (I think) once you get to the first pipe (a pipe is |).
I'll try to make a post later explaining what some of the other commands do.
Logged
#259
Re: Installing Ubuntu using compressed files
tangomike
Contributor
Posts: 77
April 03, 2008, 11:29:31 AM
Quote from: ashtond33 on April 03, 2008, 08:55:57 AM
What is the best way to distribute things which we add to the kernel? For instance, I've enabled bluetooth, and I'm sure others will do similar things for other devices. Is there away for others to conveniently update these things without recompiling like an rpm or something?
One way is to use tar to create a copy of what you've added, and then attach it to a post here.
Logged
#260
Re: Installing Ubuntu using compressed files
moocapiean
Master Contributor
Posts: 330
April 03, 2008, 12:57:30 PM
That's what I'd recommend too. There's an upload limit per post, but a module shouldn't be large enough to go over that. Unfortunately, a kernel's too big...
Edit: I just realized that you need to be logged in to the forum to be able to see the files posted. While that shouldn't be much of an inconvenience, I just wanted to make sure we all knew because I found this out the hard way...
«
Last Edit: April 03, 2008, 01:07:41 PM by moocapiean
»
Logged
#261
Re: Installing Ubuntu using compressed files
jt42
Contributor
Posts: 39
jt42
April 03, 2008, 02:49:54 PM
Hi there
Is anyone else having trouble downloading the 2 tar.bz2 files from blackabydataservices? My downloads get halfway and then hang up and stop - if I start a new download (change file name), it downloads as before and again stops.
RESOLVED Got the files - tried with wget in linux and in vista with firefox - both quit halfway - only MS explorer (!) was able to complete the download!
«
Last Edit: April 03, 2008, 07:14:19 PM by jt42
»
Logged
#262
Re: Installing Ubuntu using compressed files
jt42
Contributor
Posts: 39
jt42
April 03, 2008, 02:51:43 PM
What did you do to enable bluetooth? Was it installing the bluez-utils? Have you any bluetooth devices working? I'm hoping to hear someone has the Apple keyboard functioning...
thanks!
Quote from: ashtond33 on April 03, 2008, 08:55:57 AM
What is the best way to distribute things which we add to the kernel? For instance, I've enabled bluetooth, and I'm sure others will do similar things for other devices. Is there away for others to conveniently update these things without recompiling like an rpm or something?
Logged
#263
Re: Installing Ubuntu using compressed files
ashtond33
Contributor
Posts: 85
April 03, 2008, 07:30:04 PM
I've been using my bluetooth mouse all day. When you follow the instructions listed above you will eventually get to "make menuconfig". This brings up a terminal program which lets you add or remove anything you'd like from the kernel. If you look around under networking you'll see all the bluetooth options. Once enabled in the kernel, you must download bluez-utils.
Logged
#264
Re: Installing Ubuntu using compressed files
Shmigget
Commenter
Posts: 28
April 03, 2008, 09:05:46 PM
Hey, I posted here a couple of days ago about the fact that my SDHC card was giving me frequent grief during loading with an "Unrecognized program format" error. Just wanted to share the news for those similarly inflicted (you still around, chibicthulhu?) that I've found a solution.
You'll need koolkat's uber bootloader script from
http://olpcnews.com/forum/index.php?topic=2375.0
, but instead of replacing the olpc.fth on your SD card with it, rename or remove that file and instead replace the olpc.fth on your nand. After looking for an olpc.fth elsewhere the system will find the one on your nand and you'll be offered the menu of choices, and from there you'll be able to successfully boot off either your SDHC card or your nand.
I'd noticed that when viewing the mounted files on the SDHC card or on those rare occasions that I was able to boot off it that I had no troubles with any file access, so I wondered if the problem wasn't isolated to the initial boot sequence (which I guess is running off the firmware?) and that once I got past it I'd be ok. Note that if you were getting the bogus warnings about having the wrong filesystem you'll still see those.
Enjoy being unafraid of rebooting!
Logged
#265
Re: Installing Ubuntu using compressed files
koolkat
Contributor
Posts: 42
Chemist at Leeds Uni
April 04, 2008, 02:28:37 AM
Interesting, I have my olpc.fth on my sdcard, but I also vaguely remember someone saying that there was a delay in initializing some SD cards. I'll end up writing a different one with two menu's one for over or under clocking, and another for where to boot. I still need to figure out a way to timeout these menu's so they can resort to the defaults.
Logged
#266
Re: Installing Ubuntu using compressed files
vblackaby
Commenter
Posts: 10
April 04, 2008, 06:49:34 AM
wget from OLPC is working for me. I am working on getting a faster host for the files... as soon as i get this workin, someone is willing to mirror me.
i have made the kernel, chnged the OLPCRD and VMLINUZ files, and yet, every time i uname -r i still get the old kernel name, even if i have removed it from the drive. so I don't know if i am running the new kernel or not, but i see no way Not to be.
any idea what i am missing?
Ok.... I lost my dev. key - i think that is the problem
«
Last Edit: April 04, 2008, 03:00:21 PM by vblackaby
»
Logged
#267
Re: Ubuntu with compressed files - GPSDrive works
tangomike
Contributor
Posts: 77
April 04, 2008, 10:00:29 AM
I installed GPSDrive (with Synaptec) on my XO. It works!
I plug my handheld Garmin Rino into the XO using a USB-9PinSerial adapter and the Rino serial cable. It shows up on the XO as
/dev/ttyACM0
(that's a zero on the end). The XO display does a great job of showing the maps in GPSDrive.
Besides the great display, GPSDrive uses free maps downloaded from Expedia (and Google I think) and can use satelite images like Google Earth. So in my car or on my boat passengers can see where we are and watch our progress.
Love that Open Source.
Logged
#268
help with xbindkeys...
JoeMac
Senior Contributor
Posts: 108
April 04, 2008, 11:20:07 PM
I have been able to boot off of a Kingston 8 GB SDHC card now without any difficulty following moocapiean's instructions . I spent several hours installing software (openoffice, opera, tools, etc.) and getting XFCE set up the way I wanted. It was a good learning experience.
I made one big mistake, however: at the very end I tried using xbindkeys with the olpc-keybind-1-2.noarch.rpm file off of favias.org to see if I could get screen rotation working. That was a big mistake in my case. I lost the entire keyboard when booting off of the SDHC
I tried my best to undo the damage with my very limited knowledge of Linux, but the best I could do was reboot without starting XFCE and uninstall xbindkeys (apt-get --purge remove xbindkeys).
The keyboard is more or less back (characters work at least) with xbindkeys gone, but I lost the brightness buttons and battery meter that worked out of the box for me when I downloaded the Xubuntu compressed files installation. I have an identical install of just Xubuntu on a USB and I still have the orignal compressed file. Is it possible for me to copy files over from the USB to the SD to get the previous keyboard configuration back? If so, any idea which files to copy over to the SD?
Yeah, I feel like a real doofus for not backing everything up before playing with keybindings...lesson learned.
Logged
#269
Re: Installing Ubuntu using compressed files
moocapiean
Master Contributor
Posts: 330
April 05, 2008, 12:58:40 PM
It sounds like you just need to reinstall xbindkeys. I'm not familiar with the olpc-keybind-1-2.noarch.rpm file, so however you installed that, if you try uninstalling it, then reinstalling xbindkeys, it should hopefully fix the problem. Or did you already try that?
Logged
Pages:
1
...
15
16
17
[
18
]
19
20
21
...
24
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
OLPC G1G1 Information
-----------------------------
=> G1G1 Introduction
===> First Impressions
===> G1G1 Europe
===> XO Shipping - USA
===> XO Shipping - Canada
===> XO Shipping - Problems
=> XO User Groups
===> OLPC Canada
===> OLPC Learning Club DC
===> XO Europe User Group
===> Assistive Technology Group
=> OLPC Publicity
-----------------------------
XO Laptop
-----------------------------
=> XO Laptop Help
===> User Guide
===> Internet & Mesh Networking
===> Sugar & Linux
===> Battery & Power
===> T-Mobile HotSpot
=> XO 1.5 Laptop
=> XO Activities
===> Activities Development
===> Games!
===> eBooks
===> Music & Radio
===> Jabber & Chat
=> XO Hacks
===> Hardware Modifications
===> Other Operating Systems
=> XO Accessories
===> USB Memory Sticks & SD Cards
===> USB Adapters & Attachments
=> XO Problemo
===> Hardware Trouble
===> Keyboard
=> XO MISC
-----------------------------
OLPC Outreach
-----------------------------
=> Press & Blogs
=> Your Opinion
=> Promoting OLPC to Schools
-----------------------------
Other Devices
-----------------------------
=> Asus Eee PC
=> Classmate and 2go PC
=> Other 4P Computers
Stats
Members
Total Members: 2405
Latest:
sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 27
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 15
Total: 15
Loading...