From 97c44e0d945b806aad73fe8ffba9d5d3dc867d2a Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 8 Apr 2018 11:03:00 +0200 Subject: No need to close net-deploy for network support. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf3e9959..ae064471 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Just a bare bone automated [Arch](https://wiki.archlinux.org/index.php/Arch_Linu # cd ~/archlive # echo -e "git\npython-psutil" >> packages.both - # echo "git clone -b net-deploy --single-branch https://github.com/Torxed/archinstall.git" >> ./airootfs/root/customize_airootfs.sh + # echo "git clone https://github.com/Torxed/archinstall.git" >> ./airootfs/root/customize_airootfs.sh # echo "chmod +x ~/archinstall/archinstall.py" >> ./airootfs/root/customize_airootfs.sh # mkdir ./airootfs/etc/skel # echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && sh -c ~/archinstall/archinstall.py' >> ./airootfs/etc/skel/.zprofile @@ -19,7 +19,7 @@ Whenever this live-cd boots, from here on now - it'll run `archinstall.py`. # Manually run it on a booted Live CD - # git clone -b net-deploy --single-branch https://github.com/Torxed/archinstall.git + # git clone https://github.com/Torxed/archinstall.git # python3 ./archinstall/archinstall.py # Some parameters you can give it @@ -55,4 +55,4 @@ Whenever this live-cd boots, from here on now - it'll run `archinstall.py`. ## End note - ![description](description.jpg) \ No newline at end of file + ![description](description.jpg) -- cgit v1.2.3-70-g09d2 From ba09d311a21bdc5757237253d07a21019fceedcb Mon Sep 17 00:00:00 2001 From: Lord Anton Hvornum Date: Sat, 5 May 2018 19:13:48 +0200 Subject: Fixed: nvme-drive support fixed. parted gives partition numbers, not the actual labels of devices. Hence, parted is scrapped and lsblk is used to determain partition names/labels instead. --- archinstall.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/archinstall.py b/archinstall.py index dad42737..9fa0d07e 100644 --- a/archinstall.py +++ b/archinstall.py @@ -81,9 +81,10 @@ def update_git(): def device_state(name): # Based out of: https://askubuntu.com/questions/528690/how-to-get-list-of-all-non-removable-disk-device-names-ssd-hdd-and-sata-ide-onl/528709#528709 - with open('/sys/block/{}/device/block/{}/removable'.format(name, name)) as f: - if f.read(1) == '1': - return + if os.path.isfile('/sys/block/{}/device/block/{}/removable'.format(name, name)): + with open('/sys/block/{}/device/block/{}/removable'.format(name, name)) as f: + if f.read(1) == '1': + return path = rootdir_pattern.sub('', os.readlink('/sys/block/{}'.format(name))) hotplug_buses = ("usb", "ieee1394", "mmc", "pcmcia", "firewire") @@ -96,20 +97,15 @@ def device_state(name): return True def grab_partitions(dev): - o = run('parted -m -s {} p'.format(dev)).decode('UTF-8') + drive_name = os.path.basename(dev) parts = oDict() - for line in o.split('\n'): - if ':' in line: - data = line.split(':') - if data[0].isdigit(): - parts[int(data[0])] = { - 'start' : data[1], - 'end' : data[2], - 'size' : data[3], - 'sum' : data[4], - 'label' : data[5], - 'options' : data[6] - } + o = run('lsblk -o name -J -b {dev}'.format(dev=dev)) + r = json.loads(o) + for part in r['blockdevices'][0]['children']: + parts[part['name'][len(drive_name):]] = { + # TODO: Grab partition info and store here? + } + return parts def update_drive_list(): -- cgit v1.2.3-70-g09d2