Forgot some imports that didn't show up on a static run without going through a few of the menu's
This commit is contained in:
parent
8b96080ec8
commit
7149b76f3b
|
|
@ -1,7 +1,7 @@
|
||||||
from .btrfs import *
|
from .btrfs import *
|
||||||
from .helpers import *
|
from .helpers import *
|
||||||
from .blockdevice import BlockDevice
|
from .blockdevice import BlockDevice
|
||||||
from .filesystem import Filesystem
|
from .filesystem import Filesystem, MBR, GPT
|
||||||
from .partition import *
|
from .partition import *
|
||||||
from .user_guides import *
|
from .user_guides import *
|
||||||
from .validators import *
|
from .validators import *
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import os
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from ..output import log
|
from ..output import log
|
||||||
|
|
@ -94,6 +95,7 @@ class BlockDevice:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def partitions(self):
|
def partitions(self):
|
||||||
|
from .filesystem import Partition
|
||||||
SysCommand(['partprobe', self.path])
|
SysCommand(['partprobe', self.path])
|
||||||
|
|
||||||
result = SysCommand(['/usr/bin/lsblk', '-J', self.path])
|
result = SysCommand(['/usr/bin/lsblk', '-J', self.path])
|
||||||
|
|
@ -123,6 +125,7 @@ class BlockDevice:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def partition_table_type(self):
|
def partition_table_type(self):
|
||||||
|
from .filesystem import GPT
|
||||||
return GPT
|
return GPT
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
import time
|
import time
|
||||||
|
import logging
|
||||||
|
import json
|
||||||
from .partition import Partition
|
from .partition import Partition
|
||||||
from .blockdevice import BlockDevice
|
from .blockdevice import BlockDevice
|
||||||
|
from ..general import SysCommand
|
||||||
from ..output import log
|
from ..output import log
|
||||||
|
from ..storage import storage
|
||||||
|
|
||||||
GPT = 0b00000001
|
GPT = 0b00000001
|
||||||
MBR = 0b00000010
|
MBR = 0b00000010
|
||||||
|
|
@ -58,7 +62,7 @@ class Filesystem:
|
||||||
return index
|
return index
|
||||||
|
|
||||||
def load_layout(self, layout :dict):
|
def load_layout(self, layout :dict):
|
||||||
from .luks import luks2
|
from ..luks import luks2
|
||||||
|
|
||||||
# If the layout tells us to wipe the drive, we do so
|
# If the layout tells us to wipe the drive, we do so
|
||||||
if layout.get('wipe', False):
|
if layout.get('wipe', False):
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,8 @@ def get_mount_info(path) -> dict:
|
||||||
|
|
||||||
|
|
||||||
def get_partitions_in_use(mountpoint) -> list:
|
def get_partitions_in_use(mountpoint) -> list:
|
||||||
|
from .partition import Partition
|
||||||
|
|
||||||
try:
|
try:
|
||||||
output = SysCommand(f"/usr/bin/findmnt --json -R {mountpoint}").decode('UTF-8')
|
output = SysCommand(f"/usr/bin/findmnt --json -R {mountpoint}").decode('UTF-8')
|
||||||
except SysCallError:
|
except SysCallError:
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,13 @@ import glob
|
||||||
import pathlib
|
import pathlib
|
||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
|
import json
|
||||||
|
import os
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from .blockdevice import BlockDevice
|
from .blockdevice import BlockDevice
|
||||||
|
from .helpers import get_mount_info, get_filesystem_type
|
||||||
from ..output import log
|
from ..output import log
|
||||||
|
from ..general import SysCommand
|
||||||
|
|
||||||
class Partition:
|
class Partition:
|
||||||
def __init__(self, path: str, block_device: BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True):
|
def __init__(self, path: str, block_device: BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True):
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ from ..output import log
|
||||||
|
|
||||||
def suggest_single_disk_layout(block_device, default_filesystem=None):
|
def suggest_single_disk_layout(block_device, default_filesystem=None):
|
||||||
if not default_filesystem:
|
if not default_filesystem:
|
||||||
from .user_interaction import ask_for_main_filesystem_format
|
from ..user_interaction import ask_for_main_filesystem_format
|
||||||
default_filesystem = ask_for_main_filesystem_format()
|
default_filesystem = ask_for_main_filesystem_format()
|
||||||
|
|
||||||
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
|
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
|
||||||
|
|
@ -76,7 +76,7 @@ def suggest_single_disk_layout(block_device, default_filesystem=None):
|
||||||
|
|
||||||
def suggest_multi_disk_layout(block_devices, default_filesystem=None):
|
def suggest_multi_disk_layout(block_devices, default_filesystem=None):
|
||||||
if not default_filesystem:
|
if not default_filesystem:
|
||||||
from .user_interaction import ask_for_main_filesystem_format
|
from ..user_interaction import ask_for_main_filesystem_format
|
||||||
default_filesystem = ask_for_main_filesystem_format()
|
default_filesystem = ask_for_main_filesystem_format()
|
||||||
|
|
||||||
# Not really a rock solid foundation of information to stand on, but it's a start:
|
# Not really a rock solid foundation of information to stand on, but it's a start:
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ def ask_user_questions():
|
||||||
|
|
||||||
# Ask for a root password (optional, but triggers requirement for super-user if skipped)
|
# Ask for a root password (optional, but triggers requirement for super-user if skipped)
|
||||||
if not archinstall.arguments.get('!root-password', None):
|
if not archinstall.arguments.get('!root-password', None):
|
||||||
archinstall.arguments['!root-password'] = archinstall.get_password(prompt='Enter root password (Recommendation: leave blank to leave root disabled): ')
|
archinstall.arguments['!root-password'] = archinstall.get_password(prompt='Enter root password (leave blank to disable disabled & create superuser): ')
|
||||||
|
|
||||||
|
|
||||||
# Ask for additional users (super-user if root pw was not set)
|
# Ask for additional users (super-user if root pw was not set)
|
||||||
|
|
@ -245,9 +245,9 @@ def perform_filesystem_operations():
|
||||||
Setup the blockdevice, filesystem (and optionally encryption).
|
Setup the blockdevice, filesystem (and optionally encryption).
|
||||||
Once that's done, we'll hand over to perform_installation()
|
Once that's done, we'll hand over to perform_installation()
|
||||||
"""
|
"""
|
||||||
mode = archinstall.GPT
|
mode = archinstall.disk.GPT
|
||||||
if has_uefi() is False:
|
if has_uefi() is False:
|
||||||
mode = archinstall.MBR
|
mode = archinstall.disk.MBR
|
||||||
|
|
||||||
for drive in archinstall.arguments['harddrives']:
|
for drive in archinstall.arguments['harddrives']:
|
||||||
with archinstall.Filesystem(drive, mode) as fs:
|
with archinstall.Filesystem(drive, mode) as fs:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue