resize partitions after mount 08/34708/2 accepted/tizen/tv/20150203.041546 submit/tizen_tv/20150203.035716
authorSuchang Woo <suchang.woo@samsung.com>
Sat, 31 Jan 2015 07:48:33 +0000 (16:48 +0900)
committerJoonsub Lee <joon-sub.lee@samsung.com>
Tue, 3 Feb 2015 00:47:00 +0000 (16:47 -0800)
At the first boot, mount is always failed because mount and resize are executed
at the same time. To fix mount error, execute resize2fs after the partition is
mounted.
(Kernel after 2.6 version supports on-line resize for ext3 and ext4 filesystem)

Change-Id: Ib0d4eea9c18bfb980bc551819d5465990969f72f
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
scripts/tv-mbr-3parts.post

index 3a9d851..69ce1e1 100644 (file)
@@ -25,9 +25,9 @@ cat > /usr/lib/systemd/system/resize2fs@.service << EOF
 Description=Resize of File System on %f
 DefaultDependencies=no
 BindsTo=%i.device
-After=systemd-fsck@%i.service
+After=systemd-fsck@%i.service local-fs.target
 Requires=systemd-fsck@%i.service
-Before=local-fs.target shutdown.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
@@ -37,8 +37,8 @@ StandardOutput=journal+console
 TimeoutSec=0
 EOF
 
-mkdir -p /usr/lib/systemd/system/local-fs-pre.target.wants
-ln -s ../resize2fs@.service /usr/lib/systemd/system/local-fs-pre.target.wants/resize2fs@dev-disk-by\\x2dlabel-system\\x2ddata.service
-ln -s ../resize2fs@.service /usr/lib/systemd/system/local-fs-pre.target.wants/resize2fs@dev-disk-by\\x2dlabel-user.service
-ln -s ../resize2fs@.service /usr/lib/systemd/system/local-fs-pre.target.wants/resize2fs@dev-disk-by\\x2dlabel-rootfs.service
+mkdir -p /usr/lib/systemd/system/basic.target.wants
+ln -s ../resize2fs@.service /usr/lib/systemd/system/basic.target.wants/resize2fs@dev-disk-by\\x2dlabel-system\\x2ddata.service
+ln -s ../resize2fs@.service /usr/lib/systemd/system/basic.target.wants/resize2fs@dev-disk-by\\x2dlabel-user.service
+ln -s ../resize2fs@.service /usr/lib/systemd/system/basic.target.wants/resize2fs@dev-disk-by\\x2dlabel-rootfs.service