25 August, 2014

Partitioning, GRUB and Boot-Repair

Tux, the Linux penguin
Tux, the Linux penguin (Photo credit: Wikipedia)
Sunday afternoon, 24-Aug-2014


I was configuring the pagefile.sys partitions in my Windows 8.1 laptop, which is currently also having dual-boot feature – yes, I am running Ubuntu Linux and Windows 8.1 in the same machine, and I am always enamored by the simplicity and ease of use of Linux. But that time I was in Windows, and having read some useful article which tells of how to make pagefile.sys work better, I proceeded to execute the necessary changes.

First point is to use a space in a drive other than where your OS is installed, and better yet, create a partition all for the page file’s use. However, you can’t ever get away from creating a page file in the OS’s same drive – this has its own use. So now, you need to have 2 partitions for the page file, one in the drive where your OS is installed, and another in a separate drive. How big is the size? This is a big question, and the standard answer is 1.5x your installed RAM size. Not exactly correct, the guy said. Primary use of page file is to move from RAM whatever memory of inactive programs into the page file. So how big is that? Not really big. Minimum? 1GB. Maximum, twice of that. So simple math would yield 2GB. That is all you need. Quite small, eh? Just enough. That is why you need to have the page file in the (usual) installation drive for the OS, which is C: drive, because of error and crashes, when there is no time to reach the other paging file in the other drive. To be convenient, just set aside 4GB to 8GB. How you divide between the 2 partitions, that is entirely up to you.

I thought that I was all set, and proceeded to go and create the partition, so I downloaded and installed EaseUS Partition Master, and get it to work on my requirements. Easily I identified where I would be slicing off the 8GB, and that was divided into 3.5GB from C: drive, and 5GB from P: drive. With the ease of use provided by EaseUS Partition Manager, that was a breeze. Just right-click on the drive, and drag either the bar on the left or on the right, to create a space before or after it. Really, it is all that easy. I clicked on OK, then on Apply, which asked for a restart.

I yielded. And that’s when the problem started.

GRUB failed, and it stopped on a prompt that I have never seen before. And it is indicating something like ‘unrecognized drive’ or ‘unknown drive’. I immediately guessed that it was the newly-partitioned space that is still pending processing. I remembered that it was after P: partition that the \sda14 formatted as EXT4 is located, and that might have impacted GRUB.

I almost panicked. Hey, it is only about 5 months since the last disaster happened – Ubuntu Linux installation was done by mistake, overriding Windows, and fortunately, I was able to recover much of my documents, especially the important ones.

I composed myself for some time, trying to figure out, what happened, and what can be done to do recovery. At least I reasoned to myself that Windows and Linux are still intact, since nothing was done, except that the additional partition may have affected GRUB – I still don’t know why.

And to verify my guess, I turned on my other laptop, thought hard on what I should be searching for, until I typed, ‘how to fix GRUB’. One guide told of doing some manual recovery using a Live Linux stick, which I could say works to a certain degree, but no completely. I got to see GRUB, but not the usual menu, which is supposed to show Windows and Linux. Only Linux shows, and when I selected it, it still didn’t boot up to Ubuntu Linux.

I continued to search for other possible recovery methods, and that is when I saw Boot-Repair – one that you install, and it will do the recovery for you.

I installed it, and run it. First time, I didn’t get it to work; I still wasn’t able to get GRUB boot into Linux.

I did another Linux Live stick session, and this time, using the data from the manual recovery article, which identifies the Linux installation partition, and the GRUB partition (which indicates ‘boot’). I went to the Advanced settings, and assigned the MBR to the partition carrying ‘boot’ ID, run the recovery as provided by Boot Repair apps, and that fixed the problem.

When I did a restart, I see the Windows and Ubuntu choices, and yes, there is another, I guess, from the previous run, where I didn’t specifically indicate the MBR partition. I guess I will look for ways to remove that, so it doesn’t cause any other problem, but point is, my GRUB was repaired, and that only took some time, about one hour or so.

Oracle XE, ODP.NET and Oracle 9i in the same Windows XP machine

English: The logo of Oracle Corporation de:Bil...
English: The logo of Oracle Corporation de:Bild:Oracle-Logo.svg he:תמונה:Oracle Logo.jpg (Photo credit: Wikipedia)
Saturday night, 23-Aug-2014


For a couple of weeks now, I have been figuring out how to make Oracle 9i and Oracle XE work in the same machine. For a long time, I have been running Oracle 9i and ODP.NET, designing, developing and maintaining applications using the Oracle RDBMS. Only lately when I started working in a new company that I am having restricted access to databases that I had to resort to some local DB, even on my old XP machine. I have the disc space to begin with.

And having some access on some Oracle dB means I had to also create and maintain a local dB that is Oracle-based. In comes Oracle XE.

That is when I started experimenting with Oracle Express Edition, and with 11g as the latest, and with ODP.NET version of 10.x.x, did not think of having a compatibility issue, even then, since I was doing all these in a Windows XP-based unit.

