| Summary: | "mount -o remount,ro /mnt/img" not working properly | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | huberty89 |
| Component: | Other | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.17.x | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
huberty89
2010-08-04 22:21:54 UTC
On "mount -o remount,ro /path", "standard" mount does:
mount("/lib", "/mnt/tmp", 0x7f5e8d55e0c0, MS_MGC_VAL|MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = 0
Whereas busybox mount does:
mount("/dev/mapper/vg_dhcp25227-lv_root", "/mnt/tmp", 0x6e8e9a, MS_RDONLY|MS_REMOUNT|MS_SILENT|0x200000, "seclabel,barrier=1,data=ordered") = -1 EBUSY
No wonder it fails - MS_BIND bit is missing.
The difference comes from the fact that "standard" mount consults /etc/mtab, sees "/lib /mnt/tmp none rw,bind 0 0" line there, understands that it's a bind mount, and uses correct flags; whereas busybox mount looks into /proc/mounts, sees "/dev/mapper/vg_dhcp25227-lv_root /mnt/tmp ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0" line and there is no way for it to understand that it's a bind mount (also, it can't figure out correct 1st arg, but that may be not needed for -o remount).
|