Virtual environment for Linux Kernel hacking [closed] - linux

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 11 years ago.
This question is to practicing Linux kernel hackers:
Generally, it is best to test/play with linux kernel changes/hacks in a virtualized enviroment.
What virtual environment do you use for testing your hacks?
How do you make a minimalistic filesystem(with basic utils) to use with the environment. If you are using a readymade filesystem, what is that are you using?
Useful heuristics you do with your environment(like installing a new kernel, sharing files etc?
Please provide a step by step procedure to setup the environment, if possible.
A collection of this info doesnt seem available in web.
Thanks.

Different people use different set ups, I don't think there is one true answer.
I currently use VirtualBox as Hypervisor with a file system created with Buildroot.
Apart from other VMs (kvm, qemu, vmware etc.) you could also use User Mode Linux to much the same effect if your hacking is in the more "logical" layers of the kernel.

I'm currently using a Fedora14 VM running in QEMU/KVM on a Fedora14 host for my network driver development. I use a fairly standard install with the Software Development packages, plus whatever web or networking tools (e.g. wireshark) might be useful for the task. I typically set up a serial console on the VM and monitor it with minicom on the host - this helps me catch stack traces when I'm chasing a bug. I usually have my source and editing environment on the host machine with the files on an NFS file system that the VM mounts - this way I don't have to keep copying files to and from the VM. With the host running the same version kernel, I can compile the driver quickly on the multicore host and test it in the VM.

Related

Remotely install Linux on Windows xp using TeamViewer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Our customer has about 800+ computers running Windows XP distributed across the country. Each computer can be accessed using TeamViewer. The goal is to replace XP by a Linux distribution remotely.
Does anybody know if this is possible, and where to start?
Thanks!
PXE is your only realistic hope:
Some on-site assistance is needed to press F12 at Bios before Windows XP boot:
A) On PC-A, setup DHCP server that refer DHCP-client to PXE server that download Linux ISO from a web server (of course all three can be a Windows machine in the same LAN segment onsite)
B) reboot PC-B onsite to reboot machine and press F10-F12 to choose Boot-options
C) then choose network-boot (PXE-Boot)
further reading : https://www.vercot.com/~serva/
guide: https://youtu.be/nnxgFpUr1Og?t=39
Note: Make sure you have enabled proxyDHCP and not DHCP Server
I would try with something like these:
Clonezilla, which works by replicating a previously prepared disk image to one or more computers booted inside a network segment
Cobbler, which works like a provisioning server for Linux based machines
Of those options, I have used Clonezilla with success. As long as the prepared base image doesn't change too frequently, the main time consuming tasks would be related with configuring the Clonezilla server and building that seed image.
I did a basic test of Cobbler and it worked fine in my environment, being this a way that would be more apt to deal with requirement changes.
Please also note that both options require some network configuration, like DHCP server settings that work with the PXE protocol.
Also, for your requirement, someone, a human being, would be needed to execute one or more of these tasks:
Properly enable network booting in the BIOS of each of the 800+ machines, unless it has already be done before
Boot the machines to install the new operating system
The network booting option, based on the PXE specification, should be supported by the motherboard of those machines and have higher booting priority than other devices, like CD drives, hard drives, etc.
Another thing to consider for the couple of options I'm suggesting, is how are those 800+ distributed across the country. The more disperse they are, the more cumbersome this task will be. Quite contrary, if there are few places were those machines are located, the more feasible this task will be; for example, by preparing and testing a server, computer or laptop that you then carry to each of those few places and installing the new operating system.
Regarding the option to boot using the public Internet to reach a remote deployment server, I don't know about how that could be done; in fact, for me that would be something quite interesting to learn about. If something like this is possible, another variable to note is the hardware compatibility of the destination machines, because as far as I know, protocols like PXE do some kind of multicast or broadcast in the local network segment and I presume those 800+ machines don't have recent motherboards with advanced firmware that could support more modern boot protocols.
That's all for now.

