Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (4) </ 1 2 3 [4] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: linuxrc, How to use bash in linuxrc not ash?< Next Oldest | Next Newest >
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Nov. 24 2006,19:29 QUOTE

So you added busybox as well?  What did you change to try to execute it?

How did you try to replace the shell?

I meant like the other forum user's post, where PXE loaded the kernel and the minirt which held the knoppix image (you just need more memory to use this though).
Back to top
Profile PM 
MrUmunhum Offline





Group: Members
Posts: 23
Joined: Feb. 2006
Posted: Nov. 24 2006,22:28 QUOTE

Quote (^thehatsrule^ @ Nov. 24 2006,14:29)
So you added busybox as well?  What did you change to try to execute it?

How did you try to replace the shell?

I meant like the other forum user's post, where PXE loaded the kernel and the minirt which held the knoppix image (you just need more memory to use this though).

I put busybox in /static along with links for :
Quote

(cd PXE_FS/static/ ln -s       busybox ls      )
(cd PXE_FS/static/ ln -s       busybox mkdir   )
(cd PXE_FS/static/ ln -s       busybox sleep   )
(cd PXE_FS/static/ ln -s       busybox env     )
(cd PXE_FS/static/ ln -s       busybox pwd     )
(cd PXE_FS/static/ ln -s       busybox which   )
(cd PXE_FS/static/ ln -s       busybox ifconfig)
(cd PXE_FS/static/ ln -s       busybox ifup    )
(cd PXE_FS/static/ ln -s       busybox ping    )
(cd PXE_FS/static/ ln -s       busybox route   )
(cd PXE_FS/static/ ln -s       busybox ln      )


The mini24 image is the small FS that is used during the boot up process.  It is not the run level FS, that is what I am trying to use a NFS mount to connect.

I have been doing some reading about linuxrc.  It is call after the kernel gets control.
The code looks like this:
Quote

static int do_linuxrc(void * shell)
{
static char *argv[] = { "linuxrc", NULL, };
extern char * envp_init[];

close(old_fd);
close(root_fd);
close(0);
close(1);
close(2);
setsid();
(void) open("/dev/console",O_RDWR,0);
(void) dup(0);
(void) dup(0);
return execve(shell, argv, envp_init);
}


I have tried changing the '#!' line in linuxrc, Copying bash to linuxrc.
All fail with a kernel panic.

The bottom line is, it is not a DSL problem, it is a kernel problem.  I get  the same results using other kernels, including FC5.

So more of RTFMing!
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Nov. 24 2006,22:41 QUOTE

Quote
The mini24 image is the small FS that is used during the boot up process.  It is not the run level FS, that is what I am trying to use a NFS mount to connect.
Yes I know - but it doesn't have to be small.  I was just suggesting what another forum user had completed - it's basically network-toram.  Guess it won't help you if you don't have enough memory anyways.

I'm guessing it's because that bash you're trying to use requires external libraries... you'd have to compile a static executable or something like it (same for busybox)

Also networking support isn't even enabled here, even if you do include ifconfig, you'll have to include the device and drivers/modules.
Back to top
Profile PM 
MrUmunhum Offline





Group: Members
Posts: 23
Joined: Feb. 2006
Posted: Nov. 25 2006,00:00 QUOTE

Quote (^thehatsrule^ @ Nov. 24 2006,17:41)
Quote
The mini24 image is the small FS that is used during the boot up process.  It is not the run level FS, that is what I am trying to use a NFS mount to connect.
Yes I know - but it doesn't have to be small.  I was just suggesting what another forum user had completed - it's basically network-toram.  Guess it won't help you if you don't have enough memory anyways.

I'm guessing it's because that bash you're trying to use requires external libraries... you'd have to compile a static executable or something like it (same for busybox)

Also networking support isn't even enabled here, even if you do include ifconfig, you'll have to include the device and drivers/modules.

Yes, I know about the drivers.  I'm not getting to that point yet.  The drivers are included in the mini FS.  It's not so mini any more!
Back to top
Profile PM 
18 replies since Nov. 21 2006,12:47 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (4) </ 1 2 3 [4] >/
reply to topic new topic new poll
Quick Reply: linuxrc

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code