image: don't pass block size to mkfs.ext*
This commit is contained in:
parent
5ae07ab0ea
commit
3d3002114f
2 changed files with 7 additions and 7 deletions
|
@ -187,8 +187,8 @@ def cmd_build(
|
|||
root_dev = get_cryptmapper_path(encryption_mapper)
|
||||
|
||||
assert os.path.exists(root_dev)
|
||||
create_root_fs(root_dev, sector_size)
|
||||
create_boot_fs(boot_dev, sector_size)
|
||||
create_root_fs(root_dev)
|
||||
create_boot_fs(boot_dev)
|
||||
|
||||
install_rootfs(
|
||||
root_dev,
|
||||
|
|
|
@ -374,7 +374,7 @@ def partition_device(device: str, boot_partition_size: Optional[str] = None):
|
|||
raise Exception(f'Failed to create partitions on {device}')
|
||||
|
||||
|
||||
def create_filesystem(device: str, blocksize: Optional[int], label=None, options=[], fstype='ext4'):
|
||||
def create_filesystem(device: str, blocksize: Optional[int] = None, label=None, options=[], fstype='ext4'):
|
||||
"""Creates a new filesystem. Blocksize defaults"""
|
||||
labels = ['-L', label] if label else []
|
||||
cmd = [f'mkfs.{fstype}', '-F', *labels]
|
||||
|
@ -394,12 +394,12 @@ def create_filesystem(device: str, blocksize: Optional[int], label=None, options
|
|||
raise Exception(f'Failed to create {fstype} filesystem on {device} with CMD: {cmd}')
|
||||
|
||||
|
||||
def create_root_fs(device: str, blocksize: Optional[int]):
|
||||
create_filesystem(device, blocksize=blocksize, label='kupfer_root', options=['-O', '^metadata_csum', '-N', '100000'])
|
||||
def create_root_fs(device: str):
|
||||
create_filesystem(device, label='kupfer_root', options=['-O', '^metadata_csum', '-N', '100000'])
|
||||
|
||||
|
||||
def create_boot_fs(device: str, blocksize: Optional[int]):
|
||||
create_filesystem(device, blocksize=blocksize, label='kupfer_boot', fstype='ext2')
|
||||
def create_boot_fs(device: str):
|
||||
create_filesystem(device, label='kupfer_boot', fstype='ext2')
|
||||
|
||||
|
||||
def install_rootfs(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue