Enable automatic fsck upon booting OSMC (Raspberry Pi3)

With the absence of a small button to wake-up or boot-up the Raspberry Pi3 when running OSMC, being forced instead to cut-off DC power via some switch or leave it permanently on, I felt the need to introduce a more persistent file-system integrity check upon each boot or reboot of the device.

This is where fsck comes in, from the world of Unix; however, I had no idea where to enable it for running during boot-time.

Thanks to the people at the OSMC Support and especially to user DBMandrake (who is an OSMC developer) I, too was able to find the location of the files to edit, as well as the additional changes needed.

Obviously, you need to have SSH installed and know how to connect to your Pi3 device and then log in with the known credentials for OSMC via SSH that are osmc/osmc for username/password, respectively.

According to DBMandrake we need to make 2 specific changes in our system:

For anyone who wants to enable an automated fsck with repair, right now all you need to do is edit file /etc/fstab and change the second number at the end of each line from 0 to 1 (systemd doesn’t make any distinction between 1, 2, 3 etc. so using numbers above 1 makes no difference) then edit the file /boot/cmdline.txt and at the end of the same line, add a space then add fsck.repair=yes option. You should now see a two line fsck scan in the top left corner of the blue splash screen momentarily during boot. When no repairs are needed it only takes a couple of seconds.

So with this solution in hand, I was able to log-in via ssh from Terminal on my Mac OS X, and quickly modify these 2 files as explained. For Windows users, PuTTY is the obvious and straight-forward tool for SSH. Just remember that since it may be the first time ever to connect to your Raspberry Pi3 device, you may be asked to confirm the key fingerprint of the secure connection.

In my screenshot you can see the end-result after connecting to an OSMC system.

Install missing AppStore purchase that’s not visibly available (like macOS Sierra)

Once macOS 10.13.0 High Sierra became officially available to the public, I decided to keep a backup of the macOS 10.12.6 Sierra installation application on my Mac, for archiving reasons. I normally do this when every new macOS release is out, since the 10.xx.0 versions tend to be buggy. I did the exact same thing with El Capitan 10.11.6 when Sierra was officially out, last fall.

However, to my surprise, when I visited the AppStore on my Mac, I could not find the Install macOS Sierra entry, which I had very well downloaded some time ago. It was either deleted from the AppStore or visibly not available to end-users, anymore. This was just days after High Sierra was out.

Whilst searching for answers, I stumbled across a discussion over at MacRumors Blog where people confirmed this, too, and expressed their dissatisfaction to the fact that Apple had removed Install macOS Sierra from their AppStore so quickly; not to mention a theory that this specific download doesn’t really make part of official or registered purchases by end-users, like all previous (and still available) Mac OS X releases. Strange.

But thanks to user jasminetroll and his/her straight-to-the-point tip, I was able to re-download Install macOS Sierra.app officially, using some Terminal magic and with very little hassle, compared to other (evidently, more painful) methods such as the one described over at 7 Labs.

The main tool needed is the mas-cli utility by Dmitri Rodionov, found at GitHub. Download the latest version (currently at v1.3.1) and unpack, then copy the binary executable to a location that you can freely run from; for example /opt/local/bin/ if you have MacPorts already present, or simply /usr/local/bin/ through Administrator authentication.

Next, just go to any temporary location such as ~/Downloads/ and run the command with the following parameters, as jasminetroll points out:

mas install 1127487414

The process will launch the download of the selected AppStore application (in this case, 1127487414 is linked to Install macOS Sierra) on both on the Terminal and Dock:

This rather easy process results to an application bundle that evidently contains a properly-signed MAS receipt linked to my connected Apple ID, it seems:

Once the download is complete, user jasminetroll advises to confirm the signature information as proof that it is indeed an official download of the Sierra installer:

codesign -dv /Applications/Install\ macOS\ Sierra.app

…that results to the following output on Terminal:

Executable=/Applications/Install macOS Sierra.app/Contents/MacOS/InstallAssistant_springboard
Identifier=com.apple.InstallAssistant.Sierra
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=321 flags=0x2200(kill,library-validation) hashes=4+3 location=embedded
Signature size=4605
Info.plist entries=30
TeamIdentifier=K36BKF7T3D
Sealed Resources version=2 rules=7 files=137
Internal requirements count=1 size=124

Now, an official Install macOS Sierra application is available to run!

…which also includes the very useful createinstallmedia tool by Apple that allows the creation of USB installers (via Terminal, of course).

JUNE 2018 UPDATE

It seems Apple now offers the chance to (re-)download a couple of previous OS versions by publishing on their Knowledge Base the direct links to AppStore:

For further reading, you can visit the related StackExchange thread.

Speed up SMB transfers in El Capitan Mac OS 10.11.x

Until recently, I’ve been working on a Mac using Yosemite 10.10.5 and was quite happy with it, but since Sierra 10.12.2 was out, I knew I had to move on in my life, so I decided to make a clean installation (dual boot) of El Capitan to the latest available version 10.11.6 including all recent updates from Apple. However, I soon realized that my connections to both network backup HDDs via SMB was painfully slow, evidently much slower than I was used to, when synchronizing files from my Mac to my Western Digital network drives.

This meant that Apple most likely fiddled again with SMB (Samba) protocol in this OS X release, and once more we had to find a fix for returning to “status quo”. After all, I was using on my Gigabit home LAN two different WD network storage devices, namely MyBook II World (2x1TB) and MyCloud (1x2TB), most likely with different SMB implementations each.

I had read that in the older days, a quick solution to force Mac OS X to use older SMB versions, was to use CIFS protocol; but today, this didn’t work. So, this time I mounted via Finder both drives (Cmd + K) forcing the smb:// protocol:

Finder Server Connect

Next, in Terminal.app the following output was presented, after running the needed query command smbutil per volume:

SMB Shares Information

This showed that older MyBook World II negotiates with SMB 1.x protocol (latest firmware v01.02.14 available) and later MyCloud storage asks for SMB 2.x protocol (firmware v03.04.01-230 kept on purpose) therefore causing a possible performance issue with latest Mac OS X systems, due to their newer and seemingly more secure SMB implementation.

After digging around, I read that there’s a hidden fix for SMB, just like the one posted by Dan Roncadin in his related article, which apparently increases transfer speeds due to the fact that it disables “client signing”. As Dan Roncadin writes:

The issue seems to come down to Apple’s SMB forcing default enabling of “client signing” which ruins performance.

The fix consists of setting a parameter in file nsmb.conf in folder /etc/ with sudo privileges, forcing the system to obey the parameter on the next use of SMB protocol (and after each reboot, obviously):

[default]
signing_required=no

The way to implement this parameter is to quickly open Terminal.app and apply this command as your administrator password will be requested:

sudo printf "[default]\nsigning_required=no\n" | sudo tee /etc/nsmb.conf >/dev/null

Then, either restart your Mac (if you’re used to do this, due to some older Windows habit like mine) or simply unmount and re-mount your SMB shares. Please note that on a clean installation of El Capitan, this file (and therefore, parameter) does not exist, due to the fact that Apple considers this a lesser security measure; but for home connections, it is fine by me.

Through the application “GoodSync” I was able to re-check the speed and it seems things returned to normal; I didn’t go into much detailed speed measurements, but I am sure any improvement is welcome at this stage. Also, this is confirmed to have a positive effect on speed, as mentioned by users over at Computer Audiophile where they post their (positive) results after applying this fix.

Finally, should you wish to reverse the “fix”, simply remove this file (better via Teminal, again) by running:

sudo rm /etc/nsmb.conf

References and articles:

Setup Windows 10 with as little user information leak as possible

We need to embrace the future, at some point in life, so I decided to install and try out Windows 10 (64-bit) on my virtual machine, despite being happy using the now depreciated -by Microsoft standards- Windows 7 operating system, on my work laptop and other virtual machine on my Mac computer. Windows 10 is here and I need to find more how to get around it, as I had decided to skip Windows 8.x fooling around, altogether.

I heard many people and friends in IT telling me that Windows 10 is good enough and deep down resembles to previous Windows iterations, but the only serious drawback was the widely-publicized and criticized “leak” of user data and information, a very deterring issue for whoever wants to move across and take the… leap of faith. So I decided to read and collect articles and bits about the security of Windows 10 and how to enforce user-preferences for the least leaking possible.

Also, despite the numerous and detailed articles, I was also happy to encounter private efforts of people that put all those needed system changes and tweaks in one, concise tool, that would help speed-up the “securing” procedure and also make sure that no communication “hole” -based on up-to date knowledge- is left open.

FURTHER READING IS A MUST

There is a large number of interesting articles found on the Internet, providing step-by-step instructions on how to disable such “spying” by means of Control Panel settings. The most notable for me, are:

1) Windows 10 violates your privacy by default, here’s how you can protect yourself by TechRepublic.com (with screenshots of each window’s settings)

2) Fix Windows 10 privacy by IsLeaked.com (includes Windows 7 and 8 fixes, too, that I ignored until reading the article)

3) How to Configure Windows 10 Privacy Settings During Setup by MakeUseOf.com

4) The Ultimate Windows 10 Security and Privacy Guide by HeimdalSecurity.com (with explanations on each security switch that needs to be turned off)

It seems that even during setup of Windows 10 on any machine, choosing the correct privacy settings is equally critical, for starters.

RUN IT AFTER YOU’VE DONE IT

Following the tips and steps that most of these -and similar- articles advise, I could not rest assured that the work was fully done. As usual with our modern world, suspicion crawled in and I felt that there was more to be done to secure my privacy.

This is lunacy, considering how much effort and time is spent on protecting my own data and related information or statistics, when such “leaks” from the new Windows OS could have not been included the first place! The IT world is definitely taking an unknown, darker path.

Thus, based on the original article by BGR.com titled 6 free tools that stop Windows 10 from spying on everything you do -despite being written over a year ago- I was still happy to see that some of these tools have still been around and kept updated, making our life towards better privacy a little more easy.

Until today, a year after Windows 10 was released, there are 2 tools that really stand out of the crowd.

“W10Privacy”

First to be considered is the tool called W10Privacy from a German developer (found here) now with English/French/German/Spanish menus -most likely due to its grown popularity- what started as a private own project.

With its simple, straight-forward interface, W10Privacy wins the power-user but may scare novices, a little. It includes a comprehensive list of security tweaks and checks, most of them not found anywhere near Control Panel. As the website mentions:

Microsoft generously enables everybody to change the concerning settings, but hides them in countless menus, where a normal user does not want to search for!

The program should therefore be a help, to display the available settings relatively clearly and to set the desired options if necessary.

Do not be overwhelmed by the many tabs; it’s just a logical split of tweaks instead of having them all-in-one list. It is intimidating -for sure- but the list seems quite exhaustive. The user or administrator is assisted with color-coding of each tweak, denoting severity and recommendation level. The developer also writes that the project is work-in-progress so we are bound to see more settings to be enabled or disabled with coming versions.

W10Privacy Main Window

Using W10Privacy relies on selecting the tweaks for each category, and then apply them. There is an option for creating a -many times needed- restore point, so the user can revert in case some functionality… well… get “screwed”.

“DoNotSpy10”

Secondly, the tool DoNotSpy10 seems to rise to the occasion, too (found here). It also includes a long list of security tweaks, but the interface does not intimidate the user that much. Through its lighter design, running the tool checks for the fixes already present; color-coding warns the user of the severity of the fix, if applied.

DoNotSpy10 Main Screen

I can only trust the developer(s) of DoNotSpy10 tool that their list of fixes is full and nothing’s been left out (except those yet to be discovered?) as I don’t have the luxury of time to dig further into the matter of deeply enhancing my Windows 10 privacy experience. The only reported drawback of using the tool is found in the installation procedure: It seems to install the OpenCandy framework, as DoNotSpy10 is ad-supported. Per user quietman7 comments:

[DoNotSpy10] appears to be detected as a Potentially Unwanted Program (PUP) / Potentially Unsafe Application (PUA) most likely because it includes OpenCandy.

OpenCandy is an advertising application distributed by the OpenCandy Software Network which displays ads in other programs. The use of advertisement is a way to promote software packages and recover development costs. The OpenCandy FAQs answers many questions users may have about this product.

OpenCandy is technically not installed on a computer, does not collect personally identifiable information and in most cases allows the user to choose whether or not to install advertised software recommended by the vendor. Although no personal information is collected, the software does collect anonymous statistics about events and other data during installation. See What information does OpenCandy collect?

So just a word of precaution: although the developer(s) of DoNotSpy10 tool would like to seemingly obtain a small source of income to cover costs -and rightfully so- we are prompted to donate if we are happy with the tool, thus receiving the OpenCandy-free installer. In my honest opinion, OpenCandy doesn’t feel like a show-stopper and is seemingly harmless, definitely less important to deal with compared to all those privacy leaks of Windows 10.

 

Have a good time with Windows 10, privacy-leak-free, everyone.

Replacing with silent fan on Icy Box IB-3620U3 enclosure

I have recently purchased the well-built Icy Box IB-3620U3 dual hard-disk (3.5″) enclosure by Raidsonic, featuring an aluminum chassis and USB v3.0 connectivity, making it ideal for local backups, even side-storage for more demanding work.

Despite the build quality and rather compact size, the embedded stock cooling fan (rear) that came with the Icy Box was more noisy than expected, despite being a relatively decent brand (Yong Lin Tech Co. Ltd.) from Asia.

