Who loads the code in BIOS during booting? - bootstrapping

I am studying the boot process in Linux. I am looking through this html page http://www.tldp.org/HOWTO/Bootdisk-HOWTO/x88.html. The first line under the section 3.1 "The boot process" says that "All PC systems start the boot process by executing code in ROM (specifically, the BIOS)".
My doubts are
Who loads the code in BIOS ?
Where is this code in BIOS located ?
To where is the code in BIOS loaded and executed ?
Kindly tell me references where i can get more information
Thanks,
LinuxPenseur

The code is already there in memory when the computer is powered on. It is in non volatile memory, meaning it doesn't disappear when the computer is turned off.
So the code is already there in a specific memory address, and the processor starts by running it.
More info here

A good question! Actually you do not need to reformat the HDD or even reinstall the OS on it unless the new PC is unable to run the existing OS on the drive.
Commonly, if you did a simple install of a Linux distribution, you would have no trouble moving the HDD to a new system and just running it. But if the OS is a version of Windows, the chances of this being the case are nearly zero: hardware vendors nearly always tune their device drivers for Windows so you cannot even use the same driver for two versions of Windows on the same machine (upgrading from XP to Windows 7 for example, often requires that you redownload at least a few hardware drivers).
And the problem often arises even with Linux if you have installed any high performance drivers. Sometimes you can perform a "recovery boot" from GRUB or LILO and get into a text mode screen with internet access, though. And if you can do that, often you can install the drivers for the new PC on the Linux HDD without doing a complete reinstall of Linux.
In fact, this is actually what that install CD or DVD is actually doing. It boots to a very vanilla flavor of the OS (Windows or Linux), then installs drivers for the hardware it detects, reboots (hopefully with functioning drivers) and wraps up the install process.

Related

Why is ruby on rails testing super slow in linux?

I have reviewed blogpost from 2008 to date. I have Inherited a ruby ​​on rails project for which I need to increase the test code.
I work on a laptop asus computer with an 8gen cpu i7U with 16gb ram and a 512gb ssd.
Initially I was running ubuntu 19.10, when I started the project and with about 1200 tests. it takes more than 1hr to run. Whereas on a 2015 macbook pro with 8gb of ram and an hdd, it takes only 2-3 min.
The log / test.log does not report errors, the tests do not hang, but waiting too long is not efficient, especially when i'll be increasing the number of tests.
So I Uninstall ubuntu, wipe off the ssd, install solus, arch and ubuntu, with the same setup for all through asdf as version manager and in no distro the time is less than 1hr.
Does anyone know why this happens in linux? The mac setup is also through asdf and it is fast enough.
Without knowing the specifics of the codebase or the tests, this question is equivalent to "how long is a piece of string."
There are many differences between linux and macOS. Cryptographic libraries may have different defaults. Memory limits for threads will be different. Memory limits for processors may be different.
Unless you can isolate specific tests which are wildly different and extrapolate from there, it's almost certainly going to come down to OS-level differences.

Error "LoadLibrary failed with error 126: The module could not be found" when launching Spyder IDE through VPN

