Re: USB Flash rootfs prep!

6 messages, 2 authors, 2008-11-15 · open the first message on its own page

Re: USB Flash rootfs prep!

From: Cristian Axenie <hidden>
Date: 2008-11-15 09:12:51

On Sat, Nov 15, 2008 at 11:12 AM, Cristian Axenie <cristian.axenie@gmail.com
wrote:

On Sat, Nov 15, 2008 at 10:18 AM, Joachim Foerster [off-list ref]wrote:
quoted
Hi Cristian,

On Sat, 2008-11-15 at 03:05 +0200, Cristian Axenie wrote:
quoted
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 156k init
Warning: unable to open an initial console.
Device file /dev/console doesn't seem to exist in your rootfs.
Strange because /dev/console exists in my ext2.img.
quoted
quoted
Failed to execute /bin/busybox.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option
to kernel.
It seems that you don't have an executable called /bin/busybox in your
rootfs. Your kernel command line seems to have "init=/bin/busybox"
included?

But, hmmm, it is very strange, at least in your uboot bootargs there is
no such string. Is it because of some default kernel command line (set
before compiling the kernel)?

I simply forgot to write them here (because I didn't knew if they were
valid) but I 've tried with init=/sbin/init and get the same result !
quoted
quoted
Rebooting in 180 seconds..

Shall I explicitly give the init ? What should be ... init=/sbin/init,
init=/bin/busybox ????

15 more quoted lines

Re: USB Flash rootfs prep!

From: Cristian Axenie <hidden>
Date: 2008-11-15 10:17:25

On Sat, Nov 15, 2008 at 12:01 PM, Nicholas Mc Guire [off-list ref] wrote:
quoted
quoted

On Sat, Nov 15, 2008 at 10:18 AM, Joachim Foerster <mls.JOFT@gmx.de
wrote:
quoted
quoted
Hi Cristian,

On Sat, 2008-11-15 at 03:05 +0200, Cristian Axenie wrote:
quoted
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 156k init
Warning: unable to open an initial console.
Device file /dev/console doesn't seem to exist in your rootfs.
Strange because /dev/console exists in my ext2.img.
did you check that it is actually a valid character device (c 5 1) ?
it can easaly happend during copying of a tree into your image that
they become regular files.

hofrat
I think that you are right, butr how can I test this validity??

Cristian

Re: USB Flash rootfs prep!

From: Nicholas Mc Guire <hidden>
Date: 2008-11-15 10:27:59

quoted

On Sat, Nov 15, 2008 at 10:18 AM, Joachim Foerster [off-list ref]wrote:
quoted
Hi Cristian,

On Sat, 2008-11-15 at 03:05 +0200, Cristian Axenie wrote:
quoted
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 156k init
Warning: unable to open an initial console.
Device file /dev/console doesn't seem to exist in your rootfs.
Strange because /dev/console exists in my ext2.img.
did you check that it is actually a valid character device (c 5 1) ?
it can easaly happend during copying of a tree into your image that
they become regular files.

hofrat

Re: USB Flash rootfs prep!

From: Nicholas Mc Guire <hidden>
Date: 2008-11-15 10:46:07

quoted
did you check that it is actually a valid character device (c 5 1) ?
it can easaly happend during copying of a tree into your image that
they become regular files.

hofrat
I think that you are right, butr how can I test this validity??
just check with ls -l that the device file is actually still a character
device with the right major/minor number.

crw--w--w-    1 root     tty        5,   1 Nov 13 22:18 /mnt/dev/console

modes and date of course may be diferent.

hofrat

Re: USB Flash rootfs prep!

From: Cristian Axenie <hidden>
Date: 2008-11-15 11:15:10

On Sat, Nov 15, 2008 at 12:40 PM, Nicholas Mc Guire [off-list ref] wrote:
quoted
quoted
did you check that it is actually a valid character device (c 5 1) ?
it can easaly happend during copying of a tree into your image that
they become regular files.

hofrat
I think that you are right, butr how can I test this validity??
just check with ls -l that the device file is actually still a character
device with the right major/minor number.

crw--w--w-    1 root     tty        5,   1 Nov 13 22:18 /mnt/dev/console

modes and date of course may be diferent.

hofrat
I mount my ext2.img and run ls -l and I get

crw-r----- 1 root root   5,   1 2008-11-15 02:24 console

I think is not ok ?!


Now regarding some steps in the creation of the rootfs:

use "tmpfs" for cases where a writable file system is needed and add the
following lines to the /etc/rc.sh script:

# mount TMPFS because root-fs is readonly
/bin/mount -t tmpfs -o size=2M tmpfs /tmpfs

create the same symbolic links for device files that must be placed in a
writable filesystem:  dev/ptyp0 → /tmpfs/dev/ptyp0     dev/ttyp0 →
/tmpfs/dev/ttyp0
 dev/ptyp1 → /tmpfs/dev/ptyp1     dev/ttyp1 → /tmpfs/dev/ttyp1
dev/ptyp2 → /tmpfs/dev/ptyp2
    dev/ttyp2 → /tmpfs/dev/ttyp2  dev/ptyp3 → /tmpfs/dev/ptyp3     dev/ttyp3
→ /tmpfs/dev/ttyp3  dev/ptyp4 → /tmpfs/dev/ptyp4     dev/ttyp4 →
/tmpfs/dev/ttyp4
 dev/ptyp5 → /tmpfs/dev/ptyp5     dev/ttyp5 → /tmpfs/dev/ttyp5
dev/ptyp6 → /tmpfs/dev/ptyp6
    dev/ttyp6 → /tmpfs/dev/ttyp6  dev/ptyp7 → /tmpfs/dev/ptyp7     dev/ttyp7
→ /tmpfs/dev/ttyp7  dev/ptyp8 → /tmpfs/dev/ptyp8     dev/ttyp8 →
/tmpfs/dev/ttyp8
 dev/ptyp9 → /tmpfs/dev/ptyp9     dev/ttyp9 → /tmpfs/dev/ttyp9
dev/ptypa → /tmpfs/dev/ptypa
    dev/ttypa → /tmpfs/dev/ttypa  dev/ptypb → /tmpfs/dev/ptypb     dev/ttypb
→ /tmpfs/dev/ttypb  dev/ptypc → /tmpfs/dev/ptypc     dev/ttypc →
/tmpfs/dev/ttypc
 dev/ptypd → /tmpfs/dev/ptypd     dev/ttypd → /tmpfs/dev/ttypd
dev/ptype → /tmpfs/dev/ptype
    dev/ttype → /tmpfs/dev/ttype  dev/ptypf → /tmpfs/dev/ptypf     dev/ttypf
→ /tmpfs/dev/ttypf  tmp → /tmpfs/tmp     var → /tmpfs/var  dev/log →
/var/log/log
         In case you use dhclient also:  etc/dhclient.conf →

40 more lines

Re: USB Flash rootfs prep!

From: Cristian Axenie <hidden>
Date: 2008-11-15 12:12:38

So I mounted the ext2.img on my host and the /dev/console is not a regular
file. If it helps or clears some aspects this is the contetnt of
rootfs_devices.tab used at the ext2.img generation :

#<name>    <type> <mode> <uid> <gid> <major> <minor> <start>  <inc>  <count>
/dev            d  755  0       0        -      -       -       -       -
/dev/console    c  640  0       0        5      1       -       -       -
/dev/fb0        c  640  0       0       29      0       -       -       -
/dev/full       c  640  0       0        1      7       -       -       -
/dev/hda        b  640  0       0        3      0       -       -       -
/dev/hda        b  640  0       0        3      1       1       1       16
/dev/kmem       c  640  0       0        1      2       -       -       -
/dev/mem        c  640  0       0        1      1       -       -       -
/dev/mtd        c  640  0       0       90      0       0       2       16
/dev/mtdblock   b  640  0       0       31      0       0       1       16
/dev/mtdr       c  640  0       0       90      1       0       2       16
/dev/nftla      b  640  0       0       93      0       -       -       -
/dev/nftla      b  640  0       0       93      1       1       1       8
/dev/nftlb      b  640  0       0       93      16      -       -       -
/dev/nftlb      b  640  0       0       93      17      1       1       8
/dev/null       c  640  0       0        1      3       -       -       -
/dev/ptyp       c  640  0       0        2      0       0       1       10
/dev/ptypa      c  640  0       0        2      10      -       -       -
/dev/ptypb      c  640  0       0        2      11      -       -       -
/dev/ptypc      c  640  0       0        2      12      -       -       -
/dev/ptypd      c  640  0       0        2      13      -       -       -
/dev/ptype      c  640  0       0        2      14      -       -       -
/dev/ptypf      c  640  0       0        2      15      -       -       -
/dev/ram        b  640  0       0        1      0       0       1       2
/dev/ram        b  640  0       0        1      1       -       -       -
/dev/rtc        c  640  0       0       10      135     -       -       -
/dev/tty        c  640  0       0        4      0       0       1       4
/dev/tty        c  640  0       0        5      0       -       -       -
/dev/ttyS       c  640  0       0        4      64      0       1       8
/dev/ttyp       c  640  0       0        3      0       0       1       10
/dev/ttypa      c  640  0       0        3      10      -       -       -
/dev/ttypb      c  640  0       0        3      11      -       -       -
/dev/ttypc      c  640  0       0        3      12      -       -       -
/dev/ttypd      c  640  0       0        3      13      -       -       -
/dev/ttype      c  640  0       0        3      14      -       -       -

8 more lines

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help