Category: Tips

  • FlexRaid: powershell script to set disks online/offline

    FlexRaid‘s products (Raid-F and tRaid) are setting offline all disks used as DRU or PPU to prevent direct access and mistakes. Access are made through virtual disks created by FlexRaid. But if you have many disks and sometimes needs to access your physical disks, you will like this script to reset online all those disks…

    Click to Read More

    Create a file to store this powershell script (ex.: ManageDisks.ps1) :

    [code language=”shell”]

    Clear-Host
    $action = Read-Host ‘Type "Off" to set disks offline or "On" to set them online’
    Clear-Host
    if ($action.ToLower() -eq ‘off’)
    {
    echo ‘Please Wait…’
    $lines = Get-Content C:\OffLineDisks.txt
    foreach ($line in $lines) {
    if ($line.Trim())
    {
    $fields = $line -split ‘ : ‘
    $disk = $fields[1] $command = ‘"select disk ‘ + $disk + ‘", "offline disk" | diskpart’
    echo $command
    invoke-expression $command
    }
    }
    }
    elseif ($action.ToLower() -eq ‘on’) {
    echo ‘Please Wait…’
    Get-Disk | ? isoffline | Format-List Number > C:\OffLineDisks.txt
    $lines = Get-Content C:\OffLineDisks.txt
    foreach ($line in $lines) {
    if ($line.Trim()) {
    $fields = $line -split ‘ : ‘
    $disk = $fields[1] $command = ‘"select disk ‘ + $disk + ‘", "online disk", "detail disk" | diskpart | Where-Object {$_ -match ".*Volume.*Partition" } 2>&1’
    echo $command
    $output = invoke-expression $command
    if ($output -eq $null) {
    echo "No Volume on disk $disk"
    } else {
    $fields = $output.TrimStart(" Volume") -split ‘ ‘
    $volume = $fields[0] $command = ‘"select volume ‘ + $volume + ‘", "assign" | diskpart’
    echo $command
    invoke-expression $command
    }
    }
    }
    }
    else
    {
    $message = $action + ‘ is not a supported action’
    echo $message
    }

    [/code]

    Usage: run this script “As Administrator” and

    Type  ‘On’ to set online all disks currently offline. This will:

    1. Create a file OffLineDisks.txt on the C:\ drive with the ID of the disks currently offline. I presume that all disk offline are used by FlexRaid!
    2. Bring online each of those disks.
    3. Assign a letter to the volumes on those disks. I presume that there is only one volume per DRU and none on the PPU.

    Type ‘Off’ to set offline the disks listed in the file OffLineDisks.txt created previously.

    My purpose was to scan and repair various physical disks as this was not working when trying to do so via the NZFS Virtual Drives…

    Click to Read More

    Doing a Chkdsk on the NZFS Virtual Drive, I got:

    Chkdsk was executed in read/write mode.

    Checking file system on #:
    Volume label is #.

    Stage 1: Examining basic file system structure …

    # file records processed. File verification completed.

      # large file records processed.

      # bad file records processed.

    Stage 2: Examining file name linkage …
    The data written out is different from what is being read back
    at offset 0x# for 0x# bytes.
    An unspecified error occurred (696e647863686b2e 1324).

    So, instead, I do it on Physical Drives once set back online. And instead of Chkdks, I am using the powershell command “Repair-Volume”. E.g.: on a disk assigned with letter X:

    PS C:\> Repair-Volume X -Scan
    ScanErrorsFoundNeedSpotFix

    PS C:\> Repair-Volume X
    ErrorsFixed

    PS C:\> Repair-Volume X -Scan
    NoErrorsFound

    Loading

  • Disable “Wake on Mouse/Keyboard” while “Wake On By PCIe/PCI” must be enabled

    In order to support “Wake on Lan” from “Power Off State (S5)”, I had to enable “Wake On By PCIe/PCI” in the bios of my Asus P9X79 Pro. A consequence seems (?) to be that moving the mouse or pressing a key from the keyboard also wakes the PC from “Sleep States (S2/3/4)”. This can be solved by disallowing those devices to wake the PC via their “Power Management” properties.

    Click to Read More

    1. Disallow the Mouse to wake up the PC.
      1. Open Control Panel > Hardware and Sound > Devices and Printers
      2. Double-Click on your Mouse or on your receiver if you use a wireless Mouse (Ex.: Logitech Nano Receiver).
      3. Go to the “Hardware” tab and select the device named “HID-compliant mouse” with type “Mice and other pointing devices”. Then click on the “Properties” button.
      4. In the “HID-Compliant mouse Properties” pane now opened, click on the button “Change settings”. This will add a tab “Power Management”. Open that tab.
      5. In the tab “Power Management”, uncheck the option “Allow this device to wake the computer”
    2. Disallow the Keyboard to wake up the Computer
      1. Open Control Panel > Hardware and Sound > Devices and Printers
      2. Double-Click on your Keyboard or on your receiver if you use a wireless Keyboard (Ex.: Logitech Nano Receiver). NB.: my Bluetooth keyboard is displayed as “Logitech Elite Keyboard”.
      3. Go to the “Hardware” tab and select the device named “HID Keyboard Device” with type “Keyboards”. Then click on the “Properties” button.
      4. In the “HID Keyboard Device Properties” pane now opened, click on the button “Change settings”. This will add a tab “Power Management”. Open that tab.
      5. In the tab “Power Management”, uncheck the option “Allow this device to wake the computer”. NB.: if there is a “Sleep” button on the keyboard, it won’t work either to wake the PC from Sleep State !

    Loading

  • Wake on Lan from Power Off State (S5) on Asus P9X79 Pro

    My PC built on top of an Asus P9X79 Pro can be waked up from Lan when it is in Sleep Mode (=S1 state) but not when it has been completely turned off (=S5 state). Googling a bit I found the exact solution on Ryan’s Bliggity Blog: enable the “Network Stack” in the Bios.

    Click to Read More

    So, as a resume, here is my configuration:

    1. Windows Power Options
      1. Open Control Panel > Hardware and Sound > Power Options
      2. Click on “Change what the power buttons do” on the left
      3. Click on “Change settings that are currently unavailable”
      4. Uncheck the option “Turn on fast start-up (recommended)”
    2. Bios
      1. Enter your UEFI bios (I am using the latest version when posting his)
      2. Click on “Exit/advanced mode” button in the upper-right corner and enter the advanced mode
      3. Go to the “Advanced” tab and select the entry “APM”
        1. Enable the option “Power On By PCI/E/PCI”.
        2. Enable also the “Network Stack”
      4. Possibly go next to the “Boot” tab and
        1. Either disable the option “Fast Boot”
        2. Or if you enable it, enable its sub-option “Network Stack Driver Support”
    3. Network adapter settings:
      1. Open Control Panel > Network and Internet > Network and Sharing Center
      2. Click on “Change Adapter Settings” (on the left)
      3. Right-Click the Network Adapter “Intel(R) 82579V Gigabit Network Connection” and select “Properties”
      4. In the “Networking Tab”, click “Configure”
      5. In the “Power Management” tab, yous should now see and tick the option “Wake on Magic Packet from power off state”
      6. Keep the “Wake on Magic Packet” option ticked too (to wake from Sleep State).

    All about System Power States can be found on Intel website:

    • System Power State S0 the ON state: The system is completely operation, fully powered and completely retains the context.
    • System Power State S1 the Sleep state: The system consumes less power than S0 state. All Hardware & Processor context is maintained.
    • System Power State S2 the Sleep state: The system consumes less power than S1 state. Processor loses power and processor context and contents of the cache are lost.
    • System Power State S3 the Sleep state: The system consumes less power than S2 state. Processor & Hardware context, cache contents, and chipset context are lost. The system memory is retained.
    • System Power State S4 the Hibernate state: The system consumes the least power compared to all other sleep states. The system is almost at an OFF state, expect for a trickle power. The context data is written to hard drive (disk)and there is no context retained.
    • System Power State S5 the OFF state:The system is in a shutdown state and the system retains no context. Note that in power state S4 the system can restart from the context data stored on the disk, but in S5 the system requires a reboot.

    Loading

  • Couldn’t format SD/SDHC card or delete its volume

    I was recently unable to format a SDHC card with Windows Explorer or the Disk Management console (diskmgmt.msc). I did apply the same trick as when I was unable to delete a volume of a SDHC card.

    The symptom was the same: in the Computer Management > Disk Management console… the “Delete Volume…” menu was dimmed (disabled)…

    The solution was to format or delete the volume using command ‘Diskpart’ in a Dos prompt.

    Click to Read More

    See here how menu is disabled when I want to delete it:

    Computer Management: Delete Volume... dimmed

    To solve this, I used the solution published on Internet by Salty Wagyu : diskpart. Here is the list of commands to be used in a dos prompt run as Administrator:

    1. Diskpart
    2. List Disk
    3. Select Disk x (where x is the number corresponding to your SD Card)
    4. Clean
    5. Create partition primary
    6. Active
    7. Format fs=fat32 quick
    8. Assign

    Loading

  • Request Microsoft for an existing hotfix not publicly released

    I found a kb (article from the knwledge base) of Microsoft mentioning an existing hotfix but not providing a link to download this one.

    Here is a link to request Microsoft for such hotfix without going through the long and expensive process of a phone call,  etc… E.g.: for a dummy kb 1234567: Click here.

    Click to Read More

    I found a post that give all the requested details on that process: http://www.pesikov.tk/blog/request-download-kb-update-hotfix-directly-without-contacting-microsoft-customer-support-services/

    Only notice that you must now use a parameter “ln” in the URL to enforce the language of the page. Ex.: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=1234567&ln=en-us.

    This will bring you to such a support page:

    Request Microsoft for a hotfix
    Request Microsoft for a hotfix

    Loading

  • Mouse entering a ClickLock-like selection mode within Visual Studio

    Quite often, when I stop the Visual Studio debugger (possibly mainly when I just did an “edit and continue“) the mouse enters a kind of “ClickLock” mode: the text is automatically highlighted between the current mouse location and the location where it was when I stopped the debugger. Impossible to move the mouse (or the cursor using the arrows) without highlighting text (I.e.: doing a text selection)… So, impossible to work anymore as pressing any key will immediately delete the selection.

    I found only a few reports about that “issue/behavior” on the web. I still have no idea how to prevent it. But I found a way to halt it when it occurs: Press Alt-Gr + CTRL + SHIFT

    Loading

  • Upgrade Fuhu Nabi 2 from Ice Cream Sandwich to Jelly Bean

    I used to root Kids’ tablet Fuhi Nabi 2 in order to be able to install Google Play. But I got a notification from Fuhi two weeks ago announcing that Google Play was now available out of the box with their latest update… This one upgrades from Android 4.0.1 to 4.1.1… So, hop, hop, hop, I immediately decided to rollback my tablet to a stock Rom and give a try to that new update. Piece of cake… if you know how to proceed…

    Click to Read More

    1. The Nabi 2 had Rom 1.9.37 and TWRP Recovery Image 2.2.2.1.
      • I had a touch screen calibration issue with more recent TWRP. I didn’t try to most recent one however (E.g.: 2.6.3.0).
      • Original site of TWRP can be found Here.
      • All TWRP versions tested for Nabi 2 can be found here as well as the native Recovery Image from Fuhu.
    2. Download the stock Rom 2.0.5 and unzip it from your PC onto a SD card under \TWRP\Backups\<device serial number>\abcdstock123, then re-plug the SD into the Nabi 2
      • This is the folder where TWRP did store my backup when I did root the device
      • All Stock Versions can be found here.
      • There should be 4 files: boot.emmc.win, boot.emmc.win.md5, recovery.emmc.win an System.ext4.win
    3. Install PDA.Net, to be found here, if not available anymore on your PC.
    4. Boot the Nabi 2 in recovery mode by pressing both the Volume + Button and the Power Button.
    5. Press twice the Volume – Button to move to the menu “Recovery Kernel”
    6. Press once the Volume + Button to enter the selected menu
      • it takes quite a few seconds to enter. Be patient.
    7. Once entered in Teamwin (TWRP), select “Restore”
    8. Then select “Using external SD” and pick the Stock Rom version 2.0.5 copied on the SD
    9. Only restore System and Boot, but not your data!
      • I presume that all your data, if any, are in gmail, google+, etc…
    10. Once the restore completed, reboot the system.
    11. It will take some time to reboot, installing the various packages, etc…
    12. Once back into Android, go to the “Settings” > “About” > “System Updates” > “Check now” for updates, “Download” it and install. Android will reboot at the end of that update.
    13. This was actually the “first part” of the upgrade from the Stock Rom 2.0.5 to 2.3.11. With that first part, you are not yet running Android 4.1.1. You have to redo the step here above once more to install the “second part”.

    Notice: I had an issue with the installation of the “first part”. I think that the “update” file was corrupted because I lost the Wi-Fi connection for a few seconds during the download. So, I had to restart the operation and it went then well.

    I had a bigger issue when I tried to install the “second part” of the update. During the reboot, I got the red triangle dead Android picture… This is because I still had traces of rooted files on the tablet. The update din’t recognize some system files and refused to proceed further… Fortunately, there is a solution

    1. Download the fix OTA2.zip to be found here (named Part2 Work Around)
    2. Copy the zip as is onto the SD card under \TWRP\ and re-plug the SD into the Nabi 2
    3. Reboot into Recovery mode as explained previously
    4. Now, instead of “Restore”, select “Install” and pick the file OTA2.zip from the “external SD”
    5. As far as I am concerned, I did a “Wipe Cache/dalvik” after the installation..
    6. Reboot the system.

    Et voilà. The Nabi 2 is now running a fresh Jelly Bean with all kids’ favorite games re-installed from Google Play. Big big thanks to XDA-Developers’ community for providing such a great support!!

    Notice: I am now running a US version instead of a UK version… But I don’t care as everything seems ok 😛

    Click to Read More

    I am not that happy about the upgrade…

    For sure, the new Android interface for the parents is great. But there is no real change for my kids except that:

    • It’s much slower to boot
    • It freezes regularly while my kids are unlocking the screen immediately after the boot. The lock screen start to slide and then freeze in the middle of the screen. I have no choice but hard-reboot (keeping the power button pressed for some seconds)
    • It also freezes sometimes while my kids are playing. Not often but still… I never had any issue in the past.

    And a problem that I always had: when charging the tablet, the tablet always completely switch off and it’s a real pain to reboot it once charged. I always have to wait a bit (> 1 minute) after unplugging the tablet before being finally able to boot. Possibly due to the fact I am on 230V/50Hz and some kind of protection ? It looks indeed like the tablet refuses to boot because the battery is too hot…

    Loading

  • Cropping and printing photos for standard photographic print sizes

    As far as photos edition and printing is concerned, I only use two free softwares: FastStone and Paint.Net. I use FastStone to crop pictures using predefined standard photographic print sizes or to print pictures keeping its size…

    Click to Read More

    Although Paint.Net is really great for editing photo (Ex.: clone and heal details, convert into Sepia, …) it can’t crop using predefined standard print sizes…

    Also, assuming that I have a photo with a custom size and a resolution like 600×600 , I cannot print it in its actual size… Paint.Net will always resize the photo to fit the paper (although I do not check the option “fit picture to frame”) – or – will print Full page, 13×18, 20×25, 10×15, 9×13, Wallet (9 picture) or Contact sheet (35 pictures). As said by the Team developping Pain.Net : it would mean rewriting the printing functionality from scratch and isn’t something we’ll do because it would take months if implementation and debugging.

    So, I use open my photos with FastStone and use its “Crop Board” as well as its “Print” feature.

    If I have to edit the photo, I can open it within Paint.Net directly from FastStone using its “Edit With External Program”…

    Notice: I use the “Sepia” adjustment of Paint.Net as the result is much better than with FastStone. I also use the “Clone stamp” of Paint.Net as I can adjust its width, something that I cannot do with FastStone.

    Loading

  • View or flush the content of the DNS cache on Windows

    Although my primary DNS is my Synology and the IP returned for ‘beatificabytes.be’ is expected to be the IP of my NAS, Chrome tried to access my blog on the web instead of locally. I thought it was an issue with the DNS and wanted to know how it resolved my domain name.

    Click to Read More

    Windows is caching the IP resolved by a DNS. So, thinking my DNS was possibly off when Chrome tried to resolve my domain name, I had to view the content of the cache. This can be done with the following command:

    ipconfig /displaydns

    The result was clear. My DNS didn’t answer itself and the domain name was therefore resolved by the DNS of my provider:

    www.beatificabytes.be
    —————————————-
    Record Name . . . . . : www.beatificabytes.be
    Record Type . . . . . : 5
    Time To Live . . . . : 30
    Data Length . . . . . : 8
    Section . . . . . . . : Answer
    CNAME Record . . . . : <myNAS>.diskstation.me
    Record Name . . . . . : <myNAS>.diskstation.me
    Record Type . . . . . : 1
    Time To Live . . . . : 30
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 91.182.141.78

    So, I tried to just flush the cache to see if my DNS would now resolve the domain name. The command to do so is:

    ipconfig /flushdns

    For information purpose, here are the commands to respectively turn off/on the DNS cache until next reboot:

    net stop dnscache

    net start dnscache

    Flushing the DNS didn’t solve the issue unfortunately 🙁

    Neither ipconfig /release nor ipconfig /renew did solve the issue either*… But this post is to keep a note about viewing/flushing the DNS cache only 😉

    * To be continued…

    Loading

  • Google search via url field vs search page

    I just noticed that I can not use Chrome’s url field anymore to search on my blog as I did so far… Google is using now my blog’s search feature.. EXACTLY the opposite of my expectation!

    Click to Read More

    As explained here, I use my blog as a knowledge base to be searched using Google.

    Concretely, if I want to find something like the processor used on my desktop (named Chaos), I used to type this in the url field of Chrome: beatificabytes chaos

    As I am very used to the keyword suggestion feature of Chrome, as soon as I see that the suggestion seems to match what I am typing, I press ‘tab’ to auto-complete it.

    Moreover, I use very often the url ‘beatificabytes.be’. So when I type ‘bea’ as a first keyword, I am suggested ‘beatificabytes.be’. I never had any problem with that as searching for ‘beatificabytes chaos’ or beatificabytes.be chaos’ used to be equivalent.

    But since a few days, when I type ‘tab’ to auto-complete ‘bea’, my keyword is replaced by ‘Search beatificabytes.be’. And if I add a keyword like ‘Chaos’ behind that, Chrome is using the WordPress’ search feature of my blog instead of searching via Google. Obviously, the result is disappointing.

    So, I have no choice but type now ‘beatificabytes’ after another keyword. The down side is that in such a case, I don’t have the auto-completion anymore on ‘bea’ 🙁

    Loading