Here's what happens:
Using a Macbook Pro, I use the Microsoft Remote Desktop Connection application to connect to my work computer, which is a Windows 10 machine
If I try to launch Spyder on my work computer, I get this error:
Load Library Error
However:
If I am at my work computer (i.e. physically at work instead of logging in remotely), I can launch Spyder successfully
If I leave Spyder open on my work computer, then go home and do a remote log-in to my work computer, I can use Spyder without issue. The problem/error described above arises only if I try to open Spyder through the remote connection.
This error only seems to affect Spyder and I can use all other programs without issue through a remote connection. As a workaround I've been using other IDEs and successfully running scripts, but I strongly prefer Spyder.
What I have tried so far (without success):
The 4 troubleshooting steps posted by Fazil M. to this Microsoft thread
Uninstalling/reinstalling Spyder using Conda
Restarting my work computer
System Information:
Work Computer OS: Windows 10, 64-bit
OS of computer through which I'm logging in to work computer: Mac OS X El Capitan 10.11.6
Spyder version: 4.1.1
Any thoughts as to what could be going on?
Update--More information and trials:
I checked out Issue #3736 on Spyder's GitHub. It says to download and add a file called opengl32sw.dll to the folder ~\Lib\site-packages\PyQt5\Qt\bin. But when I go to the PyQt5 folder, I do not see a subfolder for Qt. I tried placing it into the PyQt5 main folder, but that did not fix the problem.
I've heard this can be a graphics card issue too. On my machine I have two graphics cards: AMD RadeonT R5 430 and Intel(R) HD Graphics 630.
Darren's answer did not work for me. What did work was to:
First option: go into the device manager and disable the Intel HD Graphics card under "display adapters."
Second option:
run "Gpedit.msc"
navigate to Computer Configuration->Administrative
Templates->Windows Components->Remote Desktop Services->Remote
Desktop Session Host->Remote Session Environment
Disable "use WDDM graphics display driver for remote desktop
connections"
Restart the computer
See https://answers.microsoft.com/en-us/windows/forum/all/windows-10-1903-may-update-black-screen-with/23c8a740-0c79-4042-851e-9d98d0efb539
It took help from my organization's IT contractor, but I fixed the issue by doing the following:
Run a file called "gpedit.msc", which will open up a window for Local Group Policy Editor
In the tree menu on the left, navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment, and open the Remote Session Environment folder (not the subfolder within it)
Make sure the following are set to "Enabled":
"Use hardware graphics adapters for all Remote Desktop Services"
"Prioritize H.265/AVC444 graphics mode for Remote Desktop Connections"
"Configure H.264/AVC hardware encoding for Remote Desktop Connections"
Then restart the computer.
Since I was unable to get pass LoadLibrary 126 error using the solutions provided online and on here, I stepped back and realized the obvious workaround. The errors occurs when you open the program while you're using a remote session, right? The obvious solution is to launch the program while a remote session is not in progress. To do this while you're remoting, you should create a batch script to launch the program but make sure to include to a time delay before that (I used 'timeout 10 /nobreak' to do so). Run the batch script and, before your program launchs, disconnect from RDP. After enough time passes for the program to launch, you can reconnect to RDP and your program will be up and ready

How to install Torch on windows 8.1?

