Question

I have a system which works on openWRT ; bootloader is uboot. I have UBI file system on my NAND device . The linux kernel used is 3.4.18 and the image boots fine and the filesystem also comes up fine.

one issue is that when ftp happens and then the target is powered off and on (after the file which is ftpd is completely transferred, doing an ls on the target to confirm), the file (which is ftpd) shows size as 0. "mount" command was executed then it was observed that mount option of root file system is without "sync". But from bootloader the bootargs is passed as below :

[    0.000000] arg[1] ubi.mtd=1
[    0.000000] arg[2] root=ubi0:rootfs
[    0.000000] arg[3] rootfstype=ubifs
[    0.000000] arg[4] rw
[    0.000000] arg[5] rootflags=sync
[    0.000000] arg[6] console=ttyS0
[    0.000000] arg[7] init=/etc/preinit

output of mount command

 rootfs on / type rootfs (rw)
 ubi0:rootfs on / type ubifs (rw,noatime)

Any pointers would be helpful.

Was it helpful?

Solution

When the system boots up the /etc/inittab is probably doing a re-mount of your root file system

You will need to change the remount line in /etc/inittab file to be like this:-

null::sysinit:/bin/mount -o remount,rw,sync /

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top