Install VirtualBox Additions In Ubuntu [Archive] - Glock Talk

PDA

View Full Version : Install VirtualBox Additions In Ubuntu


MavsX
11-17-2010, 17:06
I'm running Virtual box on windows. I installed ubuntu as a guest. Everything is working fine, except i'm trying to install the Vbox guest additions, which helps the graphics, etc. This is basically like VM tools under VM ware.

ANyway, when you 'install' the vbox guest additions it mounts a cd on the desktop. So the guest thinks there is a cd rom in the drive. I click on that 'cd', and it opens up a window. The file i want to open is called "VBoxLinuxAdditions-x86.run", Now when i double click on it a white terminal box appears, and it says something to the effect of this progam needs to be ran with administrative privileges. I tried all kinds of different "sudo" commands in front.

any ideas?

the google and the web aren't much help, since the commands don't work..

indygun?

IndyGunFreak
11-17-2010, 17:40
Where did you download this Guest Additions file? I can't find it on Vbox's website.

IGF

MavsX
11-17-2010, 17:49
With the virtual machine running you go to Devices > Install Guest Additions...Then it loads the CD on your desktop. When you do the same thing in a windows guest, it just loads up a .exe and installs a few files and a 3D graphics driver.

Note, that when i click "device >install guest additions", that's on the windows virtualbox program, so it's not part of the guest virtual machine. Makes sense?

IndyGunFreak
11-17-2010, 17:54
With the virtual machine running you go to Devices > Install Guest Additions...Then it loads the CD on your desktop. When you do the same thing in a windows guest, it just loads up a .exe and installs a few files and a 3D graphics driver.

Note, that when i click "device >install guest additions", that's on the windows virtualbox program, so it's not part of the guest virtual machine. Makes sense?

OK.. gimme just a couple minutes... I'm not sure myself so I'm gonna fire up Ubuntu in Vbox and see... be back in a minute.

MavsX
11-17-2010, 18:03
thanks dude!

IndyGunFreak
11-17-2010, 18:36
OK.... After Starting Ubuntu in Vbox... This should get Guest Additions installed for you... You were pretty close.. the fact you didn't get this, suggests you might have been following incomplete instructions. Note, the below assumes you're using 32bit(but I assume the same would work for 64bit). As for configuring it, You're going to be on your own, because I'm actually not on my PC at the moment(which has Vbox) and done all this by Remote Desktop.. so if you need help further configuring it, etc.. I can probably help you later tonight or tomorrow. This however, should get you installed.

1. After Ubuntu is started in Vbox, Go to The Devices Menu, and Choose the "Install Guest Additions"

2. When the CD mounts and you can browse it, you should see a file in there called "VboxLinuxAdditions-x86.run"...That is the 32bit file we need.... If your Ubuntu guest is 64bit, and you need 64bit, then you need the "VboxLinuxAdditions-amd64.run"

3. After that folder is open, Leave it open, and open a terminal (Application/Accessories/Terminal)

4. Now, we need to change the terminal directory, to the CD. The easiest way to do that, is going to be... Type "cd" no quotes, and hit the space bar one time. Then drag/drop the VboxLinuxAdditions file you need, in the terminal... that's gonna ive you an output smoething like this....

cd '/some/path/here/VboxLinuxAdditions-x86.run'

What you need to do, is delete that VboxLinuxAdditions-x86.run part of that path, but do not delete the ' at the end.... so you should have somthing like this...
cd '/some/path/here' (make sure the path doesn't end in /)

5. Hit Enter, and you should see the terminal change it's directory. If you get an error, make sure that 1. you didn't delete the ' at the beginning or the end, and that 2... There's a space between cd and the first ' There shouldn't be a space anywhere in the actual path, including before and after the '

6. Once you're in the proper directory type
sudo sh VboxLinuxAdditions-x86.run (or substitute the 64bit filename here if you need to)

7. Hit enter, and you should see it doing it's thing.

IGF

MavsX
11-17-2010, 19:07
hell yeah.. Thanks man! I knew i needed the sudo command the problem is i didn't know how to manage the command line. I learned to use 'ls' instead of 'dir' for seeing whats in the directory, and a bunch of other commands...I even copied that .run file to different folders to try and run it from there...

anyway, it works like a charm..heres the terminal window copy and paste..


mavsx@ubuntu:~$ cd '/media/cdrom0'
mavsx@ubuntu:/media/cdrom0$ sudo sh VBoxLinuxAdditions-x86.run
[sudo] password for mavsx:
Verifying archive integrity... All good.
Uncompressing VirtualBox 3.2.10 Guest Additions for Linux.........
VirtualBox Guest Additions installer
tar: Record size = 8 blocks
Uninstalling old VirtualBox DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
Installing the Window System drivers
Installing X.Org Server 1.7 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.


Installing graphics libraries and desktop services components ...done.
mavsx@ubuntu:/media/cdrom0$


thanks again IGF you the man!

MavsX
11-17-2010, 19:09
while were on the subject. As soon as i installed the update and rebooted the VM, it gave me an option for widescreen so the VM resolution is set to 1360 X768, and it says "monitor unknown" Which is better than 640X480... I'd love to get it 1280 X 1024 like my windows VM's...

any thoughts?

IndyGunFreak
11-17-2010, 19:13
Yeah, I kinda figured part of the issue was w/ the directory your terminal was in.. because beyond that, installing it is fairly straightforward. A lot of times when you read instructions on the internet, where you need to cd into another directory they'll simply say, 'change the terminal to that directory' and a new user (especially if they're doing a lot of copy/pasting commands) will never get past that step. That is one thing about a lot of linux users posting instructions would understand(especially those posting Ubuntu instructions, since newbs almost always float to it)... You're dealing w/ folks who come from a point and click world, so if you're gonna put terminal commands in, you've gotta put every single command they'll need.

