Confusingboat / flash-it

Easy one-step flashing for LSI SAS2-based HBA/RAID devices
GNU Affero General Public License v3.0
105 stars 30 forks source link

Error Line 105 #14

Closed elijahgaraz closed 4 years ago

elijahgaraz commented 4 years ago

Hi. I am getting the error Line 105 megacli64 not found. Is there a solution to this. Been stuck here for days. I gave tried using ubuntu live, centOS and also ubuntu desktop on a Dell R720.

Thanks in advance

richardfrost commented 4 years ago

Looks like this was changed here: 2d99ddd7d4cb9cb566d13607cba54aae5fbef588. I just removed the leading / from lines 105 and 107. I figured it should be a relative path anyway, because on line 95 it extracts it to a relative path, and all the other paths are relative. You could also copy the files from there into the /opt/ path if you didn't want to modify the script and that should work too.

elijahgaraz commented 4 years ago

Thanks Richard. Will try this today.

elijahgaraz commented 4 years ago

I am getting the following error now? Anyone know how to handle this/

cp -p lsiutil /usr/bin make: Leaving directory '/home/ubuntu/flasher/lsiutil' Cloning into 'lsirec'... remote: Enumerating objects: 34, done. remote: Total 34 (delta 0), reused 0 (delta 0), pack-reused 34 Unpacking objects: 100% (34/34), 13.35 KiB | 325.00 KiB/s, done. make: Entering directory '/home/ubuntu/flasher/lsirec' cc -Wall -O2 -std=gnu99 lsirec.c -o lsirec make: Leaving directory '/home/ubuntu/flasher/lsirec' DeviceName: Integrated RAID
Subsystem: Dell PERC H310 Mini Monolithics [1028:1f51] Could not retrieve PCI address from lspci, attempting to load from existing backup file. Error: unable to locate PCI address backup file. No changes have been made.

richardfrost commented 4 years ago

What OS are you running this on? I had a similar issue with Ubuntu 20 Live. That error went away way I switched to Ubuntu 18.04 Live. Not sure of your exact situation, I'll share my experiences here.

It looked to me like there was a newer version of lscpi on Ubuntu 20 which changed the output of the command and prevented line 148 from finding the PCI address. If you try this command in your shell lspci -nnv | grep H310 -B1 | grep -E '^\w+' | cut -d' ' -f1, do you get any result? I tried playing around with it and got it to work by expanding the before match context in the first grep command by another line (-B2), or in full: lspci -nnv | grep H310 -B2 | grep -E '^\w+' | cut -d' ' -f1. You can try running that in your shell if the first doesn't return the address. If its still not working, I'd probably recommend checking each command (separated by the pipes, adding the next command after a successful execution) to see where it breaks down.

Like I mentioned, I got past the missing address on Ubuntu 20, but then ran into another issue (which I don't recall), and I decided to just fall back to Ubuntu 18 since its known to work. On Ubuntu 18, I still had to do a couple commands manually (for some reason, the lines in the script weren't working, but that might not effect you):

add-apt-repository universe multiverse
apt update
apt install git-core build-essential python3 pciutils p7zip-full sysfsutils unzip -y

I then adjusted the absolute paths on 105 & 107, and it worked.

Edit: I guess you could also just stick the PCI address into the backup file as another alternative.

richardfrost commented 4 years ago

@elijahgaraz Still stuck? I'm just hoping to help you through it while its still fresh on my mind 😄.

elijahgaraz commented 4 years ago

@richardfrost H, sorry to get back so late. Been at work all day but good news is that after following your advice and reverting back to Ubuntu 18, and also amending the script to fix the absolute paths issue, everything worked perfectly without a hitch. Thank you very much for all the help

richardfrost commented 4 years ago

No worries! Glad it worked for you. This really is a very nice script.

elijahgaraz commented 4 years ago

100% its a good script . The one thing I might add is too automate adding universe and installing 7zip before the actual script starts because I found out I had to do this each time I rebooted to flash another card

richardfrost commented 4 years ago

It looks like there was already a branch that added universe: ubuntu-18.04-live-fix referenced in #7, but no report on if that fixed it. Anyway, I only had 1 server to do this with, and I don't really have much more I can do as far as testing goes. I'm so glad it worked for us though, its very nice. I don't feel like I have much to contribute, besides the couple manual steps I outlined here in this issue. It works, and likely shouldn't need to be tailored to every possible OS.

Confusingboat commented 4 years ago

Hey guys, it sounds like 2d99ddd messed up the script for most folks, so I'm going to push a new commit that reverts the change soon. Thoughts?

richardfrost commented 4 years ago

I'd agree with that. Since everything seems contained in the folder with the script, I think it keeps things cleaner.

elijahgaraz commented 4 years ago

@Confusingboat @richardfrost I agree as well, That would keep things cleaner and make the process smoother. Thank you

Confusingboat commented 4 years ago

Reverted in ccb63a3