Then I got the problem. I mean, I don’t know how it happened, but for a moment, after initially installing oracle XE, I was getting both local dB and data warehouse dB (using TNS) to work. I was very happy. And as in all installs, I did a reboot. And if in most cases, a reboot would rebuild and repair and renew settings and realign once again everything – as new – something now doesn’t work. I either would get the DW dB to be working, and Oracle XE dB to be broken, or vice-versa.
I did many things, like tweaking the Path variables, the 3 .ora files, even the TNS_ADMIN variable and value, pointing either to the Oracle 9i directory, or the Oracle XE, and like I said, I would either get one or the other, but not both. And in most cases, I get the DW dB which is using TNS, to be the one working. Doing a PING to XE would result in error, but TNSPING to XE would give a positive result. But both PING and TNSPING to 127.0.0.1 would give both a positive result.

As in previous issues and problems, I did a lot of searching. And this becomes complicated, because I have to wait until I get home then I will be able to look up ORA-12154, ORA-12514, ORA-12528, etc., etc., because internet access is also restricted! Bummer!

There were some suggestions that focused on setting up, if not already, TNS_ADMIN variable in the system variables, and assigning its value to the Oracle XE …\network\admin path, and I tried this one, adding, removing, changing, then putting it back to Oracle 9i …\network\admin path, and still, I would either get one or the other, but not both. And still the same, I would usually be having the DW dB working, but not the Oracle XE dB.

I should mention that for each trial, I am either uninstalling Oracle XE, at least, or I would uninstall all of Oracle XE, ODP.NET and Oracle 9i, in sequence. And in reinstalling, it is also in the same order: Oracle XE, then ODP.NET, and finally, Oracle 9i. I believe it is common knowledge for all who have tried it, that for ODP.NET to work with Oracle 9i, the installation should be in that sequence. This is more or less something to do with the final value of Path in the system variables, and even in the default Home selection for Oracle.

Also, after each uninstallation, I would run CCleaner to remove invalid registry items, after a reboot. And after running CCleaner, another reboot, to really be sure that I am starting clean.

After many trials and errors, I made it to work. I did a reboot, and I checked, and it is still working. Another reboot, and it is still working. I run CCleaner, to once again remove invalid registry items, then a reboot, and yes, I confirm that both data warehouse dB using TNS and Oracle XE dB are both working.

Monday morning, 25-Aug, when I came to work, I booted up my PC, tested the 2 dBs, and they are working. I did a reboot, just to be really sure that I am not dreaming, and yes, both are working.

What did I do to make it work?
  1. I removed the TNS_ADMIN setting from the System Variables. So it is now the individual .ora files being looked up and evaluated when I do a connection to each dB. (I think).
  2. After the installation, I did not touch the .ora files, which means that whatever value that was created by the installers, then that was it. No tweaking or whatever.
  3. The ODP.NET …\network\admin folder does not contain any .ora file. That’s a fact. It is just the dll file anyway that is required by .NET applications. Nada mas.
The day is now closing, and I have done quite a number of reboots – I am just very, very curious if the working condition will be sustained throughout the day. And yes, even as the day is already closing, I still get both data warehouse dB using TNS, and the local dB, using Oracle XE. I guess some times, you just keep your hands off things, and they will work on their own. They don’t need our help. 

Sometimes.

Till then!

11 August, 2014

Nature's Joystick: The Brain

English: This is a photo of a dummy BrainGate ...
English: This is a photo of a dummy BrainGate interface which was at the Star Wars exhibition at the Boston Science Museum in October 2005. I took it myself. (Photo credit: Wikipedia)
11-August-2014
-----


by Nick Bilton


Engineers studying the programming code for Google Glass in April found hidden examples of ways that people might interact with the wearable computers without having to say a word. A nod could turn the glassed on or off. A single wink miht tell the glasses to take a picture.

But even these gestures might not be necessary for long. Soon, we might interact with our smartphones and computers simply by using our minds. In a couple of years, we could be turning on the lights at home just by thinking about it, or sending an e-mail from our smartphones without even pulling the device from our pocket. Further into the future, your robot assistant will appear by your side with a glass of lemonade simply because it knows you are thirsty.

Researchers in Samsung's Emerging Technology Lab are testing tablets that can be controlled by your brain, using a cap that resembles a ski hat studded with monitoring electrodes, the MIT Technology Review, the science and technology journal of the Massachusetts Institute of Technology, reported in April.

The technology, often called a brain computer interface, was conceived to enable people with paralysis and other disabilities to interact with computers or control robotic arms, all by simply thinking about such actions. Before long, these technologies could well be in consumer electronics, too.

Some crude brain-reading products already exist, letting people play easy games or move a mouse around a screen.

