Red Hat / Fedora :: Distinguishing A Virtual Vs. Physical Folder?
Jul 18, 2010
I use the command ln -s a lot to create symbolic links. The problem is that I need to run a routine that looks for a specific string in ALL of my websites and I'd do it somehting like this:
Code: cd /home grep -R "function_enhanced_mail_v100.php" * however, it's going to recurse all the "folders" and include symbolic links which I don't wish to do. Is there any way to prevent this?
This may seem like a silly question but I have many servers and sometimes we forget when we login if it physical or virtual running on a VMware system. This makes a diffrence when I try to get a console access etc. So I wanted to know before if its physical or VM.yes I know i can change motd once i get the info or make a list etc. There are many ways not OS related for me to find this info out. But I was wondering if there was a Linux command that I could use when I ssh to a system to check if its physical or logical?I have inventory information etc and vm vsphere to check but that can be time consuming if I just want to check something quick.
uname -a or something like that that would tell me would be cool. I am thinking there is no command as Linux really does not care if its running Vm or physical.
I am new to Linux kernel/user space programming having been an assembly programmer in my previous life. I am now using 2.6.x kernel on an embedded CPU that has a few dedicated hardware blocks (including more CPU running just C-code, i.e., no operating system). There is a single DRAM connected to this chip with one Linux CPU + multiple h/w blocks. No swapping.Question(s):
1. The Linux CPU needs to talk to hardware blocks that obviously physical DRAM addresses while Linux processes/threads use virtual addresses. 2. How do I translate these addresses back-n-forth? For example, a Linux process may want to allocate memory and then hand it off to a hardware block to write into it. Then after a while the process will read it. 3. Sometimes, the hardware block may write a physical address into the shared memory. The Linux CPU will read the shared memory and then convert the physical address to virtual memory and go read that location.
How does one achieve all of this? If this is being extremely stupid, then please let me know. Hopefully, you can give me some pointers.
I've read several write ups on how to convert a physical linux box to a virtual one, but have yet to do it. I've tried a few times just playing around with no success. Generally I use VMware ESX as my host of choice, but am open to citrix's XEN (as citrix presentation server is my day job). I run 3 websites out of the house (on junk left over desktop.. can't believe I've had such good (lucky) uptime). One of the sites was particularly difficult to set up, so I'd rather not ahve to do it over again. It's built on OScommerce (LAMP).. so it's a database server as well come to think of it. So.. what have you tried to convert with/to?
I have two old windows 95 computers. The problem is I have files and programs that have specific settings that I need. The computers are old and I want to just make a copy of the hard drive and insert it into virtual box. How can I do this?
A process is trying one access to memory, for example through an array (ex.: vect[0]=123. What happens?
Here below what I guess but I'm not sure and accept any comment (please, distinguish between "the system" and "the CPU" in case).
Let's suppose swapping to disk disbled.
We have two scenarios: without and with cache.
If no cache is present in the system: 1. The CPU must discover the phys addr of vect[0] virtual addr. To do that, has to read from 3 (or 2 depending on the system?) pages tables, stored in memory as well. 2. The CPU writes to the final address.
These mean 4 memory accesses.
If cache is present: 1. Like above but, if the pages tables are in cache, we have 3 accesses to that. 2. If the req. page is not in cache, it's reads from ram and transferred to it. Afterwards, cache is written. In the best case we have 4 cache accesses.
I have set up OpenVPN server using a bridged configuration. My networking "powers" aren't that advanced, so I did this by following the openvpn tutorial for bridged servers. I have tested this with several clients connecting to my server from different locations and it works very nicely (including broadcasts).
My server's LAN IP address is 192.168.2.4, and my LAN's mask is 24. Clients connecting to my server get assigned IP address that also fall within that subnet (i.e., the 192.168.2.x pool contains both physical machines in my home and "virtual" hosts). This is what the OpenVPN walkthrough specifies:
[Code]...
I was wondering if it would be possible for the VPN to fall within a different subnet (such as 10.0.1.x). I would also like to do that without adding another physical NIC to my server, or changing my physical IP address. I would imagine this is possible, since that's how hamachi does it.
I have a 32 bit Ubuntu installed and my Laptop has 4GB RAM, but only 3GB is considered by Linux. My question is: what is the reason for the upper limit on physical memory ?
Code: dmesg | grep Memory [0.000000] Memory: 3052428k/3112960k available (4673k kernel code, 56364k reserved, 2121k data, 656k init, 2200904k highmem) I am familiar with the virtual memory concept where linux splits upper 1GB for kernel and lower 3GB for user processes. In total, linux 32bit can address 4GB virtual addresses. Does this meant that 1GB of physical memory is already mapped to 1GB of kernel space and Linux only shows the remaining 3GB physical memory left for the user in the above command.
I did some searching on the internet and found some articles related to this, but it only confused me further since some articles suggest 4GB is the upper limit with mentioning whether it's virtual or physical memory, some bring in the concept of PAE, etc. I'm relative new to Linux's memory management, so it'd be really helpful if someone could answer this.
I am encountering some problems regarding CentOS 5 and I am going to kindly ask your help in debugging further what is happening. I will give as much information as possible about the setup. Here we go. We use on one server of our servers, GOautodial, an inbound/outbound call center application, that it's installed on a CentOS 5.5 (Final).
# cat /etc/*release* cat: /etc/lsb-release.d: Is a directory CentOS release 5.5 (Final) GoAutoDial CE 2.0 # uname -a Linux xxxxx.com 2.6.18-194.8.1.el5.goPAE #1 SMP Fri Jul 30 05:30:57 EDT 2010 i686 i686 i386 GNU/Linux
I've been experimenting with Debian coming up with a system with suits my needs. I have done this and I'm wondering, "Do I have to start from scratch on my physical machine or can I convert an existing VDI to IMG and possibly port it to the physical machine?"
I am currently using windows xp, but I have acquired another hard drive and wish to install ubuntu to it, unfortunately i do not have a working cd drive. I have loaded the newest iso in daemon tools and it asks me if i want to install it in windows, or restart my computer to do a full install. i wish to do neither. i want to install a full copy to my other drive with the virtual cd drive. I have found alot of help dealing with installing it on the same drive as windows or something that would require a floppy drive. this task seems like it would be alot simpler than installing on the same drive, buy maybe not. Did i miss a tutorial somewhere?
As i undertsand - out of 1GB of the virtual Address space for Kernel from 3GB to 4GB of the process address space, Kernel image (code, data, bss, stack, heap) resides staring @0x0 address. Vmalloc area starts either at the end of Physical ram size or at 896M. This 896M cap is mandated to ensure that minimum of 128MB is reserved as vmalloc_reserve for vmalloc,kmap etc.
Is the understanding correct? Now trying to map Physical Zones into this 1GB address space
Initial 16MB is mapped to ZONE_DMA 16MB - 896MB is mapped to ZONE_NORMAL 896MB - 1024MB is mapped to ZONE_HIGHMEM
Does this mean that Kernel image is residing in ZONE_DMA area? Any call to vmalloc() in kernel code will return address beyond 896M? insmod of any LKM will internally invoke vmalloc() to obtain contiguous area - where will this code physically located along with rest of kernel code in ZONE_DMA or in ZONE_HIGHMEM?
I have been learning Debian by using a virtual machine. After fine-tuning my installation procedure, I decided to copy that installation to my physical system. The hard drive already has another Linux based system installed. I plan to dual boot.After copying files I updated fstab and menu.lst.The partition scheme between the virtual and physical environments are similar, but the partitions are not mapped exactly the same.Thus the Debian system on the physical hard drive fails to boot simply because the initrd is created for the root partition location on the virtual machine. The initrd created in the virtual machine is looking for the root file system on /dev/hda1 whereas on my physical drive the new location is /dev/sda7.How can I rebuild the initrd on the physical system? I started to use the installation DVD in rescue mode, but I did not get too far.
I read once that you could use VMWare's converter to convert a physical machine into a virtual machine to run in VirtualBox. Can someone point me in the direction of a tutorial or just give me instructions on how to do this? I was very confused by the converter and how to get the image to work with virtualbox.
I need a small shell based program that prints the mac address of physical ethernet adapter from it's firmware. I need this utility for license generation and appliance activation. I have tried several example but none of them is flawless, The easiest method I have found is to parse the output of "ifconfig" command but it has also some drawbacks.
1. Firstly program should differentiate between physical and virtual adapters. Physical means installed on board(wired or wireless) or installed additionally. Virtual adapters are those created by VPN or created by virtualization apps such as VirtualBox/VMWare etc. I am not interested in virtual ones.
2. In case of more them one physical adapters(wired and wireless), it should print the mac address and description(name & vendor) of both/all adapters.
3. If media is disconnected then also it should be able to read the mac address and description(name, vendor) of card.
4. This one is bit complex. I know that 'ethtool' can show you the universal mac address but it's limited to use only 2 types of drivers and won't work in all cases.
I have been learning Debian by using a virtual machine. After fine-tuning my installation procedure, I decided to copy that installation to my physical system. The hard drive already has another Linux based system installed. I plan to dual boot.After copying files I updated fstab and menu.lst.
The partition scheme between the virtual and physical environments are similar, but the partitions are not mapped exactly the same.Thus the Debian system on the physical hard drive fails to boot. I think the initrd created in the virtual machine is looking for the root file system on /dev/hda1 whereas on my physical drive the new location is /dev/sda7.How can I rebuild the initrd on the physical system? Or how can I build an initrd in the virtual system that will function on the physical system.I started to use the installation DVD in rescue mode, but I did not get too far.
I had cloned a centos 5.6 installation from virtualbox virtual machine to physical box. Everything work fine. However, the time showing in os using date command differs from bios time by roughly 4 hours. I am running ntp services which sync the time with another centos server on the network. It appears that some services are using virtual clock and some use physical clock. How do I get rid of virtual clock and only use physical clock?
I am working on a few different Linux related self-education projects, and I'm trying to stump myself as much as possible so I can learn as quickly as possible. Using VMWare, I have several Linux and Windows flavors I am using for various purposes. To the point, I have an Ubuntu server (text only) and a Fedora desktop installed, and I need to figure out how to map a drive on the Fedora VM so that I can access it on the Ubuntu server VM. I have installed Samba on both, and I can send a ping from one to the other with no problems. I guess I just need some help with the command line syntax?
On a related note, I have NOT been able to figure out how DNS works in a setup like this, so when I say I can ping them, it is by IP address only. I'll work on the DNS stuff soon, but for right now, I just need access to my Fedora VM, unless for some reason you can ONLY set this up via DNS.
Ubuntu server 192.168.28.133 Fedora desktop - 192.168.28.130 Folder I need to access: [Fedora desktop]/home/[username]/downloads/
I have mounted a shared folder in Ubuntu in VirtualBox, but I have to remount everytime I restart. how do I make this command run (for mounting) on startup or make it permanent?
I'm running Android (without installing it) through VirtualBox under Ubuntu. I already added a folder of my Ubuntu system, in the shared folder settings in VirtualBox.Now the question is: how do I access this folder from inside the virtualized Android?where is it?
I'm mounting a shared folder in an arch linux guest on a windows 7 host in Virtual Box. The shared folder's filesystem is ext3 and is mounted in windows 7 with Ext2Fsd. I mount the shared folder at boot with this fstab:
The scenario like this. I'm working on Ubuntu 10.10. I've enable samba sharing with full guest access enable. In my office I had another server (CentOS 5.5) installed just for me and I've created a Apache VirtualHost which root document pointed to share folder on my comp
This is my fstab setting //my ubuntu computer name/sharing/www /media/www cifs context=system_ubject_r:httpd_sys_content_t:s0,username=username,password=******,iocharset=utf8,fi le_mode=0777,dir_mode=0777 0 0
After label the mount folder as httpd_sys_content_t the Apache web server working in correct way (duno much but at least it can index files and excute some php code so) then the troll come in : if some file was created by my ubuntu (personal comp) then the file would be listed in Apache virtualhost correctly.
But if I'm ssh to CentOS server goto /media/www which was mounted to my unbuntu computer. Then type command like $mkdir something Suprising that folder ./something could not be accessed by Apache anymore except I remount by umount and mount it again or "setenforce 0" What is wrong with my system can anyone point me out of this headache
i use virtual hosts to develop several web applications. These are located in my home folder under /home/user/projects/project After a fresh installation, i always get a 403 forbidden error. After googling and reading on this forum, several solutions are mentioned for this problem. But i can hardly believe putting using a chmod 755 on my home folder is a correct solution. What is the correct way of doing things in this situation?
So I got a bad physical volume inisde my logical volume. I want to do this safely rather than tinkering around, how can I get the bad physical disk out and look at the data on the other 2 drives to see if I can save anything? Its just the standard fedora setup where it combines all the disks, nothing fancy.
I have the volume group activated as a partial, and now I just want to see the data on the other sections how could I mount that?
We are working on our subscription renewal and now since Red Hat has changed their subscription model we need to give them the number of physical CPU sockets on each system.
I have tried looking thru /proc/cpuinfo as well as tried to parse data out from dmidecode but both of those solutions count each individual core as a CPU.
Is there a clean and easy way to determine the number of sockets on each system? We also use RHN Satellite to manage our systems but I believe that is pulling the same data from dmidecode.