xboxscene.org forums

Author Topic: Xebian Kernel Upgrade.. Possibly Initrd Problem.  (Read 30 times)

timtastiq

  • Archived User
  • Newbie
  • *
  • Posts: 1
Xebian Kernel Upgrade.. Possibly Initrd Problem.
« on: May 31, 2006, 01:14:00 PM »

Good day ladies and gentlemen,

I'm in need of some Xbox Linux advice.  I've 'inherrited' an xbox that already has Xebian running on it.  It's not running natively, but is softmodded and running in some kind of loopback filesystem.  Forgive me, I know my way around a Linux box..  but this stuff gets a bit complicated for me. :-)  I'm happy to leave it like this, because it 'just works' and I'm not very well versed in Xbox hackery.

Now, I need a 2.6 kernel (because I need the newest usbserial driver for a Nokia data cable, if anyone's interested.)

I've been searching around a bit, and the best tutorial I've found is this one. - Which I can follow quite easily.  First of all I tried one of the precompiled .deb kernels he links to here.  All well and good, but when I try to run it from the dashboard, I just get a blank screen.  No error.  I suspect this is because the author runs Linux natively, and has not given instructions for the likes of myself!

I've tried to follow the tutorial right through, patching the vanilla kernel with the xbox linux stuff, etc...  and got exactly the same result.  I'll try and run through what I'm doing briefly, so you guys get a better idea of what's going on with this system.
  • Kernel is downloaded and patched in /usr/src, new /usr/src/linux symlink is made.  
  • Modules compiled and installed.
  • Kernel is compiled using .config fromt he xbox patch.
  • Kernel copied to /boot and vmlinuz symlink updated.
  • Kernel image copied to /mnt/hda50/debian/ and /mnt/hda50/debboot/ (This is my 'E' partition and both directories exist.  I can't figure out which one is needed, so I use both.  If anyone wants to tell me how this bootloader works, that would be great. :-D)

Next are the slightly confusing (to me) parts of this tutorial.  The author says:
QUOTE
  1.  mount -o loop /boot/initrd-2.4.xxx /mnt/initrd
   2. cp -r /mnt/initrd /mnt/new-initrd
   3. foreach of the files that fails to copy, create a directory for them
   4. populate some additional devices in /dev
         1. /dev/console
         2. /dev/loop/0
         3. /sysfs
   5. mkcramfs /mnt/new-initrd /boot/initrd-2.6.xxx


I got the initrd mounted, though it needed the fs type specifying (-t cramfs), and I copied it all to a new dir.  Here is the output from cp:

QUOTE
www:/usr/src/linux# cp -R /mnt/initrd-old/* /mnt/initrd-new/
cp: will not create hard link `/mnt/initrd-new/floppy' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/home/xbox' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/C' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/E' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/F' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/X' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/Y' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/Z' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/mnt/cdrom' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/newroot/mnt/cdrom' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/newroot/mnt/initrd' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/newroot/mnt/livefs' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/proc' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/ram' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/tmp' to directory `/mnt/initrd-new/cdrom'
cp: will not create hard link `/mnt/initrd-new/var' to directory `/mnt/initrd-new/cdrom'


So, I'm not 100% sure what he means by "foreach of the files that fails to copy, create a directory for them".  Anyone got any ideas?  I created mount points under /mnt for C, E, F, X, Y, Z..  even though they're not present under my current system.  I aslo created a cdrom mountpoint in the same place.  Also /newroot/mnt/cdrom, /newroot/mnt/initrd, /newroot/mnt/livefs, /proc, /ram, /tmp and /var (All rooted in my /mnt/inited-new/ directory, of course.)

I'm not sure about any of this..  so if anyone knows what I should be doing..  heads up! :-)

I was also unsure about how to "populate some additional devices in /dev".  I used 'touch', as follows:
CODE
www:/usr/src/linux# touch /mnt/initrd-new/dev/console
www:/usr/src/linux# mkdir /mnt/initrd-new/dev/loop
www:/usr/src/linux# touch /mnt/initrd-new/dev/loop/0
www:/usr/src/linux# touch /mnt/initrd-new/sysfs
www:/usr/src/linux# touch /mnt/initrd-new/dev/sysfs

Is this anything like what I was supposed to do?  I did the sysfs one twice because I was unsure where it was supposed to be, and figured it would do no harm.

I created the initrd, which gave the following output:
QUOTE
www:/usr/src/linux# mkcramfs /mnt/initrd-new /boot/initrd-2.6.16-xbox
Directory data: 5252 bytes
Everything: 1212 kilobytes
Super block: 76 bytes
CRC: 1e4acf1f

And copied this to /mnt/hda50/debian/initrd-2.6.16-xbox and /mnt/hda50/debboot/initrd-2.6.16-xbox (Again, I have no idea which of these works.  They have similar contents, but the debian directory contains the rootfs, so I guess that one.)

I then changed linuxboot.cfg in both directories to look like this:
CODE
#title 2_4
#kernel vmlinuz24
#initrd initrd24
#append init=/linuxrc root=/dev/ram0 kbd-reset xbox=fatx_e:/debian ramdisk_blocksize=4096
#xboxfb y

#title 2_6
kernel vmlinuz
initrd initrd-2.6.16-xbox
append init=/linuxrc root=/dev/ram0 kbd-reset xbox=fatx_e:/debian ramdisk_blocksize=4096
xboxfb y


#default 2_4

Yes, the kernel image is called just vmlinuz...

Which, like the method from coresec.de, produces nothing but a black screen...

Anyone got any ideas?!    love.gif

Cheers,

Tim
Logged