NeuroSky, a company based in San Jose, California, recently released a Bluetooth-enabled headset that can monitor slight changes in  brain waves and allow people to play concentration-based games on computers and smartphones. These include a zombie-chasing game, archery and a game where you dodge bullets -- all these apps use your mind as a joystick.

Another company, Emotiv, sells a headset that can read brain waves associated with thoughts, feelings and expressions. The device can be used to play Tetris-like games or search through Flickr photos by thinking about an emotion the person is feeling -- like happy, or excited -- rather than searching by keywords. Muse, a lightweight, wireless headband, can engage with an app that "exercises the brain" by forcing people to concentrate on aspects of a screen, almost like taking your mind to the gym.

Car manufacturers are exploring technologies that detect when people fall asleep while driving and rattle the steering wheel to awaken them.

"The current brain technologies are like trying to listen to a conversation in a football stadium from a blimp," said John Donoghue, a neuroscientist and director of the Brown Institute for Brain Science in Providence, Rhode Island, "To really be able to understand what is going on with the brain today you need to surgically implant an array of sensors into the brain."

In other words, to gain access to the brain, for now you still need a chip in your head.

Last year, a project called BrainGate pioneered by Dr. Donoghue enabled two people with full paralysis to use a robotic arm with a computer responding to brain activity. One woman, who had not used her arms in 15 years, could serve herslef a drink by imagining the robotic arm's movements.

But that chip inside the head could soon vanish. An initiative by the Obama administration this year called the Brain Activity Map project aims to build a comprehensive map of the brain.

Miyoung Chun, a molecular biologist and vice president for science programs at the Kavli Foundation, is working on the project. Although she said it would take a decade to completely map the brain, companies would be able to build new kinds of brain computer interface products within two years.

"The Brain Activity Map will give hardware companies a lot of new tools that will change how we use smartphones and tablets," Dr. Chun said."It will revolutionize everything from robotic implants and neural prosthetics, to remove controls, which could be history in the foreseeable future when you can change your television channel by thinking about it."

There are some fears to be addressed. On the Muse website, one passage is devoted to convincing customers that the device cannot siphon thoughts from people's minds.

Dr. Donoghue said one of the current technologies used to read people's brains is called P300, in which a computer can determine which letter of the alphabet someone is thinking based on the area of the bran that is activated when she sees a screen full of letters.

But that even when advances in brain-reading technologies speed up, there will be new challenges, as scientists will have to determine if the person wants to search the Web for something in particuular, or if he is just thinking about a random topic.

He said, "Just because I'm thinking about a steak medium-rare at a restaurant doesn't mean I actually want that for dinner."


-----
Taken from TODAY Saturday Edition, May 4, 2013

06 August, 2014

Readyboost: sysmain.com

English: Screenshot of Microsoft's chkdsk.exe ...
English: Screenshot of Microsoft's chkdsk.exe (NT version) in action. (Photo credit: Wikipedia)
06-August-2014


I had to upgrade my old laptop from Windows Vista to Windows 7, as I find that Vista doesn't cut it. It was nice, if you are coming from Windows XP, but after a couple of Vista years, and having experienced Windows 7 at work, I decided to do an upgrade.

So I did.

It was a move I wouldn't regret, as Windows 7 is definitely better. And even more so, that it has Readyboost feature. I know, it is not a replacement for RAM, but as I understand, it is additional cache memory, one that prevents frequent reading from solid-state disc drives, so it helps!

Then came the problem.

As I have bought a new laptop, and one that is running Windows 8.1 OS, I have almost forgotten to do the occasional check and clean-up routines. And my girls aren't saying anything about the old laptop. They just turn it on, use it, and shut down. No word.

When I remembered to do the usual check, I found that Readyboost isn't working. I saw that the thumb drive size of 4.GB is free. I thought maybe Readyboost was just turned off. When I tried to activate it back, I got the error, saying something about 'sysmain.com' problem.

I searched for this on the web, and I found some that suggested running Super Prefetch, or something like that, and when I tried to follow on the instruction, I got lost. And there really was no clear direction, because it tells of doing some other things -- maybe that is how it got fixed -- for them.

A few days of searching and trying, and finally, I gave up on it. I just did the usual chkdsk /f /r thing on all the drives, and yes, I remember running sfc /scannow, which, unfortunately, found some problems, but also reported that it cannot fix the problem. It was supposed to, but the fixer itself ran into some problem that it failed to fix the problems it found. Wow! The doctor is sick...

And as I said, the last thing I did was run chkdsk /f /r on all the disks, which required the checking for some drives to be on restart.

The laptop was restarted, and chkdsk did its thing, and guess what happened? It fixed the Readyboost problem! I just went back to right-clicking the thumb drive and turning on Readyboost, and it did turn back on! How's that? I still don't understand how or why, but one thing I am sure of, Readyboost in my old laptop is back, so it got some speed gain.

If all else fails, why not try chkdsk /f /r? It might just work for you... also.

Till then!