Editing initrd

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.
Post Reply
User avatar
ralcocer
Samurai
Samurai
Posts: 146
Joined: 02 Jan 2011, 12:53
Distribution: 3.2rc5 Xfce
Location: Puerto Rico
Contact:

Editing initrd

Post#1 by ralcocer » 05 Sep 2015, 14:25

I just edited my initrd in the xfce distribution to change the sgn file name so that it will not conflict with another porteus distribution, however when I try to boot with the new initrd, I get: linuxrc: exec: line 443 bin/chroot not found, I know that the only thing I changed was the name and the changes path.

donald
Full of knowledge
Full of knowledge
Posts: 1123
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Editing initrd

Post#2 by donald » 05 Sep 2015, 14:57

Why not use the *.sgn file cheatcode?
sgnfile=some_name.sgn

... This cheatcode specifies the *.sgn file which Porteus will
search for. This is useful when you want to store several
Porteus editions on one disk/disc.
Example: 'sgnfile=porteus-usb.sgn'

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

Re: Editing initrd

Post#3 by ralcocer » 06 Sep 2015, 16:30

Thanks for the reply, I am wondering why it is so hard to modify the initrd.xz and the core module , if I change anything in any of them the system gives me the same error as above. I want to change the HOSTNAME and the "issue" file since the issue just slows down the booting process, and it cannot be modified because it is compiled, but I can't .

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Editing initrd

Post#4 by brokenman » 06 Sep 2015, 17:16

You are more likely to get useful help if you supply useful information. What have you tried? How are you packing and unpacking your initrd.xz file?

IMHO, this is not worth the trouble just for shaving a millisecond off boot time for the issue file.
How do i become super user?
Wear your underpants on the outside and put on a cape.

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

Re: Editing initrd

Post#5 by ralcocer » 06 Sep 2015, 17:19

I found the answer here:viewtopic.php?f=53&t=4990#p36546

I use this script to edit the initrd:
#!/bin/bash

cd `pwd`
if [ -e initrd.xz ]; then
xz -d < initrd.xz | cpio -i
rm initrd.xz
else
find | cpio -H newc -o | xz --check=crc32 --x86 --lzma2 > ../initrd.xz
fi


If I don't edit initrd and edit 001-core I get the same error and vice versa.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Editing initrd

Post#6 by brokenman » 09 Sep 2015, 18:53

All looks good. Check that all permissions and symlinks are intact in the folder you are packing up.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply