Skip to contentSkip to conversation

init: I won't write compressed data to a terminal.

Buildroot Ossy 3 participants 15 messages Jul 6, 2010 – Jul 11, 2010

lore
Share & tools
lore

Ossy

author
#0 lore raw

Hi buildroot mailinglist,

After successfully compiling a whole rootfs and mounting it via loop on some nfs export I started my arm ebedded device and ran into tho following error after booting the image via tftp.

"init: I won't write compressed data to a terminal."

The bootargs include a console=ttyS0,115200 and rootfs over nfs options. I guess there is is an issue with the built in zip/bzip compression. But why is the init process not able to output to the terminal? After that error, the kernel panics, so I can't boot into my brand new rootfs. (The search function of the mailinglist didn't give a hint...)

Thanks for your help,
Marcus

#1 lore raw
Quoted 1 line · Ossy

Hi buildroot mailinglist,

Hey Ossy!

Quoted 9 lines

After successfully compiling a whole rootfs and mounting it via loop on some nfs export I started my arm ebedded device and ran into tho following error after booting the image via tftp.

"init: I won't write compressed data to a terminal."

The bootargs include a console=ttyS0,115200 and rootfs over nfs options. I guess there is is an issue with the built in zip/bzip compression. But why is the init process not able to output to the terminal?

I would suspect that it's not init as-such, but rather there is a startup script that is not working properly.