Can Zynq-7000 be singled steped [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I want to use linux for the ARM core of Zynq-7000. But have a quesion on:
Can I single step debug the kernel from the IDE instead of just printk? Does the hard ARM core allows single step into the kernel and expose all the registers, flags, pc?
The eclipse-based tools for PowerPC and Microblaze (the Xilinx SDK) can do single step, and also supports the Zynq-7000.
From the linked Xilinx webpage:
SDK includes an integrated debugger supporting Zynq-7000 EPP, MicroBlazeâ„¢, and PowerPC processors. You can set breakpoints or watchpoints, step through program execution, view the program variables and stack, and view the contents of the memory in the system. You can also simultaneously debug programs running on different processors (in a multi-processor system), all from within the same debug environment.

Switching to linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've been using linux at university for quite a while, and it seems much more customisable and better for coding.
So I want to switch to linux from windows 7 at home.
What branch of linux should I use? I'm an emacs user if that gives any insight.
Which desktop enviroment should I use? At uni we use KDE, but it's too graphical, often I just click on stuff instead of using the terminal. I want one where it encourages me to use terminal more.
and the biggest question, how do I install it all? Should I put everything on external hard drive and wipe my computer completley?
I primarily program in Java and python.
I would recommend that you first try using Linux off Live CD/DVD. Linux Mint, Ubuntu, etc.
Just download and burn .iso onto blank media and boot your computer off of it. Just play around, check various desktop environments, see if all your hardware work with the specific Linux distribution. This step is very useful to decide which distribution you actually want to install onto your computer, especially the latter since, while it has been improving, the biggest obstacle you may face in configuring your computer to run on Linux is often hardware incompatibility. Just make sure everything that you need to work actually works.
If you have no issues wiping out Windows, Linux installation is pretty straightforward these days. It even takes less time in general than re-installing Windows. I would browse the web for an installation note for your specific computer model to see if anyone has already successfully done so, so that you can just follow. That saves a lot of time.
I use Debian (Wheezy now) and KDE. It's very easy to install and switch desktop environments after installing Linux though, so that shouldn't be any concern.
I suggest creating a virtual machine using VMWare or Virtual Box. As far as the distribution goes, Linux Mint and Ubuntu are pretty user-friendly for first time installations. And for the desktop environment, I suggest XFCE.
A few Google searches will do you good. I think a virtual environment will be much more easier to manage than partitioning a hard-drive.
Well, the installation step, if you use Windows 7, you may want to make a full backup of your hdd - so if things go wrong you will be safe and able to recover.
I was in somewhat similar situation recently - figuring out which linux distro to use. Previously I had luck with ScientificLinux, but this time it didn't like my laptop hardware for some reason - after wake-up wireless network card was getting stuck and wasnt picking any signal. I didn't want to recompile kernel etc., so I installed Ubuntu, but the Gnome 3 was a show stopper - I had to roll back to Gnome 2, but later I tried and liked a lot XFCE desktop - which I use right now on my workstation and laptop.
Java, Python and emacs probably work well with any linux distribution out of the box, so it is up to you which one to choose after all. Good luck!
Sorry, forgot to mention - all contemporary Linux distributions are able to install a dual boot feature - so you can keep your Windows 7 setup along with Linux (if you have enough of free space), moreover Windows partition will be accessible from Linux which is handy sometimes.

Which Hypervisor should I use? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
This is more of an advisory question.
I am into a virtualization project and need a good software to do that.
Basically I am into Desktop virtualization that allows to run multiple operating systems on the same physical hardware.
I cannot afford to buy the developer APIs of VMWare, so I have moved on to Linux.
I did some research on the same and learnt that Xen can't be installed on Fedora 16. Is it true? because I am doubtful of the same.
My Questions are :
Which Operating system should I install?
Fedora 16 /Ubuntu 11.10 /Any other?
Which software for the same?
Xen/Any other?
I want an advise because I am using it for the first time and any post-installation problems will hurt me bad.
I am a newbie in linux... Can anyone please help me out on this?
P.S. : No offence, I am not asking which is the BEST! I am just asking what will suit my purpose.
If you are looking for APIs you are probably most interested in libvirt for simple ESX style api for interfacing LOCALLY with the virtualization hypervisor on your system.
libvirt works with qemu, kvm, and xen and probably more.
http://libvirt.org/
redhat has traditionally had better virtualization support in its enterprise offerings. but fedora is not that. I'd suggest ubuntu oneiric.
If you are looking for a REST API to talk to a large number of virtualization servers... ala vsphere. I'd suggest looking at openstack.
http://www.openstack.org/
http://www.devstack.org/
http://www.trystack.org/
I have used VirtualBox several times. I had some production servers running virtualized on Linux with it. I think it was bought by Oracle, but still open source and free (I hope :)
Take a look at it, may be is what you need. I remember installation and configuration was easy, and very well documented.
It seems you want to begin with Linux as a Windows guy. Why not to intall Microsoft Virtual PC? I bet it does support Linux and all modern distributions will likely work.
I also recommend VirtualBox as a good starting point for you if you want to use Windows as a hypervisor.
If you want to use Linux as hypervisor, I recommend to stick with standard KVM. E.g. in RHEL (CentOS) or Fedora you can use it easily. Definitely read this document: Virtualization Getting Started Guide
http://docs.fedoraproject.org/en-US/Fedora/18/html/Virtualization_Getting_Started_Guide/index.html
As it explains everything to start with virutalization including very easy setup and installation on Fedora Linux. It also applies to Ubuntu, but the installation procedure will be different. But you will end up using the very same tools and software.

What is the current state of art in Linux virtualization technology? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What VM technologies exist for Linux, their pros and cons, and which is recommended for which application?
Since this kind of question can be asked for X other than "VM technologies for Linux", and since the answer changes with progress, I suggest to define a template for this kind of pages. Those pages will have the tag 'stateoftheart' and they will be revisited each month and each month there will be up-to-date list of technologies, up-to-date reviews and up-to-date recommendations.
This is a job for ... Wikipedia!
Types of Virtualization
Platform Virtualization
Comparison of Virtual Machines
Now that the obvious stuff is out of the way...
Linux runs fine as a guest on every VM host I've used, so I'm going to assume that you're referring to Linux as the host operating system. I'm also going to assume x86 or amd64 hardware.
Platform virtualization breaks down into two major forms: Desktop virtualization and Server virtualization. Both types will allow you to load and run multiple OS instances as guests that virtualize their I/O through the host OS. Desktop virtualization concentrates on providing a highly interactive console experience for each of the guest VMs, while Server virtualization concentrates on maximizing computing performance, generally while sacrificing console services and more exotic devices (Sound cards, USB, etc.) Server virtualization implementations typically include either RDP or VNC for remote access to a virtual console.
On Linux, your choices for Desktop Virtualization include:
VMware Workstation -- it's commercial, somewhat expensive, mature, and provides the most hardware, device, and guest OS support of any solution.
VMware Player -- it's commercial (freeware) and only supports VMs that were created elsewhere. Available with Ubuntu.
Parallels Workstation -- it's commercial, somewhat expensive, and not up to par with VMware. Doesn't support 64-bit guests.
VirtualBox -- available in commercial (freeware) and community versions (GPL). Fedora's preferred solution.
On Linux, your choices for Server Virtualization include:
VMware Server -- it's commercial (freeware), mature, and provides the most hardware, device, and guest OS support of any solution. Available with Ubuntu.
Xen -- it's open source. A para-virtualization solution, it has only recently added hardware-virtualization, so Windows guest support depends upon specific CPU support.
Virtual Iron -- a commercialized version of Xen that adds native virtualization.
KVM -- it's open source. It depends upon QEMU for the last mile. Ubuntu's preferred solution.
Linux-VServer -- it's open source. It provides virtual jails based on the host OS kernel, so no Windows guests.
For myself, I stick with VMware Workstation (7+ years) and VMware Server for my Linux-hosted virtualization needs. At work, it's VMware Workstation (on Windows), VMware Server (on Windows), and VMware ESX (on bare metal). I'll probably have another look at Xen, KVM, and VirtualBox at some point, but for right now compatibility between work and home is paramount.
2008 Oct
To be filled in at October to reflect the market status then.
2008 Sept
Products/services/technologies currently existing
VMware
Xen
VirtualBox
VServer
???
Comparisons
???
Recommendations for particular application areas
Home multi-boot replacement
Small business which has MS-Windows legacy applications
Datacenter of multinational corporation
???
W Craig Trader answer is great, but just to add there is also User-mode Linux (UML) which has been around for a while - it has been in the mainline kernel tree since 2.6.0 . Note that I haven't used it myself.
Ubuntu prefers KVM, and I believe Red Hat is moving to it over Xen now as well. Both KVM and Xen can be managed by libvirt, optionally through the virtual machine manager GUI. The virtual machine manager can manage remote instances through ssh connections.
In addition, a good comparison can be found here (pdf). Lots of performance tests done. The short version is that xen and linux-vserver were generally the best on performance grounds.

Resources