FedoraForum.org - Fedora Support Forums and Community
Page 4 of 7 FirstFirst ... 2 3 4 5 6 ... LastLast
Results 46 to 60 of 96
  1. #46
    Join Date
    Jan 2011
    Posts
    186

    Re: Oracle VirtualBox installation script

    glennzo,

    Updated script has failed for the 1st time.
    While running it produces a long list of "format" errors and ends with the following:



    Installing Oracle VirtualBox extension pack.
    ./InstallVBox.sh: line 162: VBoxManage: command not found
    Oracle VirtualBox is now installed.
    Script run complete.
    While it states installation is complete, it actually is not. No icon installed and cannot find any new files.

    I am running F22_64 workstation (gnome 3)
    Any suggestions?
    Last edited by zuser; 22nd September 2015 at 10:58 PM. Reason: spelling

  2. #47
    Join Date
    Oct 2015
    Location
    Australia
    Posts
    2

    Re: Oracle VirtualBox installation script

    OK, so im new to different operating systems. New to coding,,,, just a basic newb. Ive spent the last two days installing Fedora 22 on Virtualbox host windows 7. Everytime it installs and reboots, it reboots to the installation screen again. It just wont start up. Hopefully this problem can be fixed by noone of that stuff up there ^^^^^^^^ and its something simple i can change in settings. Ive literally fumbled through it to this point using youtube vids and scanning forums. Plese dont write me off i really want to know what im doing, im a quick learner and just need a little help.

  3. #48
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    Quote Originally Posted by zuser
    glennzo,

    Updated script has failed for the 1st time.
    While running it produces a long list of "format" errors and ends with the following:





    While it states installation is complete, it actually is not. No icon installed and cannot find any new files.

    I am running F22_64 workstation (gnome 3)
    Any suggestions?
    Sorry, didn't see this post until just now. Have you tried the script in the last few days? I believe the errror(s) were caused by a version mismatch type of issue. The Oracle web page that I pull latest version info from was not updated at the same time VirtualBox was, so for several days it was at 5.0.2 when everything VirtualBox was at 5.0.4. The script has worked well for me once the versioning info was updated on Oracle's end.
    Glenn
    The Bassinator

  4. #49
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    In the menu, go to Settings>System and move "Hard Disk" to the top of the list. I'm guessing that Optical is currently at the top, hence the constant attempt to install the OS.

    Glenn
    The Bassinator

  5. #50
    Join Date
    Oct 2015
    Location
    Australia
    Posts
    2

    Talking Re: Oracle VirtualBox installation script

    Quote Originally Posted by glennzo
    In the menu, go to Settings>System and move "Hard Disk" to the top of the list. I'm guessing that Optical is currently at the top, hence the constant attempt to install the OS.

    Bloody Legend mate! Knew it was something simple

  6. #51
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    New numbers, new version... Still seems to be working really well for Fedora 22/23.

    PHP Code:
    #!/bin/bash
    # 22_oracle_virtualbox.sh

    # Glenn A. Johnson
    # Started January 18, 2015
    # Updated October 4, 2015

    # A tip of the fedora to Fedora Forum members Sea, Skull One, marko, Dangermouse
    # for help with code

    << COMMENT
     
    Install and configure the Oracle version of VirtualBox for Fedora 22 only.
     * 
    Install the Oracle VirtualBox Extension Pack.
     * 
    Handle all platformsi686PAE and x86_64 .
     * 
    Clean up when finished.
     * 
    Remove previously installed VirtualBox.
     * 
    Support color no color (sudo NOCOLOR=1 22_oracle_virtualbox.sh)
    COMMENT

    # 10.04.15 - Constantly updating the current VirtualBox versioning numbers.
    # 09.13.15 - Adding Fedora 23 to the mix, I think...
    # 09.12.15 - Constantly changing VirtualBox versions
    # 07.22.15 - Decided to support only the current release of Fedora
    # 07.19.15 - No longer need YUM since we're Fedora 21 and later.
    # 07.19.15 - Got me a couple errors to deal with ...
    # 07.09.15 - Fedora 21 and 22 only. No more Fedora 20.
    # 07.09.15 - Version 5.0 ??
    # 06.08.18 - Working with the Fedora 22 rpm
    # 06.07.17 - Huh?
    # 05.14.15 - Add feature to import and install the Oracle public key
    # 05.14.15 - Update VirtualBox version to 4.3.28
    # 05.12.15 - Test run under Fedora 22 Beta. 
    # 04.26.15 - Can I add an uninstall (safely) feature?
    # 04.26.15 - Testing... 1,2,3
    # 03.26.15 - Cosmetic changes and version update
    # 03.15.15 - Tested under Fedora 22 Workstation Alpha (x86_64).
    # 03.14.15 - New VirtualBox version
    # 02.25.15 - Betterer code to discover kernel arch.
    # 02.23.15 - New code to discover kernel arch
    # 02.22.15 - Seems that kernel arch discovery is not working.
    # 02.21.15 - New version of VirtualBox

    << COMMENT
    Additional packages needed 
    for a successful install of VirtualBox over the different platformsx86_64i686 and i686+PAE include
    kernel-devel-$(uname -r), gccqtqt-x11libpng15libXmulibXtlibvpxdkms, and SDL
    COMMENT

    # Determine OS platform and install correct packages.
    # PAE or no?
    GETVERS=$(uname -grep "PAE")
    if [[ 
    $GETVERS ]] ; then
        PACKFILES
    ="kernel-PAE-devel gcc qt qt-x11 libpng15 libXmu libXt libvpx dkms SDL"
    else
        
    PACKFILES="kernel-devel-$(uname -r) gcc qt qt-x11 libpng15 libXmu libXt libvpx dkms SDL"
    fi

    # Determine the current version of VirtualBox
    curl -Os [url]http://download.virtualbox.org/virtualbox/LATEST.TXT[/url]
    current_version=$(cat LATEST.TXT)
    echo 
    $current_version
    rm LATEST
    .TXT

    # We can easily make changes to the source file versions by changing a few variables below.
    # Most recent is [url]http://download.virtualbox.org/virtualbox/5.0.0/VirtualBox-5.0-5.0.0_102096_fedora22-1.x86_64.rpm[/url]
    # [url]http://download.virtualbox.org/virtualbox/5.0.6/VirtualBox-5.0-5.0.6_103037_fedora22-1.x86_64.rpm[/url]

    VB_REL_VER="5.0-"$current_version"_103037"
    VB_EXT_VER="$current_version"-103037
    VB_REL_DIST
    ="fedora22-1"
    VBOX_SRC_FILE="VirtualBox-${VB_REL_VER}_${VB_REL_DIST}."`uname -m`".rpm" 
    VBOX_EXT_SRC="Oracle_VM_VirtualBox_Extension_Pack-${VB_EXT_VER}.vbox-extpack"
    SRC_PATH="http://download.virtualbox.org/virtualbox/$current_version"
    PUB_KEY="oracle_vbox.asc"

    # Color definitions; the variables are null if the option NOCOLOR is set.
    # Thanks Skull One!

    if [ -"$NOCOLOR]; then
        OKB
    =$(tput bold;tput setaf 6)
        
    OK=$(tput setaf 6)
        
    ERRB=$(tput bold;tput setaf 1)
        
    ERR=$(tput setaf 1)
        
    RST=$(tput sgr0)
    else
        
    OKB=
        
    OK=
        
    ERRB=
        
    ERR=
        
    RST=
    fi

    # Need elevated permissions at some point, might as well do it now.
    if [[ $EUID -ne 0 ]] ; then
        clear
           printf $OK
    "You're going to need elevated permissions at some point. Let's get that out of the way now.\nUse \"sudo\" or \"su -c\"\n"$RST
           
    exit 0
    fi

    # Release 22 or later
    function get_release()
    {
        
    printf $OK"Checking Fedora release version... "$RST
        RELNUM
    =$(rpm -qa --queryformat '%{version}\n' fedora-release)
        if [[ 
    $RELNUM -lt "22" ]] ; then
            clear
            printf $ERR
    "This script is for Fedora release 22 or later.\n"$RST
               
    exit 0
        
    else printf $OK"Fedora $RELNUM $OKB✓"$RST
    fi
    echo
    }

    # Clear screen and print a headline.
    function headline()
    {
        
    clear
        printf $OK
    "==>$OKB VirtualBox installation script for Fedora 22.\n"$RST
        printf $OK
    "==>$OKB Oracle VirtualBox and Oracle VirtualBox Extension Pack will be installed.\n"$RST
        printf $OK
    "==>$OKB VirtualBox release $VB_REL_VER\n"$RST
    }

    # Remove Oracle VirtualBox source files if they exist in the current working directory.
    function remove_source()
    {
        for 
    i in $VBOX_SRC_FILE $VBOX_EXT_SRC $PUB_KEY; do
            
    rm -f $i
        done
    }

    # Remove any installed version of VirtualBox.
    function remove_fed_vbox()
    {
    VBOX_INSTALLED=$(rpm -qa grep VirtualBox)
    if [[ 
    $VBOX_INSTALLED ]] ; then
        printf $OK
    "Removing previously installed instance of VirtualBox. Please wait..."$RST
        dnf 
    --q erase $VBOX_INSTALLED 2>/dev/null
        printf $OKB
    " ✓\n\n"$RST
    fi
    }

    # Download and import the Oracle public key.
    function get_public_key()
    {
    printf $OK"Installing the Oracle public key.\n"$RST
    curl 
    -Os https://www.virtualbox.org/download/$PUB_KEY
    rpm --import $PUB_KEY
    }

    # Install Oracle VirtualBox from the downloaded source RPM.
    function install_source()
    {
        if [[ -
    f $VBOX_SRC_FILE ]] ; then
            printf $OK
    "Installing Oracle VirtualBox\n"$RST
            rpm 
    -Uvh $VBOX_SRC_FILE
        
    else
            
    printf $ERR"The source file missing.\nThere was an error downloading the file.\n"$RST
            
    exit 0
        fi
    }

    # Install the Oracle VirtualBox Extension Pack.
    function install_extpack()
    {
        if [[ -
    f $VBOX_EXT_SRC ]] ; then
            
    echo $OK"Installing Oracle VirtualBox extension pack."$RST
            VBoxManage extpack install 
    --replace $VBOX_EXT_SRC
        
    else
            
    printf $ERR"Oracle VirtualBox extension pack source file missing!\n"$RST
        fi
    }

    # Get any Fedora packages typically needed to complete the VirtualBox installation without errors.
    function get_packages()
    {
    printf $OK"Checking for necessary packages..."$RST
    echo
    NEWPKGS=""
    for i in $PACKFILES ; do
        
    printf $OK"==> $i: "
           
    rpm -q $i > /dev/null
        
    if [ $? -eq 0 ] ; then
            printf $OKB
    "✓\n"$RST
        
    else
            
    printf $ERR"✗\n"$RST
            NEWPKGS
    ="${NEWPKGS} $i"
        
    fi
    done
    if [ -"${NEWPKGS}]; then
        
    echo --n $OK"==> Installing necessary packages$OKB "${NEWPKGS}"... "$RST
        dnf 
    --q install ${NEWPKGS2>/dev/null
           
    echo -e $OKB"\nDone installing packages.\n"$RST
    else
           
    printf $OK"==>$OKB Nothing new to install.\n"$RST
    fi
    }

    # Test retrieval of any Fedora packages typically needed to complete the VirtualBox installation without errors.
    function test_get_packages()
    {
    printf $OK"Checking for necessary packages..."$RST
    echo
    NEWPKGS=""
    for i in $PACKFILES ; do
        
    printf $OK"==> $i: "
           
    rpm -q $i > /dev/null
        
    if [ $? -eq 0 ] ; then
            printf $OKB
    "✓\n"$RST
        
    else
            
    printf $ERR"✗\n"$RST
            NEWPKGS
    ="${NEWPKGS} $i"
        
    fi
    done
    if [ -"${NEWPKGS}]; then
        
    echo --n $OK"==> Packages that need to be installed are: $OKB "${NEWPKGS}"... "$RST
        
    echo
    else
           
    printf $OK"==>$OKB Nothing new to install.\n"$RST
        
    echo
    fi
    }

    # Get the VirtualBox source files from Oracle
    function get_source()
    {
        
    printf $OK"Getting the VirtualBox source RPM from the Oracle download site..."$RST
        remove_source
        curl 
    -Os $SRC_PATH/$VBOX_SRC_FILE
        printf $OKB
    " ✓\n"$RST
        printf $OK
    "Getting the VirtualBox Extension Pack source file..."$RST
        curl 
    -Os $SRC_PATH/$VBOX_EXT_SRC
        printf $OKB
    " ✓\n"$RST
    echo
    }

    # The script run has completed. Print a short message stating same.
    function script_complete()
    {
        
    #remove_source
        
    printf $OKB"Oracle VirtualBox is now installed.\n"
        
    printf $OKB"Script run complete.\n"$RST
    }

    # The test script run has completed.
    function script_test_complete()
    {
        
    remove_source
        printf $OKB
    "This script test is now complete.\n"
        
    printf $OKB"All necessary Fedora packages are installed.\n"$RST
    }

    # Script execution has been cancelled by the user.
    function script_cancel()
    {
        
    clear
        printf $OK
    "Script execution cancelled.\n"$RST
    }

    # Testing only. Show value of all variables
    function show_vars()
    {
            echo
            
    printf $OK"VB_REL_VER is $OKB$VB_REL_VER\n"$RST
            printf $OK
    "VB_EXT_VER is $OKB$VB_EXT_VER\n"$RST
            printf $OK
    "VB_REL_DIST is $OKB$VB_REL_DIST\n"$RST
            printf $OK
    "VBOX_SRC_FILE is $OKB$VBOX_SRC_FILE\n"$RST
            printf $OK
    "VBOX_EXT_SRC is $OKB$VBOX_EXT_SRC\n"$RST
            printf $OK
    "SRC_PATH is $OKB$SRC_PATH\n"$RST
    }

    function 
    testonly()
    {
    clear
    printf $ERRB
    "===== TEST ONLY. NO PACKAGES ARE BEING INSTALLED.=====\n"$RST
    }

    # Main script flow
    function menu()
    {
    clear
    headline
    printf $OK
    "\nFor this script to succeed you need to be running the newest available and installed kernel.\n\nIf you aren't running the newest available and installed kernel please exit this script\nand update your system. Then boot into the newest kernel and run this script again.\n"$RST
    printf $OKB
    "\nShall we continue? <y/n/t/v> "$RST
    read yn
    case $yn in
        y
    )    get_release
            remove_fed_vbox
               get_packages
            get_public_key
               get_source
               install_source
               install_extpack
               script_complete
               
    ;;

        
    n)    script_cancel
               
    exit 0
               
    ;;
    # Test menu entry used for development. End user should ignore this menu option.
    # All this does is install missing packages. It also downloads VirtualBox and the Extension Pack.
        
    t)     testonly
            get_release
               test_get_packages
               get_source
               script_test_complete
               
    ;;
    # Test menu entry used for development. End user should ignore this menu option.
    # All this does is show the current value of all of the variables.
        
    v)  get_release
            show_vars
            
    ;;
        *)    
    script_cancel
               
    exit 0
               
    ;;
    esac
    }
    menu 
    Glenn
    The Bassinator

  7. #52
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    Got an error while using the script on a fresh install to a physical machine.
    PHP Code:
    errorFailed dependencies:
        
    libvpx.so.1()(64bitis needed by VirtualBox-5.0-5.0.6_103037_fedora22-1.x86_64 
    I solved this by installing compat-libvpx1 and re-running the installation script.
    PHP Code:
    dnf install compat-libvpx1 
    This was on a Fedora 23 Mate install. You may not get the same error under Gnome or others.
    Glenn
    The Bassinator

  8. #53
    Join Date
    Jan 2011
    Posts
    186

    Re: Oracle VirtualBox installation script

    Quote Originally Posted by glennzo
    Sorry, didn't see this post until just now. Have you tried the script in the last few days? I believe the errror(s) were caused by a version mismatch type of issue. The Oracle web page that I pull latest version info from was not updated at the same time VirtualBox was, so for several days it was at 5.0.2 when everything VirtualBox was at 5.0.4. The script has worked well for me once the versioning info was updated on Oracle's end.
    glennzo,
    Thanks for that. I'm away for a few days but will try again when I get back

  9. #54
    Join Date
    Jan 2015
    Location
    Al Ain, UAE
    Posts
    749

    Re: Oracle VirtualBox installation script

    I always install Virtualbox with Autoten from autoten.co.uk it works perfectly.

    There is no need to re-invent the wheel.
    --
    Have fun!
    http://www.aeronetworks.ca

  10. #55
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    Quote Originally Posted by flyingdutchman
    I always install Virtualbox with Autoten from autoten.co.uk it works perfectly.

    There is no need to re-invent the wheel.
    Helpful. Thanks!
    Glenn
    The Bassinator

  11. #56
    Join Date
    Nov 2014
    Location
    Ireland
    Posts
    89

    Re: Oracle VirtualBox installation script

    Hi,

    I had to update your script to get the last version:
    Code:
    COMMENT
    
    # 10.12.15 - Update to current version VirtualBox-5.0-5.0.10_104061_fedora22-1.x86_64
    
    ...
    VB_REL_VER="5.0-"$current_version"_104061"
    VB_EXT_VER="$current_version"_104061
    However I had a first error and I fixed it by removing the tags in the curl command
    Code:
    # Determine the current version of VirtualBox
    # curl -Os http://download.virtualbox.org/virtualbox/LATEST.TXT
    curl -Os http://download.virtualbox.org/virtualbox/LATEST.TXT
    current_version=$(cat LATEST.TXT)
    echo $current_version
    rm LATEST.TXT
    The I had a second error and I am stuck:
    Code:
    Updating / installing...
       1:VirtualBox-5.0-5.0.10_104061_fedo################################# [100%]
    
    Creating group 'vboxusers'. VM users must be member of that group!
    
    No precompiled module for this kernel found -- trying to build one. Messages
    emitted during module compilation will be logged to /var/log/vbox-install.log.
    
    Stopping VirtualBox kernel modules                         [  OK  ]
    Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]
    Trying to register the VirtualBox kernel modules using DKMS[  OK  ]
    Starting VirtualBox kernel modules                         [FAILED]
      (modprobe vboxdrv failed. Please use 'dmesg' to find out why)
    Installing Oracle VirtualBox extension pack.
    WARNING: The vboxdrv kernel module is not loaded. Either there is no module
             available for the current kernel (4.2.5-201.fc22.x86_64) or it failed to
             load. Please recompile the kernel module and install it by
    
               sudo /sbin/vboxconfig
    
             You will not be able to start VMs until this problem is fixed.
    VBoxManage: error: RTZipGzipDecompressIoStream failed: VERR_ZIP_BAD_HEADER
    VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackFileWrap, interface IExtPackFile, callee nsISupports
    VBoxManage: error: Context: "Install(fReplace, __null, ptrProgress.asOutParam())" at line 1156 of file VBoxManageMisc.cpp
    Oracle VirtualBox is now installed.
    Script run complete.
    dmesg says
    Code:
    [ 3315.864431] audit: type=1130 audit(1447344605.514:222): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxballoonctrl-service comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    [ 3315.886832] audit: type=1130 audit(1447344605.536:223): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxautostart-service comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    [ 3315.909387] audit: type=1130 audit(1447344605.559:224): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxweb-service comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    [ 3316.162429] audit: type=1106 audit(1447344605.812:225): pid=3235 uid=1000 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_xauth acct="root" exe="/usr/bin/su" hostname=? addr=? terminal=pts/0 res=success'
    [ 3316.162666] audit: type=1104 audit(1447344605.812:226): pid=3235 uid=1000 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=? addr=? terminal=pts/0 res=success'
    Could you help me?
    Thanks

  12. #57
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    First thing that comes to mind is kernel-devel. Is that installed? The script should have installed it, but ...
    PHP Code:
    gjohnson@toshiba23=> rpm -qa grep kernel-devel
    kernel
    -devel-4.2.5-300.fc23.x86_64 
    This script is not the be all to end all. It needs constant tweaking so it will be able to stay with the current version of VirtualBox and the Extension Pack. There is a constant chase to remain current that I don't know how to handle in the script.

    I just made a change to the minor version (101573 to 104061) and the script ran flawlessly on a Fedora 22 LXDE virtual machine.

    Works for Fedora 23 also, but need to install compat-libvpx1 (at least for LXDE) which was not installed by the script.

    There is a minor error under Fedora 23 when the script looks at the Fedora release number but it doesn't negatively affect the script's execution or results.
    Glenn
    The Bassinator

  13. #58
    Join Date
    Nov 2014
    Location
    Ireland
    Posts
    89

    Re: Oracle VirtualBox installation script

    Kernel-devel is installed
    Code:
    rpm -qa | grep kernel-devel
    kernel-devel-4.2.5-201.fc22.x86_64
    kernel-devel-4.1.7-200.fc22.x86_64
    kernel-devel-4.2.3-200.fc22.x86_64
    Another idea?

    Edit: Maybe I should upgrade to F23 before?
    Last edited by MrNice; 13th November 2015 at 10:43 AM.

  14. #59
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    15,643

    Re: Oracle VirtualBox installation script

    May be a silly question but, are you running kernel 4.2.5-201? Sometimes we forget that we need to reboot the machine...
    Glenn
    The Bassinator

  15. #60
    Join Date
    Nov 2014
    Location
    Ireland
    Posts
    89

    Re: Oracle VirtualBox installation script

    Code:
    uname -r
    4.2.5-201.fc22.x86_64
    I think so

Page 4 of 7 FirstFirst ... 2 3 4 5 6 ... LastLast

Similar Threads

  1. oracle virtualbox not working
    By pythonkr11 in forum Wibble
    Replies: 1
    Last Post: 7th September 2012, 07:48 PM
  2. oracle virtualbox not working
    By pythonkr11 in forum Fedora Focus
    Replies: 1
    Last Post: 7th September 2012, 07:20 PM
  3. Oracle Virtualbox
    By clueless in forum Using Fedora
    Replies: 5
    Last Post: 17th May 2011, 10:39 AM
  4. [SOLVED] oracle vm virtualbox
    By postmanpat in forum Using Fedora
    Replies: 5
    Last Post: 24th November 2010, 12:51 PM
  5. Update Oracle VM VirtualBox error
    By JValeck in forum Using Fedora
    Replies: 2
    Last Post: 12th October 2010, 05:42 AM

Tags for this Thread

Posting Permissions

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