Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

2020-05-06

Beware of ahci module change from dynamic to built-in on Artix (Arch) Linux


Recently, after one of the usual system updates, I suddenly ended up with an unbootable system on my Artix based NAS server. Since the system's boot process is not the most stable in general, initially, I thought it was yet another "moody" day for the system caused by the Marvell controller on ADPE4S-PB daughterboard. However, the boot is usually successful in several attempts in this case. If not, rarely this was caused by failed initramfs generation during the update process. In such situations, I was regenerating it by booting into Artix (or previously Arch) installation system and chrooting into the main system (or using fallback initramfs boot option). This procedure requires reconnecting the system drive to VIA based controller. Nevertheless, nothing was helping to bring it back to life. I started to suspect that I was dealing with the new issue this time. Initial speculation was geared to failing old hardware, but in the end it appeared to be a software based issue. Since then, I successfully booted into the system using the VIA integrated controller, it was getting obvious that modules configuration was not being applied for some reason. I confirmed that by looking at the lspci output which didn't show the AHCI driver being applied for the Marvell controller.


A little investigation revealed that the new kernel has ahci.ko.xz and libahci.ko.xz module files missing in /usr/lib/modules//kernel/drives/ata directory. They were present there before the upgrade. Since I depend on the AHCI driver specific property, the reason of the failure was pretty clear. Despite that, I didn't know yet why those modules had been missing. Regardless, I was looking for the fastest way to restore my system first. The first solution I came up with is to revert to the previous kernel. It appeared to be possible due to the fact that pacman package manager is keeping older packages in pacman cache. Using command "pacman -U /var/cache/pacman/pkg/linux-5.5.10.artix1-1-x86_64.pkg.tar.xz" downgraded kernel and, fortunately, the system was bootable again.

The downgrade solution was supposed to be temporary, since I can't ignore upgrades forever. Initially, I assumed that the missing modules were a mistake so I filed a bug report. However, it was soon closed with explanation that ahci modules are built-in in the kernel and it's not a bug. I believe this change happened starting 5.6 kernel series since 5.5 based kernels were still working for me. Because of this, I made an attempt to apply corresponding configuration of dynamic modules on kernel. Thankfully to the good Arch Linux online documentation, it was easy to find required information. This page describes how to pass module parameters to the kernel and this one describes the GRUB bootloader configuration. To pass module parameter "module.param_name=param_value" needs to be passed to the kernel line. Blacklisting is performed by passing "module_blacklist=module_name" parameter. In my specific case, I needed to pass marvell_enable=1 property value to ahci driver and blacklist pata_marvell module. So, these steps needed to be performed in my case:
  • sudo vi /etc/default/grub
    • change GRUB_CMDLINE_LINUX line to:
    • GRUB_CMDLINE_LINUX="ahci.marvell_enable=1 module_blacklist=pata_marvell"
  • regenerate grub.cfg by running sudo grub-mkconfig -o /boot/grub/grub.cfg
It should be safe to keep both: grub configuration and previous configuration for dynamic modules. They should not interfere with each other and would be ignored depending on using either built-in or dynamic module.

Unfortunately, this solution didn't work as well as expected. Though I was able to boot into the system, the success ratio decreased to an unbearable level. Only 1 out of 5 to 7 attempts were partially successful. By that, I mean the system booted and I could interact with it, however, none of the attempts initialized all the hard drives correctly. It was either system one or one of other two hard drives in LVM RAID failing. Thus, RAID volume wasn't mounted at best, or system was failing to boot at worst. Quite often, the system disk was still not recognized early in the boot process leading to rescue shell. Because of that, I was forced to revert to the old kernel again.

Considering that I didn't manage to fix the issue, I am not sure if there is a workable and stable solution at this point. Manually built kernel with modularized ahci module may help, but it would mean that I would need to track kernel upgrades myself. Moreover, building Linux kernel is not a very trivial process as I wish it should be, so it is not a viable option for me. As a temporary solution I can completely disable Linux kernel upgrades and keep the other software up-to-date. However, as a long term solution, it may force me to look for another distribution which still uses AHCI as module or even to consider a complete hardware update. Only time will tell which one will be easier to implement.

In conclusion, if Arch Linux based system is used along with Marvell 88SE6145 SATA controller (or any other marvell controller which requires ahci module specific configuration), I currently advice to refrain from upgrading to 5.6.x kernel. One can try to experiment with kernel parameters as described above, however, it is advisable to make a backup image of the system beforehand, so it can be easily restored. The downgrade path may not always be successful because of other dependencies and should not be relied on.

2012-02-16

EPIA-M900 system setup and Windows 7 start up

After I tested some open source operating systems I've decided not to play to long and started to assemble the main configuration for the desktop PC. It consists of EPIA-M900 motherboard, eH-1 graphics card, 2xKingston KVR1333D3S9/4G RAM (I am not really that Kingston fan but lately all RAM comes from them and I can't complain, they have very good compatibility with most boards), Samsung HD161HJ 160GB hard drive and In Win BM-639 case. Initially I planned to add CD-ROM too but some modifications disallowed that (later on that). RAM works at 1066MHz effective speed because it is the maximum VX900 supports.

The main purpose was to replace that annoying small CPU fan. So I perforated one side of the case above the CPU/chipset heatsink and installed 120mm fan. This "project" went ok and I was able to remove default fan. CPU cores temperature goes from 43°C on idle to 63-66°C max on load (speedfan show 5 degrees less than AIDA64 at the same time). CPU temperature is ~55°C by AIDA64. System temperature never rises above 31°C. The downside of this solution was that the fan blocked ability to add CD-ROM as original case design placed construction for 5.25'' drive just a little bit below that side of the case. GPU temperature range starts from 41.3°C on idle to 46-48°C on load. I firstly made one mistake during assembling because one wire stuck between GPU heatsink preventing fan from rotating. This lead to temperature from 81°C on idle to more than 126°C on load. You can understand from this that eH1 can work without fan :). Graphics card fan is surprisingly silent. I've read a lot of angry comments about active cooling solution in this card but it seems that they aren't reasonable this time (I know that fans tends to fail after some time but on the other hand you need to keep good airflow with passive cooling solution and need fans somewhere anyway). Unfortunately, the PCI-E riser was only 1.1 compatible so I needed to turn on the switch on graphics card to support slower PCI-E version. I tested that motherboard supports 2.0 version actually (at least graphics card worked switch in off mode). Finally, PCI-E slot is x16 physically only. x8 is effective speed of that slot.


AIDA64 CPUID
The other task was to fasten graphics card because I bought not suitable riser (I needed right angle one but I bought straight one. It lead to the problem that riser raised graphics card much above case panel for cards bracket fastening). The solution was simple. I inserted graphics card upside down (fan is on the top now). I needed to cut the bracket a little bit and make one hole in the it and the case for the screw but this solution needed minimal effort and almost no sacrifice for the future use of the case or graphics card (yes, the original bracket will not be suitable for normal insertion any more but I have replacements and you probably will find them at various IT stores too). Unfortunately my camera is broken now because of that I couldn't to make photos of these modifications but I'll try to do them in the future.


GPU-Z (some information inaccurate)
The last thing I wanted to do before Windows installation was BIOS update. I found the newer version on viaembedded web page and I made an upgrade. Firstly, it seemed that everything went ok. However, after I loaded system defaults, motherboard just didn't boot anymore. It was very unpleasant moment because I though that motherboard just died because of unsuitable BIOS version. Fortunately it booted after I changed RAM to some spares I had had at home. BIOS showed incorrect checksum error on boot but I was very happy nevertheless as motherboard was alive at least. I downgraded BIOS back to old version (fortunately I made a backup of it because you couldn't download it from viaembedded web page). I don't know why VIA decided to add this BIOS version without any release notes and description but they will gain lots of unsatisfied users with such irresponsible move. These days BIOS upgrades are simple and painless process usually, because of this users will try to do this from time to time. Such surprises should be avoided and BIOS purpose and suitability for particular model stated clearly. Anyway I recommend to use original BIOS versions with VIA motherboards :)...


After all preparations I was able to try Windows 7 (64-bit) finally. I wasn't installing them cleanly, just tried to boot into installed system from previous computer. This process went smoothly... almost. Every time I tried to connect to the network, Windows was hanging up and rebooting with good, old BSOD in the end. Solution was simple yet again, I needed to install network drivers from CD or web page. It seems that Windows update provided faulty drivers for some reason. I also installed the newest 500 series Chrome drivers from s3graphics web page instead of the ones from CD or viaembedded eH1 web page. All other devices were recognized by Windows and successfully installed into the system. Due to system resources requirement for physical memory addresses Windows sees 7.25GB of RAM instead of 8GB. I will discuss some performance results and power usage in the next article.
Windows 7 rating

2011-12-06

2011 small summary

I was less active this year and unfortunately couldn't keep any of my promises. I still have quite lot of readers of my eComStation 2 installation article. It is quite surprising as I don't think that I'm the only one who described an installation process of this operating system. Unfortunately, I didn't use it much and I decided not to upgrade to new version. Because of this I am leaving usage review for somebody else (at least for now). However, I hope somebody found that article interesting and maybe even useful.

I was less active on collecting CPUs recently however I had some new additions and photos. Not everything is on my gallery but sooner or later I'll put photos of all my CPUs. Some new additions will include Kendall Square Research cpu set, HP Alpha 21364 1300 MHz, some PowerPC, MIPS, Zilog Z380 and other items. You already can find new CPUs from last big update in march such unfinished HyperSPARC, VIA Nano Quad Core ES, Intel C8008, HP PA-RISC 8700 3AA2-3105, Hitachi SH-3 and SH-4 and others. Probably it is not that "epic" as last update but still was interesting and with lots of unusual items. I am not going to expand my collection in such pace as earlier but I still looking for some items like intergraph or fairchild clipper, at&t hobbit and some rare items. My focus is still to have several new architectures before I feel more or less completed my original aim to have all major CPU architectures in my collection.

This year wasn't very interesting in hardware too. My jetway jnc-81 died this summer. Jetway replaced it with JNC-84E-LF. It is quite similar board but it has newer amd 785G+SB750 chipset (compared to 780G+SB700) whose main feature is updated graphics. It also uses AMI BIOS instead of Award and supports more AMD CPU models (though I still use Athlon II X2 235E). I removed my 750GB WD disk and use only NAS server for data. One NAS server green WD 1.5GB hard drive died but I replaced both disks with Hitachi Deskstar 7K3000 3TB. Read performance nicely surprised me. It is SATA 3 disk so it might be even faster on new interface as it seems that it hits the boundary on the first part of the benchmark. It is five platter disk so it might not be the best disk for NAS but 3TB should be enough for a very long time for me. I just hope they won't fail anytime soon. I've made a service to report S.M.A.R.T. data to ensure some early detection this time.

