How to separate Initrd from object modules except 000-kerne

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

How to separate Initrd from object modules except 000-kerne

Post#1 by neko » 06 Sep 2015, 11:49

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.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

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

Post#2 by brokenman » 06 Sep 2015, 13:27

No problem. It should provide the same function.
How do i become super user?
Wear your underpants on the outside and put on a cape.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

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

Post#3 by neko » 06 Sep 2015, 14:42

@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.

User avatar
ralcocer
Samurai
Samurai
Posts: 187
Joined: 02 Jan 2011, 12:53
Distribution: 3.2rc5 Xfce
Location: Puerto Rico
Contact:

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

Post#4 by ralcocer » 06 Sep 2015, 19:02

I tried your fix and now I can Change the initrd but not the core module I get a respawning to fast error.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

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

Post#5 by neko » 06 Sep 2015, 22:19

@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.

Post Reply