2014年4月22日 星期二

Shared folders will not mount after 3.10 update

https://forums.virtualbox.org/viewtopic.php?f=3&p=283645

Q:
I installed the VirtualBox-4.3.10-93012-Win.exe update today.

My Ubuntu VM booted OK and worked normally, but then I got the prompt to update the guest additions. After doing that and rebooting I cannot mount shared folders. I get this error:
mount: wrong fs type, bad option, bad superblock on /home/richard/Xdata,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

and in dmesg I see 
sf_read_super_aux err=-22
I tried recreating the shared folder but it made no difference.



A:

Debian based machines seem to have changed the location of the install, pointing to location that does not exist.

Look at /sbin/mount.vboxsf and see if the link is broken, and see if the Guest additions are installed in /opt, and if so see below.

The work-a-round is to run the following in a terminal on the guest.

CODE: SELECT ALL   EXPAND VIEW
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions \
/usr/lib/VBoxGuestAdditions

cscope install Q&A


  • curses : command no found
sudo apt-get install libncurses-dev 

  • flex : command not found
sudo apt-get install flex

  • fscanner.c error 1
  • make: yacc: Command not found

    sudo apt-get install bison
    http://stackoverflow.com/questions/3871425/how-to-install-lex-and-yacc-in-ubuntu

    Installing VirtualBox Guest Additions on Ubuntu Server



    Installing VirtualBox Guest Additions is necessary to enable folder sharing between host and guest operating systems on VirtualBox. This is a quick how-to install the additions from the command line on the Ubuntu Server virtual machine:
    1. Start the Ubuntu Server VM and insert the Guest Additions CD image (Devices menu, Install Guest Additions).
    2. Mount the CD Rom with the shell command:
      $ sudo mount /dev/cdrom /media/cdrom
      
      After that the install scripts should be accessible in the /media/cdrom/ directory:
      $ ls -l /media/cdrom/
      total 41942
      dr-xr-xr-x 3 root root     2048 Dec 19 13:11 32Bit
      dr-xr-xr-x 2 root root     2048 Dec 19 13:11 64Bit
      -r-xr-xr-x 1 root root      647 Aug 16  2011 AUTORUN.INF
      -r-xr-xr-x 1 root root     6966 Dec 19 13:02 autorun.sh
      -r-xr-xr-x 1 root root     5523 Dec 19 13:02 runasroot.sh
      -r-xr-xr-x 1 root root  7361995 Dec 19 13:06 VBoxLinuxAdditions.run
      -r-xr-xr-x 1 root root 14634496 Dec 19 13:08 VBoxSolarisAdditions.pkg
      -r-xr-xr-x 1 root root 13270208 Dec 19 12:55 VBoxWindowsAdditions-amd64.exe
      -r-xr-xr-x 2 root root   278832 Dec 19 12:48 VBoxWindowsAdditions.exe
      -r-xr-xr-x 1 root root  7383936 Dec 19 12:49 VBoxWindowsAdditions-x86.exe
      
    3. Install necessary build tools and build dependencies:
      $ sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
      
      Note
      Getting the headers solves a potential build error that is reported in /var/log/vboxadd-install.log
      Failed to install using DKMS, attempting to install without
      /tmp/vbox.0/Makefile.include.header:94: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again.  Stop.
      
    4. Build and install the Guest Additions:
      $ sudo /media/cdrom/VBoxLinuxAdditions.run
      
    Tested on Ubuntu Server 12.04 precisely.

    change resolution of virtualbox

    1. virtualbox 4.3.10 , Debian7.4(none desktop environment)

    2. update grub to grub2

    sudo apt-get install grub-pc

    sudo upgrade-from-grub-legacy

    3. Getting resolution from GRUB2.
        At grub menu list type "c" into command and input "vbeinfo" than you can get all resolution     providing by graphic card.
    ex:1280x1024x16,800x600x24,640x480.....

    3.modify /etc/default/grub


    • GRUB_GFXMODE=1024x768x8

    1024x768x8 => this value is got from Step 3.


    • GRUB_GFXPAYLOAD_LINUX=keep


    GRUB_GFXPAYLOAD_LINUX will work with  GRUB_GFXMODE.
    It wil let kernel have the same resoluiton with GRUB2.

    4.running sudo update-grub afterwards to update.

    http://wiki.ubuntu-tw.org/index.php?title=GRUB2%E4%B8%AD%E6%96%87%E6%8C%87%E5%8D%97%E7%AC%AC%E4%BA%8C%E7%89%88(%E4%B8%8A%EF%BC%89

    ps:
    If  want to get more resolution setting vale , you can use followed command.

    VBoxManage setextradata global GUI/MaxGuestResolution any
    VBoxManage setextradata "VM name" "CustomVideoMode1" "1280x800x32"

    http://chimerhapsody.blogspot.tw/2013/07/virtualbox-virtualbox-customize-screen.html

    2014年4月21日 星期一

    Add User to “sudoers” File

    from:http://benaiah41.wordpress.com/2008/08/15/37/
    To give a user the ability to use the “sudo” command you must add them to the “sudoers” file.  Here’s how.
    Thanks to ubuntucat (see comment below) for the following suggestion!  The easiest way to allow a user to sudo is to simply run the following command from the Terminal:
    To open the Terminal:
    Applications >> Accessories >> Terminal
    Once the Terminal is open type:
    sudo adduser username admin
    This must be done from an account that already has sudo abilities or else from the root account.
    If for some reason you have to manually edit the “sudoers” file keep reading!
    Open the file “sudoers” located at /etc/sudoers using your favorite text editor.  You must have root permissions to be able to edit this file so you will want to open your editor from the command line.
    To use gedit you would do the following:
    Open the Terminal and type:
    sudo gedit /etc/sudoers
    If you want to use vim you can simply enter the following into the Terminal:
    sudo visudo
    Once you have the sudoers file open, scroll down to the line:
    root   ALL = (ALL)    ALL
    Add the folling line below the root line (replacing “user” with the name of the account you wish to give sudo access to)
    user   ALL = (ALL)    ALL
    Save and close the file.  The new user has now been added to the “sudoers” file and can use the “sudo” command.