site  contact  subhomenews

Reason cannot boot USB when no HD

August 15, 2011 — BarryK
I have found out why there are recent reports that Puppy will not boot from USB when there is no hard drive.

I did fix it awhile ago, which I reported on this blog. So, I was puzzled.

I found the reason, I had upgraded Busybox in the initrd, from 1.4.2 to 1.18.5:
http://bkhome.org/archive/blog2/201107/busybox-1185-in-initramfs.html

I tried to move over to using more Busybox applets, but ended up going back to the full versions -- except for 'grep', I kept the Busybox 'grep' applet as it seemed ok.

Until now, I have discovered it is not ok:

# echo 'abc' | grep -v -f emptyfile

abc
# echo 'abc' | ./busybox grep -v -f emptyfile
BusyBox v1.18.5 (2011-07-09 23:09:48 GMT-8) multi-call binary.

Usage: grep [-HhnlLoqvsriwFEz] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

Options:
-H Add 'filename:' prefix
-h Do not add 'filename:' prefix
-n Add 'line_no:' prefix
-l Show only names of files that match
-L Show only names of files that don't match
-c Show only count of matching lines
-o Show only the matching part of line
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress open and read errors
-r Recurse
-i Ignore case
-w Match whole words only
-F PATTERN is a literal (not regexp)
-E PATTERN is an extended regexp
-z Input is NUL terminated
-m N Match up to N times per file
-A N Print N lines of trailing context
-B N Print N lines of leading context
-C N Same as '-A N -B N'
-e PTRN Pattern to match
-f FILE Read pattern from file

#


...the first line is using the full grep, the same operation with Busybox grep fails, even though it should work.

So why did I bother to upgrade Busybox? The old 1.4.2 worked, in conjunction with full utilities where required, and it added up smaller size.
I am going to roll Busybox back and put in the full 'grep', will upload Woof soon.

Comments

bug


Re busybox bug
Username: BarryK
"I am discovering bugs in various apps all the time, many I do report, many I have dialogs with developers and get it solved, as recently with netpbm. It is however almost a full-time job itself. I have applied the quick fix, to use the full grep. if you feel that the bug should be reported, the same question can be asked of you.

USB boot success
Username: BarryK
"I have just tested it -- success! I tested on the Gecko Edubook, took out the internal SD card. Heh heh, with the older Busybox and full grep, initrd.gz has dropped from 2929KB to 2907KB -- a saving of 22KB :happy: Note, initrd.gz in Wary is biggish as it has a heap of SCSI drivers in it.

re bug reports
Username: 01micko
"Recently I reported a bug to Kevin DeKorte of gnome-mplayer. he responded promptly and fixed the bug in svn. I also reported a bug about ffmpeg-0.8.2 .. ffmpeg and ffplay were crashing (segfault) with video only. Turns out the "--enable-small" option is broken. They treated me as a bit of a fool at first but I think it's on the way to getting somewhere. Hmmm.. now on to JWM.. Joe is ok but I think jwm is on the back burner for him...

ffmpeg fixed
Username: 01micko
"Well full marks to ffmpeg guys, they fixed the bug in 0.7 and 0.8 series. Ticket: https://avcodec.org/trac/ffmpeg/ticket/392


Tags: woof