Torch is a scientific computing framework with wide support for machine learning algorithms. It is easy to use and efficient, thanks to an easy and fast scripting language, LuaJIT, and an underlying C/CUDA implementation.
Q:
Is there a way to install torch on MS Windows 8.1?
I got it installed and running on Windows (although not 8.1, but I don't expect the process to be different) following instructions in this repository; it's now deprecated, but wasn't deprecated few months ago when I built it. The new instructions point to torch/torch7 repository, but it has a different structure and I haven't been able to build it on Windows yet.
There are instructions on how to install Torch7 from luarocks, but you may run into issues on windows as well; I haven't tried this process. It seems like there is no official support for Windows yet, but some work is being done by contributors (there is a link to a pull request in that thread).
Based on my experience, compiling that deprecated repo may be your best option on Windows at the moment.
Update (7/9/2015): I've recently submitted several changes that fix compilation issues with mingw, so you may try the most recent version of torch7 and follow the build instructions in the ticket. Note that the changes only apply to the core lib and additional libraries may need similar changes.
This webpage hosted by New York University recommends installing a Linux virtual machine in order to run Torch7 on Windows through Linux. Another option would off course be to install a Linux dist in parallel with Windows 8.
Otherwise, if you don't mind running an older version of Torch, there is a Windows installer for Torch5 at SourceForge.
I think to use a GPU from inside the virtual machine, the processor and the motherboard should not only support VT-x , but VT-d should be supported too.
But the question is, if I use a CPU with VT-d supported, do you think there will be a significant loss in PCIe connections efficiency?
From what I understand,
VT-d is important if I want to give the virtual machines direct access to my hardware components (like PCI Express cards). Like directly attach graphics card to vm instead of host machine. Isn't that mean that the PCIe connections efficiency will be the same just like if it was the host?

Delphi 6 Update 2 installation workaround on Windows 8.1 x64?

I need to work with Delphi 6 Update 2 in Windows 8.1 x64 (in case you were wondering, it's about maintaining an old application, migrating to a newer version is not an option. I can't use a VM because I use the same machine to connect to some peripherals that don't work in a VM).
The problem is that Update 2 has a 32 bit installer with a 16 bit stub. So the current behaviour is that the installer starts, it extracts the files in a temp location, starts the setup then nothing appears on screen.
So far, I gathered that it is impossible to do it. But the same behaviour I 've seen for SQL Server 2000 (don't ask) but there I was able to use msetup.exe (DemoShield) to open a sqlservr.dbd that started the script. However, there is no such dbd file. I guess I was lucky on SQLServer 2000.
So far I've tried compatibility mode, DosBox, replacing the setup file with both Installshield 3 and 5, waiting for hours for the setup to start (sometimes, W8 does that), even comparing files and registries on an XP machine before and after update 2 but this might be a bit too risky to apply on a real machine.
Since Windows 8.1 86 includes Hyper-V for running VMs, most modern hardware supports Hyper-V, and Windows 8 x86 can still run 16-bit based apps:
Install a Windows 8.1 x86 VM under your host physical machine, then install it there.
The up-tick: it is easy to move your VM to a new host without needing to reinstall a full new VM.
See http://www.techrepublic.com/blog/windows-and-office/get-started-with-windows-8-client-hyper-v-the-right-way/7893/ and http://www.infoworld.com/d/virtualization/5-excellent-uses-of-windows-8-hyper-v-208436 to get started with Hyper-V.
Hyper-V can redirect quite a bit of hardware from the host to the VM nowadays. For "old" hardware like COM and LPT ports you often can buy USB adapters that can be redirected.
If installing on x86 Windows 8.1 works and x64 fails, I think you have proved the assumption that the 16-bit portion of the installer is the culprit.
Maybe my blog post from last year can solve your problem:
http://blog.dummzeuch.de/2013/11/11/delphi-6-on-windows-8-1/
excerpt:
I just deleted the registry entry
HKCU\Software\Borland\Delphi\6.0\LM
(I did not make a backup, what would have been the point?)
I started Delphi 6, ignored the warning about incompatibilities (which was talking about Delphi 7 anyway) and went through the registration/activation process again. This time it worked.
Maybe I should mention, that I did not install any of my Delphi versions to c:\program files but put them into c:\Delphi instead to avoid any problems with access rights to the installation directory.

How to make a struts2 project an executable Application

I have developed a Struts2 Project using Apache server and MySQL database.
Is it possible to make this application an executable application so that i do not need to give JDK, Apache and MySQL separately to the user. The installer could install all these 3 itself.
Also can i make this so that only a single user can use this application. How Please Tell.
Usually a Web Application has a central server (with at least: a Java Virtual Machine, a Web Server / Application Server, a Database, and the Web Application contanining the Java code), and all the client computers use their browsers to connect to it.
The kind of application that seems to arise from your description is a monolitic one, like a GUI App made in Swing or in Visual Basic; you install it in the clients, and each one has a copy of each component. If you install it 20 times, you will have 20 database, 20 copies of the files, etc...
Even in client-server applications, with centralized database and distributed code, the problems were always client-related; you can't know if the system were you are automatically installing a database, an JDK etc... already has that software, maybe in other versions, or has the environment variables messed up etc. When you need to update the software, or to tune up the system, you need to be physically log to that pc, remotely or by person. This are some of the reasons that led to the choice of preferring Web Applications to distributed applications.
If you need to craft a "package" of your application to be installed in one click by a dumb user (let's say, a portable version of your application, to let your PM perform some Demo in remote locations, or to give it to the big boss to let him see it), you should really evaluate the possibility of creating a Virtual Machine.
A Virtual Machine is a big file (on a hard disk, or read by an USB key, etc) that, once mounted by a Virtualization Software (usually the same software that created the Virtual Machine), will run an entire new OS inside a window of your guest OS.
The leading software to do this is VMWare (the Player is free and cross-platform), alternatively you can use VirtualBox.
Then, you need to
download VMWare Player
download the ISO of your favourite Linux distribution (I hope you don't use Windows as server)
create a, let's say, 10GB partition for your Linux distribution with VMWare Player, and mount it
plug the ISO with something like (the free edition of) Daemon Tools
install the Linux distribution
install and configure all the software you need there (Apache, MySQL, your favourite browsers, etc; JVM usually is already there)
install your web application
Then you will have a physical file with a complete Linux OS inside, with all the needed software already tuned up: just distribute this file to Windows, Mac or Linux users, they will only need the VMWare Player installed to run your file and access (their copy of) your application inside the Linux OS.

Resources