root on Squashfs breaks mknod

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux