Welcome to the Linux Foundation Forum!

Ubuntu 18.04 LTS

Options

Hi, I hope there are no stupid questions I can ask here.
Is there a link to install Ubuntu 18.04 LTS on a windows 10 machine? I know it will be a VM.

Ubuntu 18.04 LTS is the recommended operating system for this course. Ubuntu environments can be run in an Ubuntu desktop OS natively installed, or in a virtual machine (VM). Popular options for VMs include IBM Cloud's Virtual Server, VirtualBox, AWS EC2, and Vagrant. It is strongly recommended to use a fresh installation of Ubuntu 18.04 for this course.

It is safe to allocate at a very minimum 30 GB of disk space towards using Hyperledger Fabric in a development environment (close to 7 GB will account for just running Docker containers). To ensure the containers do not slow down and cause the environment to hang, it is best to allocate at least 4 GB of RAM towards use with this course. Lastly, your CPU should be at least dual core or higher.

Answers

  • Bobbijn
    Bobbijn Posts: 192
    edited May 2023
    Options

    @randymor Hello! There are no stupid questions, so feel free to ask anything you need help with. To install Ubuntu 18.04 LTS on a Windows 10 machine using VirtualBox, follow the steps below:

    Download and install VirtualBox from the official website: https://www.virtualbox.org/wiki/Downloads

    Download the Ubuntu 18.04 LTS ISO file from the Ubuntu website: https://releases.ubuntu.com/18.04/

    Open VirtualBox and click on "New" to create a new virtual machine.

    Name your virtual machine, select "Linux" as the Type, and choose "Ubuntu (64-bit)" as the Version. Click "Next."

    Allocate the recommended amount of RAM (at least 4 GB) to your virtual machine by adjusting the slider or entering a value. Click "Next."

    Choose "Create a virtual hard disk now" and click "Create."

    Select "VDI (VirtualBox Disk Image)" as the hard disk file type and click "Next."

    Choose "Dynamically allocated" for storage on the physical hard disk and click "Next."

    Allocate at least 30 GB of disk space for the virtual hard disk file. You can adjust the slider or enter a value. Click "Create" to finish setting up the virtual machine.

    With your newly created virtual machine selected, click "Settings," go to the "System" tab, and make sure your CPU is set to at least 2 cores.

    Go to the "Storage" tab, click on the "Empty" CD icon under the "Controller: IDE" section, and click on the CD icon on the right. Choose "Choose/Create a Disk Image" and locate the Ubuntu 18.04 LTS ISO file you downloaded earlier. Click "OK" to save your settings.

    Start your virtual machine by clicking "Start." The Ubuntu installation process will begin. Follow the on-screen instructions to complete the installation.

    Once you've installed Ubuntu 18.04 LTS in your virtual machine, you can proceed with the LFS272 lab instructions. Make sure your virtual machine meets the minimum requirements mentioned in your question (at least 30 GB of disk space, 4 GB of RAM, and a dual-core or higher CPU) for optimal performance during the course.

    Good luck with your course, and don't hesitate to ask if you have any more questions! Bobbi

  • randymor
    randymor Posts: 34
    Options

    Hi Bobbi, thanks so much for instructions and your patience. cheers, Randy

  • randymor
    randymor Posts: 34
    Options

    Hi Bobbi, I Got the Oracle VM box to installed and running.
    I create a Virtual Machine Name and Operating System called "TFIS" per your instructions and hit start. A new window pops up for just a second then disappears.
    In the Left-hand frame of Oracle VM Box manager is says "TFIS aborted"
    Attached is jpg of Oracle VM Box and error.
    I'm sure it's user error on my part.

    Any help would be appreciated. Thanks

  • randymor
    randymor Posts: 34
    Options

    Hi,
    To install Oracle VirtualBox-7.0.6-155176-Win.exe
    it required I install MS VC Redistributable Here is version I installed.
    Visual C++ Redistributable for Visual Studio 2022 (version 17.5)

    Here is version I installed
    installed ubuntu-18.04.6-desktop-amd64.exe

    Attached is picture of device being used.

    any help is appreciated, thanks

    Instructions I followed.
    Is there a link to install Ubuntu 18.04 LTS on a windows 10 machine? I know it will be a VM.

    Ubuntu 18.04 LTS is the recommended operating system for this course. Ubuntu environments can be run in an Ubuntu desktop OS natively installed, or in a virtual machine (VM). Popular options for VMs include IBM Cloud's Virtual Server, VirtualBox, AWS EC2, and Vagrant. It is strongly recommended to use a fresh installation of Ubuntu 18.04 for this course.

    It is safe to allocate at a very minimum 30 GB of disk space towards using Hyperledger Fabric in a development environment (close to 7 GB will account for just running Docker containers). To ensure the containers do not slow down and cause the environment to hang, it is best to allocate at least 4 GB of RAM towards use with this course. Lastly, your CPU should be at least dual core or higher.

  • randymor
    randymor Posts: 34
    Options

  • randymor
    randymor Posts: 34
    Options

    Installed Oracle VM Box
    VirtualBox-7.0.6-155176-Win.exe

  • randymor
    randymor Posts: 34
    Options

    OS the machine is running

    Edition Windows 10 Pro
    Version 22H2
    Installed on ‎5/‎30/‎2021
    OS build 19045.2728
    Experience Windows Feature Experience Pack 120.2212.4190.0

  • randymor
    randymor Posts: 34
    Options

    Error log from Oracle VM Box

    00:00:05.748266
    00:00:05.748267 [/USB/HidMouse/] (level 2)
    00:00:05.748267
    00:00:05.748268 [/USB/HidMouse/0/] (level 3)
    00:00:05.748268
    00:00:05.748268 [/USB/HidMouse/0/Config/] (level 4)
    00:00:05.748269 Mode = "absolute" (cb=9)
    00:00:05.748270
    00:00:05.748270 [/USB/HidMouse/0/LUN#0/] (level 4)
    00:00:05.748271 Driver = "MouseQueue" (cb=11)
    00:00:05.748271
    00:00:05.748272 [/USB/HidMouse/0/LUN#0/AttachedDriver/] (level 5)
    00:00:05.748272 Driver = "MainMouse" (cb=10)
    00:00:05.748273
    00:00:05.748273 [/USB/HidMouse/0/LUN#0/Config/] (level 5)
    00:00:05.748274 QueueSize = 0x0000000000000080 (128, 128 B)
    00:00:05.748275
    00:00:05.748275 [/USB/USBProxy/] (level 2)
    00:00:05.748276
    00:00:05.748276 [/USB/USBProxy/GlobalConfig/] (level 3)
    00:00:05.748277
    00:00:05.748277 ********************* End of CFGM dump **********************
    00:00:05.748388 HM: HMR3Init: Attempting fall back to NEM: VT-x is disabled in the BIOS for all CPU modes
    00:00:05.748662 VMSetError: F:\tinderbox\win-rel\src\VBox\VMM\VMMR3\NEMR3Native-win.cpp(1402) int __cdecl nemR3NativeInit(struct VM *,bool,bool); rc=VERR_NEM_NOT_AVAILABLE
    00:00:05.748674 VMSetError: Not in a hypervisor partition (HVP=0)
    00:00:05.748699 NEM: NEMR3Init: Native init failed: VERR_NEM_NOT_AVAILABLE.
    00:00:05.748706 VMSetError: F:\tinderbox\win-rel\src\VBox\VMM\VMMR3\HM.cpp(677) int __cdecl HMR3Init(struct VM *); rc=VERR_VMX_MSR_ALL_VMX_DISABLED
    00:00:05.748708 VMSetError: VT-x is disabled in the BIOS for all CPU modes
    00:00:05.875102 ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={6ac83d89-6ee7-4e33-8ae6-b257b2e81be8} aComponent={ConsoleWrap} aText={Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE).
    00:00:05.875119 VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)}, preserve=false aResultDetail=-4028
    00:00:05.875321 Console: Machine state changed to 'PoweredOff'
    00:00:05.976083 Power up failed (vrc=VERR_VMX_MSR_ALL_VMX_DISABLED, rc=E_FAIL (0X80004005))
    00:00:05.980970 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 800x600
    00:00:05.981086 ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={The console is not powered up (Display::setVideoModeHint)}, preserve=false aResultDetail=0
    00:00:05.981923 GUI: Aborting startup due to power up progress issue detected...
    00:00:06.019767 GUI: UICommon: Handling aboutToQuit request..
    00:00:06.403951 GUI: UICommon: aboutToQuit request handled!

  • randymor
    randymor Posts: 34
    Options

    attached log file from Oracle VM Box

  • randymor
    randymor Posts: 34
    Options

    Reload loaded TFIS VM in Oracle VM Box and got the log file above

  • Bobbijn
    Bobbijn Posts: 192
    Options

    Hello @Randymor,

    Thank you for providing all the details of your installation process. From your error log, it seems that your CPU does not support hardware virtualization or it is not enabled in your BIOS settings. This is required for running a 64-bit guest operating system on a virtual machine.

    To check if hardware virtualization is enabled on your computer, you can follow these steps:

    Restart your computer and enter the BIOS settings by pressing a key such as F2 or Delete during startup.

    Look for an option such as "Virtualization Technology" or "VT-x" and make sure it is enabled.

    Save your changes and exit the BIOS settings.

    After enabling hardware virtualization, you can try starting your virtual machine again. If you still encounter issues, you may want to try using a different virtualization software such as VMware or Hyper-V, as they may work better with your hardware.

    I hope this helps, let me know if you have any further questions.

    Best regards,
    Bobbijn

  • randymor
    randymor Posts: 34
    Options

    Hi Bobbi,
    I'm an experienced programmer and I'm lost getting this setup.
    I've got the virtual machine running. I'm I running these commands from inside the virtual machine or windows shell cmd as administrator?

    How do I bring start cmd shell in the Ubuntu system?

    Is there test virtual machine running in the cloud with all this installed that we can connect to?
    This seems crazy every student has to install the Ubuntu virtual machine.
    Then install all this other parts.
    Below are the instructions I tried to cut and paste unfortunately the formatting.

    Thank you for you patience and help. Randy

    System PrerequisitesPlease see the ​Course Audience and Requirements​ and the ​Course Resources​ pages in theintroductory chapter.
    Once you have an Ubuntu 18.04 LTS system ​and​ have downloaded the resources file(​lfs272-assets.tgz​) for this course, you can proceed to the next steps.
    Install cURLFirst, let’s update our package list and install any newer versions
    using ​apt​:sudo apt updatesudo apt -y upgrade
    Since we are running Ubuntu 18.04, we should already have ​cURL​ installed.
    You can still runthe following ​apt ​command to install it on your Ubuntu 18.04 system
    (running the following
    command won’t cause any issues if cURL is already installed):_________________________________________________________________________________________________________Copyright, The Linux Foundation 2020. All rights reserved.
    LFS272_V11.19.2020_________________________________________________________________________________________________________sudo apt install curlInstall GitJust like cURL, since we are running Ubuntu 18.04, we should already have Git installed. Youcan still run the following command:sudo apt install gitInstall PythonLet’s now install Python using the following ​apt​ command:sudo apt install -y python-minimalInstall DockerBefore moving on, let’s update our package list one more time:sudo apt updatesudo apt upgradeWe will now use ​apt​ to install a few packages Docker is dependent upon:sudo apt install apt-transport-https ca-certificates gnupg-agentsoftware-properties-commonNow we need to curl down our gpg key:curl -fsSL ​https://download.docker.com/linux/ubuntu/gpg​ | sudo apt-keyadd -Next, let’s add the Docker repository (stable version):sudo add-apt-repository "deb [arch=amd64]https://download.docker.com/linux/ubuntu​ $(lsb_release -cs) stable"Once more, let’s update our package list:sudo apt update_______________________________________________________________________________________

  • randymor
    randymor Posts: 34
    Options

    HI Bobbi, So ALT+CTL+T starts shell in ubuntu VM.

    Picture of error I'm getting trying to run cmd
    sudo apt update

    "vboxuser is not in sudoers file. This incident will be reported."

    the vboxuser is userid in ubuntu shell. Why does it keep asking me to type in the password for vboxuser to run command prompt?

    attached is png of error in ubuntu shell.

    Thanks Randy

  • Bobbijn
    Bobbijn Posts: 192
    Options

    Hi Randy,

    You'll be running these commands inside the virtual machine (VM), not in the Windows shell cmd. I see you are using Ctrl + Alt + T to open a new terminal window.

    I understand that setting up a VM and installing all the necessary components can be time-consuming. However, it's a valuable learning experience as it helps you become familiar with the Ubuntu environment and the tools you'll be working with throughout the course.

    The course depends on properly installing the operating system and the dependencies. The way the lab is set up, the command shouldn't be cut and pasted but rather typed in with careful attention to formatting.

    The error message you're encountering indicates that the current user (vboxuser) does not have the necessary privileges to execute sudo commands. Some possible reasons for the error is
    The user 'vboxuser' is not part of the 'sudo' group, If the 'vboxuser' is part of the 'sudo' group but still can't use sudo, the sudoers file might not be correctly configured, or the password is incorrect. Please check for these possible situations.

    Once this is resolved, we can move on to installing the dependencies!

    Bobbi

  • randymor
    randymor Posts: 34
    Options

    Hi Bobbi, How do make 'vboxuser' (default user name ubuntu gave me) part of the sudo group. Password is correct as ubuntu logs me out after non usage. I try and run this commandt.
    usermod -aG sudo vbox

    Get error
    usermod:permission denied

    do I need to create a new account ?

    ssh root@server_ip_address
    adduser username
    usermod -aG sudo username

    sudo ls -l /root

    thanks!!!

  • Bobbijn
    Bobbijn Posts: 192
    edited May 2023
    Options

    Randy,

    Hello, and I hope you are okay. This forum answers questions about the lab exercises and assumes your system is working. I did a little research for you and found these directions that might help you get started:

    If you want to add the 'vboxuser' to the sudo group, you'll need to have root access or access to another account that is already a part of the sudo group. Here are the steps you can follow:

    Open a terminal window.

    If you have root access, type su and hit Enter. You'll be asked for the root password. Enter it, and you'll be switched to the root user. If you do not have root access but have access to another account in the sudo group, type sudo -i and enter the password for your current account.

    Once you are operating as root or another sudoer, type the following command and hit Enter:

    usermod -aG sudo vboxuser

    This command adds 'vboxuser' to the sudo group. The -aG option stands for 'append' (or add) to 'group'.
    After running this command, you'll need to log out and log back in for the changes to take effect. You can do this by closing the terminal, logging out of your session, and logging back in, or by typing exit to leave the root/sudo session and then su vboxuser to log in as vboxuser.

    To verify that 'vboxuser' is now part of the sudo group, you can use the following command:

    groups

    This should display a list of groups that 'vboxuser' is a part of, which should now include 'sudo'.

    I hope this helps get you started. Bobbi

  • randymor
    randymor Posts: 34
    Options

    Hi Bobbi,
    Thanks for doing that research. I typed in 'su' and I got asked for a password which was the same password I gave the default user 'vboxuser'.
    that signed me on as su. then I entered
    usermod -aG sudo vboxuser

    and was added to root group

    I still don't understand why the Linuxfoundation doesn't provide VM in the cloud for these classes.
    I've been writing smart contracts for Ethereum and the VM installs easily, and a test ledger is provided.

    Thank you so much for your help, Randy

  • randymor
    randymor Posts: 34
    Options

    HI Bobbi
    Next, let’s add the Docker repository (stable version)
    :sudo add-apt-repository "deb [arch=amd64]https://download.docker.com/linux/ubuntu​ $(lsb_release -cs) stable"

    error: does not have a Release file

    What am I missing. I feel lost???

    any help would be appreciated.

    Also any time I sign out of the terminal have to make vboxuser a root user again.
    should I just sign on as 'su' and be running all these commands as the 'su'?

  • randymor
    randymor Posts: 34
    Options

  • Bobbijn
    Bobbijn Posts: 192
    Options

    I understand that encountering errors while trying to install Docker for the fabric course can be frustrating and make you feel lost. However, don't worry! Troubleshooting technical issues is a normal part of the learning process, and with some perseverance, you'll be able to overcome these challenges.

    Remember that seeking help and asking questions is a great approach. You've taken the right step by reaching out for assistance.

    It appears that there is an issue with adding the Docker repository on Ubuntu. The error message "does not have a Release file" usually occurs when the repository URL is incorrect or when the system is unable to connect to the repository.

    To resolve this issue, you can try the following steps:

    Make sure the command is typed correctly: The command you provided seems to have an extra space before "$(lsb_release -cs)". Command should be
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    Some other suggestions are:
    Check your internet connection: Ensure that the machine has a working internet connection, as the command requires access to the Docker repository to download the necessary files.

    Check Docker repository URL: Verify that the Docker repository URL is correct and accessible. You can try opening the repository URL in a web browser to see if it loads properly.

    Regarding the issue with vboxuser, it is not recommended to run all commands as the 'su' (superuser) since it can be risky.

    Stay determined, keep learning, and you'll soon find a resolution to the Docker installation issue.
    Bobbi

  • randymor
    randymor Posts: 34
    Options

    Hi Bobbi,
    This command works as you can see by attached file.
    curl -fsSL ​https://download.docker.com/linux/ubuntu/gpg​ | sudo apt-key add -

    Yes I have internet connection to site by attached file.

    I'm sure I have command typed right now.

    Attached picture of command. I'm mad at myself.

    am I still typing command wrong?

    Thank you Randy

  • randymor
    randymor Posts: 34
    Options

  • randymor
    randymor Posts: 34
    Options

  • randymor
    randymor Posts: 34
    Options

  • randymor
    randymor Posts: 34
    Options

    Bobbi I don't understand how these files have errors in them. This class and this setup should work. Do you have an idea who I should complain to about this?

    Typing

    sudo -H gedit /etc/apt/sources.list

    this in a terminal and hitting Enter will do the job.

    This can sometimes be a very easy fix, but you must backup sources.list first since it's a critical file.

    Open the terminal with Ctrl+Alt+T.
    Type/paste: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
    (this creates a backup copy)
    sudo sed -i -e '68d' /etc/apt/sources.list
    (this deletes the problematic line)
    sudo apt-get update
    (this updates the database with the hopefully-fixed file)

    It didn't fix my problem. arrggg....

Categories

Upcoming Training