OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Booting Modern Distros From An Sd Card Using The 2.6.23 Kernel, c7x0, 2.6.23 Kernel and the Altboot Bug
danr
post Jan 21 2008, 01:20 AM
Post #1





Group: Members
Posts: 138
Joined: 12-February 04
Member No.: 1,830



Hi all,

For some time I've tried to get the Angstrom 2.6.23 kernel to work with Debian on my C860, but I've been bitten by the altboot bug (see http://bugs.openembedded.org/show_bug.cgi?id=1718 for example), where the system freezes a few seconds after booting.

I think I've found a solution to this issue. After doing some experimenting, it looks like the system hang can be prevented by executing /etc/init.d/sysklogd script early on during initialisation. I don't know why this should stop the hanging, but it does. So to ensure this is run early in initialisation,

CODE

cd /etc/rcS.d
ln -sf ../init.d/sysklogd S01sysklogd


Note that you still have to be fast at selecting option 1 (boot from flash) or 3 (boot from SD card) in the altboot menu, and that you usually have to make the selection twice. I also commented out line 474 of /etc/altboot.func, so that it says

CODE

#$FSCK $1 || sleep 2


otherwise when booting from SD card, it always checks the filesystem, which takes forever, and may lead to the system freezing because the syslog daemon is not executed in time.

My current setup is as follows:

Latest Angstrom kernel and console image including altboot installed on flash.
Debian tarball unzipped to SD card (in /debian directory).
Angstrom filesystem unzipped to SD card (in /angstrom directory).

The failsafe mode is to boot Angstrom from flash. To experiment with the minimum requirements needed for booting, I

CODE

cd /media/card
ln -sf angstrom/* .


Then I play around with which scripts I keep inside /etc/rcS.d and /etc/rc5.d, run altboot, select option 3, and see if the system boots. If it doesn't, I remove the power, select altboot option 1, boot from flash, and make further changes.

To boot Debian, I

CODE

cd /media/card
ln -sf debian/* .


and then boot from the SD card.

At the moment I haven't got the CF card working, so maybe this functionality has been removed from the kernel so that I need to load a module or something.

In theory this technique could also be used for other distros, such as Android.

I might have missed other dependencies, such as one or two binaries from Angstrom /sbin, but if other people try this method for determining what the boot requirements are, then we would get a definitive answer. If anyone gets this to work, please add further comments to this thread.

Cheers,

Dan
Go to the top of the page
 
+Quote Post
kibymo
post Jan 22 2008, 07:00 AM
Post #2





Group: Members
Posts: 5
Joined: 13-December 07
Member No.: 21,070



I follow your way and it can boot to 2.6.23 on c860, but the wireless module can't load.
so I back 2.6.21 again
Thanks anyway
Go to the top of the page
 
+Quote Post
henrysviper
post Feb 15 2008, 03:23 PM
Post #3





Group: Members
Posts: 76
Joined: 4-May 04
From: Athens, Greece
Member No.: 3,136



I have the same problem as kibymo

I tried it with my C750 and now I have no trouble alt-booting in Angstrom (in SD) or Debian armel, but in debian the CF cards are not recognized at all.


Edit: After looking at the output from lsmod in Angstrom, I found that modprobing (in Debian) "pxa2xx_cs" before inserting a CF card fixes the problem. (Maybe a udev rule would help?)
Thanks Dan for the original solution.
Go to the top of the page
 
+Quote Post
henrysviper
post Feb 18 2008, 04:20 AM
Post #4





Group: Members
Posts: 76
Joined: 4-May 04
From: Athens, Greece
Member No.: 3,136



Dan,

You do not need this setup with two directories (angstrom/debian) and creating symbolic links. Altboot supports booting loopback images.
If you have the rootfs as a file ending in ".rootfs.tar.gz" in SD, then altboot (through the "Advanced" menu) can create a loopback image out of it for you. When booting, altboot sees all the images and presents you with a menu allowing to choose which one to boot. Thus, if you have a big enough SD card you can have many distributions on it without problems and workarounds.

Also, commenting out line 474 of /etc/altboot.func is not needed. The file /etc/altboot-2.6.cfg contains a variable "FSCK_IMAGES": set it to "no" to disable checking (remember to check them manually from time to time from the NAND installation though).

Edited to add info about FSCK_IMAGES
Go to the top of the page
 
+Quote Post
danr
post Feb 19 2008, 04:24 AM
Post #5





Group: Members
Posts: 138
Joined: 12-February 04
Member No.: 1,830



QUOTE(henrysviper @ Feb 18 2008, 12:20 PM) *
Dan,

You do not need this setup with two directories (angstrom/debian) and creating symbolic links. Altboot supports booting loopback images.
If you have the rootfs as a file ending in ".rootfs.tar.gz" in SD, then altboot (through the "Advanced" menu) can create a loopback image out of it for you. When booting, altboot sees all the images and presents you with a menu allowing to choose which one to boot. Thus, if you have a big enough SD card you can have many distributions on it without problems and workarounds.


Are the loopback images read-only or is there support for writing to them as well?

Cheers,

Dan
Go to the top of the page
 
+Quote Post
henrysviper
post Feb 20 2008, 01:54 AM
Post #6





Group: Members
Posts: 76
Joined: 4-May 04
From: Athens, Greece
Member No.: 3,136



QUOTE(danr @ Feb 19 2008, 02:24 PM) *
Are the loopback images read-only or is there support for writing to them as well?


A loopback image is just like a "normal" filesystem, so it is writable (the only limitation is that is has a fixed size).
Check out the altboot FAQ for more info.
Go to the top of the page
 
+Quote Post
svs57
post Oct 16 2008, 02:45 AM
Post #7





Group: Members
Posts: 108
Joined: 7-November 05
From: Russia
Member No.: 8,481



Hi
As I understand I need
1. flash Angstrom
2. put Debian rootfs on SD
3. type 3 while booting Angstrom
Thats all?
Do anybody test Andromeda rootfs? I can't use it because kernel doesn't suport 750.
If not where can I get working debian rootfs?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th December 2014 - 06:21 AM