Couple things to note..

1. Anytime you're not sure what path a file is in, you can find it easily by dragging/dropping it in a terminal(as you saw)...

2. By Default, your terminal always opens up in your home folder.

Glad you got it working..

IGF

IndyGunFreak
11-17-2010, 19:17
while were on the subject. As soon as i installed the update and rebooted the VM, it gave me an option for widescreen so the VM resolution is set to 1360 X768, and it says "monitor unknown" Which is better than 640X480... I'd love to get it 1280 X 1024 like my windows VM's...

any thoughts?

Does System/Preferences/Monitors allow you to change it?

Beyond that, I'm not sure... I'll look into it later though.

MavsX
11-17-2010, 19:56
Yeah, I kinda figured part of the issue was w/ the directory your terminal was in.. because beyond that, installing it is fairly straightforward. A lot of times when you read instructions on the internet, where you need to cd into another directory they'll simply say, 'change the terminal to that directory' and a new user (especially if they're doing a lot of copy/pasting commands) will never get past that step. That is one thing about a lot of linux users posting instructions would understand(especially those posting Ubuntu instructions, since newbs almost always float to it)... You're dealing w/ folks who come from a point and click world, so if you're gonna put terminal commands in, you've gotta put every single command they'll need.

Couple things to note..

1. Anytime you're not sure what path a file is in, you can find it easily by dragging/dropping it in a terminal(as you saw)...

2. By Default, your terminal always opens up in your home folder.

Glad you got it working..

IGF


yeah i never would have thought to drag an icon into the terminal to show the path. genius! Now, i know though. haha

dammit i just tried it in windows and you can drag icons in there too....learn something new everyday. thanks bro.

MavsX
11-17-2010, 19:57
Does System/Preferences/Monitors allow you to change it?

Beyond that, I'm not sure... I'll look into it later though.


nah, thats where i was going earlier.

it shows monitor preferences, and says monitor unknown..and it's all red/pink

i mean 1360 X 737 is manageable..but if i could figure out how to make it better i would...we'll talk soon. thanks again bro!

IndyGunFreak
11-17-2010, 20:10
Hmm... There's probably a way to do it... but I'm just not 100% sure of it at the moment.. I'll take a look at it tonight or tomorrow and see if I can figure something out.

MavsX
11-17-2010, 20:30
totally cool. take your time. thanks bro

MavsX
11-17-2010, 20:33
hmm. well i dont know what just happened. So i have dual 24 inch monitors...so i had the ubuntu vm up on one monitor. I decided to maximize the window, that somehow automatically resized my screen. I then went into monitors and now it shows a whole bunch of options. Maybe ubuntu auto-senses what the sizes are based on how big the vm is? is that even possible? It sounds like a feature i just made up. hahaha

really weird stuff. It still says unknown monitor..but i'm just happy that the monitor is bigger. thanks again man

IndyGunFreak
11-17-2010, 20:56
hmm. well i dont know what just happened. So i have dual 24 inch monitors...so i had the ubuntu vm up on one monitor. I decided to maximize the window, that somehow automatically resized my screen. I then went into monitors and now it shows a whole bunch of options. Maybe ubuntu auto-senses what the sizes are based on how big the vm is? is that even possible? It sounds like a feature i just made up. hahaha

really weird stuff. It still says unknown monitor..but i'm just happy that the monitor is bigger. thanks again man

