Author Topic: Dualbooting/multiplebooting With Kexec!  (Read 63744 times)

matthis

  • Full Member
  • ***
  • Posts: 217
    • View Profile
    • http://badaboum.bidibom.free.fr/mat/
Dualbooting/multiplebooting With Kexec!
« Reply #30 on: March 27, 2008, 05:13:18 am »
Woops sorry ZDevil, you hadn't mixed up anything  

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #31 on: March 27, 2008, 05:42:22 am »
No worry. I just fear the notes may make more toasted penguins. Happy dualbooting!

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

matthis

  • Full Member
  • ***
  • Posts: 217
    • View Profile
    • http://badaboum.bidibom.free.fr/mat/
Dualbooting/multiplebooting With Kexec!
« Reply #32 on: March 27, 2008, 06:07:15 am »
Alas, following your instructions with Sharp rom already installed gives me the usual:
"Warning: unable to open an initial console". and nothing more.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #33 on: March 27, 2008, 06:17:41 am »
In which system do you get the error? Sharp or Debian?

If you get this when booting sharp rom, how about reflashing the sharp rom kernel first and let it boot once smoothly (can't think of any reason how this would fail), and then flash the debian kernel (provided that you have a debian system ready on the media)?
« Last Edit: March 27, 2008, 06:18:37 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #34 on: March 27, 2008, 03:45:50 pm »
Hey, I've found the way to boot Cacko without the need for hdd1, hdd2 and hdd3.
So no more need to repartition the internal disk just for restoring Cacko in NAND.
Also now the whole Debian rootfs can be freely mounted and is entirely visible in Cacko.
ATM working on a script for the Cacko hack and will post here later.
« Last Edit: March 27, 2008, 03:46:19 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3698
    • View Profile
Dualbooting/multiplebooting With Kexec!
« Reply #35 on: March 27, 2008, 07:49:20 pm »
Quote from: ZDevil
Hey, I've found the way to boot Cacko without the need for hdd1, hdd2 and hdd3.
So no more need to repartition the internal disk just for restoring Cacko in NAND.
Also now the whole Debian rootfs can be freely mounted and is entirely visible in Cacko.
ATM working on a script for the Cacko hack and will post here later.

am looking forward to hearing more, dual-booting cacko and debian is my next project!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #36 on: March 27, 2008, 09:41:38 pm »
Heh - triplebooting cacko/pdaxii/debian is on my list

Matthis - The kernel you kexec with needs the partition info hardcoded into the boot string (mtdparts=blah) to work properly, otherwise the system only sees a very truncated (and hence corrupted) filesystem. I recompiled the pdaXrom kernel to match my NAND layout; you can do the same thing with the sharprom. EvilJazz's kernel tarball has a nice script which completely automates building all the 2.4 kernel variants.
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

matthis

  • Full Member
  • ***
  • Posts: 217
    • View Profile
    • http://badaboum.bidibom.free.fr/mat/
Dualbooting/multiplebooting With Kexec!
« Reply #37 on: March 28, 2008, 05:06:37 am »
Quote from: pelrun
The kernel you kexec with needs the partition info hardcoded into the boot string (mtdparts=blah) to work properly, otherwise the system only sees a very truncated (and hence corrupted) filesystem. I recompiled the pdaXrom kernel to match my NAND layout; you can do the same thing with the sharprom. EvilJazz's kernel tarball has a nice script which completely automates building all the 2.4 kernel variants.

Thanks for your help. I was indeed trying to boot into sharprom with kexec. I will either try to compile the kernel or wait for a guru to do it  

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #38 on: March 28, 2008, 12:26:48 pm »
Just uploaded a new "Cacko HDD Fix" scriptpack, which will remove the HDD restriction on the internal disk, i.e. Cacko will run happily without caring about the HDD.     Please check out the first post (2.2.1).

I have tested the scriptpack a few times in my Cacko setup (3200). No problem found so far.  

Have fun!

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

malik

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Dualbooting/multiplebooting With Kexec!
« Reply #39 on: March 28, 2008, 06:10:12 pm »
did i get it right? i can keep my cacko installation and my hd partition and install
debian on sd, kexecuting cacko kernel from debian? will try this soon...

another question: is there a 2.4 kernel which supports kexec so that i can use
cacko/sharp as my main distribution and kexec debian and so on for testing?

thanx...
borzoi, cacko 1.23 lite, 1gb kingston cf, 512mb toshiba sd.. suse 10.0

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #40 on: March 28, 2008, 06:39:59 pm »
Quote from: malik
did i get it right? i can keep my cacko installation and my hd partition and install
debian on sd, kexecuting cacko kernel from debian?
I think so. Simply put, there is no special installation apart from setting up each system separately and then flashing a kexec-capable kernel. Just reboot and kexec from there. If at some point you don't like this setup anymore, say you want to go back and stick with Sharp/Cacko rom only, then simply reflash the Sharp/Cacko kernel and that's it (no more kexec).
Quote
another question: is there a 2.4 kernel which supports kexec so that i can use
cacko/sharp as my main distribution and kexec debian and so on for testing?
afaik kexec is supported in kernel 2.6 but not 2.4.

In reality it doesn't make a big difference if you simply do dualbooting (such as Debian/Cacko), as long as either of them can use kexec.
The "catch" here, if i am forced to say, is you must boot into the kexec-ready rootfs in the very first boot after setting everything up. And a simple reboot will boot into this rootfs first. But rebooting is not absolutely necessary (and not a very cool thing to do) if things are running well.

Then each time you want to load the other system it's a (warm) reboot. So it's like:

-- (first boot) --> Debian -- (reboot with kexec) --> Cacko -- (normal reboot again) -- > Debian -- (reboot with kexec again) --> Cacko -- ...... ad infinitum

(Hope this doesn't sound too confusing  )

(The great thing about the Zaurus is we seldom shut it down totally because it is instant-on/off.    )

Of course triple/multiple booting is a different story. A full "juggling" mode is to make each system accessible from one another:
e.g. a "perfect" triple booting = a<-->b; b<-->c; c<-->a  

Altboot and uboot are great solutions to this. But at this stage only Angstrom has altboot. uboot is not widely supported (esp. in upstream). There are also some kind of pivot booting (like the OpenBSD/Cacko dualbooting hack), but it doesn't apply to many systems.
« Last Edit: March 28, 2008, 06:44:10 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

matthis

  • Full Member
  • ***
  • Posts: 217
    • View Profile
    • http://badaboum.bidibom.free.fr/mat/
Dualbooting/multiplebooting With Kexec!
« Reply #41 on: March 28, 2008, 08:21:44 pm »
I was interested in kexec from 2.4 as well, there is a thread in this forum which seems to show it is possible.

https://www.oesf.org/forum/index.php?showtopic=18104

What do you think?

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Dualbooting/multiplebooting With Kexec!
« Reply #42 on: March 28, 2008, 08:41:38 pm »
Quote from: matthis
I was interested in kexec from 2.4 as well, there is a thread in this forum which seems to show it is possible.
https://www.oesf.org/forum/index.php?showtopic=18104
What do you think?
Hmm... very interesting (and very tempting too!) ... The discussion mentions corruption of the content in flash by the mtd modules in 2.6, which may explain the "incidence" my setup ran into some time ago when I tried to mount the partitions in flash in Debian.
I'll go remove the sections in the howto about accessing flash content in Debian.
Thanks for the pointer!
« Last Edit: March 28, 2008, 09:16:23 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

matthis

  • Full Member
  • ***
  • Posts: 217
    • View Profile
    • http://badaboum.bidibom.free.fr/mat/
Dualbooting/multiplebooting With Kexec!
« Reply #43 on: March 28, 2008, 10:07:27 pm »
OK I wanted to try 2.4 kexec backport so I compiled the kexec.c provided in the above thread, using eviljazz kernel sources.
(I attach the result to this post.)

Alas, when running the provided bootlinux script, the kexec module seems to be properly loaded, but nothing happens at all!  
(I get no error messages either).

ecc_hy

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Dualbooting/multiplebooting With Kexec!
« Reply #44 on: March 28, 2008, 11:32:17 pm »
The updater.sh is not suitable for C1000. You may use attach file which come from angstrom.
After install and set nand access, it corrupted my pdaxii13 root file.

To ZDevil:
Could you paste the content include how to access NAND? I need this to remove those modules and package.

Really like kexec for pdaxrom, pdaxii13 is more suitable for daily use. Debian need more test and adjust now.
« Last Edit: March 28, 2008, 11:34:09 pm by ecc_hy »
SL-C1000, Roku wifi, pdaxii13v2/Debian dual booting