From 48f789c5b43bc40e2cd81653d4c58a0b2d3396e6 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 13:12:17 -0600 Subject: [PATCH 01/11] (re)Disable root SSH logins --- Build Linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build Linux b/Build Linux index af01c928..ec136c6e 100755 --- a/Build Linux +++ b/Build Linux @@ -229,7 +229,7 @@ function update_live_env() { ssh-keygen -b 4096 -C "$username@$hostname" -N "" -f "$SKEL_DIR/.ssh/id_rsa" echo 'rm /root/.ssh/id*' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'rm /root/.zlogin' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - sed -r '/.*PermitRootLogin.*/d' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + sed -i -r 's/^(.*PermitRootLogin.*)$/PermitRootLogin no/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" cp "$ROOT_DIR/.linux_items/authorized_keys" "$SKEL_DIR/.ssh/authorized_keys" # Root user From 883305ca6b1d45182975d02638324556404dec0f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 13:42:51 -0600 Subject: [PATCH 02/11] Replaced pacinit alias with full script --- .bin/Scripts/pacinit | 15 +++++++++++++++ .linux_items/include/airootfs/etc/skel/.aliases | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 .bin/Scripts/pacinit diff --git a/.bin/Scripts/pacinit b/.bin/Scripts/pacinit new file mode 100755 index 00000000..eda3f960 --- /dev/null +++ b/.bin/Scripts/pacinit @@ -0,0 +1,15 @@ +#!/bin/bash +# +## Wizard Kit: Update pacman settings to usage in live sessions + +# Disable custom repo (used at build-time) +sudo sed -i -r "s/^(\[custom\])/#\1/" /etc/pacman.conf +sudo sed -i -r "s/^(SigLevel = Optional TrustAll)/#\1/" /etc/pacman.conf +sudo sed -i -r "s/^(Server = )/#\1/" /etc/pacman.conf + +# Disable signature checks +sudo sed -i -r "s/^SigLevel.*/SigLevel = Never/" /etc/pacman.conf + +# Refresh package databases +sudo pacman -Sy + diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index 03d15315..bf7507bc 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -16,7 +16,6 @@ alias ls='ls --color=auto' alias mkdir='mkdir -p' alias mount='sudo mount' alias mv='mv -nv' -alias pacinit='sudo sed -i -r "s/^SigLevel.*/SigLevel = Never/" /etc/pacman.conf; sudo pacman -Sy' alias photorec-sort='sudo photorec-sort' alias photorec='sudo photorec' alias q1='clear && ls -1' From a4d559f4064cf6acb3ae9e28ba917920b1c38ec3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 11:46:15 -0600 Subject: [PATCH 03/11] Removed more VCR 2008 references --- .bin/Scripts/functions/setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index 4fca0303..c5c10a48 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -104,10 +104,6 @@ SETTINGS_MOZILLA_FIREFOX_64 = { }, } VCR_REDISTS = [ - {'Name': 'Visual C++ 2008 SP1 x32...', - 'Cmd': [r'2008sp1\x32\vcredist.exe', '/qb! /norestart']}, - {'Name': 'Visual C++ 2008 SP1 x64...', - 'Cmd': [r'2008sp1\x64\vcredist.exe', '/qb! /norestart']}, {'Name': 'Visual C++ 2010 x32...', 'Cmd': [r'2010sp1\x32\vcredist.exe', '/passive', '/norestart']}, {'Name': 'Visual C++ 2010 x64...', From 9689f5aa15dabc7d5557527070eba872e2c132a8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 11:51:22 -0600 Subject: [PATCH 04/11] Adjusted I/O chunk size and graph scale --- .bin/Scripts/functions/hw_diags.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 3b8bd354..97409f32 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -29,13 +29,14 @@ ATTRIBUTES = { } IO_VARS = { 'Block Size': 512*1024, - 'Chunk Size': 16*1024**2, + 'Chunk Size': 32*1024**2, 'Minimum Dev Size': 8*1024**3, 'Minimum Test Size': 10*1024**3, 'Alt Test Size Factor': 0.01, 'Progress Refresh Rate': 5, - 'Scale 16': [2**(0.6*x)+(16*x) for x in range(1,17)], - 'Scale 32': [2**(0.6*x/2)+(16*x/2) for x in range(1,33)], + 'Scale 8': [2**(0.56*(x+1))+(16*(x+1)) for x in range(8)], + 'Scale 16': [2**(0.56*(x+1))+(16*(x+1)) for x in range(16)], + 'Scale 32': [2**(0.56*(x+1)/2)+(16*(x+1)/2) for x in range(32)], 'Threshold Fail': 65*1024**2, 'Threshold Warn': 135*1024**2, 'Threshold Great': 750*1024**2, From 4979fbe9278dab18d82ae3d26dcdb25c60073e8e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 11:52:24 -0600 Subject: [PATCH 05/11] Taller I/O horizontal graph * Inceases fidelity to 32 steps --- .bin/Scripts/functions/hw_diags.py | 48 ++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 97409f32..a9c171b8 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -74,12 +74,16 @@ TESTS = { }, } -def generate_horizontal_graph(rates): +def generate_horizontal_graph(rates, oneline=False): """Generate two-line horizontal graph from rates, returns str.""" - line_top = '' - line_bottom = '' + line_1 = '' + line_2 = '' + line_3 = '' + line_4 = '' for r in rates: - step = get_graph_step(r, scale=16) + step = get_graph_step(r, scale=32) + if oneline: + step = get_graph_step(r, scale=8) # Set color r_color = COLORS['CLEAR'] @@ -91,15 +95,35 @@ def generate_horizontal_graph(rates): r_color = COLORS['GREEN'] # Build graph - if step < 8: - line_top += ' ' - line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + full_block = '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) + if step >= 24: + line_1 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-24]) + line_2 += full_block + line_3 += full_block + line_4 += full_block + elif step >= 16: + line_1 += ' ' + line_2 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-16]) + line_3 += full_block + line_4 += full_block + elif step >= 8: + line_1 += ' ' + line_2 += ' ' + line_3 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) + line_4 += full_block else: - line_top += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) - line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) - line_top += COLORS['CLEAR'] - line_bottom += COLORS['CLEAR'] - return '{}\n{}'.format(line_top, line_bottom) + line_1 += ' ' + line_2 += ' ' + line_3 += ' ' + line_4 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + line_1 += COLORS['CLEAR'] + line_2 += COLORS['CLEAR'] + line_3 += COLORS['CLEAR'] + line_4 += COLORS['CLEAR'] + if oneline: + return line_4 + else: + return '\n'.join([line_1, line_2, line_3, line_4]) def get_graph_step(rate, scale=16): """Get graph step based on rate and scale, returns int.""" From 6c4381c3a56ce554c864738de8a160c003ed5b8e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:15:28 -0600 Subject: [PATCH 06/11] Include percent with rates in "raw" I/O log --- .bin/Scripts/functions/hw_diags.py | 41 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index a9c171b8..c8e2228d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -68,6 +68,7 @@ TESTS = { 'Status': {}, }, 'iobenchmark': { + 'Data': {}, 'Enabled': False, 'Results': {}, 'Status': {}, @@ -410,7 +411,9 @@ def run_iobenchmark(): # Run dd read tests offset = 0 - read_rates = [] + TESTS['iobenchmark']['Data'][name] = { + 'Graph': [], + 'Read Rates': []} for i in range(test_chunks): i += 1 s = skip_count @@ -425,12 +428,18 @@ def run_iobenchmark(): o='/dev/null') result = run_program(cmd.split()) result_str = result.stderr.decode().replace('\n', '') - read_rates.append(get_read_rate(result_str)) + cur_rate = get_read_rate(result_str) + TESTS['iobenchmark']['Data'][name]['Read Rates'].append( + cur_rate) + TESTS['iobenchmark']['Data'][name]['Graph'].append( + '{percent:0.1f} {rate}'.format( + percent=i/test_chunks*100, + rate=int(cur_rate/(1024**2)))) if i % IO_VARS['Progress Refresh Rate'] == 0: # Update vertical graph update_io_progress( percent=i/test_chunks*100, - rate=read_rates[-1], + rate=cur_rate, progress_file=progress_file) # Update offset offset += s + c @@ -440,24 +449,29 @@ def run_iobenchmark(): run_program(['tmux', 'kill-pane', '-t', bottom_pane]) # Build report - h_graph_rates = [] + avg_min_max = 'Average read speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( + sum(TESTS['iobenchmark']['Data'][name]['Read Rates'])/len( + TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), + min(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), + max(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2)) + TESTS['iobenchmark']['Data'][name]['Avg/Min/Max'] = avg_min_max + TESTS['iobenchmark']['Data'][name]['Merged Rates'] = [] pos = 0 width = int(test_chunks / IO_VARS['Graph Horizontal Width']) for i in range(IO_VARS['Graph Horizontal Width']): # Append average rate for WIDTH number of rates to new array - h_graph_rates.append(sum(read_rates[pos:pos+width])/width) + TESTS['iobenchmark']['Data'][name]['Merged Rates'].append(sum( + TESTS['iobenchmark']['Data'][name]['Read Rates'][pos:pos+width])/width) pos += width - report = generate_horizontal_graph(h_graph_rates) - report += '\nRead speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( - sum(read_rates)/len(read_rates)/(1024**2), - min(read_rates)/(1024**2), - max(read_rates)/(1024**2)) + report = generate_horizontal_graph( + TESTS['iobenchmark']['Data'][name]['Merged Rates']) + report += '\n{}'.format(avg_min_max) TESTS['iobenchmark']['Results'][name] = report # Set CS/NS - if min(read_rates) <= IO_VARS['Threshold Fail']: + if min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Fail']: TESTS['iobenchmark']['Status'][name] = 'NS' - elif min(read_rates) <= IO_VARS['Threshold Warn']: + elif min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Warn']: TESTS['iobenchmark']['Status'][name] = 'Unknown' else: TESTS['iobenchmark']['Status'][name] = 'CS' @@ -466,8 +480,7 @@ def run_iobenchmark(): dest_filename = '{}/iobenchmark-{}.log'.format(global_vars['LogDir'], name) shutil.move(progress_file, dest_filename) with open(dest_filename.replace('.', '-raw.'), 'a') as f: - for rate in read_rates: - f.write('{} MB/s\n'.format(rate/(1024**2))) + f.write('\n'.join(TESTS['iobenchmark']['Data'][name]['Graph'])) update_progress() # Done From d4f24eafb67ac789c6cf08b8eb5a5a305930a2d4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:17:38 -0600 Subject: [PATCH 07/11] Fix issue #55 --- .bin/Scripts/functions/hw_diags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index c8e2228d..205171ae 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -420,7 +420,7 @@ def run_iobenchmark(): c = int(IO_VARS['Chunk Size'] / IO_VARS['Block Size']) if skip_extra and i % skip_extra == 0: s += 1 - cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o}'.format( + cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o} iflag=direct'.format( b=IO_VARS['Block Size'], s=offset+s, c=c, From 4b16ec60954a2d678ef7c2180a900748973d51d0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:24:47 -0600 Subject: [PATCH 08/11] Adjusted Prime95 countdown --- .bin/Scripts/functions/hw_diags.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 205171ae..a5866c37 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -507,8 +507,10 @@ def run_mprime(): try: for i in range(int(MPRIME_LIMIT)): clear_screen() - print_standard('Running Prime95 ({} minutes left)'.format( - int(MPRIME_LIMIT)-i)) + min_left = int(MPRIME_LIMIT) - i + print_standard('Running Prime95 ({} minute{} left)'.format( + min_left, + 's' if min_left != 1 else '')) print_warning('If running too hot, press CTRL+c to abort the test') sleep(60) except KeyboardInterrupt: From 5e73583e000ee3f0a18d34cbfc6c855592763739 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:33:11 -0600 Subject: [PATCH 09/11] Mark declined overrides as "Skipped" * NS should be reserved for known failures not unknown/questionable states --- .bin/Scripts/functions/hw_diags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index a5866c37..b492c22f 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -812,7 +812,7 @@ def scan_disks(full_paths=False, only_path=None): if ask('Run tests on this device anyway?'): TESTS['NVMe/SMART']['Status'][dev_name] = 'OVERRIDE' else: - TESTS['NVMe/SMART']['Status'][dev_name] = 'NS' + TESTS['NVMe/SMART']['Status'][dev_name] = 'Skipped' TESTS['badblocks']['Status'][dev_name] = 'Denied' TESTS['iobenchmark']['Status'][dev_name] = 'Denied' print_standard(' ') # In case there's more than one "OVERRIDE" disk From a3c82023e8b66aa428f06f8fd06d57dc9c341731 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 15:17:44 -0600 Subject: [PATCH 10/11] Removed unused file --- .linux_items/.gitignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .linux_items/.gitignore diff --git a/.linux_items/.gitignore b/.linux_items/.gitignore deleted file mode 100644 index 5495eced..00000000 --- a/.linux_items/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -wk_tmp -wk-repo From 3b27d05fd6c1013f8017e500482ffd8eff8efb45 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 20:51:40 -0600 Subject: [PATCH 11/11] Disabled HDT menu entry * See issue #57 --- .linux_items/include/syslinux/wk_pxe_extras.cfg | 2 +- .linux_items/include/syslinux/wk_sys_extras.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.linux_items/include/syslinux/wk_pxe_extras.cfg b/.linux_items/include/syslinux/wk_pxe_extras.cfg index d677b4b0..f4118570 100644 --- a/.linux_items/include/syslinux/wk_pxe_extras.cfg +++ b/.linux_items/include/syslinux/wk_pxe_extras.cfg @@ -4,6 +4,6 @@ MENU BACKGROUND pxelinux.png INCLUDE boot/syslinux/wk_pxe_linux.cfg INCLUDE boot/syslinux/wk_pxe_linux_extras.cfg #UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg -INCLUDE boot/syslinux/wk_hdt.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys_extras.cfg b/.linux_items/include/syslinux/wk_sys_extras.cfg index 3e5af215..7f6b92cd 100644 --- a/.linux_items/include/syslinux/wk_sys_extras.cfg +++ b/.linux_items/include/syslinux/wk_sys_extras.cfg @@ -3,6 +3,6 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg INCLUDE boot/syslinux/wk_sys_linux_extras.cfg #UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg -INCLUDE boot/syslinux/wk_hdt.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg