From: INSUN PYO Date: Thu, 13 Jul 2017 06:22:50 +0000 (+0900) Subject: fstab: fix wrong mount option for / partition X-Git-Tag: submit/tizen/20170717.140706~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be2c55247a37a059548e6597414c4d3b598b1294;p=platform%2Fadaptation%2Femulator%2Fsystem-plugin-emulator.git fstab: fix wrong mount option for / partition Change-Id: I1b484153ba8d4b44f4a57acf731b09096cc6ba73 Signed-off-by: INSUN PYO Signed-off-by: Sooyoung Ha --- diff --git a/filesystem/etc/fstab b/filesystem/etc/fstab index b0a144b..0259470 100644 --- a/filesystem/etc/fstab +++ b/filesystem/etc/fstab @@ -1,6 +1,4 @@ # All filesystem have been automatically mounted in ramfs before init. # After that, fstab remount root filesystem as read-only # -emulator-rootfs / ext4 ro,relatime,data=ordered 0 1 -#remount /mnt to /opt/mnt -/opt/mnt /mnt none bind 0 2 +LABEL=emulator-rootfs / ext4 ro,relatime,data=ordered 0 1 diff --git a/filesystem/usr/lib/systemd/system/mnt.mount b/filesystem/usr/lib/systemd/system/mnt.mount new file mode 100644 index 0000000..e9c003c --- /dev/null +++ b/filesystem/usr/lib/systemd/system/mnt.mount @@ -0,0 +1,9 @@ +[Unit] +Description=/mnt for emulator +Before=local-fs.target + +[Mount] +What=/opt/mnt +Where=/mnt +Type=none +Options=bind diff --git a/packaging/system-plugin-emulator.spec b/packaging/system-plugin-emulator.spec index f2d7509..870a23f 100644 --- a/packaging/system-plugin-emulator.spec +++ b/packaging/system-plugin-emulator.spec @@ -27,16 +27,17 @@ System plugin files for emulator find . -name .gitignore -exec rm -f {} \; cp -arf filesystem/* %{buildroot} +# to remount /mnt here +mkdir -p %{buildroot}/opt/mnt + # for systemd unit %install_service basic.target.wants emulator_preinit.target %install_service emulator_preinit.target.wants emul-setup-audio-volume.service %install_service emulator_preinit.target.wants emul-common-preinit.service %install_service emulator_preinit.target.wants dev-disk-by\\x2dlabel-emulator\\x2dswap.swap +%install_service emulator_preinit.target.wants mnt.mount %install_service multi-user.target.wants emulator.target -# to remount /mnt here -mkdir -p %{buildroot}/opt/mnt - %posttrans #run emulator_ns.preinit script after all packages have been installed. /etc/preconf.d/emulator_ns.preinit @@ -59,9 +60,11 @@ mkdir -p %{buildroot}/opt/mnt %{_unitdir}/emul-setup-audio-volume.service %{_unitdir}/emul-common-preinit.service %{_unitdir}/dev-disk-by\x2dlabel-emulator\x2dswap.swap +%{_unitdir}/mnt.mount %{_unitdir}/emulator_preinit.target.wants/emul-setup-audio-volume.service %{_unitdir}/emulator_preinit.target.wants/emul-common-preinit.service %{_unitdir}/emulator_preinit.target.wants/dev-disk-by\x2dlabel-emulator\x2dswap.swap +%{_unitdir}/emulator_preinit.target.wants/mnt.mount %{_prefix}/lib/udev/rules.d/51-tizen-udev-default.rules %{_prefix}/lib/udev/rules.d/95-tizen-emulator.rules %{_sysconfdir}/fstab