no one done that before?![]()
I want to call a program that draws a graphic to the framebuffer during startup. I realized that I have to start that program in
linuxrc. But as soon as I change more than one line in linuxrc (inside miniroot.gz inside boot.img) the boot process breaks. Although if I just change something at the end of the script, its behavior changes already in the beginning (e.g. when it scans the different partitions for the Knoppix CD, it writes the pink lines *under* each other instead of *replacing* them /hda1 /hda2 ... etc)
How do I edit linuxrc correctly? Does it have to stay in the same size or why am I having this trouble?
I have tried it several times on different machines. Here is what I did:
loop-mount boot.img
unpack initrd.gz
loop-mount initrd.gz
edit linuxrc with kwrite
unmount initrd
pack initrd
replace initrd.gz
Where is the mistake?
no one done that before?![]()
unfortunatelyif I have some free time I will try to add something to it, but I don't know whet it will be.
could *please* anyone who has successfully edited linuxrc explain how exactly you did it? I'm becoming crazy on this...
Ok, i tried with success:
loop-mount boot.img
unpack miniroot.gz
loop-mount miniroot.gz
edit linuxrc with vim
unmount miniroot
pack miniroot (gzip -9)
replace miniroot.gz
umount boot.img
Thanks a lot!Originally Posted by Pasq
I did exactly the same (of course I meant miniroot instead of initrd above), except that I used kwrite and I didn't use "9" at gzip. I'll try whether this makes a difference.
Thanks
probono
We will see.
You won't believe it - now it works indeed! Seems as if kwrite messed up the file. Now that I was using only mcedit everything works fineOriginally Posted by Pasq
Thanks a *lot* for your help!
no problem![]()
This is caused by editing the file with kwrite or kate (and some other editors).(e.g. when it scans the different partitions for the Knoppix CD, it writes the pink lines *under* each other instead of *replacing* them /hda1 /hda2 ... etc)
The linuxrc script creates a variable called CRE which is set to an ascii string containing a carriage return and then a code to clear the screen to the end of the current line.
This is how the script makes those lines write over each other - it precedes each output line with this CRE string.
The problem is that kwrite and kate change the carriage return to a carriage return *and* line feed. When you write out your modified file you also write out the change to the CRE string and then when you boot with that linuxrc things will look a bit strange. If you edit linuxrc with kate or kwrite and look for the line beginning with CRE, you'll see that it is actually split over two lines.
The command line editor "ed" doesn't mess up the line and apparently neither does mcedit.
I still use kate to edit linuxrc but I have written shell scripts to extract linuxrc from the minirt26.gz file and then to put it back again. The script which puts it back again uses "ed" to fix up the CRE string before it copies linuxrc back into minirt26.gz..
Best Wishes
Pete
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$11.99
Netac DDR4 32GB 16GB DDR4 3200MHz UDIMM C16 Desktop Internal Memory RAM Kit
$25.99
Samsung 8GB 2Rx8 PC3-12800 DDR3 1600 MHz 1.5V Non-ECC DIMM Desktop Memory RAM 8G
$9.99
Samsung M471A2G43AB2-CWE 16GB 1Rx8 PC4-25600 DDR4-3200 Memory RAM SODIMM Laptop
$22.00
Crucial - 32GB Kit (2x16GB) DDR4 3200MHz C22 SODIMM Laptop Memory Kit - Green
$44.99
Flash Drive USB 3.0, High Speed Memory Stick, Thumb Drive, 16 GB 32 GB 64 GB
$4.99
16GB DDR3 1600Mhz PC3 -12800 sodimm Laptop memory RAM PACK 2x 8GB 12800s DDR3L
$14.99
Hynix 16GB DDR4 2666MHz PC4-21300 ECC RDIMM Server Memory RAM (HMA82GR7AFR4N-VK)
$13.99
A-Tech 512GB 8x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM
$439.92
New Dell Memory Module 16GB (1x16GB) RAM DDR4 3200MT/s SNP1CXP8C/16G
$26.99