Page 2 of 98 FirstFirst 12341252 ... LastLast
Results 11 to 20 of 978

Thread: Inspired

  1. #11
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    Quote Originally Posted by sudodus View Post
    I think you can rely on us (who have responded in this thread) to test your scripts and give you feedback.

    Looking forward to test your new set of scripts
    Here is the script for the Report, based on what you all asked for, mostly. (Some of the others were specialized, like Bash omn's, which I dealt with as it's own.)
    Code:
    #!/bin/bash
    
    ## MAFoElffen, <mafoelffen@ubuntu.com>, 2021.08.19
    ## Report.sh
    ## Find Machine Hardware Related Information
    
    # Check for preinstalled prerequisites
    REQUIRED=$(apt list --installed | grep inxi 2> /dev/null)
    SUB1="installed"
    boot_mode=""
    [ -d /sys/firmware/efi ] && $boot_mode="UEFI mode" || $boot_mode="Legacy mode"
    
    echo "This script will install any prerequisite packages..."
    
    if [[ $REQUIRED == *"$SUB1"* ]]; then
        continue;
    else
        sudo apt install -y inxi;
    fi
    
    # User Input for Computer Make, Model, Type.
    clear
    echo -e "Please provide some basic Information..."
    read -p "Computer Make: " computer_make
    read -p "Computer Model: " computer_model
    read -p "Computer Type (Server | Desktop | Laptop | etc.): " computer_type
    read -p "What is the main complaint (summarized)? " main_complaint
    read -p "Describe the Problem: " problem_description
    clear
    
    # Machine Info
    rm $HOME/Documents/Report.txt
    echo -e "Starting Report: `date +%D`  `date +%T`" >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "Computer Make:  $computer_make" >> $HOME/Documents/Report.txt
    echo -e "Computer Model:  $computer_model" >> $HOME/Documents/Report.txt
    echo -e "Computer Type:  $computer_type"
    echo -e ""  >> $HOME/Documents/Report.txt
    echo -e "Main Complaint: $main_complaint" >> $HOME/Documents/Report.txt
    echo -e "Problem Description:  $problem_description" >> $HOME/Documents/Report.txt
    echo -e "The computer boot mode was: $boot_mode" >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    sudo inxi -CDGiMoprS --usb >> $HOME/Documents/Report.txt
    clear
    echo -e "" >> $HOME/Documents/Report.txt
    echo "Video Detail:"  >> $HOME/Documents/Report.txt\
    sudo lshw -C video >> $HOME/Documents/Report.txt
    clear
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "The current kernel version ius: `uname -r`" >> $HOME/Documents/Report.txt
    echo -e "The current release decriton is: `lsb_release -sd`" >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "The current logged in User is: `who`" >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "The User's ID is: `id`" >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "The current running DE is: $XDG_CURRENT_DESKTOP" >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "*** End Of Report ***"  >> $HOME/Documents/Report.txt
    echo -e "" >> $HOME/Documents/Report.txt
    echo -e "The Report can be found at $HOME/Documents/Report.txt"
    I made the Report with a .txt extension, as that can be used as an attachment to a post.

    It produces this report:
    Code:
    Starting Report: 08/19/21  21:44:14
    
    Computer Make:  IBM
    Computer Model:  Quantum: Paris 
    Computer Type:  Quantum
    
    Main Complaint: Testing this script.
    Problem Description:  Testing the script to see how it look to a user and how the report turns out...
    The computer boot mode was: Legacy boot
    
    System:
      Host: ubuntu Kernel: 5.4.0-1042-raspi aarch64 bits: 64 
      Desktop: Gnome 3.36.9 Distro: Ubuntu 20.04.3 LTS (Focal Fossa) 
    Machine:
      Type: ARM Device System: Raspberry Pi 4 Model B Rev 1.4 details: BCM2835 
      rev: d03114 serial: 1000000019c286af 
    CPU:
      Topology: Quad Core model: N/A variant: cortex-a72 bits: 64 type: MCP 
      Speed: 1000 MHz min/max: 600/1500 MHz Core speeds (MHz): 1: 1000 2: 1000 
      3: 1000 4: 1000 
    Graphics:
      Device-1: bcm2708-fb driver: bcm2708_fb v: kernel 
      Device-2: bcm2711-hdmi0 driver: N/A 
      Device-3: bcm2711-hdmi1 driver: N/A 
      Display: x11 server: X.Org 1.20.11 driver: fbdev unloaded: modesetting 
      resolution: 1920x1080~N/A 
      OpenGL: renderer: llvmpipe (LLVM 12.0.0 128 bits) v: 4.5 Mesa 21.0.3 
    Network:
      Message: No ARM data found for this feature. 
      IF-ID-1: eth0 state: up speed: 1000 Mbps duplex: full 
      mac: dc:a6:32:ed:0b:03 
      IP v4: 10.0.0.7/24 scope: global 
      IP v6: 2601:603:1f80:6dd0::8e8d/128 type: dynamic noprefixroute 
      scope: global 
      IP v6: 2601:603:1f80:6dd0:dea6:32ff:feed:b03/64 
      type: dynamic mngtmpaddr noprefixroute scope: global 
      IP v6: fe80::dea6:32ff:feed:b03/64 scope: link 
      IF-ID-2: virbr0 state: down mac: 52:54:00:6e:8c:56 
      IP v4: 192.168.122.1/24 scope: global 
      IF-ID-3: virbr0-nic state: down mac: 52:54:00:6e:8c:56 
      IF-ID-4: wlan0 state: down mac: dc:a6:32:ed:0b:04 
      WAN IP: No WAN IP data found. Connected to the web? SSL issues? 
    Drives:
      Local Storage: total: 116.48 GiB used: 40.43 GiB (34.7%) 
      ID-1: /dev/mmcblk0 model: SD128 size: 116.48 GiB 
    Partition:
      ID-1: / size: 114.40 GiB used: 40.31 GiB (35.2%) fs: ext4 
      dev: /dev/mmcblk0p2 
      ID-2: /boot/firmware size: 252.0 MiB used: 128.4 MiB (50.9%) fs: vfat 
      dev: /dev/mmcblk0p1 
      ID-3: /snap/core18/2073 raw size: 48.9 MiB size: <superuser/root required> 
      used: <superuser/root required> fs: squashfs dev: /dev/loop0 
      ID-4: /snap/core18/2127 raw size: 48.9 MiB size: <superuser/root required> 
      used: <superuser/root required> fs: squashfs dev: /dev/loop2 
      ID-5: /snap/lxd/20330 raw size: 59.6 MiB size: <superuser/root required> 
      used: <superuser/root required> fs: squashfs dev: /dev/loop3 
      ID-6: /snap/lxd/21032 raw size: 62.0 MiB size: <superuser/root required> 
      used: <superuser/root required> fs: squashfs dev: /dev/loop1 
      ID-7: /snap/snapd/12397 raw size: 28.1 MiB size: <superuser/root required> 
      used: <superuser/root required> fs: squashfs dev: /dev/loop5 
      ID-8: /snap/snapd/12707 raw size: 28.1 MiB size: <superuser/root required> 
      used: <superuser/root required> fs: squashfs dev: /dev/loop4 
    Unmounted:
      Message: No unmounted partitions found. 
    USB:
      Hub: 1-0:1 info: Full speed (or root) Hub ports: 1 rev: 2.0 
      Hub: 1-1:2 info: VIA Labs Hub ports: 4 rev: 2.1 
      Device-1: 1-1.1:3 info: Logitech M105 Optical Mouse type: Mouse rev: 2.0 
      Device-2: 1-1.2:4 info: N/A type: Keyboard,HID rev: 1.1 
      Device-3: 1-1.3:5 info: N/A type: Keyboard,Mouse rev: 1.1 
      Hub: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 
    Repos:
      Active apt repos in: /etc/apt/sources.list 
      1: deb http://ports.ubuntu.com/ubuntu-ports focal main restricted
      2: deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted
      3: deb http://ports.ubuntu.com/ubuntu-ports focal universe
      4: deb http://ports.ubuntu.com/ubuntu-ports focal-updates universe
      5: deb http://ports.ubuntu.com/ubuntu-ports focal multiverse
      6: deb http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse
      7: deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
      8: deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted
      9: deb http://ports.ubuntu.com/ubuntu-ports focal-security universe
      10: deb http://ports.ubuntu.com/ubuntu-ports focal-security multiverse
      Active apt repos in: /etc/apt/sources.list.d/yktooo-ubuntu-ppa-focal.list 
      1: deb http://ppa.launchpad.net/yktooo/ppa/ubuntu focal main
    
    
    The current kernel version is: 5.4.0-1042-raspi
    The curent release description is: Ubuntu 20.04.3 LTS
    
    The current logged on User is: mafoelffen tty7         2021-08-19 14:17 (:0)
    
    The User's ID is: uid=1001(mafoelffen) gid=1001(mafoelffen) groups=1001(mafoelffen),27(sudo),108(kvm),135(libvirt),64055(libvirt-qemu)
    
    The current running DE is: GNOME
    
    *** End Of Report ***
    Comments and/or suggestions?

    EDIT: This is the first draft... I can already see a few things that I forgot, such as whether the users booted as BIOS Legacy or UEFI mode... (added)
    Last edited by MAFoElffen; August 20th, 2021 at 06:48 AM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  2. #12
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Inspired

    @MAFoElffen,

    Thanks, I have debugged the script, and suggest the following version with several modifications, some simple 'debugs' but also some more general things, for example

    - LANG=C in order to get the output readable also when the languages that we cannot read are used.

    - Blueback headlines

    - Write the report into the user's home directory, because when some locales (languages) are used, the Documents directory is renamed to something else, in my case to Dokument.

    - Add memory (RAM) to the output of inxi

    - Removed the option --usb from inxi, because inxi does not work in my 18.04 unless it is removed.

    - Added general machine data as read my lshw (from the head end of its output).

    - Added tip howto read the report (because less without -r does not interpret the ANSI sequences). An alternative is to remove all ANSI formatting (including from inxi).

    You may want to modify it further or roll back some of my modifications.

    Code:
    #!/bin/bash
    
    ## MAFoElffen, <mafoelffen@ubuntu.com>, 2021.08.19
    ## sudodus <nio.wiklund@gmail.com>      2021.08.21
    ## Report.sh
    ## Find Machine Hardware Related Information
    
    # Check for preinstalled prerequisites
    
    if [ "$(whoami)" == "root" ]
    then
     echo "Run as a normal user, *not* as root and don't use sudo here"
     echo "$0"
     exit
    fi
    LANG=C
    blueback="\0033[1;37;44m"
    resetvid="\0033[0m"
    
    REQUIRED=$(apt list --installed | grep inxi 2> /dev/null)
    SUB1="installed"
    boot_mode=""
    [ -d /sys/firmware/efi ] && boot_mode="UEFI mode" || boot_mode="Legacy mode (alias CSM alias BIOS mode)"
    
    echo "This script will install any prerequisite packages..."
    
    if [[ $REQUIRED == *"$SUB1"* ]]; then
        continue;
    else
        sudo apt install -y inxi;
    fi
    
    # User Input for Computer Make, Model, Type.
    clear
    echo -e "Please provide some basic Information..."
    #read -p "Computer Make: " computer_make
    #read -p "Computer Model: " computer_model
    #read -p "Computer Type (Server | Desktop | Laptop | etc.): " computer_type
    read -p "What is the main complaint (summarized)? " main_complaint
    read -p "Describe the Problem: " problem_description
    clear
    
    # Machine Info
    echo -e "${blueback}Starting Report:$resetvid  `date +%F`  `date +%T`" > $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- User Input:$resetvid" >> $HOME/Report.txt
    #echo -e "Computer Make:  $computer_make" >> $HOME/Report.txt
    #echo -e "Computer Model:  $computer_model" >> $HOME/Report.txt
    #echo -e "Computer Type:  $computer_type" >> $HOME/Report.txt
    echo -e ""  >> $HOME/Report.txt
    echo -e "Main Complaint: $main_complaint" >> $HOME/Report.txt
    echo -e "Problem Description:  $problem_description" >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- General computer specs from 'lshw':$resetvid" >> $HOME/Report.txt
    sudo bash -c "lshw | sed '/*-core/,$ d' >> $HOME/Report.txt"
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- General computer specs from 'inxi':$resetvid" >> $HOME/Report.txt
    sudo bash -c "inxi -CDGimMoprS >> $HOME/Report.txt"
    clear
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- File system specs from 'df -h':$resetvid" >> $HOME/Report.txt
    df -h | grep -v '/snap/' >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- Block device specs from 'lsblk':$resetvid" >> $HOME/Report.txt
    lsblk -o name,size,fstype,hotplug,label,mountpoint,model | grep -v '/snap/' >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- Block device extra from 'lsblk':$resetvid" >> $HOME/Report.txt
    lsblk -o name,fstype,size,fsused,label,partlabel,mountpoint,uuid,partuuid | grep -v '/snap/' >> $HOME/Report.txt
    if [ $? -ne 0 ]
    then
     clear
     lsblk -o name,fstype,size,label,partlabel,mountpoint,uuid,partuuid | grep -v '/snap/' >> $HOME/Report.txt
    fi
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- Mount Details of '/etc/fstab':$resetvid"  >> $HOME/Report.txt
    cat /etc/fstab  >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- Video Details:$resetvid"  >> $HOME/Report.txt
    sudo bash -c "lshw -C video >> $HOME/Report.txt"
    clear
    echo -e "" >> $HOME/Report.txt
    echo -e "${blueback}---------- Other Details:$resetvid"  >> $HOME/Report.txt
    echo -e "The computer boot mode was: $boot_mode" >> $HOME/Report.txt
    echo -e "The current kernel version is: `uname -r`" >> $HOME/Report.txt
    echo -e "The current release description is: `lsb_release -sd`" >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    whostr="$(who)"
    tvar="$(<<< "$whostr" wc -l)"
    if [ $tvar -eq 1 ]
    then
     echo -e "The current logged in User is: $whostr" >> $HOME/Report.txt
    else
     echo -e "The current logged in Users are:
    $whostr" >> $HOME/Report.txt
    fi
    echo -e "" >> $HOME/Report.txt
    echo -e "The User's ID is: `id`" >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "The current running DE is: $XDG_CURRENT_DESKTOP" >> $HOME/Report.txt
    
    echo -e "" >> $HOME/Report.txt
    echo -e "*** End Of Report ***"  >> $HOME/Report.txt
    echo -e "" >> $HOME/Report.txt
    echo -e "The Report can be found at '$HOME/Report.txt', and can be viewed with"
    echo -e "less -r '$HOME/Report.txt'"
    Edit 1:

    Maybe a section with the output from
    Code:
    lsblk -o name,size,fstype,label,mountpoint,model
    should be added. Probably we should eliminate the snaps that are loop mounted

    Code:
    lsblk -o name,size,fstype,label,mountpoint,model | grep -v '/snap/'

    That info is already there from inxi, but I think it is easier to read from lsblk.
    Last edited by sudodus; August 21st, 2021 at 12:46 AM. Reason: Edit 1; Edit 2: in response to oldfred's comments

  3. #13
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Inspired

    Ran report.
    First time used sudo bash , so report went into /root/home. duh do not use sudo

    Not sure why asking about system as if user is not sure, then report shows details better.

    I prefer this for lsblk, I do not have snaps, but thought the -o excluded them?
    lsblk -o name,fstype,size,fsused,label,partlabel,mountpoint ,uuid,partuuid

    Report looks good.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #14
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Inspired

    Quote Originally Posted by oldfred View Post
    Ran report.
    First time used sudo bash , so report went into /root/home. duh do not use sudo

    Not sure why asking about system as if user is not sure, then report shows details better.

    I prefer this for lsblk, I do not have snaps, but thought the -o excluded them?
    lsblk -o name,fstype,size,fsused,label,partlabel,mountpoint ,uuid,partuuid

    Report looks good.
    Thanks for the feedback, oldfred,

    1. I don't understand "Not sure why asking about ...". Please explain

    2. I debugged in a Lubuntu+Xubuntu 18.04.x system and tested in an installed Ubuntu Desktop 20.04.x LTS system.

    - In the Lubuntu+Xubuntu 18.04.x system inxi writes ansi sequences even when redirected to file.

    - In the Ubuntu Desktop 20.04.x LTS system the loop devices for snaps will 'dominate' the output of lsblk. But I want to see possible other loop devices, this is why I suggest to remove them with grep as shown in my previous post.

    3. It OK for me too add options to get also fsused, partlabel, uuid and partuuid from lsblk.



    Edit 1: This what you are not sure about, oldfred: The red requests in the beginning:

    Please provide some basic Information...
    Computer Make: aaa
    Computer Model: bbb
    Computer Type (Server | Desktop | Laptop | etc.): ccc

    What is the main complaint (summarized)? ddd
    Describe the Problem: eee

    Well, I'm responsible for adding the input from lshw without removing those requests. It is OK for me to remove them.

    Edit 2: I have removed those 'red' questions and I have added your lsblk favourite list. I have also added /etc/fstab to the output [to the report generator in my previous post.]
    Last edited by sudodus; August 21st, 2021 at 12:29 AM. Reason: Is this what you are not sure about, oldfred?

  5. #15
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Inspired

    It asks what make, model, type and what issue is.
    I think it should only ask issue as report itself is to document make, model and other hardware configuration.
    Often users do not know details, they may know brand or that cpu is Intel or AMD, but report will show the details we need.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #16
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    I really thank you for the comments about the ansi and language/locale. I didn't realize, nor think that Documents would be translated by locale, so would be different. That info helps me on other scripts I wrote in python for this support LiveCD, That I now need to update and change... LOL

    I, personally, do not like seeing/looking through the /dev/loopX/snaps... In fact, I usually filter out all occurrences of "Loop" all together. One person above (sudodus in post #5) asked for snaps info... LOL. The reason I do that filter in my python scripts for this LiveCD, is that I want to ignore the loop devices caused by booting from a LiveCD and look at the Machine it booted up. Filtering out "loop" also conveniently filters out "snap"...

    Personally I think that I should deal with Snap separate in it's own script. And splitting out scripts. Then it could be to create different report names for each script, or it not and one consolidated report... then would need to remove the automatic delete of an existing report, and add a User prompt asking if they want to append to exist, or start fresh. Thinking separate reports.

    I am happy to hear that looking for USB info needs to be split out. (So I don't cause problems with doing that) I didn't realize that in inxi would lock up some machines up using that option. I can get the same and more parsing lspci and lsusb. One user above specifially wanted USB information, but that can be spilt out.

    With that note, I also thought of maybe splitting out network info to it's own... if the issue is network related, looking for it early with this script is not going to get the wanted basic information before drilling down into that.What do you think about that?

    Back to drive/partition data and which tools... The except popular on this board seems to be asking users to use fdisk. Lately, a lot of Ubuntu Members have been asking for lsblk... Some older members still use parted, because it's easier for them to parse through, and manipulate with scripts... (1) lsblks shows a nice tree to visually see what is there and it's structure... but is harder to weed through when you try to automate, when you find this, do that. And the characters they add in the first column, does weird things when you try to extract the actual device names from that column. It's good for reports (visually).
    (2) parted has been around forever. it works well with all sized disks (below and above 2GB). But it only supports very few partition "types", and very few people use it anymore. A lot of new users don't even know it exists. (3) fdisk and gdisk are the ones used mostly currently. It supports a lot of partition types.

    But I'm not the only person who needs to interpret this report... So yes, differing formats... looking at different things. so from lsblk, inxi and fdisk? You realize that the boot-info script is also going to be on it with it's own report...

    I started the Support LiveCD, with the scripts dealing with partitions ID'ed as: Linux, Linux LVM, Solaris__xxxx, /dev/mdx (RAID) and /dev/mapper/ (LVM on RAID) from fdisk... The "mountpoint" column of lsblk is useless from a LiveCD, as it only shows the mounts of the LiveCD environment. They work so far for Linux filetypes (extX and btrfs tested so far), and ZFS... Still working out the different conditions a user can change with Linux LVM under the covers... (LOL)

    Yes... I started scripts for ZFS. Yann's boot-repair fails on ZFS. I had to remember back to my days supporting Solaris, combined with how Ubuntu does that now.

    Why the user input on the Machine Information??? The tool sets see what is there physically... But that doesn't tell us what the Computer Make, Model, and model number is. How many times have we asked for that, and the user never tells us... Or finally tells us in post #8 or beyond? With that, we can google the spec's of what he is running. There is differences in a desktop or laptop, with the same hardware detected by the tools. There is also different firmware issues that we have found with differing computers, based on just that information. I know oldfred has saved a library of that kind of specific quark information.
    Last edited by MAFoElffen; August 20th, 2021 at 11:13 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  7. #17
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    oldfred... good catch on that... The script queries info on the current user information, and I need to make sure the script is "not run" from root (even though two aspects needs to run as elevated). On the LiveCD I have more controll over that, as it would mostly be called from a menu option. But if ran alone, I do need to make sure of that.

    And, if I change the location of the reports to just $HOME, then it will also work for Server Edition, which does not create a directory structure on installation, by default, beyond just a user's /home/$USER/ base directory.

    And for the Support LiveCD, it has the ability to chroot into installed systems... So I am working out how to make scripts available within the chroot, but to make any reports available outside of it, after the chroot is exited... I say "systems", because a user may have more than one installed on a computer, and needs to be given the chance to decide which one to deal with.

    EDIT: I made the changes from both of your comments and recommendations and am going to run it in the test ENV I set up with different install twists... That should be an interesting report for you to see how that will look.

    I'm also looking at the differences and changes in the automated installations "caused" by the new Live Installer in Server Edition (since 20.04) and for Desktop Edition (starting with 21.10)... And starting with 21.10, I can query the BIOS and get at least the BIOS vendor name and BIOS version, without any vendor specific translations.
    Last edited by MAFoElffen; August 20th, 2021 at 11:16 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  8. #18
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Inspired

    @MAFoElffen,

    It was easy for me to add some edits to the script version in post #12

    - Now it is checking that the script is not started as root or with sudo

    - Some more details are added concerning drives, partitions, mounting

    - I only commented away the manual info about make, model, type of computer. We can easily uncomment and get back those items.

    I understand that you have great visions for a whole set of tools, and this one should be only one of them. I agree that it will probably be easier to use different tools depending of the problem to be solved.

    Do you intend to make a general tool, that can help find out where to look in more detail (and use a specialized tool for that particular kind of problem)?
    Last edited by sudodus; August 21st, 2021 at 12:19 AM.

  9. #19
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    @sudodus:
    I debugged the changes you suggested. Was just minor things. *** Those escape sequences look great on-screen! (the blue highlighted headers), but... To use them, I then had to post-process the report with sed to remove those characters from the finished report... LOL. What I did was display it to the user, then strip the extraneous characters out of afterwards.

    @both:
    I added both your recommendations.

    Here's what the report looks like with 5 disks and 5 different kinds of Ubuntu Installations... With differing filesystems and various file managers...
    Code:
    Starting Report: 2021-08-21  02:51:16
    
    ---------- User Input:
    
    Main Complaint: Sample cheif complaint.
    Problem Description:  Sample problem description. Running on test case KVM geust VM.
    
    ---------- General computers specs from 'lshw':
    ubuntu-micro
        description: Computer
        product: Standard PC (Q35 + ICH9, 2009)
        vendor: QEMU
        version: pc-q35-4.2
        width: 64 bits
        capabilities: smbios-2.8 dmi-2.8 smp vsyscall32
        configuration: boot=normal uuid=F231A073-CB54-0D41-A673-D7CAB96ED04A
    
    ---------- General computers specs from 'inxi':
    System:    Host: ubuntu-micro Kernel: 5.11.0-27-generic x86_64 bits: 64 Console: N/A 
               Distro: Ubuntu 20.04.3 LTS (Focal Fossa) 
    Machine:   Type: Kvm System: QEMU product: Standard PC (Q35 + ICH9, 2009) v: pc-q35-4.2 serial: N/A 
               Mobo: N/A model: N/A serial: N/A UEFI: EFI Development Kit II / OVMF v: 0.0.0 date: 02/06/2015 
    Memory:    RAM: total: 3.82 GiB used: 231.4 MiB (5.9%) 
               Array-1: capacity: 4 GiB slots: 1 EC: Multi-bit ECC 
               Device-1: DIMM 0 size: 4 GiB speed: Unknown 
    CPU:       Topology: 4x Single Core model: AMD Opteron 63xx class CPU bits: 64 type: SMP L2 cache: 2048 KiB 
               Speed: 2800 MHz min/max: N/A Core speeds (MHz): 1: 2800 2: 2800 3: 2800 4: 2800 
    Graphics:  Device-1: Red Hat QXL paravirtual graphic card driver: qxl v: kernel 
               Display: server: X.org 1.20.11 driver: qxl tty: 128x48 
               Message: Advanced graphics data unavailable in console for root. 
    Network:   Device-1: Red Hat Virtio network driver: virtio-pci 
               IF-ID-1: enp1s0 state: up speed: -1 duplex: unknown mac: 52:54:00:9d:48:42 
               IP v4: 192.168.122.136/24 type: dynamic scope: global 
               IP v6: fe80::5054:ff:fe9d:4842/64 scope: link 
               WAN IP: 76.22.108.221 
    Drives:    Local Storage: total: 85.00 GiB used: 8.24 GiB (9.7%) 
               ID-1: /dev/sda vendor: QEMU model: HARDDISK size: 10.00 GiB 
               ID-2: /dev/sdb vendor: QEMU model: HARDDISK size: 20.00 GiB 
               ID-3: /dev/sdc vendor: QEMU model: HARDDISK size: 20.00 GiB 
               ID-4: /dev/sdd vendor: QEMU model: HARDDISK size: 20.00 GiB 
               ID-5: /dev/vda model: N/A size: 15.00 GiB 
    Partition: ID-1: / size: 14.21 GiB used: 8.24 GiB (58.0%) fs: ext4 dev: /dev/vda2 
               ID-2: /boot/efi size: 511.0 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/vda1 
    Unmounted: ID-1: /dev/dm-0 size: 8.54 GiB fs: ext4 label: N/A uuid: ddf2288c-015c-4a63-aaf9-241973331647 
               ID-2: /dev/dm-1 size: 980.0 MiB fs: swap label: N/A uuid: 6ee48abe-b40d-4ac6-bd9d-22247d0f714a 
               ID-3: /dev/dm-2 size: 9.23 GiB fs: ext4 label: N/A uuid: fb81d8c7-1804-43cd-88c4-d6ef38419efb 
               ID-4: /dev/sda1 size: 512.0 MiB fs: vfat label: N/A uuid: 0576-559D 
               ID-5: /dev/sda2 size: 9.50 GiB fs: lvm2_member label: N/A uuid: L9rK0Q-RDec-QdUw-U6z2-8fGK-tkcr-PcTVg3 
               ID-6: /dev/sdb1 size: 512.0 MiB fs: vfat label: N/A uuid: 5500-DEE3 
               ID-7: /dev/sdb2 size: 923.0 MiB fs: swap label: N/A uuid: e7b1408b-c301-4044-a60b-2437c539d83e 
               ID-8: /dev/sdb3 size: 998.0 MiB fs: zfs_member label: bpool uuid: 7959111764556978840 
               ID-9: /dev/sdb4 size: 17.62 GiB fs: zfs_member label: rpool uuid: 6089464218371032509 
               ID-10: /dev/sdc1 size: 5.0 MiB fs: btrfs label: N/A uuid: a8fb8883-4130-415d-9488-3bedf7649187 
               ID-11: /dev/sdc2 size: 2.30 GiB fs: swap label: N/A uuid: 35238d3a-a2f6-411b-827f-7c5945919076 
               ID-12: /dev/sdc3 size: 499.7 MiB fs: vfat label: N/A uuid: 5805-E4A0 
               ID-13: /dev/sdc4 size: 17.20 GiB fs: btrfs label: N/A uuid: 9f292e4e-9582-450f-a9c6-f07cfa7e3b1f 
               ID-14: /dev/sdd1 size: 512.0 MiB fs: vfat label: N/A uuid: BFCD-815C 
               ID-15: /dev/sdd2 size: 1024.0 MiB fs: ext4 label: N/A uuid: 3ba41e8e-0387-46e5-9d3d-7931f44e604c 
               ID-16: /dev/sdd3 size: 4.62 GiB fs: ext4 label: N/A uuid: ea473298-3e83-49f9-a1a6-b1e8bd9541cd 
    Repos:     Active apt repos in: /etc/apt/sources.list 
               1: deb http://us.archive.ubuntu.com/ubuntu focal main restricted
               2: deb http://us.archive.ubuntu.com/ubuntu focal-updates main restricted
               3: deb http://us.archive.ubuntu.com/ubuntu focal universe
               4: deb http://us.archive.ubuntu.com/ubuntu focal-updates universe
               5: deb http://us.archive.ubuntu.com/ubuntu focal multiverse
               6: deb http://us.archive.ubuntu.com/ubuntu focal-updates multiverse
               7: deb http://us.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
               8: deb http://us.archive.ubuntu.com/ubuntu focal-security main restricted
               9: deb http://us.archive.ubuntu.com/ubuntu focal-security universe
               10: deb http://us.archive.ubuntu.com/ubuntu focal-security multiverse
               11: deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main
               Active apt repos in: /etc/apt/sources.list.d/scootersoftware.list 
               1: deb https://www.scootersoftware.com/ bcompare4 non-free
               Active apt repos in: /etc/apt/sources.list.d/sublime-text.list 
               1: deb https://download.sublimetext.com/ apt/stable/
    
    ---------- Additional Disk/Partition Information:
    ---------- Information from 'fdisk':
    Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors
    Disklabel type: gpt
    Disk identifier: DAC0F0EB-AB2F-4964-A77B-AE44A7CF90AA
    Device       Start      End  Sectors  Size Type
    /dev/vda1     2048  1050623  1048576  512M EFI System
    /dev/vda2  1050624 31455231 30404608 14.5G Linux filesystem
    Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
    Disk model: QEMU HARDDISK   
    Disklabel type: gpt
    Disk identifier: 58BB9F90-8E99-4E50-8E0D-99450436AA74
    Device       Start      End  Sectors  Size Type
    /dev/sdb1     2048  1050623  1048576  512M EFI System
    /dev/sdb2  1050624  2940927  1890304  923M Linux swap
    /dev/sdb3  2940928  4984831  2043904  998M Solaris boot
    /dev/sdb4  4984832 41943006 36958175 17.6G Solaris root
    Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors
    Disk model: QEMU HARDDISK   
    Disklabel type: gpt
    Disk identifier: A9B3437B-32F9-41FE-A10C-F421EF6AC138
    Device       Start      End  Sectors  Size Type
    /dev/sda1     2048  1050623  1048576  512M EFI System
    /dev/sda2  1050624 20969471 19918848  9.5G Linux LVM
    Disk /dev/sdd: 20 GiB, 21474836480 bytes, 41943040 sectors
    Disk model: QEMU HARDDISK   
    Disklabel type: gpt
    Disk identifier: B2EC33ED-9E86-4F3C-8D4F-09F1626C54E2
    Device        Start      End Sectors  Size Type
    /dev/sdd1      2048  1050623 1048576  512M EFI System
    /dev/sdd2   1050624  3147775 2097152    1G Linux filesystem
    /dev/sdd3   3147776 12843007 9695232  4.6G Linux filesystem
    /dev/sdd4  12843008 22538239 9695232  4.6G Linux filesystem
    /dev/sdd5  22538240 32233471 9695232  4.6G Linux filesystem
    /dev/sdd6  32233472 41928703 9695232  4.6G Linux filesystem
    Disk /dev/sdc: 20 GiB, 21474836480 bytes, 41943040 sectors
    Disk model: QEMU HARDDISK   
    Disklabel type: gpt
    Disk identifier: FC18B045-AAF9-40F7-A168-EAF0ACFE2FF7
    Device        Start      End  Sectors   Size Type
    /dev/sdc1      2048    12287    10240     5M BIOS boot
    /dev/sdc2  37109760 41940991  4831232   2.3G Linux swap
    /dev/sdc3     12288  1035724  1023437 499.7M EFI System
    /dev/sdc4   1036288 37109759 36073472  17.2G Linux filesystem
    Disk /dev/md0: 9.24 GiB, 9917431808 bytes, 19369984 sectors
    Disk /dev/mapper/vgubuntu-root: 8.55 GiB, 9168748544 bytes, 17907712 sectors
    Disk /dev/mapper/vgubuntu-swap_1: 980 MiB, 1027604480 bytes, 2007040 sectors
    Disk /dev/mapper/vg0-lv--0: 9.24 GiB, 9915334656 bytes, 19365888 sectors
    
    ---------- Information from 'lsblk':
    NAME                  SIZE FSTYPE            LABEL           MOUNTPOINT        MODEL
    sda                    10G                                                     QEMU_HARDDISK
    |-sda1                512M vfat                                                
    `-sda2                9.5G LVM2_member                                         
      |-vgubuntu-root     8.6G ext4                                                
      `-vgubuntu-swap_1   980M swap                                                
    sdb                    20G zfs_member        rpool                             QEMU_HARDDISK
    |-sdb1                512M vfat                                                
    |-sdb2                923M swap                                                
    |-sdb3                998M zfs_member        bpool                             
    `-sdb4               17.6G zfs_member        rpool                             
    sdc                    20G                                                     QEMU_HARDDISK
    |-sdc1                  5M btrfs                                               
    |-sdc2                2.3G swap                                                
    |-sdc3              499.7M vfat                                                
    `-sdc4               17.2G btrfs                                               
    sdd                    20G                                                     QEMU_HARDDISK
    |-sdd1                512M vfat                                                
    |-sdd2                  1G ext4                                                
    |-sdd3                4.6G ext4                                                
    |-sdd4                4.6G linux_raid_member ubuntu-server:0                   
    | `-md0               9.2G LVM2_member                                         
    |   `-vg0-lv--0       9.2G ext4                                                
    |-sdd5                4.6G linux_raid_member ubuntu-server:0                   
    | `-md0               9.2G LVM2_member                                         
    |   `-vg0-lv--0       9.2G ext4                                                
    `-sdd6                4.6G linux_raid_member ubuntu-server:0                   
      `-md0               9.2G LVM2_member                                         
        `-vg0-lv--0       9.2G ext4                                                
    sr0                  1024M                                                     QEMU_DVD-ROM
    vda                    15G                                                     
    |-vda1                512M vfat                              /boot/efi         
    `-vda2               14.5G ext4                              /                 
        ------- 'lsblk' information continued...
    NAME                PARTUUID                             UUID
    sda                                                      
    |-sda1              0d0795b9-8647-4870-abf2-9aafc0e5a216 0576-559D
    `-sda2              265d21f0-139c-41f0-8fa0-873dd08c60d7 L9rK0Q-RDec-QdUw-U6z2-8fGK-tkcr-PcTVg3
      |-vgubuntu-root                                        ddf2288c-015c-4a63-aaf9-241973331647
      `-vgubuntu-swap_1                                      6ee48abe-b40d-4ac6-bd9d-22247d0f714a
    sdb                                                      6089464218371032509
    |-sdb1              6e211de1-463c-4e07-8005-430c80d03a0b 5500-DEE3
    |-sdb2              498cd4aa-5e15-784b-8cb6-81b36f2464c1 e7b1408b-c301-4044-a60b-2437c539d83e
    |-sdb3              0dc16314-a3be-e441-92c3-9552c589b167 7959111764556978840
    `-sdb4              e2d1b433-d043-df44-bc3e-6fcf7e2054b4 6089464218371032509
    sdc                                                      
    |-sdc1              c60dc45a-3d5a-4670-a26f-9ade07729429 a8fb8883-4130-415d-9488-3bedf7649187
    |-sdc2              ad9a6f28-3f97-4d39-80db-a7a5b5d8e5b8 35238d3a-a2f6-411b-827f-7c5945919076
    |-sdc3              a2f12bfa-8f33-437d-855b-48f895b51fce 5805-E4A0
    `-sdc4              6bc67035-ff67-4965-92d7-adc56c4910e9 9f292e4e-9582-450f-a9c6-f07cfa7e3b1f
    sdd                                                      
    |-sdd1              a335de55-ce88-4cc3-90ed-2ee84daa04fd BFCD-815C
    |-sdd2              c8068219-fb37-4553-a0f2-8a9c9fa666c2 3ba41e8e-0387-46e5-9d3d-7931f44e604c
    |-sdd3              8b471189-1646-40f5-b4ef-94be12dd8dca ea473298-3e83-49f9-a1a6-b1e8bd9541cd
    |-sdd4              e60ba893-2468-4860-b844-1ac2c4b57fbe d6832d54-1467-5d39-c3fa-64220b04592b
    | `-md0                                                  49A1jd-pEUU-rLYa-XfeD-Y7Ws-8FHk-miK2lv
    |   `-vg0-lv--0                                          fb81d8c7-1804-43cd-88c4-d6ef38419efb
    |-sdd5              3a6f2c09-fdd4-4bf3-89f5-2826f8305dbc d6832d54-1467-5d39-c3fa-64220b04592b
    | `-md0                                                  49A1jd-pEUU-rLYa-XfeD-Y7Ws-8FHk-miK2lv
    |   `-vg0-lv--0                                          fb81d8c7-1804-43cd-88c4-d6ef38419efb
    `-sdd6              afdf78af-55b5-490c-9741-1191a4c82f34 d6832d54-1467-5d39-c3fa-64220b04592b
      `-md0                                                  49A1jd-pEUU-rLYa-XfeD-Y7Ws-8FHk-miK2lv
        `-vg0-lv--0                                          fb81d8c7-1804-43cd-88c4-d6ef38419efb
    sr0                                                      
    vda                                                      
    |-vda1              02e2f394-168a-4f59-85dc-21f9e9e3a650 E615-315B
    `-vda2              9486f3ff-d547-4fe1-9c04-4ace8597fa17 0f0bfec7-d134-4a5a-bca9-f07e3c91badb
    ---------- Video Details:
      *-display
           description: VGA compatible controller
           product: QXL paravirtual graphic card
           vendor: Red Hat, Inc.
           physical id: 1
           bus info: pci@0000:00:01.0
           version: 04
           width: 32 bits
           clock: 33MHz
           capabilities: vga_controller bus_master rom
           configuration: driver=qxl latency=0
           resources: irq:21 memory:c4000000-c7ffffff memory:c0000000-c3ffffff memory:c8c84000-c8c85fff ioport:1040(size=32) memory:c0000-dffff
    
    ---------- Other Details:
    The computer boot mode was: 
    The current kernel version is: 5.11.0-27-generic
    The current release description is: Ubuntu 20.04.3 LTS
    
    The current logged in User is: ubuntu   tty1         Aug 20 22:50
    
    The User\'s ID is: uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd),121(libvirt)
    
    The current running DE is: 
    
    *** End Of Report ***
    sudodus... I added lsblk columns for NAME,PARTUUID,UUID as a continuation of. Adding them "all at once", was way too wide and word wrapped bad...

    The current code:
    Code:
    #!/bin/bash
    
    ## MAFoElffen, <mafoelffen@ubuntu.com>, 2021.08.19
    ## Version 01.01, 2021.08.20
    ## Includes recommended changes submitted by:
    ##     sudodus <nio.wiklund@gmail.com>, 2021.08.20
    ##     oldfred, 2021.08.20
    ## Filename: Report-01.01.sh
    ## Description: Report Finds Machine Hardware Related Information.
    ##     For support use at "UbuntuForums.org".
    
    ## Set filename and path to
    report="$HOME/Report.txt"
    
    ## Set locale settings
    LANG=C
    
    ## Set a pretty screen decoration for displaying the report onscreen
    blueback="\0033[1;37;44m"
    resetvid="\0033[0m"
    
    ## Check for preinstalled prerequisites
    REQUIRED=$(apt list --installed | grep inxi 2> /dev/null)
    SUB1="installed"
    boot_mode=""
    [ -d /sys/firmware/efi ] && $boot_mode="UEFI mode" || $boot_mode="Legacy mode (alias CSM alias BIOS mode)"
    
    echo "This script will install any prerequisite packages..." # The LiveCD has this preinstalled
    
    if [[ $REQUIRED == *"$SUB1"* ]]; then
        continue;
    else
        sudo apt install -y inxi;
    fi
    
    # User Input for Computer Make, Model, Type.
    clear
    echo -e "Please provide some \"Basic Information\"..."
    #read -p "Computer Make (ie: Dell/HP/ASUS/Lenova): " computer_make
    #read -p "Computer Model (ie: Ultima 420p) " computer_model
    #read -p "Computer Type (ie: Server | Desktop | Laptop): " computer_type
    read -p "What is the main complaint (summarized)? " main_complaint
    read -p "Describe the Problem: " problem_description
    clear
    
    # Machine Info
    echo -e "Starting Report: `date +%F`  `date +%T`" > $report
    echo -e "" >> $report
    echo -e "${blueback}---------- User Input:$resetvid" >> $report
    #echo -e "Computer Make:  $computer_make" >> $report
    #echo -e "Computer Model: $computer_model" >> $report
    #echo -e "Computer Type:  $computer_type" >> $report
    echo -e ""  >> $report
    echo -e "Main Complaint: $main_complaint" >> $report
    echo -e "Problem Description:  $problem_description" >> $report
    echo -e "" >> $report
    echo -e "${blueback}---------- General computers specs from 'lshw':$resetvid" >> $report
    sudo bash -c "lshw | sed '/*-core/,$ d'" >> $report
    clear
    echo -e "" >> $report
    echo -e "${blueback}---------- General computers specs from 'inxi':$resetvid" >> $report
    sudo bash -c "inxi -CDGimMoprS | grep -v 'loop\|snap'" >> $report
    clear
    echo -e "" >> $report
    echo -e "${blueback}---------- Additional Disk/Partition Information:$resetvid" >> $report
    echo -e "${blueback}---------- Information from 'fdisk':$resetvid"  >> $report
    sudo bash -c "fdisk -l | grep 'Disk\|Device\|/dev/' | grep -v 'loop\|snap'"  >> $report
    echo -e "" >> $report
    echo -e "${blueback}---------- Information from 'lsblk':$resetvid"  >> $report
    bash -c "lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,MODEL | grep -v 'loop\|snap'" >> $report
    echo -e "    ------- 'lsblk' information continued..." >> $report
    bash -c "lsblk -o NAME,PARTUUID,UUID | grep -v loop" >> $report
    echo -e "${blueback}---------- Video Details:$resetvid"  >> $report
    sudo bash -c "lshw -C video" >> $report
    clear
    echo -e "" >> $report
    echo -e "${blueback}---------- Other Details:$resetvid"  >> $report
    echo -e "The computer boot mode was: $boot_mode" >> $report
    echo -e "The current kernel version is: `uname -r`" >> $report
    echo -e "The current release description is: `lsb_release -sd`" >> $report
    echo -e "" >> $report
    echo -e "The current logged in User is: `who`" >> $report
    echo -e "" >> $report
    echo -e "The User\'s ID is: `id`" >> $report
    echo -e "" >> $report
    echo -e "The current running DE is: $XDG_CURRENT_DESKTOP" >> $report
    echo -e "" >> $report
    echo -e "*** End Of Report ***"  >> $report
    echo -e "" >> $report
    echo -e "The Report can be found at $report, and can be viewed with"
    echo -e ""
    echo -e ""
    less -r $report
    ## Post-Process Report.txt to remove the extraneous characters caused by the 
    #     escape sequenses from the report text...
    sed -i 's/\x1b/\x26/g' $report
    sed -i 's/&\[1;37;44m//g' $report
    sed -i 's/&\[0m//g' $report

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  10. #20
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Inspired

    @MAFoElffen,

    Great progress

    Now it is my turn to suggest improvements from your new and improved version.

    1. You have to remove the ANSI sequences from the output from inxi too, because they affect my 18.04.x system (with default inxi settings), and even if I should and will soon upgrade, I'm sure that several users during several years will continue with 18.04.x.

    I found the following one-liner with perl, see the answer by Mariyan, that should be general enough to work not only with the default colour scheme of inxi, but also other colour settings, that a user might select. If I understand correctly, perl is bundled with Ubuntu and the Ubuntu flavours, so it should be convenient to use. If necessary we can check for it like we do with inxi.

    Code:
    perl -i -pe 's/\x1b\[[0-9;]*[mG]//g' $report
    I have tested, and it works for me; it removes the ANSI sequences not only the Bluebacks but also the output from inxi.

    2. If you wish, you can copy and paste the check for running the whole script as root or with sudo from my version of the script in post #12.

    3. If you wish, you can copy and paste the 'paragraph' showing /etc/fstab, which can be useful, when helping people to add a new static mounted file system. This is also in the script in post #12.

    4. If you wish, you can copy and paste the 'paragraph' showing df -h, which can be useful, when helping people. This is also in the script in post #12.

    5. In order to install inxi in a live or persistent live system we need the repository universe, which is missing in Ubuntu Desktop (but available by default in the other desktop flavours). It should be added in the if-else statement before installing inxi.

    Code:
    sudo add-apt-repository universe


    The following output illustrates what happens to the output from inxi in my 18.04.x LTS. Please notice that there might be other ANSI sequences, if the user has tweaked the colours. (I have truncated the output after the output of inxi.)

    Code:
    $ cat /home/sudodus/Report.txt
    Starting Report: 2021-08-21  09:12:02
    
    ---------- User Input:
    
    Main Complaint: a
    Problem Description:  b
    
    ---------- General computers specs from 'lshw':
    bionic64
        description: Tower Computer
        product: 11369C2 (LENOVO_BI_A3)
        vendor: LENOVO
        version: ThinkStation C30
        serial: S4AKMTV
        width: 64 bits
        capabilities: smbios-2.7 dmi-2.7 smp vsyscall32
        configuration: administrator_password=disabled boot=normal chassis=tower family=To be filled by O.E.M. keyboard_password=enabled power-on_password=disabled sku=LENOVO_BI_A3 uuid=2A86E6F8-3DF1-11E4-9A22-FC4DD43F7924
    
    ---------- General computers specs from 'inxi':
    &[1;34mSystem:   &[0;37m &[1;34mHost:&[0;37m bionic64 &[1;34mKernel:&[0;37m 4.15.0-154-generic x86_64 &[1;34mbits:&[0;37m 64 &[1;34mDesktop:&[0;37m LXDE (Openbox 3.6.1)&[0;37m
    &[1;34m          &[0;37m &[1;34mDistro:&[0;37m Ubuntu 18.04.5 LTS&[0;37m
    &[1;34mMachine:  &[0;37m &[1;34mDevice:&[0;37m desktop &[1;34mSystem:&[0;37m LENOVO &[1;34mproduct:&[0;37m 11369C2 &[1;34mv:&[0;37m ThinkStation C30 &[1;34mserial:&[0;37m S4AKMTV&[0;37m
    &[1;34m          &[0;37m &[1;34mMobo:&[0;37m LENOVO &[1;34mmodel:&[0;37m LENOVO &[1;34mv:&[0;37m SDK0E50510 WIN &[1;34mserial:&[0;37m N/A &[1;34mBIOS:&[0;37m LENOVO &[1;34mv:&[0;37m A3KT64AUS &[1;34mdate:&[0;37m 03/14/2018&[0;37m
    &[1;34mCPU:      &[0;37m &[1;34mQuad core&[0;37m Intel Xeon E5-1620 v2 (-MT-MCP-) &[0;37m&[1;34mcache:&[0;37m 10240 KB&[0;37m
    &[1;34m          &[0;37m &[1;34mclock speeds:&[0;37m &[1;34mmax:&[0;37m 3900 MHz &[1;34m1:&[0;37m 1201 MHz &[1;34m2:&[0;37m 1235 MHz &[1;34m3:&[0;37m 1269 MHz &[1;34m4:&[0;37m 1241 MHz &[1;34m5:&[0;37m 1235 MHz &[1;34m6:&[0;37m 1225 MHz&[0;37m
    &[1;34m          &[0;37m &[1;34m7:&[0;37m 1228 MHz &[1;34m8:&[0;37m 1245 MHz&[0;37m
    &[1;34mMemory:   &[0;37m &[1;34mUsed/Total:&[0;37m 1565.7/32083.8MB&[0;37m
    &[1;34m          &[0;37m &[1;34mArray-1 capacity:&[0;37m 128 GB &[1;34mdevices:&[0;37m 4 &[1;34mEC:&[0;37m Multi-bit ECC&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-1:&[0;37m CPU0_Dimm0 &[1;34msize:&[0;37m 8 GB &[1;34mspeed:&[0;37m 1866 MT/s &[1;34mtype:&[0;37m DDR3&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-2:&[0;37m CPU0_Dimm2 &[1;34msize:&[0;37m 8 GB &[1;34mspeed:&[0;37m 1866 MT/s &[1;34mtype:&[0;37m DDR3&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-3:&[0;37m CPU0_Dimm4 &[1;34msize:&[0;37m 8 GB &[1;34mspeed:&[0;37m 1866 MT/s &[1;34mtype:&[0;37m DDR3&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-4:&[0;37m CPU0_Dimm6 &[1;34msize:&[0;37m 8 GB &[1;34mspeed:&[0;37m 1866 MT/s &[1;34mtype:&[0;37m DDR3&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-5:&[0;37m CPU1_Dimm0 &[1;34msize:&[0;37m No Module Installed &[1;34mtype:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-6:&[0;37m CPU1_Dimm2 &[1;34msize:&[0;37m No Module Installed &[1;34mtype:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-7:&[0;37m CPU1_Dimm4 &[1;34msize:&[0;37m No Module Installed &[1;34mtype:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mDevice-8:&[0;37m CPU1_Dimm6 &[1;34msize:&[0;37m No Module Installed &[1;34mtype:&[0;37m N/A&[0;37m
    &[1;34mGraphics: &[0;37m &[1;34mCard:&[0;37m NVIDIA GK106GL [Quadro K4000]&[0;37m
    &[1;34m          &[0;37m &[1;34mDisplay Server:&[0;37m X.Org 1.19.6 &[1;34mdrivers:&[0;37m nouveau (unloaded: modesetting,fbdev,vesa)&[0;37m
    &[1;34m          &[0;37m &[1;34mResolution:&[0;37m 3840x2160@30.00hz&[0;37m
    &[1;34m          &[0;37m &[1;34mOpenGL: renderer:&[0;37m NVE6 &[1;34mversion:&[0;37m 4.3 Mesa 20.0.8&[0;37m
    &[1;34mNetwork:  &[0;37m &[1;34mCard:&[0;37m Intel 82579LM Gigabit Network Connection (Lewisville) &[1;34mdriver:&[0;37m e1000e&[0;37m
    &[1;34m          &[0;37m &[1;34mIF:&[0;37m eno1 &[1;34mstate:&[0;37m up &[1;34mspeed:&[0;37m 1000 Mbps &[1;34mduplex:&[0;37m full &[1;34mmac:&[0;37m aa:bb:cc:dd:ee:ff&[0;37m
    &[1;34m          &[0;37m &[1;34mWAN IP:&[0;37m 11.222.33.444&[0;37m
    &[1;34m          &[0;37m &[1;34mIF:&[0;37m virbr0-nic &[1;34mip-v4:&[0;37m N/A &[1;34mip-v6-link:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mIF:&[0;37m eno1 &[1;34mip-v4:&[0;37m 192.168.0.2 &[1;34mip-v6-link:&[0;37m fe80::602:7e65:567e:ef32&[0;37m
    &[1;34m          &[0;37m &[1;34mIF:&[0;37m virbr0 &[1;34mip-v4:&[0;37m 192.168.122.1 &[1;34mip-v6-link:&[0;37m N/A&[0;37m
    &[1;34mDrives:   &[0;37m &[1;34mHDD Total Size:&[0;37m 4506.9GB (24.3% used)&[0;37m
    &[1;34m          &[0;37m &[1;34mID-1:&[0;37m /dev/nvme0n1 &[1;34mmodel:&[0;37m KINGSTON_SA2000M8250G &[1;34msize:&[0;37m 250.1GB&[0;37m
    &[1;34m          &[0;37m &[1;34mID-2:&[0;37m /dev/sda &[1;34mmodel:&[0;37m SanDisk_SD6SB1M2 &[1;34msize:&[0;37m 256.1GB&[0;37m
    &[1;34m          &[0;37m &[1;34mID-3:&[0;37m /dev/sdb &[1;34mmodel:&[0;37m WDC_WD4002FYYZ &[1;34msize:&[0;37m 4000.8GB&[0;37m
    &[1;34mPartition:&[0;37m &[1;34mID-1:&[0;37m / &[1;34msize:&[0;37m 88G &[1;34mused:&[0;37m 31G (37%) &[1;34mfs:&[0;37m ext4 &[1;34mdev:&[0;37m /dev/sda5&[0;37m
    &[1;34m          &[0;37m &[1;34mID-2:&[0;37m /media/multimed-2 &[1;34msize:&[0;37m 3.5T &[1;34mused:&[0;37m 981G (30%) &[1;34mfs:&[0;37m ext4 &[1;34mdev:&[0;37m /dev/sdb7&[0;37m
    &[1;34m          &[0;37m &[1;34mID-3:&[0;37m swap-1 &[1;34msize:&[0;37m 8.59GB &[1;34mused:&[0;37m 0.00GB (0%) &[1;34mfs:&[0;37m swap &[1;34mdev:&[0;37m /dev/sda6&[0;37m
    &[1;34mUnmounted:&[0;37m &[1;34mID-1:&[0;37m /dev/nvme0n1 &[1;34msize:&[0;37m 250.06G &[1;34mlabel:&[0;37m N/A &[1;34muuid:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mID-2:&[0;37m /dev/nvme0n1p1 &[1;34msize:&[0;37m 250.06G &[1;34mfs:&[0;37m ext4&[0;37m
    &[1;34m          &[0;37m &[1;34mlabel:&[0;37m nvme-focal &[1;34muuid:&[0;37m f136af84-4c80-43ed-a2fb-0aa0251650c4&[0;37m
    &[1;34m          &[0;37m &[1;34mID-3:&[0;37m /dev/nvme0n1p2 &[1;34msize:&[0;37m 0.00G &[1;34mlabel:&[0;37m N/A &[1;34muuid:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mID-4:&[0;37m /dev/sda1 &[1;34msize:&[0;37m 0.52G &[1;34mfs:&[0;37m NTFS &[1;34mlabel:&[0;37m System &[1;34muuid:&[0;37m D4B6FE65B6FE478E&[0;37m
    &[1;34m          &[0;37m &[1;34mID-5:&[0;37m /dev/sda2 &[1;34msize:&[0;37m 149.63G &[1;34mfs:&[0;37m NTFS &[1;34mlabel:&[0;37m Windows &[1;34muuid:&[0;37m 9847001B46FFF7B8&[0;37m
    &[1;34m          &[0;37m &[1;34mID-6:&[0;37m /dev/sda3 &[1;34msize:&[0;37m 1.05G &[1;34mfs:&[0;37m NTFS &[1;34mlabel:&[0;37m Recovery &[1;34muuid:&[0;37m 2E26009026005B6B&[0;37m
    &[1;34m          &[0;37m &[1;34mID-7:&[0;37m /dev/sdb1 &[1;34msize:&[0;37m 0.53G &[1;34mfs:&[0;37m ext4&[0;37m
    &[1;34m          &[0;37m &[1;34mlabel:&[0;37m boot-nvme-focal &[1;34muuid:&[0;37m aba4300c-6b30-4856-a737-2c8725c228f1&[0;37m
    &[1;34m          &[0;37m &[1;34mID-8:&[0;37m /dev/sdb2 &[1;34msize:&[0;37m 32.21G &[1;34mfs:&[0;37m ext4 &[1;34mlabel:&[0;37m xubufocal-hdd &[1;34muuid:&[0;37m cdff8724-3afb-45eb-b3d0-a2cd8ba75d75&[0;37m
    &[1;34m          &[0;37m &[1;34mID-9:&[0;37m /dev/sdb5 &[1;34msize:&[0;37m 0.00G &[1;34mlabel:&[0;37m N/A &[1;34muuid:&[0;37m N/A&[0;37m
    &[1;34m          &[0;37m &[1;34mID-10:&[0;37m /dev/sdb6 &[1;34msize:&[0;37m 107.37G &[1;34mfs:&[0;37m ext4 &[1;34mlabel:&[0;37m studio12.04 &[1;34muuid:&[0;37m 44156f43-0958-4ea1-800d-b02afbc7d306&[0;37m
    &[1;34m          &[0;37m &[1;34mID-11:&[0;37m /dev/sdb8 &[1;34msize:&[0;37m 5.37G &[1;34mfs:&[0;37m swap &[1;34mlabel:&[0;37m N/A &[1;34muuid:&[0;37m 6958d86a-57a9-4e40-8376-1e41258e5810&[0;37m
    &[1;34mRepos:    &[0;37m &[1;34mActive apt sources in file:&[0;37m /etc/apt/sources.list&[0;37m
    &[1;34m          &[0;37m deb http://se.archive.ubuntu.com/ubuntu/ bionic main restricted&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://se.archive.ubuntu.com/ubuntu/ bionic-updates main restricted&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://se.archive.ubuntu.com/ubuntu/ bionic universe&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://se.archive.ubuntu.com/ubuntu/ bionic-updates universe&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://se.archive.ubuntu.com/ubuntu/ bionic multiverse&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://se.archive.ubuntu.com/ubuntu/ bionic-updates multiverse&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://se.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://security.ubuntu.com/ubuntu bionic-security main restricted&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://security.ubuntu.com/ubuntu bionic-security universe&[0;37m
    &[1;34m          &[0;37m &[0;37mdeb http://security.ubuntu.com/ubuntu bionic-security multiverse&[0;37m
    &[1;34m          &[0;37m &[1;34mActive apt sources in file:&[0;37m /etc/apt/sources.list.d/gezakovacs-ubuntu-ppa-bionic.list&[0;37m
    &[1;34m          &[0;37m deb http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic main&[0;37m
    
    
    ---------- Additional Disk/Partition Information:
    ...
    Edit: Tested successfully with my tweaks in Lubuntu 18.04.x, Ubuntu desktop 20.04.x (installed and live), Ubuntu server 20.04.3 RC
    Last edited by sudodus; August 23rd, 2021 at 09:20 AM. Reason: tested in Lubuntu 18.04.x, Ubuntu desktop 20.04.x, Ubuntu server 20.04.3 RC

Page 2 of 98 FirstFirst 12341252 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •