mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-13 16:06:59 +02:00
Merge pull request #151 from marineam/fsckfix
fix(build_image): Only clear UUID on rootfs/usr filesystems.
This commit is contained in:
commit
c955a484f5
@ -313,15 +313,15 @@ def FormatExt(part, device):
|
|||||||
device,
|
device,
|
||||||
part['fs_blocks']])
|
part['fs_blocks']])
|
||||||
|
|
||||||
# TODO(marineam): Make more of these fs options configurable.
|
tune_cmd = ['tune2fs', '-L', part['label'], '-e', 'remount-ro']
|
||||||
Sudo(['tune2fs', '-L', part['label'],
|
|
||||||
'-U', 'clear',
|
if part['type'] in ('coreos-rootfs', 'coreos-usr'):
|
||||||
'-T', '20091119110000',
|
tune_cmd += ['-U', 'clear',
|
||||||
'-c', '0', '-i', '0', # Disable auto fsck
|
'-T', '20091119110000',
|
||||||
'-m', '0', '-r', '0', # Disable reserve blocks
|
'-c', '0', '-i', '0', # Disable auto fsck
|
||||||
'-e', 'remount-ro',
|
'-m', '0', '-r', '0'] # Disable reserve blocks
|
||||||
device],
|
|
||||||
stdout_null=True)
|
Sudo(tune_cmd + [device], stdout_null=True)
|
||||||
|
|
||||||
|
|
||||||
def FormatFat(part, device):
|
def FormatFat(part, device):
|
||||||
@ -424,7 +424,6 @@ def Resize(options):
|
|||||||
with PartitionLoop(options, part) as loop_dev:
|
with PartitionLoop(options, part) as loop_dev:
|
||||||
Sudo(['e2fsck', '-p', '-f', loop_dev], stdout_null=True)
|
Sudo(['e2fsck', '-p', '-f', loop_dev], stdout_null=True)
|
||||||
Sudo(['resize2fs', loop_dev, str(part['fs_blocks'])])
|
Sudo(['resize2fs', loop_dev, str(part['fs_blocks'])])
|
||||||
Sudo(['tune2fs', '-U', 'clear', loop_dev], stdout_null=True)
|
|
||||||
|
|
||||||
|
|
||||||
def Mount(options):
|
def Mount(options):
|
||||||
|
Loading…
Reference in New Issue
Block a user