I was actually gonna suggest that... Vbox (if it's a supported resolution) will adjust the desktop to the window size... So when you maximized your Vbox Window, it simply adjusted the resolution on your desktop.

Did you install Ubuntu 10.10, or the new beta of 11.04? I've been having trouble getting 11.04 running, so I imagine you have 10.10(which is great)

IGF

MavsX
11-18-2010, 06:29
I was actually gonna suggest that... Vbox (if it's a supported resolution) will adjust the desktop to the window size... So when you maximized your Vbox Window, it simply adjusted the resolution on your desktop.

Did you install Ubuntu 10.10, or the new beta of 11.04? I've been having trouble getting 11.04 running, so I imagine you have 10.10(which is great)

IGF

that is weird that it auto adjusts..but hey..i'm not complaining.

I'm running 10.04, it was originally 9.04, but i upgraded it a few hours ago. Linux is so awesome, one just really has to commit himself to using it for a few months and it will be like butter...

thanks again man

IndyGunFreak
11-18-2010, 06:48
that is weird that it auto adjusts..but hey..i'm not complaining.

I'm running 10.04, it was originally 9.04, but i upgraded it a few hours ago. Linux is so awesome, one just really has to commit himself to using it for a few months and it will be like butter...

thanks again man

10.04 was a pretty good OS, 10.10 has been very solid for me.

As for the auto adjust... Actually, it kinda makes sense when you think about it. The Guest OS, senses the Virtualbox Window, as the Display size, and defaults to the supported resolution (w/o Guest addition, thats usually 640x480, or 800x600, because the default virtualbox graphics driver sucks w/ linux). When you maximized the Vbox window, you essentially hooked up a bigger Display. Since you had Guest Additions installed, it detected it, and offered new resolutions for the new display.

Virtualbox is a great way to try Linux(or FreeBSD, or Solaris, etc..). I've got a 12gig virtual drive dedicated to XP, and an 8gig virtual drive, that I just routinely install different versions of Linux on.. either to test them, or help someone out, etc..

If you want to try Ubuntu as a Windows user, and your computer has the meat to run Virtualbox, it's a great way to try Ubuntu, and you don't even need to create a CD, as Vbox can boot an ISO, and if you have a virtual hard drive set up, can install to it from a Live CD ISO.... Really a slick way of trying things out if you like.

Dual Displays... just adds a whole new level of awesome to Vbox... one OS running on each display is pretty slick (been doing that a while..)

MavsX
11-18-2010, 06:59
10.04 was a pretty good OS, 10.10 has been very solid for me.

As for the auto adjust... Actually, it kinda makes sense when you think about it. The Guest OS, senses the Virtualbox Window, as the Display size, and defaults to the supported resolution (w/o Guest addition, thats usually 640x480, or 800x600, because the default virtualbox graphics driver sucks w/ linux). When you maximized the Vbox window, you essentially hooked up a bigger Display. Since you had Guest Additions installed, it detected it, and offered new resolutions for the new display.

Virtualbox is a great way to try Linux(or FreeBSD, or Solaris, etc..). I've got a 12gig virtual drive dedicated to XP, and an 8gig virtual drive, that I just routinely install different versions of Linux on.. either to test them, or help someone out, etc..

If you want to try Ubuntu as a Windows user, and your computer has the meat to run Virtualbox, it's a great way to try Ubuntu, and you don't even need to create a CD, as Vbox can boot an ISO, and if you have a virtual hard drive set up, can install to it from a Live CD ISO.... Really a slick way of trying things out if you like.

Dual Displays... just adds a whole new level of awesome to Vbox... one OS running on each display is pretty slick (been doing that a while..)


oh i got the meat to run it. I just copied my sig from the hardforum.com...

|Lian Li PC-B25|
|Intel Core i7 920|
|Gigabyte GA-EX58-UD5|
|OCZ Gold 12GB DDR3|
|EVGA 9800 GTX+|
|2 X WD 500 GB Black Cavier (RAID 1)|
|4 X Seagate Barracuda 1TB (RAID 5)|
|Seasonic 850 watt SS-850HT|
|Windows 7 Professional 64 bit|
|Logitech G5 & Saitek Eclipse RED|
|Dual Dell 2408 WFP|

I run VM's for doing risky web browsing or torrent stuff. If anything F's up, i can just kill the VM or revert back to a saved snapshot. I've currently got a win xp pro VM, a win 7 enterprise VM, a ubuntu 10.04 Vm, and a win 2003 server R2 VM...last night i was utilizing 10+ gigs of ram...yikes!

Each vm has 2 gigs of ram with 50 gig dynamic hard drives. I was also watching a CBT nugget video and browsing the web..gotta love those i7 processors..

IndyGunFreak
11-18-2010, 07:04
oh i got the meat to run it. I just copied my sig from the hardforum.com...

|Lian Li PC-B25|
|Intel Core i7 920|
|Gigabyte GA-EX58-UD5|
|OCZ Gold 12GB DDR3|
|EVGA 9800 GTX+|
|2 X WD 500 GB Black Cavier (RAID 1)|
|4 X Seagate Barracuda 1TB (RAID 5)|
|Seasonic 850 watt SS-850HT|
|Windows 7 Professional 64 bit|
|Logitech G5 & Saitek Eclipse RED|
|Dual Dell 2408 WFP|

I run VM's for doing risky web browsing or torrent stuff. If anything F's up, i can just kill the VM or revert back to a saved snapshot. I've currently got a win xp pro VM, a win 7 enterprise VM, a ubuntu 10.04 Vm, and a win 2003 server R2 VM...last night i was utilizing 10+ gigs of ram...yikes!

Each vm has 2 gigs of ram with 50 gig dynamic hard drives. I was also watching a CBT nugget video and browsing the web..gotta love those i7 processors..

Yikes... and I had a friend who was amazed I was able to sync a Zune via Vbox... ;).

The beauty of it is, w/ huge hard drives pretty common, reserving 10-20gigs, so you can install one version of Linux, while testing various others. When I was learning FreeNas, that was how I learned it... I set it up on Vbox... then when I was ready to build my box, I pretty much had everything I wanted to do, all figured out.

IGF

MavsX
11-18-2010, 10:27
you have any idea of a free online virus scanner for ubuntu?

I've used house call and norton/mcafee for windows boxes, but i was hoping for something like that for linux. I know linux doesn't really have viruses since you need the root password.

Basically, i ran a few torrents on the linux box, and before i copy over teh files to my windows machines, i was hoping to try and scan them first..make sense?

IndyGunFreak
11-18-2010, 13:11
I'm sure there's probably some Online Scans, I can't say I know of any off the top of my head though. Really the main thing Linux antivirus programs do, is make sure you're not spreading your disease to vulnerable Windows boxes... I don't do a lot of file sharing, so I don't care. You obviously do, so you want to make sure what you pass along, is clean(at least to the best of your knowledge)

Linux has some antivirus tools... The problem w/ the ones in the repositories, they are not very user friendly (several only having a command line interface). Easiest solution I've found to this, is to simply Install the Linux version of Avast on your Guest OS. It's not as "slick" as it's Windows counterpart, but the GUI is dead nuts simple, and it's easy to install.

Go here to read about it...

http://www.avast.com/linux-home-edition#tab1

If you like the sounds of it....
1. Before bothering downloading/Installing, go ahead and start the registration process, and hopefully when it's done, you'll have your Key so you can use it (unlike the windows version, you don't get a pre-trial before a key is required). Like I said, it's free. http://www.avast.com/registration-free-antivirus.php

2. While waiting on your registration key, go ahead and Download Avast, by Clicking the "Download" tab, in the first link I gave you above. You want to download the "DEB" package. Make sure you choose to "save" the file, rather than Open it.

3. After it's downloaded... Go to Places/Downloads

4. You'll see the .deb package you downloaded there.. Double click it, and that will start the software center.

5. After it loads, click Install, and let it do its thing.

6. Go to Application/Accessories/Avast Antivirus

7. When Avast Starts, it will ask for it's key.. Check your email to see if you got your registration key yet. If so, just copy/paste it there.

Once it's started, update your database, then you can use the "Selected Folders" option, to scan the stuff you downloaded.

Hope that helps.

MavsX
11-18-2010, 13:43
damn dude. That's actually better than i expected. I guess with linux gaining market share, it's in Avast's best interests to work on a linux version. I originally just wanted a online scanner, but this does what i want and then some. Thanks again.

as a side note. can you explain briefly what the difference between a .deb file is? I thought with linux i would always want to choose the .tar files?

thanks bro i owe you yet again

IndyGunFreak
11-18-2010, 13:55
damn dude. That's actually better than i expected. I guess with linux gaining market share, it's in Avast's best interests to work on a linux version. I originally just wanted a online scanner, but this does what i want and then some. Thanks again.

as a side note. can you explain briefly what the difference between a .deb file is? I thought with linux i would always want to choose the .tar files?

thanks bro i owe you yet again

Well...

The main way you want to install software, is from the Ubuntu Software Center(or from Synaptic Package Manager.. System/Admin/Synaptic). These two tools access online "repositories" of packages, and download/install them for you automatically, if you choose to. Think of this as the "recommended" way to install software in Ubuntu.

If what you're looking for is not in the repositories, then the next thing you'd want to look for, is a DEB package. Think of this as like an ".exe" for Debian based Linux distros. If you were using a RedHat based distro, you'd want to download the RPM files in this instance. In both cases, usually you Download them, Double click them, and they load up the package manager, and tell the package manager the dependencies it needs... Assuming all those dependencies are met (or the package manager can download them) the package manager will install the program from the DEB file.

Compiling from Source(.tar files) is by far the most complex way to install software. Generally, installing from source is a PITA. It requires you to know the dependencies of the package, and if they are not in your package manager, scour the internet and download and install them manually. Often times, this puts you in what nerds refer to as "dependency hell".. because you'll find one dependency you need to install, but in order to install it, it requires another dependency you need to track down... and so on.... It can an extremely frustrating process. Once you get some standard libraries installed, compiling from source becomes easier, as you'll find you're having to track down less and less packages to satisfy various dependencies.

Here's a link that talks about compiling software...
https://help.ubuntu.com/community/CompilingSoftware

MavsX
11-18-2010, 14:05
oh crap, well that makes a lot more sense in regards to the .deb files. I've used linux for awhile and for some reason i had .tar files stuck in my head, I've mainly just used ubuntu in a VM or a re-purposed ubuntu laptop. Remember you helped me work with a wireless issue on a laptop a few years ago? I'm still just a "tourist", but it's still fun to work with. Even though there is a lot of knowledge on ubuntu forums..it's still pretty daunting. You're right that for a linux noob, we need every step clearly labeled, as most of those ubuntu beans dudes just say do this or that..and we get stuck at step 1 or 2, lol. And what is weird is I'm very comfortable with the terminal, as i use it for cisco ios everyday...but still linux is a different world...

anyway, so i did a scan of all of the folders i wanted to scan. I got back 2 errors, that said "error while scanning" "the file is a decompression bomb". That sounds scary. According to a quick google search, that just means it's a file that when decompresses get's huge..So i'm gonna try and extract all the files and then re-scan them again.

IndyGunFreak
11-18-2010, 14:07
You probably noticed this, but for anyone else following along in this journey, There is one One big difference that should be noted between the Windows Avast and the Linux Avast.

The Windows version is a "real time" scanner.. meaning if you download a virus, it's going to alert you.

The Linux version, is an "On Demand" scanner.. which means you can download 100 viruses, and it's not going to alert you until you run a system scan.

Just wanted to point that out.

IGF

IndyGunFreak
11-18-2010, 14:09
anyway, so i did a scan of all of the folders i wanted to scan. I got back 2 errors, that said "error while scanning" "the file is a decompression bomb". That sounds scary. According to a quick google search, that just means it's a file that when decompresses get's huge..So i'm gonna try and extract all the files and then re-scan them again.

Yeah, I recall helping you get a laptop going.

Yea, that would sound rather alarming...lol. That's probably the best approach, decompress it, then scan it when it's decompressed.

IGF

MavsX
11-18-2010, 14:14
do you know how to deal with .rar in linux? Basically, it's a dvd broken up into 23 parts each part is 50 megs. disclaimer these are not movies or pirated software.

in the windows world, you would just right click and extract the first one, and that somehow links all of them together and creates the file from all of the .rars. Not sure what to use in linux. I'm right clicking and on the first one and clicking on "extract here", then an error message says "could not create the archive", "archive type not supported"

are .rar's not supported in linux? Is that the problem?

and yes, i noticed that about the real time vs on demand scanner. Still it's pretty sweet, and is better than nothing...but, thanks for pointing it out for the other dudes too...

MavsX
11-18-2010, 14:16
oh man, i selected all of them and then right clicked and did "open with archive manager" that was a mistake. It tried to open all of them at one time in my VM..yikes. lol

IndyGunFreak
11-18-2010, 14:58
do you know how to deal with .rar in linux? Basically, it's a dvd broken up into 23 parts each part is 50 megs. disclaimer these are not movies or pirated software.

in the windows world, you would just right click and extract the first one, and that somehow links all of them together and creates the file from all of the .rars. Not sure what to use in linux. I'm right clicking and on the first one and clicking on "extract here", then an error message says "could not create the archive", "archive type not supported"

are .rar's not supported in linux? Is that the problem?

and yes, i noticed that about the real time vs on demand scanner. Still it's pretty sweet, and is better than nothing...but, thanks for pointing it out for the other dudes too...

Can you double click the rar file, and open it w/ Archive Manager? RAR is a proprietary format, and there is no Linux version, so in other words, no, it is not supported in Linux... There are some command line tools that have been written to merge rar files though.

IGF

MavsX
11-18-2010, 15:09
i think i'm going to try and copy it to a windows vm and extract from there...dammit

IndyGunFreak
11-18-2010, 15:14
i think i'm going to try and copy it to a windows vm and extract from there...dammit

It's been so long since I did a rar file under Linux... so bear with me(I usually find torrents that aren't rared)... First, make sure you have Unrar installed.... Open a terminal and type "sudo apt-get install unrar" no quotes... and let it do its thing.

First, extract the archive, so that it is a folder...(you usually do this w/ archive manager).

Then Open a Terminal, and cd into the directory that contains the RAR files, like we did for the Guest Additions CD.

Once you're in the right folder type "unrar x filename.rar" where filename.rar, is the name of the ".001" rar file.

Let it finish, and then look in the folder, and you should see the complete, single file there.

IGF

MavsX
11-18-2010, 17:10
alright i'll work on the archive in a minute...first thing's first...i'm trying to get the shared folders to appear from my windows host machine..have them appear in the ubuntu VM. Pretty common thing to do..

i got it working... here is the command that i'm using and it works...


sudo mount -t vboxsf Media /home/mavsx/Desktop/Media

the problem is it is not saving the shared drive when i reboot the VM..thoughts?

IndyGunFreak
11-18-2010, 17:50
alright i'll work on the archive in a minute...first thing's first...i'm trying to get the shared folders to appear from my windows host machine..have them appear in the ubuntu VM. Pretty common thing to do..

i got it working... here is the command that i'm using and it works...


sudo mount -t vboxsf Media /home/mavsx/Desktop/Media

There should be a much easier way... Jus tto be clear, you want to access a Folder, that is hosted on Windows, in the Guest OS, right?

Or do you want Windows(the host) to access a folder that is on the Guest?

IGF

MavsX
11-18-2010, 20:20
There should be a much easier way... Jus tto be clear, you want to access a Folder, that is hosted on Windows, in the Guest OS, right?

Or do you want Windows(the host) to access a folder that is on the Guest?

IGF

the folder is shared on the windows host. And i already shared it in virtualbox, then you mount the share in linux. So yes, the linux guest is accessing the windows host..

it works and i can copy stuff from the linux box to the windows host..i just can't get the mapped drive to stay there after i reboot the linux box..so somehow i need to map the drive and keep it there permanently. I read there is some file that you can edit called "fstab" which is in /etc/fstab

i read that you can edit it there, but i can't figure out how to edit the file!

IndyGunFreak
11-18-2010, 20:36
Unfortunately, I'm not very familiar w/ fstab.... I will say this though... There is an easier way to do what you're doing(and it will stay permanent).. Gimme a couple minutes..

MavsX
11-18-2010, 20:40
ight..work your magic sir

IndyGunFreak
11-18-2010, 20:47
ight..work your magic sir

I'm gonna warn you ahead of time, you're gonna look at this and think "WTF is he talking about".. and although its going to be long... It's pretty easy to do.

I just need to make these instructions quite detailed(i'm gonna try to make it all copy/paste).... so if I don't have it up in an hour, I'll have it done tomorrow.

IGF

MavsX
11-18-2010, 20:52
easy enough. thanks dude.

IndyGunFreak
11-18-2010, 21:14
OK... This is going to *LOOK* fairly complex, but it's simple. Now the reason I'm doing this, is because I've never been able to get a Linux Guest, to share w/ a Windows Host... so the easiest way to do this, was to use Samba.

First thing we need to do, is make sure Ubuntu is getting it's own IP from your router.

1. Shut down Ubuntu, until your back at the main Virtualbox screen, that shows all of your virtual machines.
2. Highlight your Ubuntu Virtual Machine
3. Click Settings
4. Click Network
5. Where it says "Attatched To" Change that to "Bridged Adapter".. Name will be eth0.

Save any changes you've made. This is going to cause the Virtual Machine, to call for a different IP from the router, than the host is using. So the router will essentially think two different machines are connected.

That's the easy part.. :) Part 2 is coming.

IndyGunFreak
11-18-2010, 21:25
Now...

1. Boot your Ubuntu Virtual Machine
2. Create a Folder somewhere, that is going to be the share w/ your Host XP
We're going to call the folder "share" in these instructions(case sensitive).. just to keep everything consistent, put the folder in your "home" folder
so you'll have /home/username/share
3. Open a terminal and type sudo apt-get install samba Let it do its thing.
4. Once Samba is installed, just to be on the safe side, make sure it is not running by "stopping it"... In a terminal type
sudo smbd service stop (if you get an error saying unknown instance, thats fine)
5. Now... Copy the next few lines one at a time, in a terminal.. Hit enter at the end of each one.. and it should just go right back to the user prompt, w/o saying anything. Basically we're going to backup the original samba configuration, create a new one.

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template

sudo touch /etc/samba/smb.conf

Edit: I just fixed the "touch" line.. there was an error there... so if you had a problem, its fixed now.

Next post, will be setting up the new samba file.

IndyGunFreak
11-18-2010, 21:43
Now, setting up our samba.conf
In a terminal type
sudo gedit /etc/samba/smb.conf

That's going to open a blank file.. Just look in the title bar of the file that opens and make sure it says smb.conf /etc/samba)- gedit.. or something to that effect.

Once your blank samba.conf is open, copy and paste EVERYTHING below, into that file, and save it...

[global]
; General server settings
netbios name = YOUR_HOSTNAME
server string =
workgroup = YOUR_WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = YOUR_USERNAME
force group = YOUR_USERGROUP

I'm not gonna go through everything here.. everything I put in Bold, is what we're going to change. Keep in mind, this is likely not the only way to set this up, this is just how I did it, and I know it works.

NetbiosName - Name it whatever you want, so long as theres no spaces I just call mine, MyNetwork

Workgroup: You need to figure out what Workgroup your Windows 7 machine is... I'm not sure how to do that, but this will help you find it I imagine... http://maximumpcguides.com/windows-7/find-the-workgroup-name/ with XP, the default is MSHome, so thats what I used.

Wins support = just change that to NO

Path = This is a path to the folder we created in Step 2 of the second post... in that example, I used /home/user/share ... assuming that is the folder you created, put that path there.

Username: This is the username you created for Ubuntu
Usergroup: This is the group your username is in... Most likely, it's the same as your username.... If you're not sure...
go to System/Admin/Users and Groups
Highlight your Username and click "Advanced Settings"
Click the "Advanced Tab"
Where it says "Main Group" that is the group your user is assigned to.

Once that is all done, click Save, and close the samba config.

Next post, will be starting samba, and setting up the share.

IndyGunFreak
11-18-2010, 21:53
Actually, there's a couple more steps before we move along to far...

First, we need to allow XP to write to the share if need be(remember above, we called the share /home/user/share)
so in a terminal type

sudo chmod 0777 /home/user/share

After that, we need to password protect samba..


sudo smbpasswd -L -a your_username (your ubuntu username)

You'll be prompted to enter a password twice... this will be a required password to access the samba share.

sudo smbpasswd -L -e your_username -- this will pretty much add you to the samba user group.

Now.. next post, will be starting samba, and configuring windows.

IndyGunFreak
11-18-2010, 22:06
First thing you need to do, after you've done everything above, is go ahead, and restart Ubuntu(guest).

Once Ubuntu is running again as Guest.... Open a terminal
sudo service smbd stop
sudo service smbd start

Now, as long as you get no errors when it starts(it usually says something like "smbd start/running, process" then some numbers.

Next thing we need to verify, is the IP address of our Guest OS.. So Open a terminal and type "ifconfig" and hit enter. It's gonna spit out a bunch of junk, you should find your local IP in the first paragraph(192.168.1.xx)

Now, Samba is running, and you know the IP address for your Guest OS...

So we need to go to the Host OS(7) and set it up to see the share. Now I've never done this w/ 7, but it works flawlessly w/ XP...

So I'm gonna just follow this.. http://www.itechtalk.com/thread3673.html
Follow the instructions to get to the "Map Network Drive" window...
Drive: You can choose any drive letter you want
Folder: \\(your Guest IP address here)\MyFiles (make sure there's no space)
Click Finish

You're going to be prompted for your username and password. This is going to be the username and password, you set in the post above.

That should be it... Now, you can do whatever you're doing on Ubuntu, then move it to /home/user/share... which 7 now has access to, and you can move it to your local OS.

When you're done movin anything important between Ubuntu and XP, and you want to turn samba off, simply

sudo service smbd stop

Now, all you have to do is start your Ubuntu guest, and if you move something to /home/username/share... 7 will be able to access. All you need to do, is Double click on My Computer, and it will be the drive under "Network Locations"

MavsX
11-19-2010, 08:31
alright..good news and bad news..the good news is i got it working. The bad news is i didn't do it your way. I do appreciate you taking the hours to figure it out and write it for me. I just new that if i could get the command to work in a terminal, then there had to be a way to automate it. Below are the links for what i used for the info...

thanks again for your help. you're awesome man. I wish more people in the world would spend the time to help out strangers just like you always do..

this is what i used to create the bootmisc.sh file..

http://ubuntuforums.org/showthread.php?t=1323830

once i got that working i used that command that i know works that maps the vbox guest to the host computer..

this helped as well..

http://serverfault.com/questions/35951/ubuntu-startup-scripts

MavsX
11-19-2010, 08:32
finally i got rar's to open up in archive manager using this link..

http://tombuntu.com/index.php/2008/02/15/open-rar-archives-in-ubuntu/

IndyGunFreak
11-19-2010, 08:36
alright..good news and bad news..the good news is i got it working. The bad news is i didn't do it your way. I do appreciate you taking the hours to figure it out and write it for me. I just new that if i could get the command to work in a terminal, then there had to be a way to automate it. Below are the links for what i used for the info...

thanks again for your help. you're awesome man. I wish more people in the world would spend the time to help out strangers just like you always do..

this is what i used to create the bootmisc.sh file..

http://ubuntuforums.org/showthread.php?t=1323830

once i got that working i used that command that i know works that maps the vbox guest to the host computer..

this helped as well..

http://serverfault.com/questions/35951/ubuntu-startup-scripts

There's no bad news in that at all, you got it working.

You got way further than I did w/ that... Getting an XP Guest, to see a Linux Host, was easy.. but I could never get a Linux Guest to see a Windows Host. This was quite a while ago, but I spent a considerable amount of time Googling, etc.. and could never get it to work right. That was when I came up w/ the Samba idea (which I knew was pretty easy)

Granted, I don't use Windows as a host anymore, so it's irrelevant....

Glad you got it going, no matter how you did it (and really, it wasn't much work, it was just going through my notes on it, and verifying everything was right.)

IGF

IndyGunFreak
11-19-2010, 08:38
Regarding Unrar-free...

Did it merge the archive, when you extracted it w/ archive manager, or did you have to use the unrar tool in CLI, to merge them? I rarley have to unrar things, so I really don't know on this one.

IGF

MavsX
11-19-2010, 08:47
Regarding Unrar-free...

Did it merge the archive, when you extracted it w/ archive manager, or did you have to use the unrar tool in CLI, to merge them? I rarley have to unrar things, so I really don't know on this one.

IGF


once everything was installed...which was just running those 2 commands from the terminal.

I opened up the folder which contained the rar's. Then i right clicked on the 1st rar..remember they are all sort of connected. Anyway, i right clicked and chose "open with archive manager" then another window appears showing either a .iso or a .bin/.cue file. I can then just select the file i want and choose extract...pretty sweet

MavsX
11-27-2010, 00:08
yo yo IGF..

so i recently updated my hp nc6000 (i call it the ubuntu laptop). It's too old and slow to run windows, but it generally runs ubuntu fine..i use it mainly for ssh ing into cisco stuff...anyway, it was running 9.04 for awhile..i decided to update to 10.04. I like it, it looks cool, whatever..

i noticed an issue when i click shutdown..it isnt' shutting down it's going to the log on screen..Don't worry i'm not choosing the wrong option.

So i could go back and reinstall ubuntu 9.04..but in the mean time..how do i shutdown from the terminal?

so far i've figured out. "sudo shutdown now", but the problem is it shuts down ubuntu, but the screen is still back lit..so it's like the hardware is still on, but the OS itself is off...i saw some options for "-h" and "-p", which when you type in "shutdown --help" it shows the options..anyway, it says the "-h" halts and "-p" shutdown..i just can't figure out what options to use, etc, etc,


got any idea of what i can try to shutdown this beater from the terminal?

IndyGunFreak
11-27-2010, 09:44
So i could go back and reinstall ubuntu 9.04..but in the mean time..how do i shutdown from the terminal?
?

There was a problem w/ 10.04 and a few specific chipsets that caused this... but honestly I thought it got resolved in system updates. Is the system up to date? Did you upgrade directly from 9.04, to 10.04? If so, that might be part of the problem... as you'd need to upgrade from 9.04, to 9.10, then to 10.04. Skipping distros during the upgrade process, can result in the OS being really unstable and doing weird things.

I'm not saying thats the problem, but if you start noticing more weird stuff, it may not be that it's simply a 10.04 problem... it could be an improper upgrade. If it were me, I'd just clean install 10.10 before reinstalling 9.04, as 9.04 reached "end of life" in October.

Anyway, to answer your question. This is how most folks got around it until the bug was fixed.

sudo shutdown -h now

the "-h" switch is important, as that tells the OS to halt power. Also, as "now" implies... it means "now".. you won't get an opportunity to save, etc.. so make sure you have everything saved, etc.

Edit: Forgot to add, If you want to "time" the shutdown,
sudo shutdown -h 2

That will shutdown the machine in 2minutes.. so you can substitute whatever you want for 2min. If before it shuts down, you find you need to stay on longer.. just close the terminal window, and that will halt the shutdown process.

That should allow you to successfully shutdown.

IGF

MavsX
11-27-2010, 10:37
There was a problem w/ 10.04 and a few specific chipsets that caused this... but honestly I thought it got resolved in system updates. Is the system up to date? Did you upgrade directly from 9.04, to 10.04? If so, that might be part of the problem... as you'd need to upgrade from 9.04, to 9.10, then to 10.04. Skipping distros during the upgrade process, can result in the OS being really unstable and doing weird things.

I'm not saying thats the problem, but if you start noticing more weird stuff, it may not be that it's simply a 10.04 problem... it could be an improper upgrade. If it were me, I'd just clean install 10.10 before reinstalling 9.04, as 9.04 reached "end of life" in October.

Anyway, to answer your question. This is how most folks got around it until the bug was fixed.

sudo shutdown -h now

the "-h" switch is important, as that tells the OS to halt power. Also, as "now" implies... it means "now".. you won't get an opportunity to save, etc.. so make sure you have everything saved, etc.

Edit: Forgot to add, If you want to "time" the shutdown,
sudo shutdown -h 2

That will shutdown the machine in 2minutes.. so you can substitute whatever you want for 2min. If before it shuts down, you find you need to stay on longer.. just close the terminal window, and that will halt the shutdown process.

That should allow you to successfully shutdown.

IGF


yo. alright. yeah it went from 9.04 to 9.10 to 10.04. Other than the shutdown issue, i haven't seen anything weird. Although i haven't used it for that much stuff. thanks for the code.

i swear i tried sudo shutdown -h now..but let me try that again.

MavsX
11-27-2010, 10:39
and yeah, it is all up to date...i actually think it worked fine until i ran system update after the 10.04 install.

IndyGunFreak
11-27-2010, 10:43
yo. alright. yeah it went from 9.04 to 9.10 to 10.04. Other than the shutdown issue, i haven't seen anything weird. Although i haven't used it for that much stuff. thanks for the code.

i swear i tried sudo shutdown -h now..but let me try that again.

that command should work... make sure there's a space between shutdown and -h...

IGF

MavsX
11-27-2010, 10:57
alright, i just checked that command you gave me works. thanks bro.

sudo shutdown -h now

what a pain in the ass lol. I guess i'll keep running 10.04 and see if i notice any other issues...if i do, i'll come back here, or maybe i'll through 9.10 on there or something...

thanks again man

IndyGunFreak
11-27-2010, 11:03
alright, i just checked that command you gave me works. thanks bro.

sudo shutdown -h now

what a pain in the ass lol. I guess i'll keep running 10.04 and see if i notice any other issues...if i do, i'll come back here, or maybe i'll through 9.10 on there or something...

thanks again man

Why would you put 9.10 on there? Before I did that, I'd clean install 10.10. Boot a live CD of 10.10, and see if everything works, and just clean install.

MavsX
11-27-2010, 11:22
Why would you put 9.10 on there? Before I did that, I'd clean install 10.10. Boot a live CD of 10.10, and see if everything works, and just clean install.

oh i meant, when i upgraded from 9.04, the only option was 9.10, and then once that was installed the option for 10.04 appeared. that was last week, when i first installed 10.04

IndyGunFreak
11-27-2010, 11:41
oh i meant, when i upgraded from 9.04, the only option was 9.10, and then once that was installed the option for 10.04 appeared. that was last week, when i first installed 10.04

I meant why would you go back to 9.10.. but i think you meant you'd put 10.10 on there.

IndyGunFreak
11-27-2010, 11:51
also, if it's really bothersome to you typing that command.. you can create a desktop(or panel icon) to do it for you.

Right click your desktop

Create Launcher

On the next Window, in the pull down box choose "Application in Terminal"

Name it whatever you want

where it says "command" put the command there.. sudo shutdown -h now

If you want to create an icon for it, click the picture, and navigate to the picture you want to use.

Click OK.. now when you double click that icon, you'll get terminal window asking for your password.. just enter your password, and it will shut your machine down. After you create the icon, you can drag/drop it to your panel, so that it's not on your desktop if you want to.

Just curious, do you have an Intel chipset on that laptop? I can't find the bug reports on it now, but I seem to recall it being isolated to the Intel chipset.

IGF

MavsX
11-27-2010, 12:08
oh....almost like a batch file in windows..or a bash file in linux...isn't that what it's called bash file?

and yeah, that laptop has an intel chipset..i dont know which one off hand..it's an HP compaq NC 6000. I got it from work...we were disposing them..and rather than dispose of them, i took it home and my it my ubuntu laptop..i used to use it for couch surfing..then i got my iPhone in 2008..so no longer needed it, now it;s used for cisco gear, since it has a built in serial port...

i also just took home a hp nc 8000, again, disposing of old stuff, it has win xp pro on it, i installed win 7 enterprise a few days ago, which ran okay, but i couldn't find 7/vista drivers anywhere for graphics and network, so, i'm in the process of reinstalling windows xp pro back on the nc8000..i'll just use it again as a terminal laptop, and also just to have other machines when i set up my CCNP lab...