Following a couple of excellent articles (by Pavel Rojtberg and Robin Jakobsson) that show how to remove the stock fan and replace with a newer, silent one, I decided to take a slightly different approach and replace mine with an equally slim fan, but silent (still more expensive than average fans of 10mm or 15mm thickness).

The stock fan is model DFS601012M and features a brushless blade, 60mm diameter with thickness 11mm approximately, powered with 12V by just 2 wires (i.e. constant speed at 4200rpm with an air-flow of 17.74CFM and acoustic level of 31.6dB, according to its specifications). After constant searching for a closest alternative, I eventually ended up buying a Xilence replacement fan, as it was the only fan that featured low-noise and was available -rather fast- in the local market (buying it from the local market would most likely secure it as an original Xilence unit, instead of some knock-up on eBay, as it’s hard to detect them).

Stock Fan Specs

The closest Xilence model found is COO-XPF60S.W at the same 60mm diameter, almost same thickness (it’s 12mm) and quieter operation (12V with speed of 2100rpm at an approximate 12CFM air-flow and 22dB noise level).

Fan Comparison

Thanks to the two other articles for the Icy Box units, the removal of the rear cover (fan and enclosure) seemed rather easy, but then I realized that I had the wrong power-plug for the fan. The Xilence comes with 3-pin Molex connector but the stock Yong Lin Tech fan had 2-pin power and smaller (2.0mm) plug! (apparently found on VGA-cooling fans) Instead of cutting and soldering, I decided to dig the internet and find a low-cost adaptor from Asia, thus making the fan replacement rather simple. The needed pin-adapter was eventually found, with the title “3 pin to 2 pin adapter, fan cable, 12V cooler fan, VGA cooling fan 2 pin, mini 2 pin, 2.0mm” on AliExpress.com; few days later, I received it and confirmed that it was spot-on choice.

2-Pin / 3-Pin Molex Adapter

The procedure is simple but needs some caution, as with all such parts being replaced; the use of a long, thin Phillips screwdriver is advised.

Screws Location

1. Unscrew the 6 screws that hold the rear cover first; remove it carefully. Be sure to not strain the fan’s 2-pin power cable; then, remove the fan’s plug from the small circuit board. Now the cover is totally free.

Rear Panel & Cable Removal

2. With the rear cover free, remove the 4 screws that hold the fan protection cover, thus freeing the stock fan itself.

Rear Fan & Protection Removed

3. Plug the 2-pin/3-pin adapter cable onto the circuit board; this adapter cable should normally be quite short.

Cable Adapter Plugged

4. Make sure that the 3-pin Molex (female) plug is visible through the fan opening on the rear cover; put the cover back in place and screw it (6 screws in total).

Rear Cover Screwed Back

5. Plug the new fan onto the adapter cable that’s hanging through the fan opening; if needed, wrap the fan cable with some cable-tie, as it’s longer than we need, but be sure there’s some slack i.e. freedom of cable movement.

New Fan Plugged

6. Carefully place the new fan in position, making sure that the excess cable is pushed on the top-side (there’s a visible metal bracket that covers the internal HDDs) so that it doesn’t get damaged in any way (even if ever re-opened); once the fan is set, put the fan protection cover back, and screw it (4 screws in total).

New Fan Put In Place

That’s it. Now, you can power-on the enclosure and witness the lack of noise 🙂

The resulting noise (or lack thereof) is pleasing to the ear, and the 1mm extra thickness of the new Xilence fan is barely noticeable (thankfully, the screws of the fan protection cover are quite long). With both 1.5TB WD Green drives running, the enclosure is not getting warmer to my experience (i.e. due to the lesser RPM and CFM) but that’s just my own environment and room temperature.

New Fan Protrudes

A couple of things to note:

1. Be wary of the new fan orientation, when placing it on the rear cover. Pay attention to the blades of the stock fan (when removing it) and be sure that you respect the (outward) air-flow, as both fan(s) are too thin to mention air-direction on the side (like on most thicker 20-25mm PC fans, denoted by some arrow).

2. Also be careful of the fan power-cable position; the assembly at factory had the cable going down towards the right corner. Be sure that when you place the new fan back in, the cable is not obstructing air-flow.

3. You may need to add some small, thin foamy pads (as stickers) on a couple sides of the new fan, as the stock fan already has 4 of them (i.e. on each side). I am not sure where one can find such pads, but they seem to minimize the vibration of the fan itself, as well as keep it firm inside the rear panel.

Foamy Pads Suggestion