What happens if you also include "init=/bin/sh" on your kernel boot line, then boot?
What happens if you rename /etc/inittab to have a different name (so init won't find /etc/inittab) then boot?

Mitch.

author
#2 lore raw

Am 07.07.2010 02:35, schrieb Mitch Davis:

Quoted 15 lines · Ossy
Quoted 1 line

Hi buildroot mailinglist,

Hey Ossy!

Quoted 9 lines

After successfully compiling a whole rootfs and mounting it via loop on some nfs export I started my arm ebedded device and ran into tho following error after booting the image via tftp.

"init: I won't write compressed data to a terminal."

The bootargs include a console=ttyS0,115200 and rootfs over nfs options. I guess there is is an issue with the built in zip/bzip compression. But why is the init process not able to output to the terminal?

Quoted 7 lines

I would suspect that it's not init as-such, but rather there is a startup script that is not working properly.

What happens if you also include "init=/bin/sh" on your kernel boot line, then boot?
What happens if you rename /etc/inittab to have a different name (so init won't find /etc/inittab) then boot?

After passing init=/bin/sh to the kernel, I ran into a similar error:

[    4.387550] eth0: link up, 100 Mb/s, full duplex, flow control disabled
[    4.716652] Looking up port of RPC 100003/2 on 192.168.1.106
[    4.727962] Looking up port of RPC 100005/1 on 192.168.1.106
[    4.739261] VFS: Mounted root (nfs filesystem) on device 0:12.
[    4.745153] Freeing init memory: 112K
sh: I won't write compressed data to a terminal.
sh: For help, type: `sh --help'.
[    4.816666] Kernel panic - not syncing: Attempted to kill init!
[    4.822617] Backtrace:
[    4.825103] [<c0028544>] (dump_backtrace+0x0/0x110) from [<c0314e70>] 
(dump_stack+0x18/0x1c)
[    4.833598]  r7:c7820000 r6:c7820000 r5:4005eef0 r4:c03f89dc
[    4.839341] [<c0314e58>] (dump_stack+0x0/0x1c) from [<c0314ec4>] 

(panic+0x50/0x13c)

I think the init process somewhere calls an inline zipping. But I can't imagine where and why.

Regards,
Marcus

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy <[email protected]> writes:

Hi,

Ossy> After passing init=/bin/sh to the kernel, I ran into a similar error:

 Ossy> [    4.387550] eth0: link up, 100 Mb/s, full duplex, flow control disabled
 Ossy> [    4.716652] Looking up port of RPC 100003/2 on 192.168.1.106
 Ossy> [    4.727962] Looking up port of RPC 100005/1 on 192.168.1.106
 Ossy> [    4.739261] VFS: Mounted root (nfs filesystem) on device 0:12.
 Ossy> [    4.745153] Freeing init memory: 112K

Ossy> sh: I won't write compressed data to a terminal. Ossy> sh: For help, type: `sh --help'.

Hmm, Did something overwrite your busybox binary? It should be around ~500KB big.

What does strings -n 25 bin/busybox|head give?

Signature · 1 line
Bye, Peter Korsgaard
author
#4 lore raw

Am 07.07.2010 22:33, schrieb Peter Korsgaard:

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy<[email protected]> writes:

  Ossy>  After passing init=/bin/sh to the kernel, I ran into a similar error:
  Ossy>  [    4.387550] eth0: link up, 100 Mb/s, full duplex, flow control disabled
  Ossy>  [    4.716652] Looking up port of RPC 100003/2 on 192.168.1.106
  Ossy>  [    4.727962] Looking up port of RPC 100005/1 on 192.168.1.106
  Ossy>  [    4.739261] VFS: Mounted root (nfs filesystem) on device 0:12.
  Ossy>  [    4.745153] Freeing init memory: 112K
  Ossy>  sh: I won't write compressed data to a terminal.
  Ossy>  sh: For help, type: `sh --help'.
Quoted 4 lines

Hmm, Did something overwrite your busybox binary? It should be around ~500KB big.

What does strings -n 25 bin/busybox|head give?

ossy at debian-virtual:/exports/rootfs/rfs1$ strings -n 25 bin/busybox|head
bzip2: I'm not configured correctly for this platform!
I require Int32, Int16 and Char to have sizes
of 4, 2 and 1 bytes to run properly, and they don't. Probably you can fix this by defining them correctly,
is suspiciously (more than %d chars) long.
Try using a reasonable file name instead. Sorry! :-)
%s: Deleting output file %s, if it exists.
%s: WARNING: deletion of output file (apparently) failed.
%s: WARNING: deletion of output file suppressed
%s: since input file no longer exists. Output file
ossy at debian-virtual:/exports/rootfs/rfs1$

I'm compiling for target arm926 on an amd64 debian squeeze.

My busybox is not 500kb big ... (shared vs. static?):
ossy at debian-virtual:/exports/rootfs/rfs1/bin$ ls -la busybox -rwsr-xr-x 1 root root 78480 28. Jun 15:40 busybox

#5 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy <[email protected]> writes:

Hi,

Quoted 1 line
Quoted 1 line

What does strings -n 25 bin/busybox|head give?

Ossy> ossy at debian-virtual:/exports/rootfs/rfs1$ strings -n 25 bin/busybox|head Ossy> bzip2: I'm not configured correctly for this platform!

 Ossy>         I require Int32, Int16 and Char to have sizes
 Ossy>         of 4, 2 and 1 bytes to run properly, and they don't.
 Ossy>         Probably you can fix this by defining them correctly,

Ossy> is suspiciously (more than %d chars) long. Ossy> Try using a reasonable file name instead. Sorry! :-) Ossy> %s: Deleting output file %s, if it exists. Ossy> %s: WARNING: deletion of output file (apparently) failed. Ossy> %s: WARNING: deletion of output file suppressed
Ossy> %s: since input file no longer exists. Output file
Ossy> ossy at debian-virtual:/exports/rootfs/rfs1$

Ok, as expected - Somehow your busybox binary got overwritten by bzip2.

Ossy> I'm compiling for target arm926 on an amd64 debian squeeze.

Ossy> My busybox is not 500kb big ... (shared vs. static?):
Ossy> ossy at debian-virtual:/exports/rootfs/rfs1/bin$ ls -la busybox Ossy> -rwsr-xr-x 1 root root 78480 28. Jun 15:40 busybox

No, it's because it's bzip2 instead of busybox.

I'm doing a test build right now to see what goes wrong.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Hi,

Peter> No, it's because it's bzip2 instead of busybox.

Peter> I'm doing a test build right now to see what goes wrong.

Ok, worked around in git. Could you update your tree and test a CLEAN rebuild?

Signature · 1 line
Bye, Peter Korsgaard
author
#7 lore raw

Am 07.07.2010 23:39, schrieb Peter Korsgaard:

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard<[email protected]> writes:

Hi,

Peter> No, it's because it's bzip2 instead of busybox.

Peter> I'm doing a test build right now to see what goes wrong.

Ok, worked around in git. Could you update your tree and test a CLEAN rebuild?

It works now. It's the busybox and not the bzip2executable. I only applied my u-boot patch (@see 07.07.2010 22:55h) which is the only difference to the current git tree.

make distclean
make
(extracting to rfs1)
ossy at debian-virtual:/exports/rootfs/rfs1/bin$ ls -l busybox -rwsr-xr-x 1 root root 592652 6. Jul 18:48 busybox
ossy at debian-virtual:/exports/rootfs/rfs1/bin$ strings -n 25 busybox|head must be suid to work properly
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as.
ossy at debian-virtual:/exports/rootfs/rfs1/bin$

#8 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy <[email protected]> writes:

Ossy> Am 07.07.2010 23:39, schrieb Peter Korsgaard:

Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard<[email protected]> writes:

Hi,

Peter> No, it's because it's bzip2 instead of busybox.

Quoted 1 line
Quoted 1 line

Peter> I'm doing a test build right now to see what goes wrong.

Quoted 3 lines
Quoted 3 lines

Ok, worked around in git. Could you update your tree and test a CLEAN rebuild?

Ossy> It works now. It's the busybox and not the bzip2executable. I only Ossy> applied my u-boot patch (@see 07.07.2010 22:55h) which is the only Ossy> difference to the current git tree.

Ok, good - Thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw
In reply to Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Hi,

Ossy> After passing init=/bin/sh to the kernel, I ran into a similar error:

 Ossy> [    4.387550] eth0: link up, 100 Mb/s, full duplex, flow control disabled
 Ossy> [    4.716652] Looking up port of RPC 100003/2 on 192.168.1.106
 Ossy> [    4.727962] Looking up port of RPC 100005/1 on 192.168.1.106
 Ossy> [    4.739261] VFS: Mounted root (nfs filesystem) on device 0:12.
 Ossy> [    4.745153] Freeing init memory: 112K

Ossy> sh: I won't write compressed data to a terminal. Ossy> sh: For help, type: `sh --help'.

Peter> Hmm, Did something overwrite your busybox binary? It should be around Peter> ~500KB big.

Peter> What does strings -n 25 bin/busybox|head give?

Seems like it:

ln -s /bin/bunzip2 sh; ./sh
sh: I won't write compressed data to a terminal.
sh: For help, type: `sh --help'.

I guess something went wrong with the recent conversion of the bzip2 package. Will test.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw
In reply to Ossy
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy <[email protected]> writes:

Ossy> Hi buildroot mailinglist,
Ossy> After successfully compiling a whole rootfs and mounting it via loop Ossy> on some nfs export I started my arm ebedded device and ran into tho Ossy> following error after booting the image via tftp.

Ossy> "init: I won't write compressed data to a terminal."

What .config are you using? That string doesn't exist in the busybox init (or anywhere in busybox).

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw
Quoted 11 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy ?<[email protected]> writes:

?Ossy> Hi buildroot mailinglist,
?Ossy> After successfully compiling a whole rootfs and mounting it via loop ?Ossy> on some nfs export I started my arm ebedded device and ran into tho ?Ossy> following error after booting the image via tftp.

?Ossy> "init: I won't write compressed data to a terminal."

What .config are you using? That string doesn't exist in the busybox init (or anywhere in busybox).

It's a message from bzip2, I think.

Mitch.

author
#12 lore raw
In reply to Peter Korsgaard

Am 07.07.2010 07:52, schrieb Peter Korsgaard:

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy<[email protected]> writes:

  Ossy>  Hi buildroot mailinglist,
  Ossy>  After successfully compiling a whole rootfs and mounting it via loop
  Ossy>  on some nfs export I started my arm ebedded device and ran into tho
  Ossy>  following error after booting the image via tftp.

Ossy> "init: I won't write compressed data to a terminal."

What .config are you using? That string doesn't exist in the busybox init (or anywhere in busybox).

I'm using the configuration attached (you may need to ignore my custom settings for the sheevaplugbased DockStar).

I mount the generated rootfs with
mount -o loop,ro br_dist/dev/rootfs.ext2 /exports/rootfs/rfs1 and export it via nfs. The Kernel supports rootfs over nfs and was able to mount the filesystem via nfs. After that I get the above mentioned error. As Mitch already mentioned, this error comes from bzip2 (or maybe gzip). So I guess there is some ext2 inline compression, which is not compatibel with the serial console?
I need to add, that I connect passing console=ttyS0,115200 to the kernel.

The cat of /exports/rootfs/rfs1/etc/inittab looks good to me:

debian-virtual:/exports/rootfs/rfs1# cat etc/inittab
# /etc/inittab
[...]
#

# Startup the system
null::sysinit:/bin/mount -o remount,rw /
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mkdir -p /dev/pts
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname

# now run any rc scripts
::sysinit:/etc/init.d/rcS

# Set up a couple of getty's
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2

# Put a getty on the serial port ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL

# Logging junk
null::sysinit:/bin/touch /var/log/messages
null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n
tty3::respawn:/usr/bin/tail -f /var/log/messages

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a

Maybe it would work, if I do not watch the bootingprocess on the serial console, but I won't be able to verify if the system comes up without serialconsole output.

Regards for now,
Marcus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-config
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100707/fc6b6b79/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uClibc-config
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100707/fc6b6b79/attachment-0003.ksh>

#13 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy <[email protected]> writes:

Ossy> Am 07.07.2010 07:52, schrieb Peter Korsgaard:

Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy<[email protected]> writes:

Ossy> Hi buildroot mailinglist,
Ossy> After successfully compiling a whole rootfs and mounting it via loop Ossy> on some nfs export I started my arm ebedded device and ran into tho Ossy> following error after booting the image via tftp.

Quoted 1 line
Quoted 1 line

Ossy> "init: I won't write compressed data to a terminal."

Quoted 3 lines
Quoted 3 lines

What .config are you using? That string doesn't exist in the busybox init (or anywhere in busybox).

Ossy> I'm using the configuration attached (you may need to ignore my custom Ossy> settings for the sheevaplugbased DockStar).

Ossy> I mount the generated rootfs with
Ossy> mount -o loop,ro br_dist/dev/rootfs.ext2 /exports/rootfs/rfs1 Ossy> and export it via nfs. The Kernel supports rootfs over nfs and was Ossy> able to mount the filesystem via nfs. After that I get the above Ossy> mentioned error.

You can also simply extract the generated tarball as root instead of the ext2 stuff.

Ossy> As Mitch already mentioned, this error comes from bzip2 (or maybe Ossy> gzip). So I guess there is some ext2 inline compression, which is not Ossy> compatibel with the serial console?

No, as you mount the ext2 on the nfs server and not on your embedded box. Have you added any custom init scripts in your tree?

What does a grep -rlis zip * in your /etc give?

I don't see anything wrong with your .config's right away.

Signature · 1 line
Bye, Peter Korsgaard
author
#14 lore raw

Am 07.07.2010 20:59, schrieb Peter Korsgaard:

Quoted 18 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy<[email protected]> writes:

Ossy> Am 07.07.2010 07:52, schrieb Peter Korsgaard:

Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ossy" == Ossy<[email protected]> writes:

  Ossy>  Hi buildroot mailinglist,
  Ossy>  After successfully compiling a whole rootfs and mounting it via loop
  Ossy>  on some nfs export I started my arm ebedded device and ran into tho
  Ossy>  following error after booting the image via tftp.
Quoted 1 line
Quoted 1 line

Ossy> "init: I won't write compressed data to a terminal."

Quoted 3 lines
Quoted 3 lines

What .config are you using? That string doesn't exist in the busybox init (or anywhere in busybox).

Ossy> I'm using the configuration attached (you may need to ignore my custom Ossy> settings for the sheevaplugbased DockStar).

Quoted 8 lines
  Ossy>  I mount the generated rootfs with
  Ossy>  mount -o loop,ro br_dist/dev/rootfs.ext2 /exports/rootfs/rfs1
  Ossy>  and export it via nfs. The Kernel supports rootfs over nfs and was
  Ossy>  able to mount the filesystem via nfs. After that I get the above
  Ossy>  mentioned error.

You can also simply extract the generated tarball as root instead of the ext2 stuff.

I extracted the the tar archive into the directory, but I get the same error:

[   26.191501] Looking up port of RPC 100003/2 on 192.168.1.106
[   26.203553] Looking up port of RPC 100005/1 on 192.168.1.106
[   26.280377] VFS: Mounted root (nfs filesystem) on device 0:12.
[   26.286293] Freeing init memory: 112K
init: I won't write compressed data to a terminal.
init: For help, type: `init --help'.
[   26.361526] Kernel panic - not syncing: Attempted to kill init!
[   26.367484] Backtrace:
[   26.369970] [<c0028544>] (dump_backtrace+0x0/0x110) from [<c0314e70>] 
(dump_stack+0x18/0x1c)
[   26.378465]  r7:c7820000 r6:c7820000 r5:4005eef0 r4:c03f89dc
[   26.384207] [<c0314e58>] (dump_stack+0x0/0x1c) from [<c0314ec4>] 
(panic+0x50/0x13c)
[   26.391923] [<c0314e74>] (panic+0x0/0x13c) from [<c003e064>] 

(do_exit+0x6c/0x690)

Quoted 8 lines
  Ossy>  As Mitch already mentioned, this error comes from bzip2 (or maybe
  Ossy>  gzip). So I guess there is some ext2 inline compression, which is not
  Ossy>  compatibel with the serial console?

No, as you mount the ext2 on the nfs server and not on your embedded box. Have you added any custom init scripts in your tree?

What does a grep -rlis zip * in your /etc give?

ossy at debian-virtual:/exports/rootfs/rfs1/etc$ grep -rlis zip * profile
services
sysconfig/sysstat
ossy at debian-virtual:/exports/rootfs/rfs1/etc$ less sysconfig/sysstat

# sysstat-9.0.5 configuration file.

# How long to keep log files (in days).
# If value is greater than 28, then log files are kept in

# multiple directories, one for each month.
HISTORY=7

# Compress (using gzip or bzip2) sa and sar files older than (in days):
COMPRESSAFTER=10

sysconfig/sysstat (END)

Quoted 1 line

I don't see anything wrong with your .config's right away.