Page 1 of 1

How to separate Initrd from object modules except 000-kerne

Posted: 06 Sep 2015, 11:49
by neko
Kernel and 000-kernel.xzm modules are generated in pairs.
Initrd will run on this kernel.
Therefore, Initrd and kernel and 000-kernel.xzm has a close bond.
And Initrd uses the chroot of 001-core.xzm,
so it will be tightly coupled with 001-core.xzm modules.

If Initrd uses the chroot of Initrs,
it will not have a close bond with 001-core.xzm.

line 439 of ISO@boot/syslinux/initrd.xz@linuxrc

Code: Select all

    exec bin/chroot . /mnt/live/bin/init "$@" <dev/console >dev/console 2>&1
-->
    exec /mnt/live/bin/chroot . /mnt/live/bin/init "$@" <dev/console >dev/console 2>&1
Is there any problem on this modifying ?


Best Regards.

Re: How to separate Initrd from object modules except 000-ke

Posted: 06 Sep 2015, 13:27
by brokenman
No problem. It should provide the same function.

Re: How to separate Initrd from object modules except 000-ke

Posted: 06 Sep 2015, 14:42
by neko
@brokenman
Thank you for your clear answer.

Because, usually like a original source, EXEC specify a relative path,
I was unclear whether there is a problem if specify an absolute path.

Now I can get new Initrd that separates from object modules except 000-kerne.xzm.

1. built init into initrd.xz
/sbin/init of 001-core.xzm is a statically linked load module.
init of 32 bit is same as one of 64 bit.
This will be copied into ISO@boot/syslinux/initrd.xz@bin/ and then be rebuilt into initrd.xz.

2. modify linuxrc
line 436~443 of ISO@boot/syslinux/initrd.xz@linuxrc

Code: Select all

#cp -f /union/sbin/init /bin
#if [ $? -eq 0 ]; then
    pivot_root /union  /union/mnt/live
    exec /mnt/live/bin/chroot . /mnt/live/bin/init "$@" <dev/console >dev/console 2>&1
#else
    echo -e "[31m""!!ERROR!!\nSomething went wrong and I cannot continue.\nPress Ctrl+Alt+Del to reboot.""[0m"
    sh
#fi
Thanks.

Re: How to separate Initrd from object modules except 000-ke

Posted: 06 Sep 2015, 19:02
by ralcocer
I tried your fix and now I can Change the initrd but not the core module I get a respawning to fast error.

Re: How to separate Initrd from object modules except 000-ke

Posted: 06 Sep 2015, 22:19
by neko
@ralcocer
wrote
I tried your fix and now I can Change the initrd but not the core module I get a respawning to fast error.
My English is poor.
Excuse me that I can't understand your English.

Question 1.
"I tried your fix"
is
"I tried your fix."

"and now I can Change the initrd"
is
"And now I can change the initrd."

"but not the core module"
is
"But I can not change the core module."

"I get a respawning to fast error"
is
"The core module is one that I get a respawning to fast error"

Are these correct ?

Question 2.
What does "I get a respawning to fast error" mean ?

Question 3.
Did you fix your trouble ?


Best Regards.