Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dinty Moore
Apr 26, 2007

niss posted:

So I'm not sure if what I want to do is possible. I have a current windows7 installation which on it I am running an Ubuntu server via virtualbox. There is a secondary physical drive in the box which has a bunch of files on it I would like to share out via samba from the ubuntu server. Currently the drive is formatted ext4, so I can see the drive is there via disk management in windows but that is it.

I cant figure out how to go about making the virtual machine see the physical drive.

Yeah, I don't believe that's a supported feature with VirtualBox, at least not via the GUI; you might be able to hack the XML description to do it, but I haven't found a way in my (admittedly cursory) searches in the past.

Adbot
ADBOT LOVES YOU

Dinty Moore
Apr 26, 2007

rugbert posted:

Do I need to install device specific drivers to get webcams to not look like rear end? Both my integrated laptop cam and my Logitech quickcam produce image quality thats as bad as most dumb phones and Im fairly certain it should be better.

What model of cam specifically? My HP Mini 311 running Ubuntu and my MacBook (both have VGA-resolution internal cameras) yield similar results, but that's because they're using lovely VGA-res CCDs. I have a Logitech QuickCam Pro 9000 on my workstation which yields way better quality (running Ubuntu as well), but that's because it has a much higher quality CCD (and better optics).

In short, if it's a VGA res integrated cam, or a cheapo VGA-res cam, don't be surprised at assy quality. This is normal, and Windows drivers probably would not do better.

Edit: Duh, okay, Logitech QuickCam, obviously.

Dinty Moore fucked around with this message at 23:53 on Jan 6, 2011

Dinty Moore
Apr 26, 2007

xPanda posted:

10.0.0.0/24 is the internal network the VMs are on, and the webserver is at 10.0.0.218.
I want to forward port 80 to 10.0.0.218, so I executed:
code:
iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.0.0.218:80
iptables  -I FORWARD -m state -d 10.0.0.218 --state NEW,RELATED,ESTABLISHED -j ACCEPT
This allows me to access the webserver from the physical LAN, but stops a bunch of things from working on the virtual machines (such as yum/apt-get installs).

How do I go about forwarding port 80 to a VM without messing up other services? I haven't quite got my head around iptables yet.

You should specify, in the PREROUTING rule, the IP address of your machine, otherwise it rewrites (as you are discovering) *ALL* connections to 80/tcp running through your machine. Something like this:

code:
iptables -t nat -I PREROUTING -d {your IP address here} -p tcp --dport 80 -j DNAT --to-destination 10.0.0.218:80

Dinty Moore
Apr 26, 2007

xPanda posted:

Ah! That did the trick, and it makes sense too. Thanks! Shouldn't this have not affected connections on the machine I was trying to route to, or does the routing change the connection to the point the machine no longer accepts them?

More the latter. The VM's outgoing connections get rewritten to go to itself, so the packet goes back to itself directly, but when it tries to send responses to itself (since the initial SYN will then claim to be from a local address), the TCP session created by the caller ends up totally confused. This sort of IP rewrite wrangling gets tricky because of that.

Dinty Moore
Apr 26, 2007

Kaluza-Klein posted:

Ubuntu 10.10 here.

Recently when connecting usb storage I am not able to mount. dmesg says: FAT: codepage cp437 not found

Shouldn't that be built into the kernel? Did some update gently caress this up, or was it me? What do I need to do? Google just lists lots of people who built their kernels incorrectly or people doing strange things with encryption, neither of which I have done or are doing.

Hm, I'm definitely not seeing this; what does:

code:
ls /lib/modules/$(uname -r)/kernel/fs/nls/
say? It's definitely a kernel module, and it's present on both the Ubuntu systems I have in front of my (my workstation and my netbook, both running 10.10).

Dinty Moore
Apr 26, 2007

Modern Pragmatist posted:

Is there a command line utility for determining resolution and codec of a video file in linux? I'm attempting to write a script that will run as a cron job and convert video files that meet certain criteria.

As mentioned, you might be able to use mplayer, or just run 'ffmpeg -i [filename]', and it should provide you some info. Alternatively, try MediaInfo; it's available for Windows, Linux and OS X, with and without GUI, and should give you more detail than you can stomach.

Dinty Moore
Apr 26, 2007

evol262 posted:

(which doesn't make a difference if you're on OpenVZ/Xen PV anyway, as far as I know).

On OpenVZ/Virtuozzo, you're correct; Xen (since early 3.0) has features to allow loading the kernel out of the domU's filesystem, and most deployments use that, because it's generally better and simpler to use distro kernels when possible. (I say this as someone involved in implementing a Xen-based VM hosting platform.)

Dinty Moore
Apr 26, 2007

Ninja Rope posted:

