Sign in with
Sign up | Sign in
Your question

Shell script problem

Last response: in Linux/Free BSD
Share
a b 5 Linux
November 1, 2008 6:52:18 AM

Hi guys,
I'm having a problem with my VM version of Linux... The VM graphics accelerator is not recognised and I've tried to install Sun VMx's add-on tools for the guest OS but there's a problem. I can't install it unless I have admin rights. This a shell script for linux and is a .run file. I'm currently VMing Fedora 10 KDE. It disallows mw from installing the shell script. I've tried su - in konsole and copy and pasting the code but it just freezes. The Host OS is Windows XP.

Thanks,

More about : shell script problem

a b 5 Linux
November 1, 2008 6:57:44 AM

Have you tried "su -; sh whatever.run" ?

You probably need to copy whatever.run to /root first

Good luck :) 
a b 5 Linux
November 1, 2008 7:02:55 AM

If SEL is enabled check dmesg

:) 
Related resources
a b 5 Linux
November 1, 2008 7:55:14 AM

I had a slight problem installing the same sort of thing on a VMWare VM, again with Fedora 10. What I had to do in the end was.

1. Open a terminal.
2. Do "su" to get a root session.
3. Copy the script file from the virtual CD to the virtual hard disk (I used the /root directory.) Don't know why, but it wouldn't work without this step.
4. Run the script by typing "sh whatever.run". (Actually in VMWare it's "perl whatever.pl", but the principle is the same.)

I've tried all the virtual machines going, including VirtualPC, VirtualBox, and KVM, but I find VMWare Server (I'm using version2) to be the fastest and most stable. And they're all free! (However, if you're writing your own 64-bit OS, and want to be able to debug it, you can't beat SimNow - but it is sloooow.)
a b 5 Linux
November 1, 2008 8:59:30 AM

Thanks alot ijack. Now I need to wait until it finishes updating...
a b 5 Linux
November 1, 2008 9:02:12 AM

Quite a lot of updates if you've just installed Fedora 10! Hope you've got a nice fast connection.
a b 5 Linux
November 2, 2008 1:27:33 AM

Little problem here...

  1. [root@FedoraVM10 echo]# sh VBoxLinuxAdditions-x86.run
  2. Verifying archive integrity... All good.
  3. Uncompressing VirtualBox 2.0.4 Guest Additions for Linux installation.........................................................................................................................................................................................
  4. VirtualBox 2.0.4 Guest Additions installation
  5. Please install the build and header files for your current Linux kernel.
  6. The current kernel version is 2.6.27.4-58.fc10.i686
  7. Please install the GNU compiler.
  8. Problems were found which would prevent the Guest Additions from installing.
  9. Please correct these problems and try again.


I've installed GNU make so far...
a b 5 Linux
November 2, 2008 1:57:58 AM

  1. [[root@FedoraVM10 echo]# sh VBoxLinuxAdditions-x86.run
  2. Verifying archive integrity... All good.
  3. Uncompressing VirtualBox 2.0.4 Guest Additions for Linux installation.........................................................................................................................................................................................
  4. VirtualBox 2.0.4 Guest Additions installation
  5. Building the VirtualBox Guest Additions kernel module...
  6. Building the shared folder support kernel module...
  7. Installing the VirtualBox Guest Additions...
  8.  
  9. Successfully installed the VirtualBox Guest Additions.
  10. You must restart your guest system in order to complete the installation.


^ can't say it any better
a b 5 Linux
November 2, 2008 2:46:46 AM

Did it work?

:) 
a b 5 Linux
November 2, 2008 3:22:34 AM

:(  Kinda...

Graphics driver still missing tho...

800x640 = eww
a b 5 Linux
November 2, 2008 3:38:37 PM

What kind of VGA is it emulating?

:) 
a b 5 Linux
November 3, 2008 2:50:27 AM

Quote:
By default VirtualBox provides graphics support by emulating a standard VESA card with 8 MB RAM, which can be adjusted. With the Guest Additions for Windows, Linux, or Solaris guests comes a special video driver that allows for better performance and features such as dynamically adjusting the guest resolution when the VM window is resized.


Wikipedia...

Hmm... I think I've done that already.
a b 5 Linux
November 3, 2008 3:11:25 AM

I'm gonna try

  1. yum install vesa


and see what happens
a b 5 Linux
November 3, 2008 7:00:59 AM

Not tried Fedora10 with VirtualBox, but with VMWare it just works. Any resolution that your monitor is capable of handling.

Solaris and Windows Server worked fine with VirtaulBox, no problems with screen resolution, but in the end I found that VMWare server was slightly faster and more versatile. (But it won't run OS/2, should you wish to do so!)
a b 5 Linux
November 3, 2008 8:27:13 AM

OK... not good...

Maybe if I edit the X.org.conf file of vesa, maybe it can support higher res?

edit: can't find it...
a b 5 Linux
November 3, 2008 9:04:47 AM

Have you tried installing the guest additions again, after the update? The update might have overwritten something. Just as a matter of interest I'm going to try installing Ferora 10 (64-bit) in a VirtualBox VM on my mainn computer. That'll be running under XP64 and it's an Intel processor, not that I expect any of that to be relevant.
a b 5 Linux
November 3, 2008 9:42:48 AM

Yes, I have.

Hmm I accidently stuffed up my edit of xorg.conf

Hooray! No GUI!
a b 5 Linux
November 3, 2008 9:48:11 AM

I've got Fedora 10 installed now, but couldn't immediately install the guest additions. After installing make, gcc, and kernel-devel I was getting a message that the kernel-headers were for the wrong version of the kernel (obvious really, because they were the latest ones whereas my running kernel was the one off the live CD). I'm now updating the system, and I'm sure that things will go fine after that. It'll take an hour or so - I'll let you know what happens

You will find that every time you update the kernel you need to reinstall the guest additions. This is because they are kernel modules and won't be present in a kernel downloaded from the Fedora site. I'm confident that if you install them now, after updating your system, all will be well.
a b 5 Linux
November 3, 2008 9:53:53 AM

Well interesting... for the sake matter I don't think I'll be updating...

a b 5 Linux
November 3, 2008 10:00:31 AM

Sorry - didn't see your last post. If it's the xorg.conf on your Fedora 10 that you've messed up, you don't actually need one. Rename it to xorg.conf.old and X should run.
a b 5 Linux
November 3, 2008 11:41:40 AM

That was fun! After updating I installed the guest additions and got exactly the same result as you. As it happened, I had a Fedora 9 installation in VirtualBox, so I tried copying xorg.conf from that one. It worked. Here's the xorg.conf:

===========================================================

# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
EndSection

Section "Monitor"
Identifier "Monitor0"
ModelName "LCD Panel 1280x1024"
HorizSync 31.5 - 64.0
VertRefresh 56.0 - 65.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "vboxvideo"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

================================================

You may need to play with the Monitor section if yours is appreciably different from mine. You should find that, with this configuration, the resolution automatically changes as you resize the window.

Hope this works for you also.

a b 5 Linux
December 16, 2008 5:17:34 AM

Okay, I've found the universal way of installing Virtual box or Vbox add-ons

1. Mount the Guest add-ons .iso file
2. Copy into user folder or /home
3. Enter root
Use su in Red hat based distros
Use sudo in Debian based distros in addition to the text of the fourth step
4. Bash the .run file
Use
  1. sh VBoxLinuxAdditions-x86.run
in Red hat (Must be root)
Use
  1. sudo bash VBoxLinuxAdditions-x86.run
(Will ask for root password) for Debian
5. Resolve dependencies such as GNU Make or GNU compile and run script again if there are dependencies

Fedora dependencies:
  1. yum install make

  1. yum install gcc

  1. yum install kernel-devel

Red hat does include Mandriva, Fedora, OpenSuSe, Mythdora
Debian includes UBuntu, Kubuntu, mythbuntu etc.
a b 5 Linux
December 16, 2008 5:25:41 AM

Should be sticked for reference. Much easier to find for me next time that way.
!