Installing Altera Modelsim on 64-bit Ubuntu 14.04 – Linux

I downloaded and the ModelSim-Altera Starter Edition for Linux from Altera (now part of Intel) website at the following webpage:

http://dl.altera.com/?product=modelsim_ae#tabs-2

I then installed it on the 64-bit Ubuntu-14.04. After which I ran the following command from within the bin directory of the installed Modelsim and despite the executable present I got the following error:

command$> ./vsim: No such file or directory

I investigated further on internet and found that I require 386 – 32-bit libraries for Ubuntu since the Modelsim seems to be 32-bit. So I took the following steps on the Linux command prompt:

$>sudo dpkg –add-architecture i386
$>sudo apt-get update
$>sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
$>sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

After installing the above, and invoking vsim, I got the following error:

libXft.so.2: cannot open shared object file

So I took the following steps:

$>sudo apt-get install libxft2 libxft2:i386 lib32ncurses5

Then I got the following error and to fix that I took the following steps

libXext.so.6: cannot open shared object file. libXext.so.6 not found

$>sudo apt install libxext6

$>sudo apt install libxext6:i386

And finally, this solved the problem. I was able to invoke Modelsim using ./vsim command.

Share Button

Restoring a Laptop When the System Restore (OS factory reset) Discs Fail

Just want to share my experience and learnings in upgrading the hard drive of my laptop and restoring Windows OS from restoration discs provided by the manufacturer. I had bought a HP-G62 107SA laptop a few years ago. This laptop came with an Intel Core-i3 M330 processor and 320 GB hard drive. The OS that the laptop was shipped was Microsoft Windows 7 Home Premium, pre-installed. The laptop did not come with any Windows installation or restoration disc however it came with a software utility that allowed me to create restoration discs. In past laptop manufacturers used to supply Windows-OS installation discs along with the laptop but now they only supply a hard drive partition with factory utilities from which one could create such OS factory restoration discs. So I created the restoration DVDs, total 3 discs, which I never needed to use until now. Also the restoration discs can only be created once, the utility does not allow the discs to be created again.

Recently, I started running out of the disc space so I decided to upgrade the hard drive to a TB. I purchased a 1 TB 2.5 inch laptop hard drive and replaced it with my current hard drive. I then bought a 2.5 inch SATA enclosure and put the old hard drive so that I can still access the data whenever I want to.

The new hard drive was blank and I needed to restore everything to its factory reset state, as it would have shipped to me from the factory, so I made use of the  OS factory restoration discs that I had created. I inserted the first disc, no problems in its installation and Windows files copying, then second and then third. It took about half an hour. After which the laptop booted from hard drive and showed me the windows logo and while still continuing the installation process. After few minutes and few cryptic messages the restoration utility popped a message stating that the restoration had failed and the first disc should be re-inserted. This was extremely frustrating, after waiting for almost half an hour the installation failed for no apparent reason I re-inserted the first disc and then pressed retry but it did not accept the disc and kept ejecting the DVD out of the tray. The only thing I could do was restart the computer, which I did. I went through the same steps, all again. Another hour wasted and still got the same error. I tried this atleast about 3 times with no luck.

Third time when the message from the restoration utility was on my screen showing the installation/restoration had failed, coincidentally, I pressed Ctrl+Alt+Del and the screen turned to the Windows 7 screen where it provides various options, for an example to open task manager, Switch User or lock the computer etc., so this meant the installation was pretty much ok even then the utility displayed failure. Also while referring to various online blogs about such failure I learnt that by using keyboard short cut I can invoke command prompt while the restoration was stuck at the message. The blog-post suggested, from the command prompt I should invoke Administrative tools and from there enable the default Administrator account to be able to login. After trying that I learnt that since I had Windows 7 Home, the OS did allow changing users and groups from Administrative tools. So I then pressed ctrl+alt+del and went for switch user option, from which I logged into my account for the first time. However, when I restarted the computer, the OS still booted and ended up stuck at the Windows 7 preparing the computer for the first time use screen. So I again searched the internet to find the cure and I came across a blog-post where I learnt that I could disable the process of boot time restoration and first time use screen by editing registry. I managed to get the Windows to boot properly. After it had booted to the desktop, the Windows 7 activation pop up turned up. So I clicked and did activate now over the internet and entered the Windows key from the back of my laptop. And guess what, the Microsoft website told me that the copy of Windows that I had installed (from the manufacturer’s restoration discs) did not match the serial number and it would not activate the installed Windows. So I investigated further and found that the restoration installation of Windows was infact Windows Home Basic and the Windows Key that was provided on the laptop was for Windows Home Premium. So frustrating. Also when I went to Microsoft’s website to download an ISO for Windows 7 Home Premium using the Windows key on my laptop, it identified and said since the key belonged to an OEM Windows 7 product I need to contact the manufacturer of the laptop.

The thing is, I could not have known about these problems when I had bought the computer, alteast until I do such  an upgrade. I was basically helpless. I was not sure if HP could help me at this point in time after so many years of buying the laptop.

So I decided not to waste time in chasing them. I thought of fixing it in a different way. I downloaded a genuine Windows 7 Home Premium ISO from internet (from other sources) and created installation discs from it. I installed the Windows Home Premium on my laptop and then attempted to activate the Windows using the key provided on the back of my laptop. Guess what, it worked. Microsoft recognized that key was correct for the installation. Finally I had a working system, almost bricked my laptop :).

Then I installed all the drivers for the laptop . It just so happened that I also updated the driver for SATA which belonged to the hard drive interface. After everything was installed, I attempted to enable and download Windows OS updates. The OS gave me some weird 0x800…. hexadecimal error for not being able to connect to the Microsoft updates. I looked for a solution on the internet. Many people had said, if I disabled and enabled the Windows updates the updates will start working on its own. So I did that with no success. Some also suggested to disable the update service delete a certain folder and then enable the service, I did that but with no success. I came across a post where it suggested that sometimes Windows OS updates fails due to having different hard drive driver. Then I remembered, I had installed and updated the SATA driver for my hard drive. I uninstalled the SATA driver, and Windows was left with its built in SATA driver. I retried checking for Windows updates and guess what, it worked. I had no idea why this was the case.

Finally I have a working Windows laptop and I have also installed Ubuntu-Linux side by side and dual booted. Wasted almost a day sorting all these things out.

Share Button