djbdns is kind of a lovely dns server. It's fine if you're doing something very limited with it, but in general nsd and unbound are better choices. BIND's not so bad.

I personally favor PowerDNS, but that's because I use it at work, and we host thousands of domains. Zone data in a database is a beautiful thing.

Dinty Moore
Apr 26, 2007

dolicf posted:

Neat trick to save some time in situations like this:

# ps -ef | grep [n]tp

grep will match on any single character inside the brackets. For instance, if you had used [abcd]tp or [a-d]tp, grep would match on atp, btp, ctp or dtp. With the above, grep will only match on ntp. The real magic comes in when you take a look at your grep process in ps. Because ps is displaying the literal command rather than how the command interprets special characters, your grep will show up in ps with the square brackets included and thus won't be matched by your grep. Observe:

code:
[root@server ~]# ps aux | grep lfd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:15 lfd - sleeping
root     24492  0.0  0.0  61232   736 pts/1    S+   06:43   0:00 grep lfd

[root@server ~]# ps aux | grep [l]fd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:16 lfd - sleeping

Seriously? I've been using Linux for... 15+ years now. How have I never heard of/thought of this? Thank you, goon sir.

Dinty Moore
Apr 26, 2007

Megaman posted:

I've installed debian 6 with dwm on my desktop that has an ATI card, I have 3 questions.

1) how do I install ATI drivers

I'm not sure about how this is done in Debian; I know in Ubuntu, you just use the "Additional Drivers" tool. You should be able to enable the non-free repository for Debian, run "apt-get update ; apt-get install fglrx fglrx-amdcccle", and then use its command line tool to configure Xorg to use the fglrx driver. You'll probably also need to add your user account to the 'video' group.

Megaman posted:

2) how do I reconfigure dwm

I assume you mean "Compiz" in this case; once you have hardware acceleration working, run "apt-get install compiz compiz-gnome", and once everything is installed, run "compiz --replace &" in a terminal window. That should enable desktop compositing.

Megaman posted:

3) how do i disable capslock on login

On Ubuntu, I do this by choosing System -> Preferences -> Keyboard, going to the Layouts tab, clicking the Options... button, and under "Ctrl key positioning", selecting "Make Caps Lock an additional Ctrl". I believe it should be similar on Debian.

Dinty Moore
Apr 26, 2007

spankmeister posted:

If google is not being stupid and is using a normal kernel with usbnet drivers included, most will work.

I've had very good results with this one: http://www.dlink.com/products/?pid=133
It's a bit bulky, but of the 60-odd RHEL boxes I manage at work about half use those and they've always worked very reliably.

I've also used this one at home with good results: http://www.amazon.com/Belkin-F5D5055-Gigabit-Network-Adapter/dp/B000FOWHTI
(Note that it will never reach gigabit speeds because the theoretical limit for usb2 is 480Mbit, and the practical limit is even lower than that.)

Basically anything with an ASIX chipset will work.

Not necessarily. I got one of these earlier this year; it works with Linux, but you need the latest ASIX kernel driver. And guess what. The latest ASIX driver is *not* in the kernel. I ended up making my own Debian packages to use DKMS to build the driver for the installed kernel(s). (See here. Works for Debian and Ubuntu; I'm using it on a PPC Mac Mini at home.) It works fine now, but not every ASIX-based USB NIC will "just work" out of the box, sadly.

Dinty Moore
Apr 26, 2007

Kaluza-Klein posted:

o rly. I was thinking about buying this: http://www.newegg.com/Product/Product.aspx?Item=N82E16833124335

People in the comments seem to imply you just plug it in with linux. . .

It's 10/100, so maybe the chip it uses works "out of the box" with Linux.

Adbot
ADBOT LOVES YOU

Dinty Moore
Apr 26, 2007

ExcessBLarg! posted:

Hmm, that's interesting.

I'm assuming the reason to run update-grub was to refresh GRUB's kernel blockmap, if it couldn't fit stage 1.5 (or GRUB 2's equivalent) in the boot track. Which may have to do more with the partitioning tool used (some use a one-sector boot track, others 63) than the existence of a separate /boot.

No, 'update-grub' doesn't actually reinstall the bootstrap code in the MBR on its own at all. All it does is regenerate the grub.cfg (or menu.lst for pre-GRUB2). Unless you're moving your GRUB bootstrap files around a lot (why?) you should pretty much never need to do that, unless the actual installed GRUB version is updated, in which case the packages will reinstall the bootstrap. Since it can actually handle partition tables and filesystems, once it has the bare minimum blockmapped (the stage2, and the modules for accessing the filesystems), it doesn't have to keep a blockmap of every file - like your kernels - like LILO did (which was why if you updated your kernel back in the bad old days of LILO and rebooted before updating your bootloader, you could end up with a hosed system).

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply