dev/console catch 22

Mike Cashwell mike.cashwell at sdrcinc.net
Tue Jun 19 02:56:43 UTC 2007


On Jun 18, 2007, at 8:22 PM, Mike Frysinger wrote:

> On Monday 18 June 2007, Michael Cashwell wrote:
>
>> The target already mounts a tmpfs file system over its /dev and then
>> does the "mknod /dev/console c 5 1" magic early in /etc/rc but it  
>> seems
>> to not be early enough.
>
> the warning is from the kernel, not userspace

The warning is secondary. The problem is that in that situation the  
serial console fails to function.

>> Is there some way to have init exit and rerun itself after it's done
>> those steps?
>
> patch it to do so

Obviously, but that would be wasteful if someone else has actually  
addressed the issue using the existing functionality.

>> Anyone have any other ideas?
>
> create the device node in the image, problem solved

No, as discussed, that just trades a problem on the target (no  
console) for one on the host (habituating the use of elevated  
privileges).

I understand some security concern for the host system in creating  
these nodes but my frustration is that I'm not targeting the host  
system. I'm doing it for the target. And I can write every file the  
target needs (including its kernel!) as a normal user except for this  
one special file.

Is it expected that creating a bootable file system (with a working  
console) requires the use of elevated privileges?

------------------------------
Mike Cashwell
San Diego Research Center, Inc.
A Wholly Owned Subsidiary of Argon ST
12701 Fair Lakes Circle, Suite 800
Fairfax, VA 22033
O: 703-259-7431
C: 703-869-3763





More information about the busybox mailing list