site  contact  subhomenews

Busybox grep trouble

February 05, 2011 — BarryK
I have had a very frustrating time today. The 'init' script in the initrd in Wary 501 has one occurrence of

grep -F "$LISTOFEXPRESSIONS"

And yesterday I put in more code with the same "grep -F". However, Wary became more broken.

After much experimentation all day, and much frustration, I suddenly found that Busybox grep handles the '-F' option differently from the full grep. Aaaaargh!

So late in the day, I changed to

grep -f /tmp/LISTOFEXPRESSIONS

which is supposed to work with Busybox grep, however then I found that the '-f' option is broken in the older version of Busybox that I have in initrd.

So, right now I am about to decide whether to upgrade Busybox in the initrd or compile the full grep statically.

Anyway, the status quo is that Wary 501 is slightly broken, though you probably won't notice it.

Wary 502 is coming very soon.

Comments

puppylinux.com is down
Username: disciple
Hi there, puppylinux.com seems to have vanished - is that intentional?

update busybox
Username: disciple
"> older version of Busybox that I have in initrd. IIRC I've had the same issue with a couple of other busybox commands, and at the time Puppy's busybox was positively antique... [i]how[/i] old is the one you're using now?

age of busybox
Username: L18L
"[b]how old is the one you're using now?[/b] [code]busybox | head -n 1[/code] BusyBox v1.17.2 (2010-09-28 21:52:28 GMT-8) multi-call binary.

Busybox version
Username: BarryK
"The Busybox in the initrd is 1.4.2. I just tried, puppylinux.com is still there.

Busybox
Username: kirk
"I just tried the latest Busybox in Fatdog64's initrd. Now when I boot I'm asked to choose which save file to use even though I only have one in that sub-directory. So Busybox changed syntax somewhere.

Busybox grep
Username: BarryK
"I compiled the latest Busybox (1.18.2) statically, intended for the initrd, but then decided not to "rock the boat" for now -- instead I compiled the full grep statically and put that in.

Re PM
Username: BarryK
"Jamesbond, Thanks, yes, I got your PM. Yes, I would like to have a compiled root f.s. ext2 file of a recent uClibc toolchain. I am still using a very old pre-compiled one that I downloaded from the uClibc site.

uclibc toolchain
Username: jamesbond
"Barry, I only managed to get the uclibc cross-compile toolchain to work. The resulting toolchain is stored in a directory and its location are hardcoded during compilation (or so I'm made to believe) - so just tar-gzip the bins and send it over to you won't work unless you duplicate my directory hierarchy. But with the config files I've sent to you, it should be pretty straightforward to re-build the toolchain on your side. I wasn't successful in creating an ext2 rootfs for uclibc using buildroot. It compiled everything *except* gcc :-O. If you prefer a rootfs instead of just a toolchain, then there *is* a more recent uclibc rootfs which you can use, it's compiled by Rob Landley (http://landley.net/aboriginal) - but you need to do something to make it work, something which I haven't done yet. Technosaurus would be able to explain more as that is his primary tools. cheers! It's directory dependent, so I'm not sure how I can pass that to you. You can also do this yourself by using the config files I've sent to you I failed trying to build ext2 rootfs using buildroot.


Tags: wary