linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Brunner <super.firetwister@googlemail.com>
To: squashfs-devel@lists.sourceforge.net
Cc: linux-embedded@vger.kernel.org
Subject: root on Squashfs breaks mknod
Date: Thu, 2 Apr 2009 13:40:27 +0200	[thread overview]
Message-ID: <200904021340.27277.super.firetwister@gmail.com> (raw)

Hi,

I have a problem if I use squashfs as root filesystem. The error occurs at 
least with linux 2.6.11/2.6.29 and squashfs 3.4/4.0 on x86.

I use an initramfs where I mount the squashfs and use run-init from klibc to 
make my squashfs the new root device. I can also copy the devices to a tmpfs 
and bind it to /dev. But after I have left the initramfs newly created 
devices don't work anymore. It doesn't matter if they get created with mknod, 
or copied with "cp -a" from /dev. The devices in /dev still work, regardless 
if they are directly on the squashfs, or on a tmpfs.

The created devices have the same Major/Minor numbers and are special files. 
It is also possible to put the devices in an archive and restore them after 
reboot. But they only work if mknod still works.

Here is the output of strace, reading from the working /dev/zero to the 
broken /tmp/null.

# strace -fff dd if=/dev/zero of=/tmp/null count=1
execve("/bin/dd", ["dd", "if=/dev/zero", "of=/tmp/null", "count=1"], [/* 
16 vars */]) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo 
...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo 
...}) = 0
getuid()                                = 0
brk(0)                                  = 0x80e6000
brk(0x80e7000)                          = 0x80e7000
open("/dev/zero", O_RDONLY|O_LARGEFILE) = 4
dup2(4, 0)                              = 0
close(4)                                = 0
open("/tmp/null", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 027741600666) = -1 
ENXIO (No such device or address)
brk(0x80e8000)                          = 0x80e8000
ioctl(2147483647, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf870224) = -1 EBADF 
(Bad file descriptor)
brk(0x80e9000)                          = 0x80e9000
write(2, "dd: can\'t open \'/tmp/null\': No s"..., 54dd: can't open 
'/tmp/null': No such device or address
) = 54
_exit(1)



Any ideas where this bug might came from?

Best Regards

Markus

             reply	other threads:[~2009-04-02 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 11:40 Markus Brunner [this message]
2009-04-16 17:21 ` root on Squashfs breaks mknod Markus Brunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904021340.27277.super.firetwister@gmail.com \
    --to=super.firetwister@googlemail.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=squashfs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).