Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How do I edit linuxrc correctly?

  1. #1
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159

    How do I edit linuxrc correctly?

    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?

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    no one done that before?

  3. #3
    Member registered user
    Join Date
    Apr 2003
    Posts
    40

    a

    unfortunately if I have some free time I will try to add something to it, but I don't know whet it will be.

  4. #4
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    could *please* anyone who has successfully edited linuxrc explain how exactly you did it? I'm becoming crazy on this...

  5. #5
    Member registered user
    Join Date
    Apr 2003
    Posts
    40

    a

    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

  6. #6
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159

    Re: a

    Quote Originally Posted by Pasq
    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!

    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

  7. #7
    Member registered user
    Join Date
    Apr 2003
    Posts
    40

    a

    We will see.

  8. #8
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159

    Re: a

    Quote Originally Posted by Pasq
    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 fine Thanks a *lot* for your help!

  9. #9
    Member registered user
    Join Date
    Apr 2003
    Posts
    40

    a

    no problem

  10. #10
    Member registered user
    Join Date
    Jun 2004
    Location
    Canada
    Posts
    67
    (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)
    This is caused by editing the file with kwrite or kate (and some other editors).
    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

Page 1 of 2 12 LastLast

Similar Threads

  1. minrt26 modules for custom kernel and linuxrc problem.
    By marksalot in forum Customising & Remastering
    Replies: 0
    Last Post: 05-11-2005, 09:53 PM
  2. Edit linuxrc and change the user preferences....knoppix 3.4
    By Sago7 in forum Customising & Remastering
    Replies: 1
    Last Post: 07-23-2004, 11:20 PM
  3. linuxrc: how to edit?
    By bongski55 in forum The Lounge
    Replies: 2
    Last Post: 05-11-2004, 11:56 AM
  4. linuxrc changes
    By darthczyz in forum Customising & Remastering
    Replies: 0
    Last Post: 04-08-2004, 01:15 PM
  5. starting linuxrc and init
    By thomas in forum Customising & Remastering
    Replies: 3
    Last Post: 01-19-2003, 02:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell R640 8x 2.5

Dell R640 8x 2.5" SFF iDRAC 2x 25GbE SFP28- Wholesale Custom Build Your Server

$259.99



Dell PowerEdge R630 Server 2x E5-2697v3 2.60Ghz 28-Core 128GB H730P Rails picture

Dell PowerEdge R630 Server 2x E5-2697v3 2.60Ghz 28-Core 128GB H730P Rails

$295.00



Dell PowerEdge R730xd Server 2x E5-2697v3 2.60Ghz 28-Core 144GB H730P picture

Dell PowerEdge R730xd Server 2x E5-2697v3 2.60Ghz 28-Core 144GB H730P

$330.15



Dell Poweredge R730 Server 8-SFF | E5-2650 V4 | 128GB Ram | 600GB HDD | H730P picture

Dell Poweredge R730 Server 8-SFF | E5-2650 V4 | 128GB Ram | 600GB HDD | H730P

$199.00



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores  32gb  180GB SSD  495w picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores 32gb 180GB SSD 495w

$169.99



Dell PowerEdge R620 (2x) E5-2650 2.0Ghz 32GB RAM 256GB HDD- NO OS picture

Dell PowerEdge R620 (2x) E5-2650 2.0Ghz 32GB RAM 256GB HDD- NO OS

$52.00



Dell PowerEdge R630 Server 2.60Ghz 28-Core 64GB 2x 600GB 15K 12G 6x 1TB H330 picture

Dell PowerEdge R630 Server 2.60Ghz 28-Core 64GB 2x 600GB 15K 12G 6x 1TB H330

$301.35



Dell PowerEdge R740xd Server 2x Gold 6148 2.40Ghz 40-Core 256GB H730P Rails picture

Dell PowerEdge R740xd Server 2x Gold 6148 2.40Ghz 40-Core 256GB H730P Rails

$1320.65



Dell R640 8x 2.5

Dell R640 8x 2.5" SFF Server iDRAC - Wholesale Custom Build Your Server

$280.99



DELL PowerEdge R730XD Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730XD Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$273.00