Hitachi Deskstar 7K3000 read/write benchmark
The last but not the least I've upgraded my mother's computer. It features Asus M5A99X motherboard and 8GB DDR3 RAM now (1600Mhz by specifications, but works only as 1333MHz because Phenom doesn't support faster speeds, at least like I understood). It replaced old Asus M2A-VM HDMI motherboard with 4GB DDR2 RAM. Motherboard has modern UEFI bios and it also successfully unlocked my Phenom II X2 555 to quad core. Now folding@home is almost twice faster because of this two additional cores. Graphics card remained the same NVIDIA Geforce 450GTS but even it seems a little bit faster at folding. There is one caveat that it consumes almost 300W of energy because of folding (I would use about 120W on idle). Electricity will become more pricey next year so I am thinking to stop or limit gpu or cpu folding but it depends on situation. It still uses about 200W if only GPU or CPU active.

More or less it is everything this year. I don't have any specific plans for next year but I think I'll have some changes too. I hope to replace my old HP PSC-2355 multifunction printer/scanner device. My NAS server hardware can be upgraded too but it is not a priority. It will be more a software year probably. I hope for NetBSD 6 release finally. It looks quite promising for me. Though I use Fedora Linux 16 as main system currently and it probably will be the one for some time. Maybe Haiku and other partially hobby systems will be used more often too as they progress. I'll keep upgrading NetBSD on DEC Alpha system though I still wasn't successful to load X server on it. Finally, I'll keep testing for some OSes and software on my VIA VT-310DP. 

I don't know if I'll update my main computer. There are always lots of interesting thoughts what I want to have and to use. Jetway JNC-84 wasn't so friendly with my systems as JNC-81so there is a possibility that I'll change platform but it is not a priority too. I still quite satisfied with current performance. 

So that is everything I want to share for now. Till the next time.

2010-11-07

eComStation 2 - installation

eComStation is last and still quite strong continuation of original OS/2 operating system. It is developed by Serenity Systems (IBM and other developers) and they released a second version of it this year. I am going to write two or three articles about it (unfortunately I deleted my first half complete draft of this article so I don't know if it will be as good a second time as it is difficult to restore motivation after such mistake).  Home and student licence allows to install this OS on 5 computers (if I am not wrong) but unfortunately it is not a strong point as the price is quite high and normal user will choose Windows or Linux. However, if you are loyal OS/2 user or some alternative OS fan you can support this efforts as they allow to stay OS/2 somehow alive. eComStation is more like evolution of OS/2 (and eComStation 2 is just evolution of the first version). Because of this eComStation feels quite old fashioned (if you look at UI) but it has some strong points and modern things which you won't find in many hobby operating systems (though they are generally free). I'll talk about that later. What is more, OS/2 has quite a big software base. This article will focus on installation procedure. I successfully loaded it on VirtualBox so I'll have some screenshots. Other articles will focus on usage and applications and I will test OS on the real hardware (VIA VT-310DP is alive again for this reason). I have never used any OS/2 version earlier and I tried eComStation 1.xx only several times so I could not compare them. However, I'll point out some things I read in the internet.

eComStation comes in two CDs (you can download them as iso images to save some money) and third iso was with OpenOffice.org (however, the newer version was released recently). You need only first CD to install operating system. Second CD has additional free and trial (modern and legacy) software you can install.

First CD is bootable. Firstly it loads boot loader with two options: first one boot from hard drive and second one to boot from cd. Of course, you need to choose cd at first. I want to warn you that you need to back up your hard drive before this step. Setup can ruin your partitions (it happened to me twice) especially if you have extended ones. My guess is that it tries to initialize hard drive somehow if it can't identify partitions correctly. This is where setup begins. Just after it loads you'll see big eComStation 2 boot screen.
First boot screen
It loads into check CD screen (similar to Fedora) where you can check if CD is ok or just skip this step and continue installation. If your CD writing utility didn't verify disk it is probably recommended to check a disk otherwise you are wasting your time IMHO.


After this step it finally tries to load setup application. It uses Scitech Snap graphics driver if video is supported (as far as I understood) or uses "new" panorama (VESA) driver otherwise (included in this release). It loaded in all computers I tried. I guess these drivers works with quite big range of cards. Setup application is graphical and intuitive (it is eComStation original installer which differs from OS/2 but it is almost identical between both versions of eComStation).
First setup screen
You need to choose keyboard layout, mouse button mode and font size (in the installer) in the first screen. You need to be careful here because some layouts doesn't support symbols needed to write a username and registration key. It is best to leave english layout here.

You must to agree with license agreement on the next step and after that to choose installation type. This screen is quite important as you can choose between easy and advanced installation. Easy one will have less steps before install. I chose advanced one and review will focus on it. Management console is something like recovery console on Windows I guess.



After that comes the most annoying part. You need to write registration name and registration key. You can't go further until it is valid. The worst thing is that registration name has 21 symbols and registration key consists of 4 lines with 22 symbols each. However you can create reg file (or download it from ecomstation.com after you registered your code) and load it here. Because of this I strongly recommend to add such file into iso file. If you forgot that you can create a supported partition and add file there (fat, hpfs, jfs) before install. I don't know if usb key supported at this point.



Next button activates automatically and you can go further. You need to select partition (volume) on the next step where you will install eComStation. Logical Volume Manager is included to create one if you need so. I guess eComStation requires primary partition. Later you need to format it or choose migration option.


There are two file system options. HPFS (High Performance File System) is original OS/2 file system. However it has 64GB partition limitation and 2GB file limitation. JFS is modern, journaling file system which doesn't have such limitations. I chose JFS as it will have better compatibility with linux. It took around 20 minutes for a full 10GB format with JFS and 1.5 hour to format as HPFS. You can choose quick format too if you want (it takes several minutes).

You can change locale and timezone in the next step.


One more time you need to be careful here. I didn't have problems when time and timezone was changed, however locale changes led to installation errors on the second phase of the installation (WarpIN and KLIBC failed to installed leading to not fully installed and quite unusable system). Default locale didn't cause any problems in the future.


After you chose your locale setup starts to detect hardware and lists them.

You can add additional drivers or remove them here or make some changes. Of course, this step makes sense only if you understand what you are doing. After that you go to multimedia support where you can choose audio driver (alsa by default).


--> Further step requires to choose default programs directory (I left unchanged) and default home directory (I change to my c:\home\[myname]). You can also choose here to install boot manager or skip this option. eComStation installation manual recommends to use their boot manager as default.
Later step allows you to choose which components or applications you want to install. Of course, this option is only available in advanced setup. Default setup is quite good but if you look through all list you might find some interesting things too (or some unneeded stuff too).
Select components
Later you need to configure network. This step consists of four separate windows (at least). You'll find connection types (LAN, point-to-point) and network types „TCP/IP, samba, IPX) in the first. Second window shows your network adapters (if they are recognised) with their settings and protocols to use. Later you'll need to specify TCP/IP settings (DHCP or manually)  choose your computer name and finally specify workstation id (computer name) and domain.
This is the last step which requires some manual changes. You accept the changes on the next windows system installation begins. Until this moment you can go back to the every step and reconfirm your decisions.

Installation consists of two phases. The first phase starts just after you accept your configuration and it installs base eComStation system files and initial configuration. It took me about 7.5 minutes on real hardware and about 10 minutes on VirtualBox (though it strange for me as system was much faster on VirtualBox). Progress bar doesn't show real progress it just fills up with blue/white colour continuously.
When the first phase ends, system restarts. CD must be kept in the CD-ROM but you need to choose boot from hard drive this time. This is the first time then eComStation boots however you will see the same installer window. Phase 2 starts which installs various additional software (WrapIn, firefox, java and so on) and makes final configuration. If installation fails during this phase you will be able to boot into eComStation and use it, however, some features will be missing and will work incorrectly. This phase took about 10 minutes too.
If phase 2 ended correctly the system will restart second time. You can remove CD. The system will boot into desktop this time. Post-install configuration will run. You can change various things in it (screen resolution, UI settings, user name, network user name and password, install printer and acpi). Some changes make require additional reboot (like screen resolution). The system is fully usable now. Default software includes Firefox 3.5.3 (old flash 5), Thunderbird 2.0.0.22, Java 1.4.2, some games, cd burning and multimedia programs, various utilities and other applications. If you have one NIC and use DHCP (or manually configured it) it will have internet too (otherwise you need some configuration). I will write about some applications in the other article. 
eComStation desktop and OS/2 chess
This is all for now. I don't know when will be the next article but it will cover usage experience and applications (not default too), maybe some configuration issues. It depends on how long it will be.