Wednesday, July 31, 2019

Some executables refuse to download on Windows 8

I'm setting up a new Windows 8.1 computer. It refuses to download certain files -- they'll download the first few hundred KB, but then stall. This happens on IE, Chrome, and Firefox.


Every non-executable file I've tried to download works fine. The executable downloads that don't work include AVG from their site and Avast from cnet. Executable downloads that do work include Start Menu 8 from cnet and the Spotify installer. (Yes, one download from a certain site works and another from the same site doesn't).


I've disabled QoS packet scheduling. I've disabled TCP window scaling. I tried disabling Windows Firewall. I removed McAfee and any other crapware that came with the computer that seemed like it might cause a problem. I made sure the account has write access to the Downloads folder, and tried downloading to other folders. I made sure downloads are enabled in Internet Options. I restarted more than once. I made sure the date and time are synced. I'm completely out of ideas.

Windows 10 file explorer won't rename any New folder created

There is a very similar post here that was closed. The answer was not working.
There is also this post that I just found documenting the issue
"Unable to rename folders through Explorer in Windows 8.1"




The issue happens for any New folder created (a sub-folder in any location).






Window's error1:






Title: "Rename folder"




Text:



"Can't find the specified file."



"Make sure you specify the correct path and file name."



"New folder"

"Date created: dd/mm/yyyy hh:mm"



Box: "Try Again" or "Cancel"






If I click 'Try Again'







Window's error2:






Title: "Rename"



"Text:"
"warning sign"



"The file or folder does not exist."




Box: OK






Context: A W7 clean install followed by a W10 "clean option" upgrade (24 July 2016), so one year after W10 launch.
Still, another of my PC with a "dirty" W10 upgrade from W7 gives the same symptoms. I fixed it but don't remember how.
Particularity: logical drives/folders on both PCs manually set for the Documents, Downloads, Music, Pictures and Videos folders at different locations than Windows default. Whether relevant or not, I don't know. It is a common characteristic / difference from standard for these 2 PCs.



http://www.winhelponline.com/blog/er...rs-windows-10/ gives a solution but I am not 100% sure it is the right one, and it implies also modifying the registry.




https://www.youtube.com/watch?v=ku-jsZ7HvfA gives a solution that could be similar to the reg fix in the 1st link. I identified that some keys are the same, but not all.



I can rename the "New folder" using an old "dos" type command opening a cmd window. That works fine. (e.g. in cmd, type H: (if H: is the logical drive on which it happens); cd "your folder_name" (reiterate if required); dir (to know if your "New folder" is there); ren "New folder" test1 (to rename your new folder to 'test1'); exit (and scream hallelujah))



Before touching the registry, would anyone with W10 insight know if these registry fixes make sense. I don't know the rationale which makes me uneasy; I am a mere user. Yes I could make backups & try but, even if it works now, I could still find out later that these fixes are damaging something else.



Thanks



acontrario

Brussels

hardware failure - cannot format bad hard disk

I think I have a problem with my hard drive.


I tried to boot the system, and it was taking a long time. After a while it said that the drive was not bootable.


I tried running check disk, but it was unable to complete.


I then tried to remove it from the laptop to see if I can recover the files, but the drive does not appear to be formatted. When I tried to format the drive, I received a message that said that the formatting was not successful.


A S.M.A.R.T test returned a read failure.


The annoying thing is that when I try to format just a part of the drive, it works fine.


EDIT : Here is the log file output:



184 End-to-End_Error 0x0032 001 001 001 Old_age Always FAILING_NOW 1927



What does this mean?


EDIT 2: The machine that I have the drive plugged into is running windows 7 sp1, the driver is connected via usb (sata to usb) and the model of the hard driver is MK1652GSX and the model of laptop is Presario CQ60.


-----The full output of smartctl-----



smartctl 5.41 2011-06-09 r3365 [i686-w64-mingw32-win7(64)-sp1] (sf-win32-5.41-1)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Toshiba 2.5" HDD MK..52GSX
Device Model: TOSHIBA MK1652GSX
Serial Number: Z8OGFLOVS
LU WWN Device Id: 5 000039 176f05fb8
Firmware Version: LV011C
User Capacity: 160.041.885.696 bytes [160 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Feb 09 21:03:59 2012 GTB
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 121) The previous self-test completed having
the read element of the test failed.
Total time to complete Offline
data collection: ( 120) seconds.
Offline data collection
capabilities: (0x51) SMART execute Offline immediate.
No Auto Offline data collection support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 57) minutes.
SCT capabilities: (0x0033) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 099 099 050 Pre-fail Always - 0
2 Throughput_Performance 0x0007 100 100 050 Pre-fail Always - 0
3 Spin_Up_Time 0x0003 100 100 002 Pre-fail Always - 1082
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 5383
5 Reallocated_Sector_Ct 0x0033 037 037 010 Pre-fail Always - 1292
7 Seek_Error_Rate 0x000f 100 100 050 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 3949
10 Spin_Retry_Count 0x0013 207 100 030 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 5085
184 End-to-End_Error 0x0032 001 001 001 Old_age Always FAILING_NOW 1927
187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 1927
188 Command_Timeout 0x0032 100 096 000 Old_age Always - 28
189 High_Fly_Writes 0x003a 100 100 001 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 074 031 045 Old_age Always In_the_past 26 (Min/Max 21/27)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 106
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 24969597
193 Load_Cycle_Count 0x0032 094 094 000 Old_age Always - 63745
194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 26 (Min/Max 13/69)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 257
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 35
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
220 Disk_Shift 0x0002 100 100 000 Old_age Always - 148
222 Loaded_Hours 0x0032 093 093 000 Old_age Always - 3023
223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 0
224 Load_Friction 0x0022 100 100 000 Old_age Always - 0
226 Load-in_Time 0x0026 100 100 000 Old_age Always - 328
240 Head_Flying_Hours 0x0001 100 100 001 Pre-fail Offline - 0
SMART Error Log Version: 1
ATA Error Count: 2536 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 2536 occurred at disk power-on lifetime: 3948 hours (164 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 00 d0 8c 41 Error: UNC 8 sectors at LBA = 0x018cd000 = 26005504
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 03 08 00 d0 8c 40 00 00:09:32.132 READ DMA EXT
25 03 80 80 ac 8a 40 00 00:09:32.130 READ DMA EXT
35 03 80 80 ac 8a 40 00 00:09:32.127 WRITE DMA EXT
25 03 80 00 ac 8a 40 00 00:09:32.125 READ DMA EXT
35 03 80 00 ac 8a 40 00 00:09:32.123 WRITE DMA EXT
Error 2535 occurred at disk power-on lifetime: 3948 hours (164 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 06 12 08 60 40 Error: UNC 6 sectors at LBA = 0x00600812 = 6293522
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 03 08 10 08 60 40 00 00:01:21.041 READ DMA EXT
25 03 08 60 09 00 40 00 00:01:21.040 READ DMA EXT
35 03 08 60 09 00 40 00 00:01:21.040 WRITE DMA EXT
25 03 08 60 09 00 40 00 00:01:21.039 READ DMA EXT
25 03 08 08 08 60 40 00 00:01:21.038 READ DMA EXT
Error 2534 occurred at disk power-on lifetime: 3948 hours (164 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 41 0a 05 08 60 60 Error: UNC at LBA = 0x00600805 = 6293509
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 08 00 08 60 40 00 00:13:34.113 READ FPDMA QUEUED
ef 02 00 00 00 00 00 00 00:13:34.113 SET FEATURES [Enable write cache]
aa aa aa aa aa aa aa ff 00:13:34.079 [RESERVED]
60 08 08 00 08 60 40 00 00:13:28.247 READ FPDMA QUEUED
ef 02 00 00 00 00 00 00 00:13:28.247 SET FEATURES [Enable write cache]
Error 2533 occurred at disk power-on lifetime: 3948 hours (164 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 41 0a 03 08 60 60 Error: UNC at LBA = 0x00600803 = 6293507
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 08 00 08 60 40 00 00:13:28.247 READ FPDMA QUEUED
ef 02 00 00 00 00 00 00 00:13:28.247 SET FEATURES [Enable write cache]
aa aa aa aa aa aa aa ff 00:13:28.223 [RESERVED]
60 08 08 00 08 60 40 00 00:13:23.677 READ FPDMA QUEUED
ef 02 00 00 00 00 00 00 00:13:23.676 SET FEATURES [Enable write cache]
Error 2532 occurred at disk power-on lifetime: 3948 hours (164 days + 12 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 41 0a 03 08 60 60 Error: UNC at LBA = 0x00600803 = 6293507
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 08 00 08 60 40 00 00:13:23.677 READ FPDMA QUEUED
ef 02 00 00 00 00 00 00 00:13:23.676 SET FEATURES [Enable write cache]
aa aa aa aa aa aa aa ff 00:13:23.656 [RESERVED]
60 08 08 00 08 60 40 00 00:13:18.232 READ FPDMA QUEUED
ef 02 00 00 00 00 00 00 00:13:18.232 SET FEATURES [Enable write cache]
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 90% 3949 163251
# 2 Extended offline Completed: read failure 90% 3947 6293501
# 3 Short offline Completed: read failure 90% 3946 6293501
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

windows 7 - Printing more than one page per sheet


I have a printer (Dell v305), and it can't print more than one page per sheet.


How can I print to this printer so that it will print, say, 60 pages with 15 sheets of paper? (double sided is 30, and two per page is 15)


Answer



You are asking two questions here:



  1. How can I print two pages per sheet of paper?

  2. How can I print on both sides of the paper?


The second question is easily answered and is valid for all printers (not just the v305):


Double sided printing is only possible by either having a printer which supports it in hardware (it needs the rolls and wheels to manually turn the paper over and print it again on the other side), or by manually turning the paper and feeding it back into the paper.


The manual part can be optimised by first printing half of the pages (e.g. all even pages) and then manually putting the paper back in (reversed) and printing the remaining (odd) pages. There is not need to do this for every sheet of paper, but you will need to it once per print job.


The first question is a bit harder and it also has two answers:



  • Either your printer driver supports it and you can enable it there. This will vary per printer driver, but Dell seems to use this for a few printer, so your might look similar.


enter image description here



  • Or you need to massage your print job.
    E.g. create a PDF with two side by side pages on a single page, then print that page.
    You can combine that with the manual duplex printing, though you would need to take care to print pages 1,2, 5,6, 9,10, ... and then turning the paper over and printing 3,4, 7,8, 11,12, ...


The easiest way to massage your output might be to print the PDF to a PDF printer. That seems redundant but you can use that to change some settings. An alternative is to use ghostscript (for postscript printers).


Tuesday, July 30, 2019

hard drive - Does this mean that Tor saves private information?

I was going through my pagefile.sys system file (as I usually do) and found a few things of note. For example:



-----BEGIN RSA PUBLIC KEY-----

MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWNR3PfJy6YRwA6fUCfF7TlcP0
Bz+PI0aeayOQmm1uyx/wB/MB0zweBwEvgLnbmgYzE8PUpBNtaFaY3essSMHsWko2
SYkCVujKPdWhN9k8tqX/tMPn7TVUm7XAZ9A4mbgoYfX669qpguMn5QXkFEt0OFYK
Qo4DHJY86AJh3qawkQIDAQAB
-----END RSA PUBLIC KEY--------


followed by



ntor-onion-key 4BeCRL/99541u3jcjdkwkmjhbutujjeroj34jkkjj542jqpwkag9jkf9=



I am a user of the Tor browser. I run it on its most default settings (i.e disabled disk writes, on Windows 10, latest version of Firefox, etc.)



Does this mean that Tor has failed in its objective to not write data to disk?

UEFI Dual Boot Windows 10 & DebianTesting

I know I am probably making a duplicate. But there are so many duplicates already that finding an answer to my specific questions will take hours. If not more. I tried.


So I succeeded in the dual boot.
I have a ASUS FX504GM gaming laptop. Windows is on an NVME & the HDD now has DebianTesting.


My question.. did any of this at all effect the EFI partition of Windows NVME?
I ask this because when I used to install grub on my old PC which had MBR disks and Legacy BIOS it would ask me which disk I wanted to install grub to.. /dev/sda or /dev/sdb.
Idealy I would keep Windows in one disk. And install grub to the sdb that way I would be able to retain both Windows Boot Loader an grub on separate disks.
This time .. grub did not ask which partition to INSTALL itself to.
Now when I go into my UEFI setup (F2 at start) I see THREE boot option. Two of which are the Debian on disk ST1000LXSJS (Seagate Firecuda) and Windows bootloader on the NVME.


-Why are there two debian boot options?


-How does the EFI partition created on the Debian HDD work?


-Did grub install to two places?


Now here's the funny part.


I messed up the kernel updates and I am reinstalling Debian.
I deleted the EFI and root partition on the HDD and my UEFI still shows the boot options.


So did grub add an entry somewhere in the NVME's efi partition?

linux - UEFI dual boot messed up attempt

I was trying to for the first time dual boot my computer With Windows 8.1 Kali Linux


I didn't Have an Idea About What UEFI means so naturally I made a partition, then I Went to the "BIOS" menu and set things up in order to boot from USB (as I saw in tutorials, I was supposed to put the legacy mode on, and the "legacy first" option); finally the installation finished and I rebooted, there appeared the menu options to select the OS to use, so I first started Kali and saw everything was ok, but when I tried to enter in Windows , there Appeared a message saying something like "the boot configuration for your PC is missing" .....


So I panicked and I used the system restore tool, even when it finished the problem stayed the same, so I decided just as lucky choice to leave the he BIOS boot menu like it was originally. And that allowed me to use windows again, but when I tryed to enter in Kali now with the legacy mode, it shows the message "unkown filesystem grub rescue ...." , so summarizing I would really appreciate your help with this questions:


1) why did the dual boot Attempt failed?


2) Why windows and linux installer shows a different size from the same partition?


3) how can I delete the useless kali linux partition (I just don't remember which one it was) in oreder to use That space again?


4) Is there a way of making a dual boot with UEFI? how?

How to install operating system from ISO image through TFTP and PXE?



TFTPD64 is installed on the computer that has the .iso file for operating system. I extracted the contents of .iso into a local folder. In TFTPD64 I have to enable DHCP server, even though there's already one on the network, since client doesn't detect and get an IP info.



For Boot File under DHCP settings in TFTPD64 I don't know what to put.




I tried putting BOOT.CAT, but client just downloaded the file quickly and didn't do anything with it. I tried putting the name of the entire .iso image itself but TFTPD64 said under the status of the download "ERR".



How to install an OS from ISO image file using TFTPD64?


Answer



That might not be possible.



Typically when netbooting a small image gets downloaded through tftp (that contains network drivers and and a very basic operating system) and then it will connect to a network drive that contains the rest of the files needed to boot.



Because of the file size limitations of TFTP, and the fact that the ISO needs to be stored somewhere while the computer boots - you can't just boot an ISO over the network.




What are you trying to boot over the network? If it's linux you may want to take a look at the linux terminal server project. It's a great way to learn about tftp and the like. If it's windows, the windows automated install kit is another cool project to learn.


power supply - What is an effective laptop charging scheme




My friend told me that if you leave the AC adaptor plug plugged into the laptop after the battery is charged 100%, it actually over charges it and never cuts off the voltage. As a result, this reduces battery life.


I have Dell n5010 n series laptop with i5 in it. It is a new machine, and I was thinking that how is it possible that huge companies leave a "bug" like this in a laptop that is so expensive.


I think that it never turns off the charging, it actually puts it to float voltage as this is one of charging techniques.


I want to know what, in fact, happens.

linux - How to specify arguments for editor in Midnight Commander


I'm using Nano as the editor in MC. I would like it to scroll by 1 line, which is not its default behavior.


I've found that you can specify the option -S when you run Nano to enable smooth scrolling, but I don't know how to tell MC to do that.


How can I specify the options for an external editor that Midnight Commander uses?


Answer



I've edited the file ~/.selected_editor and added the -S option there:


SELECTED_EDITOR="/bin/nano -S"

It works as long as I don't run select-editor, which would overwrite this change.


EDIT:


Actually there's no need to use the command-line option in this case. Smooth scrolling can be set in /etc/nanorc with set smooth.


Remap Caps Lock to Ctrl in Windows 10 without administrator privileges?

I found this question:


Which would likely work great if I had admin rights on my machine. But I don't.


I also found a couple of links about remapping keys without admin rights in Windows 7. The suggested solution is to use the following:


Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

(Save in a file with .reg extension, double-click to apply to the registry, and then reboot.)


This is the same as the first linked solution except for the key to edit; the HKEY_CURRENT_USER key can be edited without admin rights.


Unfortunately, this doesn't work on Windows 10. (It applies and creates the key, but even after reboot the Caps Lock key is caps lock, not ctrl.)


In regedit I see that under HKEY_CURRENT_USER\Keyboard Layout there are subfolders (subgroups?) for "Preload", "Substitutes", and "Toggle". It seems likely to me that putting something in "Substitutes" might be the way to do this for Windows 10 but I've no idea what to put, and there is no documentation I can find.


How can I remap Caps Lock to Ctrl in Windows 10 without admin rights?

Monday, July 29, 2019

How do you stop the Ubuntu "wipe" (wiping an NTFS disk) in progress?

I didn't realise that the Linux wipe utility runs 25 passes by default. I'm wiping a 320 GB external disk drive, (it's about 25% into Pass 3 started around 4 PM yesterday, it's now 1 PM).


Can I just shut down the terminal window while wiping is in progress and not damage the drive?


Terminal>
root@name-pc:/home/name# sudo wipe /dev/sdc1
Okay to WIPE 1 special file ? (Yes/No) yes
Wiping /dev/sdc1, pass 0 (13) [19535616 / 19535616]
pass 1 (6) [19535616 / 19535616]
pass 2 (24) [19535616 / 19535616]
pass 3 (32) [ 5097566 / 19535616]

How to use SSH on Windows 10 Home Edition

I tried setting up ssh using OpenSSH and powershell on a nextbook with Windows 10 home edition installed. An error resulted on powershell which merely stated that ssh service couldn't be started on the computer. There is a message in the control panel which says that remote connection to the computer is not supported in the current edition of windows. I'm guessing this is the reason I cannot setup an ssh service. If so, is there a way to support ssh on Windows 10 home edition?


Edit:
The error I'm receiving in powershell after trying, ' Start-Service sshd ', is as follows:
" Service 'sshd (sshd)' cannot be started due to the following error: Cannot start service sshd on Computer '.'. "


I went through the tutorial here: https://blogs.msdn.microsoft.com/powershell/2017/12/15/using-the-openssh-beta-in-windows-10-fall-creators-update-and-windows-server-1709/
and the error results from trying the Start-Service script near the bottom.

Sunday, July 28, 2019

Is there a way to toggle the Windows "compress this drive" command through a command prompt?



My friends laptop (a 64-bit Windows 7 Home Premium with 4GB RAM) was running slowly and she asked me to take a look at it. One of the things (besides that the disks had not been defragmented for a long time, and some other things) is that she had ticked the checkbox "Compress this drive to save disk space" on the OS disk.




Since this is one thing that could make the OS run a bit slower I decided to untick the checkbox. After starting the decompression process, Windows estimated that it would take 16 hours to complete. However about 30 minutes later the OS suddenly shut down.



After restarting the machine I noticed that about half of the top-level folders have been decompressed, and half have not. On the root level the "Compress this drive" checkbox is however unticked.



Is there a way to launch the decompression of files through e.g. a command prompt?


Answer



Yes, its called the "compact" command.





Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.



C:\Windows\system32>compact /?



Displays or alters the compression of files on NTFS partitions.



COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]



/C Compresses the specified files. Directories will be marked

so that files added afterward will be compressed.



/U Uncompresses the specified files. Directories will be marked
so that files added afterward will not be compressed.



/S Performs the specified operation on files in the given
directory and all subdirectories. Default "dir" is the
current directory.



/A Displays files with the hidden or system attributes. These

files are omitted by default.



/I Continues performing the specified operation even after errors
have occurred. By default, COMPACT stops when an error is
encountered.



/F Forces the compress operation on all specified files, even
those which are already compressed. Already-compressed files
are skipped by default.
/Q Reports only the most essential information.

filename Specifies a pattern, file, or directory.



Used without parameters, COMPACT displays the compression state of
the current directory and any files it contains. You may use multiple
filenames and wildcards. You must put spaces between multiple
parameters.




More information here


windows 7 - Why are the PATH environment variables handled differently when I run cmd.exe as admin?

Original post:


When I start cmd.exe normally, my PATH variable only contains the paths from the system environment variable. Only when I start cmd.exe as admin does PATH contain a concatenation of the system and user variable.


Why is that and what can I do to change that behavior?


User PATH variable:


C:\Program Files (x86)\OpenVPN\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Java\jre7\bin;C:\Users\user.name\AppData\Roaming\npm

System PATH variable:


C:\app\user.name\product\11.2.0\client_1;C:\app\user.name\product\11.2.0\client_1\bin;C:\Program Files (x86)\Common Files\GEFASOFT;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\lynx\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\nodejs\

PATH content in cmd with admin:


C:\app\user.name\product\11.2.0\client_1;C:\app\user.name\product\11.2.0\client_1\bin;C:\Program Files (x86)\Common Files\GEFASOFT;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRUTCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\lynx\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files (x86)\OpenVPN\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Java\jre7\bin;C:\Users\user.name\AppData\Roaming\npm

PATH content in cmd without admin:


C:\app\user.name\product\11.2.0\client_1;C:\app\user.name\product\11.2.0\client_1\bin;C:\Program Files (x86)\Common Files\GEFASOFT;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRUTCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\lynx\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\nodejs\

Also I'm logged in as an administrator and by "run as admin" I mean "run elevated", so it's always the same user.


Update:


The link suggested by smc in the comments mentions a size limit of the system PATH variable (1920) in Windows Server 2003 beyond which the two variables won't be merged. So I started testing, here are my results:



  • In non-elevated mode the combined size of the already expanded user and system path variables must not exceed 2045. 2045 + 1 (for the ";" Microsoft inserts between the two variables) = 2046, which (coincidentally?) seems to be an old command line length limitation in Windows 2000.

  • In elevated mode the full length of both variables (2047 each, at least in the UI) can be used.


Another difference I've noticed is that in non-elevated mode the only variable that gets expanded is %SystemRoot%. %UserProfile%, %AppData% etc. aren't expanded. Interestingly this behavior can also be seen in the environment variables UI editor: %SystemRoot% gets expanded in the overview while other variables do not. When using an elevated command prompt all variables get expanded. This is regardless of the length of the PATH variables.


So my question still stands: Why is there a difference between elevated and non-elevated mode?

Saturday, July 27, 2019

windows - RoboCopy unable to copy between a server on a domain to a computer in a workgroup

I have a RoboCopy problem and here is the scenario.


My server is running Windows Server Essentials 2012 R2. My laptop is running Windows 10 Technical Preview. The server is running as a domain controller but my computer is not joined to that domain.


I have a share on the server called "Pictures", so it's located at ~ \\192.168.1.10\Pictures which I have mapped as P: using an account tha thas Full Control privileges on that folder. I've been trying to mirror that folder to my local machine using the simple command:


RoboCopy P:\ "C:\Users\[MyUsername]\Pictures" /MIR


This always returns the error ERROR 5 (0x00000005) Accessing Destination Directory even though the destination directory is under my user account where I am the owner. I have tried using both an administrative command prompt as well as the standard user command prompt. Neither works :(


Using RoboCopy between two local folders using the Pictures folder as a destination works just fine, so I'm guessing this has something to do with domain permissions rather than the actual destination permissions.


P.S.


The funny thing is this worked just fine when my computer was using Windows 8 and connected to the Server Essentials using the Connector application without domain joining (The Connector app isn't available for Windows 10).


P.P.S


Copying directly in Windows Explorer works just fine, but I need RoboCopy since it's much more efficient at syncing large folders.


Any help would be appreciated.




Update


I am unable to try with a local user on the server since the server is a domain controller. I did however try to give the domain user I use to map the network drive on the workgroup machine full permissions on the folder as well as making him owner and still no dice. Here is the exact RoboCopy output:



-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : fimmtudagur, 25. jĂșnĂ­ 2015 21:40:01
Source : P:\
Dest : C:\Users\stefa\OneDrive\Pictures\
Files : *.*
Options : *.* /V /S /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
25 P:\
2015/06/25 21:40:02 ERROR 67 (0x00000043) Accessing Destination Directory C:\Users\stefa\OneDrive\Pictures\
The network name cannot be found.
Waiting 30 seconds...

Update 2
I'm fairly certain I have just hit a bug in Windows 10 (still there in 10159). When I try this on a Windows 8.1 machine (x64 as well as RT, clean install on both) by using robocopy over a mapped network drive or net use \\192.168.1.10\IPC$ ... everything works just fine. But using a Windows 10 client, this does not work. My theory is that either something is has broken in the way Robocopy does network copies in Windows 10 or something in the network stack in Windows 10 has broken RoboCopy.

partitioning - How can i make 2 partitions on my USB Stick and put ISOs in them?


Can i make 2 partitions and put 2 ISOs on them so when i boot into BIOS it says something like USB(1) for first partition and USB(2) for second?


Answer



When booting into BIOS, it will only recognise the USB as 1 device, no matter how many partitions you create.


However, you can possibly create a GRUB-like OS loader on the USB. Then, when you boot onto the USB, from there you can select the OS.


The tutorial below shows how to make dual-boot USB:


http://www.makeuseof.com/tag/how-to-install-multiple-bootable-operating-systems-on-one-usb-stick/


installation - Dialog box tells me there's a missing driver when installing 64-bit version of Windows 7



I'm trying to install Windows 7 64-bit on my computer (ASUS P6T Deluxe V2, one 80GB HDD and two 1 TB HDDs). When I'm supposed to select whether I want to Upgrade or do a Custom install, I get a dialog box telling me:




Load Driver



A required CD/DVD drive device driver is missing. If you have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.




Note: If the Windows installation media is in the CD/DVD drive, you can safely remove it for this step.




I've tried to reach this step using a 32-bit installation disc, but that doesn't generate this message at all. Through the command windows (shift-F10) I can reach all of my drives, including my optical drive, without any problems--so what kind of device driver is it the installation wants? I've tried all the obvious drivers on the CD that followed my motherboard, but I can't seem to find the right one. The problem is that I don't know what device I'm supposed to load the drivers for in the first place.



Can anyone help me?



Edit: It turned out that my downloaded image was corrupted. I borrowed a DVD from a friend of mine, which worked!


Answer



I've had this exact error message, and it was caused by some sort of error on the DVD that I burned (I had burned the DVD at the fastest supported speed).




I solved it by using a new blank DVD and burning the ISO at the slowest speed that the DVD burner supported.



I think when I burned the original DVD, it verified correctly. For some reason, it seems that the Windows 7 installer is more sensitive to media errors.


windows 10 - Storage Spaces Utilization Doesn't Make Sense

Here's my setup:


Windows 10



  • 1 2TB USB3 drive

  • 1 3TB USB3 drive

  • 3.59 TB Two way mirror storage space built from these drives


Previously I had 2x 2TB drives, but one failed, so the replacement is 3TB. I did the math on the utilization percentages of the individual drives and they're both equally loaded, but each at only half of the used amount of the pool. The storage space is using 1.59 TB of space, but each drive's individual utilization is only half of that.


Why is this? Shouldn't each drive be utilizing the full amount of the storage space's data? Shouldn't I be right at the limit of the first 2 TB drive and be in need of adding two more drives to expand storage capacity?

hard drive - Windows 10 upgraded from Seven, can't change install location


I would like to transfer/ or reinstall my Windows 10 (upgraded from a Windows 7) on another drive. Currently it's installed on a 500 GB hard-drive, but I bought a 500 GB SSD and I connected it to my computer.


I downloaded the Windows 10 ISO setup file from Microsoft site, tried to launch it but it will not ask me a drive or partition on which I would like to install it.


How can I put or reinstall it on my SSD, while keeping my official version registered ?


Thanks a lot for hints or solution !


Answer



Simply perform a regular clean installation. That means you’ll have to boot using your installation medium. Launching Setup in Windows is not enough.


During Setup, skip entering the Product Key. The existing activation will be restored automatically on the same PC.


It might be desirable to disconnect other drives when installing so the Windows Boot Manager ends up on the SSD.


Windows 7 System File Checker details output



See this MS article



After I run SFC /scannow



When I run the "edit sfcdetails.txt" command, it says it is an invalid command, tried on 2 Windows 7 PC's, anyone know what the solution is?




I can find the txt file and know how to read it but why does the command not work?



Also when reading the sfcdetails.txt, what does it mean when a file cannot be repaired due to a hash mismatch?



Sample (from a Vista box)




2011-06-30 09:32:05, Info CSI 0000002f [SR] Cannot repair member file [l:24{12}]"catsrvps.dll" of Microsoft-Windows-COM-ComPlus-Runtime, Version = 6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral in the store, hash mismatch




Answer



The edit.com command is a 16-bit MS-DOS program, and is not included with 64-bit versions of Windows since you cannot run 16-bit software in 64-bit mode.



You can usually use notepad or more to view text files.


Friday, July 26, 2019

battery - Can i use a universal laptop charger for +10.8v 4400mah, 47wh

I have a universal laptop adapter with listed voltage that i can set 12v/15v/16/18/19/20/24v.. i want to try it on my asus laptop with battery rating of +10.8v 4400mah, 27wh.. it's an li-ion battery. But i'm not sure if it's safe or not..


This is the universal adapter i have


Input: 110v-240v - 50/60hz 1.5A Max
Output: 12/15/16/18/19V 4.5A Max
20/24V 4A Max
https://www.lazada.com.ph/products/universal-laptop-charger-adapter-black-i1264107-s1509989.html

Customize Google Chrome keyboard shortcuts?

I would like to customize keyboard shortcuts in Google Chrome.


For example, I would like to map the key combination Ctrl+Shift+W to the command "Close Other Tabs" instead of right-clicking on a tab (default command).


Is there any setting in Chrome to set this combination to that command?

linux - How do I reactivate my MDADM RAID5 array?


I've just moved house which involved dismantling my server and re-connecting it. Since doing so, one of my MDADM RAID5 arrays is appearing as inactive:


root@mserver:/tmp# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md1 : active raid5 sdc1[1] sdh1[2] sdg1[0]
3907023872 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
md0 : inactive sdd1[0](S) sdf1[3](S) sde1[2](S) sdb1[1](S)
3907039744 blocks
unused devices:

It looks to me as though it's found all of the disks but for some reason doesn't want to use them.


So what do the (S) labels mean and how can I tell MDADM to start using the array again?


[Edit] I just tried stopping and assembling the array with -v:


root@mserver:~# mdadm --stop /dev/md0
mdadm: stopped /dev/md0
root@mserver:~# mdadm --assemble --scan -v
mdadm: /dev/sde1 is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdf1 is identified as a member of /dev/md0, slot 3.
mdadm: /dev/sdd1 is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sdb1 is identified as a member of /dev/md0, slot 1.
mdadm: added /dev/sdd1 to /dev/md0 as 0 (possibly out of date)
mdadm: added /dev/sdb1 to /dev/md0 as 1 (possibly out of date)
mdadm: added /dev/sdf1 to /dev/md0 as 3 (possibly out of date)
mdadm: added /dev/sde1 to /dev/md0 as 2
mdadm: /dev/md0 assembled from 1 drive - not enough to start the array.

..and entering cat /proc/mdstat looks no different.


[Edit2] Not sure if it helps but this is the result of examining each disk:


root@mserver:~# mdadm --examine /dev/sdb1


/dev/sdb1:
Magic : a92b4efc
Version : 0.90.00
UUID : 2f331560:fc85feff:5457a8c1:6e047c67 (local to host mserver)
Creation Time : Sun Feb 1 20:53:39 2009
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Update Time : Sat Apr 20 13:22:27 2013
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Checksum : 6c8f71a3 - correct
Events : 955190
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 1 8 17 1 active sync /dev/sdb1
0 0 8 113 0 active sync /dev/sdh1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 97 2 active sync /dev/sdg1
3 3 8 33 3 active sync /dev/sdc1

root@mserver:~# mdadm --examine /dev/sdd1


/dev/sdd1:
Magic : a92b4efc
Version : 0.90.00
UUID : 2f331560:fc85feff:5457a8c1:6e047c67 (local to host mserver)
Creation Time : Sun Feb 1 20:53:39 2009
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
Raid Devices : 4
Total Devices : 2
Preferred Minor : 0
Update Time : Sat Apr 20 18:37:23 2013
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 2
Spare Devices : 0
Checksum : 6c812869 - correct
Events : 955205
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 0 8 113 0 active sync /dev/sdh1
0 0 8 113 0 active sync /dev/sdh1
1 1 0 0 1 faulty removed
2 2 8 97 2 active sync /dev/sdg1
3 3 0 0 3 faulty removed

root@mserver:~# mdadm --examine /dev/sde1


/dev/sde1:
Magic : a92b4efc
Version : 0.90.00
UUID : 2f331560:fc85feff:5457a8c1:6e047c67 (local to host mserver)
Creation Time : Sun Feb 1 20:53:39 2009
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
Raid Devices : 4
Total Devices : 2
Preferred Minor : 0
Update Time : Sun Apr 21 14:00:43 2013
State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 2
Spare Devices : 0
Checksum : 6c90cc70 - correct
Events : 955219
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 2 8 97 2 active sync /dev/sdg1
0 0 0 0 0 removed
1 1 0 0 1 faulty removed
2 2 8 97 2 active sync /dev/sdg1
3 3 0 0 3 faulty removed

root@mserver:~# mdadm --examine /dev/sdf1


/dev/sdf1:
Magic : a92b4efc
Version : 0.90.00
UUID : 2f331560:fc85feff:5457a8c1:6e047c67 (local to host mserver)
Creation Time : Sun Feb 1 20:53:39 2009
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Update Time : Sat Apr 20 13:22:27 2013
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Checksum : 6c8f71b7 - correct
Events : 955190
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 3 8 33 3 active sync /dev/sdc1
0 0 8 113 0 active sync /dev/sdh1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 97 2 active sync /dev/sdg1
3 3 8 33 3 active sync /dev/sdc1

I have some notes which suggest the drives were originally assembled as follows:


md0 : active raid5 sdb1[1] sdc1[3] sdh1[0] sdg1[2]
2930279808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

[Edit3]


Looking through the log it looks like the following happened (based on the Update Time in the --examine results):



  1. sdb and sdf were knocked out some time after 13:22 on the 20th

  2. sdd was knocked out some time after 18:37 on the 20th

  3. the server was shut down some time after 14:00 on the 1st


Given that two disks went down (apparently) simultaneously I think it should be reasonably safe to assume the array wouldn't have been written to after that point(?) and so it should be relatively safe to force it to re-instate in the correct order? What's the safest command to do that with and is there a way to do it without writing any changes?


Answer



The S labels means the disk is regarded as "spare". You should try stopping and re-starting the array:


  mdadm --stop /dev/md0
mdadm --assemble --scan

to re-assemble the array and if that doesn't work, you may need to update your mdadm.conf, see for example this question for details on how to do that.


Thursday, July 25, 2019

Any performance issues when removing Macbook battery?

Does anyone know if removing the battery will have a major effect on the performance of the processor for the Macbook Pro 15" (Early 2011)? I ask because my laptop gets really hot - the heat in Australia doesn't seem to help, and I barely move my laptop around. Just wondering if this would reduce the heat produced.


Thanks :-)

macos - Adding NTFS partition to disk in Windows makes HFS+ partition on same disk invisible in Mac OS X



I've got a USB hard drive that I've been using with my Mac for backups, formatted as one large HFS+ partition. I added a second NTFS partition for similar use with Windows, as follows:




  1. Resize HFS+ partition using Mac OS X Disk Utility


  2. Reboot into Windows 7 using Bootcamp


  3. Add NTFS volume in the free space using Windows 7 Disk Manager





Now that I've done this, I can see both volumes in Bootcamp Windows, and they seem to be fine.



When I boot into Mac OS X, though, only the NTFS volume appears.



Looking at the disk in Disk Utility, the reason is clear: Mac OS X can't actually see any HFS+ partition there. Its space is shown as "disk4s2", and when I click on it in Disk Utility it's supposedly in "MS-DOS (FAT)" format. diskutil on the command line has this to say:



~% diskutil list /dev/disk4
/dev/disk4

#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk4
1: EFI 209.7 MB disk4s1
2: Microsoft Basic Data 700.0 GB disk4s2
3: Microsoft Basic Data BACKUPS 300.0 GB disk4s3


Nevertheless, when I reboot into Windows 7, the HFS+ partition pops up again, correct volume label and everything. So clearly the data is still there, and in some kind of usable format.



It's not the end of the world if I have to reformat, but I'd rather keep my full Time Machine history if possible. So is there something I can do to fix this non-destructively, and should I have done something differently when I was adding the second partition?



Answer



I tried various other search terms and found that this question is actually a duplicate of this one: OS X 10.6 Snow Leopard no longer mounting an external USB drive.



Here's what I did to fix:




  1. Download and install GPT fdisk

  2. Run gdisk and select problem drive:



    ~% sudo gdisk

    GPT fdisk (gdisk) version 0.8.1

    Type device filename, or press to exit: /dev/disk3
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present

    Found valid GPT with protective MBR; using GPT.


  3. Look at the partitions using the p command:



    Command (? for help): p
    Disk /dev/disk3: 1953525168 sectors, 931.5 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): ABFA9105-73F4-4627-9890-9DECC55E86AC
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1953525134
    Partitions will be aligned on 8-sector boundaries

    Total free space is 3389 sectors (1.7 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 40 409639 200.0 MiB EF00 EFI System Partition
    2 409640 1367597143 651.9 GiB 0700 Time Machine Backups
    3 1367599104 1953523711 279.4 GiB 0700 Basic data partition


    In this case, it's partition 2 that's causing the problem. And the problem is that its type code is 0700, which means something other than HFS.


  4. Use the t command to set the partition type to af00 - Apple HFS/HFS+.




    Command (? for help): t
    Partition number (1-3): 2
    Current type is 'Microsoft basic data'
    Hex code or GUID (L to show codes, Enter = af00):
    Changed type of partition to 'Apple HFS/HFS+'

  5. Use the w command to write the stuff back to disk and quit.



    Command (? for help): w


    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
    PARTITIONS!!

    Do you want to proceed? (Y/N): y
    OK; writing new GUID partition table (GPT).
    Warning: The kernel may continue to use old or deleted partitions.
    You should reboot or remove the drive.
    The operation has completed successfully.




The HFS+ partition, and all of its contents, then became visible again to OS X.


Wednesday, July 24, 2019

filesystems - Why DD output image file is larger than the source partition/runs out of space while copying partition to a file




DD output image file is larger than the source partition and DD runs out of space on the target partition(where the image is created) despite it being larger than the source partition.



I am trying to copy a partition to a file on another partition on the same disk. The target partition is slightly larger than the input partition. Both are ext3 partitions.



Running from OpenSuse-Rescue LIVE CD. Yast shows the input partition (sdb1) is 62.5 GiB and the output one sdb2 is 62.85 GiB.



Thunar shows the input sdb1 is 65.9 GB and the output one sdb2 is 66.2 GB, while the output dd image file is being also 66.2 so obviously maxing out sdb2.



Here is the console:




(sdb1 was unmounted, tried dd few times)



linux:# dd if=/dev/sdb1 of=RR.image bs=4096

dd: error writing ‘RR.image’: No space left on device
16156459+0 records in
16156458+0 records out
66176851968 bytes (66 GB) copied, 2648.89 s, 25.0 MB/s






Additional info by request:



And again : I am seeing the difference in the source partition size sdb1 and the DD image file RR.image it created from it. That file resides on sdb2.






There is still something unclear here: I am RUNNING DD AS ROOT, so that reserved space is available to write into, correct? The target sdb2 is 62.85 GiB while the total bytes for the image as you said are about 61.63 GiB. Here is also the output of df and POSIXLY_CORRECT=1 df commands:




The system now is system-rescue-cd



root@sysresccd /root % df

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sdb1 64376668 7086884 56241208 12% /media/Data1
/dev/sdb2 64742212 64742212 0 100% /media/Data2
/dev/sdb3 5236728 4785720 451008 92% /usr/local


root@sysresccd /root % POSIXLY_CORRECT=1 df /dev/sdb1
Filesystem 512B-blocks Used Available Use% Mounted on
/dev/sdb1 128753336 14173768 112482416 12% /media/Data1

root@sysresccd /root % POSIXLY_CORRECT=1 df /dev/sdb2
Filesystem 512B-blocks Used Available Use% Mounted on
/dev/sdb2 129484424 129484424 0 100% /media/Data2



The numbers are exactly the same as in simple df if we divide it by 2. 1024b/512b=2 is the divisor.




  1. sdb1 is smaller than sdb2. The 100 percent usage on sdb2 now is because of the DD image file that filled the partition up. It has to be the only file on it now.


  2. The image file itself is 66,176,851,968 bytes as of DD (at run time) and Thunar reports. Divided by 1024 bytes we get 64625832 K-blocks correct? So it is still smaller than df reported for sdb2 by more than 116380K and it is LARGER THAN THE sdb1 (THE SOURCE), but it maxes out the partition sdb2.




The question is: what is in there to take that space on sdb2?







But most important and interesting is:



Why is the target file larger than the source partition that dd created it from? Which means to me: I can't write it back.



sdb1 (64376668K) < RR.image (64625832K)



And



sdb1 (64376668 1K-blocks) < RR.image (64625832 1K-blocks) < sdb2 (64742212 1K-blocks)




(I hope things were calculated right…)



Now I checked the blocks that are rerserved for ROOT. I found this command to execute:



root@sysresccd /root % dumpe2fs -h /dev/sdb1 2> /dev/null | awk -F ':' '{ if($1 == "Reserved block count") { rescnt=$2 } } { if($1 == "Block count") { blkcnt=$2 } } END { print "Reserved blocks: "(rescnt/blkcnt)*100"%" }'

Reserved blocks: 1.6%

root@sysresccd /root % dumpe2fs -h /dev/sdb2 2> /dev/null | awk -F ':' '{ if($1 == "Reserved block count") { rescnt=$2 } } { if($1 == "Block count") { blkcnt=$2 } } END { print "Reserved blocks: "(rescnt/blkcnt)*100"%" }'


Reserved blocks: 1.59999%


So the percentage reserved for ROOT is also the same on both partitions in case that matters.






Here is the output for gdisk:




root@sysresccd /root % gdisk -l /dev/sdb

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present



***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************

Disk /dev/sdb: 312581808 sectors, 149.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DCF8AFC4-11CA-46C5-AB7A-4818336EBCA3
Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 312581774
Partitions will be aligned on 2048-sector boundaries
Total free space is 7789 sectors (3.8 MiB)

Number Start (sector) End (sector) Size Code Name
1 2048 131074047 62.5 GiB 8300 Linux filesystem
2 131074048 262889471 62.9 GiB 8300 Linux filesystem
3 302086144 312580095 5.0 GiB 0700 Microsoft basic data
5 262891520 293771263 14.7 GiB 8300 Linux filesystem
6 293773312 302086143 4.0 GiB 8200 Linux swap



So what is the real size of sdb1 then?



Isn't sdb2 (N2) larger than sdb1 (N1)? So WHY the image file GROWS LARGER than sdb2 (N2)? If I turn off the space reserved for root on sdb2, shall it fit there then?


Answer



Every filesystem needs some space for metadata. Additionally ext family reserves some space for root user and it's 5% by default.



Example




In my Kubuntu I created a (sparse) file of 1GiB:



truncate -s 1G myfile


and made ext3 filesystem within it. The command was plain



mkfs.ext3 myfile



This instantly allocated about 49MiB (~5% in this case) to the myfile. I could see that because the file was sparse and initially reported 0B usage on my real disk, then it grew. I assume this is where metadata lives.



I mounted the filesystem; df -h reported 976MiB of total space, but only 925MiB available. This means another ~5% wasn't available to me.



Then I filled up this space (after cd to the mountpoint) with



dd if=/dev/urandom of=placeholder


As a regular user I was able to take 925MiB only. The reported "disk" usage was then 100%. However, doing the same as a root, I could write 976MiB to the file. When the file grew over 925MiB the usage remained at 100%.




Conclusion



Comparing sizes of your partitions is wrong in this case; so is comparing the sizes of your filesystems. You should have checked the available space on the target filesystem (e.g. with df) and compare it to the size of the source partition.






EDIT:



To make it clear: your 66176851968 bytes are about 61.63 GiB. This is not larger than the source partition which is 62.5 GiB. The source partition was not fully read when the target filesystem got full.




In case you're not familiar with GB/GiB distinction, read man 7 units.






EDIT 2



Now we have all the actual numbers. Let's stick to the unit of 512B, it's a common sector size.





  • Your sdb1 partition occupies 131074048-2048=131072000 units on the disk. Let's call this P1. This is from gdisk output.

  • Your sdb2 partition occupies 262889472-131074048=131815424 units on the disk. Let it be P2. This is also from gdisk output.

  • Your filesystem inside sdb1 can store files up to 128753336 units total. Let's call this number F1. This is from df output.

  • Your filesystem inside sdb2 can store up to 129484424 units. Let it be F2. This is also from df output.



The difference between P1 and F1, as well as the difference between P2 and F2, can be explained if you know there must be a room for metadata. This is mentioned earlier in this answer.



Your dd tried to copy the whole sdb1 partition, i.e. P1 of data, into a file that takes space provided by the filesystem inside sdb2, i.e. F2 of available space.




P1 > F2 – this is the final answer. Your image file didn't grow larger than it should. It looks to me you expected its size to be F1. In fact the whole image would have a size of P1 units.



P2 and F1 are irrelevant in this context.


iso image - Downloading a Windows 8.1 .iso from MSDN with an OEM key


I have a computer with Windows 8.1 preinstalled. I'd like to obtain an .iso so as to be able to reinstall it in case something happens.


I know about the solution which uses the upgrade method but it's not very handy. Windows 7 in VirtualBox has some features turned off and besides, I'd have to give it half of my whole RAM. I'd like to have the real iso, for the setup recognize to recognize the key embedded in UEFI.


I'd like to download directly from MSDN but I can't find a way to activate a subscription from an OEM key.


Is there any way I could get the .iso directly from the MS servers without tinkering with virtual machines?


Answer



You can download it from here: http://go.microsoft.com/fwlink/p/?LinkId=510815


Note that this is the actual download link (downloads when you click on it), rather than a resource page containing a download link.


Read / Write NTFS External Hard Disk In Mac Mountain Lion

I have a 1TB external hard disk which is NTFS formatted and I have some files in that hard disk. When I try to use it in my Mac (Mountain Lion), I get this error:


enter image description here


I try to use Paragon, NTFS 3G, SL-NTFS but did not show any success and my hard disk still unmounted.



  1. How do I solved this issue?

  2. After installing the Paragon, NTFS 3G, SL-NTFS (or any other apps), should I do anything else?

  3. OR, perhaps this issue comes from my external hard disk itself?


Note: This external hard disk is well readable and writeable in Windows OS.

encryption - Encrypt a virtual hard disk on Windows 7 Home Premium?

I have a virtual hard disk file (*.VHD) and as Windows 7 Home Premium user, I don't have BitLocker to encrypt this hard disk. So is there any alternative way for me to do so?

linux - How to see HTTP request header by curl?


I can see HTTP header response by curl -I command.


Is there any option to see the HTTP request header sent?


curl -I www.google.com
HTTP/1.1 200 OK
Date: Sat, 31 Dec 2011 00:55:53 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
Transfer-Encoding: chunked

Answer



From the curl man page:


   -v/--verbose
Makes the fetching more verbose/talkative. Mostly useful for debugging. A line starting
with '>' means "header data" sent by curl, '<' means "header data" received by curl that
is hidden in normal cases, and a line starting with '*' means additional info provided
by curl.

Tuesday, July 23, 2019

Can't install update 'Upgrade to Windows 10 Enterprise, version 1511, 10586' (KB3012973)

I can see that I have a new update on my machine 'Upgrade to Windows 10 Enterprise, version 1511, 10586'. The Windows update is constantly nagging me to restart my computer but when I do restart (I select 'Update and restart' nothing happens, the machine just restarts normally. When I go to the knowledge base link for the update (https://support.microsoft.com/en-us/kb/3012973) I get 404.


I've tried running:



  • sfc /scannow

  • DISM.exe /Online /Cleanup-image /Restorehealth

  • MediaCreationTool.exe


SFC and DISM reported no errors and everything looks to be ok. On MediaCreationTool.exe I selected the Upgrade but it claims that my windows version is not supported by that tool. Winver states that I'm on Windows 10 Enterprise (Build 10240).


Does anyone have any idea how I could apply the update?


Edit:
There is already a similar question asked (My Windows 10 Enterprise still has not got the November update (1511)) but it is not the same case as I have.
Unlike the other question the update is in my windows update list. My computer is constantly nagging me to reboot to install the update.
Additionally I have another computer (laptop) which also has Windows 10 Enterprise edition. I've installed both computers at the same time a year ago. This other computer is already updated to 1511 (Winver states: Microsoft Windows Version 1511 (OS Build 10586.318).
On this other computer I can see that the update was installed (see third item in the windows update history)


Windows update from my laptop which was already updated


Just to be complete here is the windows update history from my computer which doesn't want to install the update:


Windows update on my computer which does not want to install the update

windows 8 - Second monitor gaining and losing detection constantly

I'm not sure if this is a hardware issue or software but from initial tests seems to be software related or hardware but not the monitor itself.


The situation: I have a slightly old sony vaio laptop with an external monitor plugged in via vga.
The problem: The primary display, being the external monitor, gets "undetected" and "redetected" every second, constantly, until I disconnect the monitor entirely. The computer is basically completely unusable because it keeps changing the primary display.


Connecting the monitor to another pc (also via vga) works so I don't think the problem lies in the monitor or the vga cable. The only culprits I can think of are the video card (ati) or some driver issue (reinstalling them though seems to have no effect).


I'm running windows 8.1, 13.9 mobility ati drivers, 64bit.
If you have any idea what might be the problem, I would really appreciate the help.

networking - monitoring and blocking network traffic




Which is the best program for monitoring and blocking network traffic through Local network from computer, which is connected to that network?

macros - Excel sort dates to be in oldest to newest without changing grouping

I have a list of customers with due dates and corresponding payment dates but the payment dates weren't updated in the correct order. Is there a way I can sort the payment date to be in order without changing the order of the customer and their original due dates? Either thru a look up that can get the dates in order or thru a macro. I've tried using a large on index match but was unsuccessful. Any help would be great!



Data set looks like this



CUSTOMER, DUE DATE, PAYMENT DATE

Toni, 1-Jan 17, 17-Mar-17

Toni, 16-Jan 17, 2-Mar-17
Toni, 31-Jan-17, 1-Jan-17
Toni, 15-Feb-17, 1-Apr-17
Rr, 7-Jan-17, 15-Feb-17
Rr, 22-Jan-17, 16-Jan-17
Rr, 6-Feb-17, 31-Jan-17


End result should look like this




CUSTOMER, DUE DATE, PAYMENT DATE
Toni, 1-Jan 17, 1-Jan-17
Toni , 16-Jan 17, 2-Mar-17
Toni , 31-Jan-17, 17-Mar-17
Toni , 15-Feb-17, 1-Apr-17
Rr, 7-Jan-17, 16-Jan-17
Rr, 22-Jan-17, 31-Jan-17
Rr, 6-Feb-17, 15-Feb-17



Apologies in advance for the poor formatting as I'm still new.

Monday, July 22, 2019

keyboard - macOS remap keys as modifiers


I use a keyboard layout called 3l (three layout) which is a layered keyboard layout. Here is the main layer (the behaviour when no modifier keys are pressed):


normal 3l layout


Now, when I am holding down the ' on a normal keyboard (sym in 3l), I am in "symbols" mode and the rest of the keyboard behaves differently. Here's a picture of this mode:


symbols layer of 3l


Effectively, this symbols key is like a special Shift which allows me to access special characters.


Additionally, I have a numbers layer which has the same effect as the symbols layer and is activated by the / key, but has cursor and number-pad controls instead:


enter image description here




The person I forked my layout from already got the layout working in Linux and Windows (using AutoHotKey). I am trying to port it to macOS as well. So far I have created a 3l.keylayout file (see it here) and have very basic functionality working.


What's Working



  1. The keys in normal mode work fine.

  2. If I press the symbol modifier key, the first character I press is outputted as the correct symbol. For example, if I press the symbol key and then O, / is outputted.

  3. The same goes for the cur/num key for the numberpad output.


What's not Working



  1. If I press and hold the symbol modifier key, and type multiple characters, only the first one actually outputs the symbol. (Same goes for the cur/num key as well.)

  2. If I press and release one of the modifier keys and then press another key, the symbol/number is outputted. This should not be the case. When I release the modifier key, I want it to go back to normal mode (just like the Shift key).

  3. The cursor manipulation keys do not work reliably in all applications and they also have the issue of not allowing repeated keys when they do work.


Is there any way for me to get the functionality I described above in macOS (Sierra and later)?


Note: I have also tried to remap ' and / to Right Option and Right Control using Karabiner Elements and then attempted to create a new keymap in 3l.keylayout that is activated by those keys. This did not work, however. It screwed everything up and I got into a perpetual control/option key situation.


Answer



I was able to fix this issue using Karabiner-Elements' complex modifications.


Here is my complete karabiner.json file.


Under profiles -> rules -> manipulators, I added two manipulators. One for sym and one for cur.


I copied the sym manipulator below:


{
"conditions": [
"name": "sym",
"type": "variable_if",
"value": 0
},
{
"name": "cur",
"type": "variable_if",
"value": 0
}
],
"from": {
"key_code": "quote",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "sym",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "sym",
"value": 0
}
}
],
"type": "basic"
}

Then I went through every key setting, i.e. when the key is pressed with no modifier, the sym modifier, and the cur modifier.


This works flawlessly.


Reducing size of Windows 7 system restore ISO image

As I have a Dell laptop, it appears I cannot use the Windows 7 ISO images that Microsoft provide for download, as they won't recognize the product key printed on the machine. Instead, Dell provide a download of their recovery disc image, but it is somewhat larger than the bare Windows ISO images and will not fit onto any media I have here. Is there any way of removing unnecessary parts of the file so that I can install it onto a 4GB SD card to restore my system when I change out my hard disk?

Disable Windows 10 Update Notification OSD

Every now and then in Windows 10 it keeps grabbing my screen with an OSD telling me about updates with a button that takes me to the update menu in Settings. It's very annoying at times, especially whenever I have an app in full-screen it takes me away from it just to tell me about updates.


I want to disable this screen grabbing OSD notification because it's too obtrusive and simply outright annoying. Would prefer if I can just have it notify me in small popup balloon notification instead so it can be viewed in Message Centre.


I'm fine with some registry tweaks or whatever, either that or just disable update notifications completely. I currently only have it to notify of updates, but not download and install them whenever it chooses.

windows 10 - My computer keeps waking from sleep without any obvious reason

I have decided to create a new thread after having perused a dozen or more discussions on similar topics, that is, related to the sleep feature, without finding the right answer.




In a nutshell this is what is happening: About a month ago, my computer has started to wake from sleep without any obvious reason. In the event viewer these awakenings can be followed under the Power-Troubleshooter event in the Windows logs. Invariably the source is marked as unknown.



I tried to get more information using the lastwake command prompt, but to no avail at all, the answer it gives equals to unknown.



The time of these awakenings is very different, it is not a fixed hour or minute of the day. For example: 04:08:25, 12:37:06, 04:18:35, 02:27:25, 12:05:40, 02:03:44, 12:43:54, 12:13:32 etc. Usually a couple of hours pass between the events, but there are days, when it wakes almost hourly. Example screenshot:



Event viewer



I have already gone through all the possible settings that could be responsible of this problem, but it is still there. As a makeshift solution, I have adjusted two minutes for the computer to go to sleep if no mouse or keyboard event. I had in addition to recur to a small program that lets me quickly enable or disable the sleep feature with a single click from the tray, similar to Caffeine but better, more flexible (DontSleep).




It all works fine now, the annoyance is considerably reduced, but still I haven’t got the slightest idea as to the wake source. Could it be a virus that wakes the computer in my absence in order to break into the system and get my bank details or something of the sort? Any hint would be appreciated.






Sorry for the humorous title. I just wanted it to be unique. There must be in this forum already quite a lot of posts with “sleep” for keyword.



As to the lastwake prompt, it doesn’t give any useful information not to be found in the Event Viewer. It looks like this:



Wake history count: -1

Wake History: [0]
Wake Source Count: -0



Now, I believe that the zero in this context means just the same as the “Source Unknown” of the Event Viewer. But enlighten me if I am wrong.



To disable the Wake Timers was one of the first things I did. I have just checked it again, they are still disabled.



The latest development is that my computer now seems to have permanently adopted this new regime to wake hourly, sometimes even only 40 minutes after the last wake. I am completely puzzled. At the beginning it woke about 3-4 times in 24 hours. Now it is closer to 30, the count of unexplained wake events in a day. (This is an estimate since obviously I can’t tell for the afternoon and the evening hours when I am using my computer). So, if I had one question at the outset, now I have two of them: 1) What is the wake source? 2) What causes the changes in the wake frequency?



As to your request to specify all the steps I have taken so far to solve this problem, I am afraid I couldn’t enumerate them all. I am not really what you call a computer geek, I don’t tinker about with command prompts and registry edits on a daily basis, I do such things only when really in a bad fix. What I intend to do is to arrive at the solution by ruling out all the possible sources one by one. So, your first suggestion was Wake Timers:




1) Wake Timers: disabled.



I hope, before we reach number 10, the culprit will be pinpointed. I am awaiting suggestion nÂș2.






Well, I am afraid this thread has become pretty inactive. Anyway, I will post the latest developments in connection with my problem, someone might still react. So, my second question had a simple answer: It was a Windows update that woke the computer hourly. The reason I didn’t get it immediately is just that before, when it happened less frequently, I checked the updates and there was none. So, I have updated Windows now, and as a result the computer wakes up only as it did before the update, that is, 3-4 times a day. Then, as suggested on another site, I disabled one more potential wake source, namely the WOL (wake on LAN):



Device manager > Network adapters > Atheros network adapter > Properties > Advanced > Wake on magic packet: Disabled




This didn’t help either. I am not sure if I am supposed to restart the computer after this change. I didn’t do it yet, but normally the changes made via the control panel take effect immediately. But maybe I am wrong there. Anyway, in order to rule out all network-related wake sources, I got the idea to switch off my router overnight. Well, it didn’t help, the computer woke anyway during the night. So, to summarize, so far I have ruled out two potential wake sources:



1) Wake timers



2) Wake on LAN plus all wake sources to be found on a network, either local or external



P.S. Should I post new information as a reply to the tread or as a comment if I want to address all the participants?

linux - Can CygWin 64 bits compile 32 bits sources?


I am trying to compile on CygWin 64 bits the (presumed) 32 bits wake on lan tool here created by Thomas Krennwallner, supposed to compile on Unix and Windows under CygWin.


After download I did:


tar -zxvf wol-0.7.1.tar.gz

and, in order to update its configure.guess script (the included one is a bit old: from 2004), I have downloaded it from here.


So, according to its README file, I do:


./configure

and I get:


Luis@Windu /cygdrive/h/Temporal/wol/wol-0.7.1
$ ./configure
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

This is my config.log:


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = Windu
uname -m = x86_64
uname -r = 1.7.33-2(0.280/5/3)
uname -s = CYGWIN_NT-6.1
uname -v = 2014-11-13 15:47
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64
PATH: /cygdrive/c/Program Files (x86)/AMD APP/bin/x86
PATH: /cygdrive/c/Windows/system32
PATH: /cygdrive/c/Windows
PATH: /cygdrive/c/Windows/System32/Wbem
PATH: /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /cygdrive/c/ATI Technologies - Graphics/ATI.ACE/Core-Static
PATH: /cygdrive/d/Utilidades/UnxUtils
PATH: /cygdrive/d/Utilidades/CURL
PATH: /cygdrive/d/Utilidades/SSH-Rsync/cwRsync/bin
PATH: /cygdrive/d/Utilidades/Copy Path To Clipboard
PATH: /cygdrive/d/Programas/HashCat/OCLHashCat
PATH: /cygdrive/d/Utilidades/Scripts
PATH: /cygdrive/d/Utilidades/SysInternals Suite - PSTools
PATH: /cygdrive/d/Utilidades/NirSoft NirCmd
PATH: /cygdrive/c/nmap
PATH: /cygdrive/c/Bitvise SSH Client
PATH: /cygdrive/d/Utilidades/Scripts/Clortho
PATH: /cygdrive/c/Nmap
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1348: checking build system type
configure:1366: result: x86_64-unknown-cygwin
configure:1374: checking host system type
configure:1388: result: x86_64-unknown-cygwin
configure:1428: checking for a BSD-compatible install
configure:1483: result: /usr/bin/install -c
configure:1494: checking whether build environment is sane
configure:1537: result: yes
configure:1570: checking for gawk
configure:1586: found /usr/bin/gawk
configure:1596: result: gawk
configure:1606: checking whether make sets $(MAKE)
configure:1626: result: yes
configure:1810: checking for style of include used by make
configure:1838: result: GNU
configure:1909: checking for gcc
configure:1925: found /usr/bin/gcc
configure:1935: result: gcc
configure:2179: checking for C compiler version
configure:2182: gcc --version &5
gcc (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2185: $? = 0
configure:2187: gcc -v &5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc_old/gcc-4.8.3-5.x86_64/src/gcc-4.8.3/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc_old/gcc-4.8.3-5.x86_64/src/gcc-4.8.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.8.3 (GCC)
configure:2190: $? = 0
configure:2192: gcc -V &5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2195: $? = 1
configure:2218: checking for C compiler default output file name
configure:2221: gcc conftest.c >&5
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find crt0.o: No such file or directory
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lcygwin
collect2: error: ld returned 1 exit status
configure:2224: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "wol"
| #define VERSION "0.7.1"
| #define PACKAGE "wol"
| #define VERSION "0.7.1"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2263: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-cygwin
ac_cv_build_alias=x86_64-unknown-cygwin
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-cygwin
ac_cv_host_alias=x86_64-unknown-cygwin
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run aclocal-1.7'
ALLOCA=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run tar'
AUTOCONF='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run autoconf'
AUTOHEADER='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run autoheader'
AUTOMAKE='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run automake-1.7'
AWK='gawk'
BUILD_INCLUDED_LIBINTL=''
CATOBJEXT=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='cygpath -w'
DATADIRNAME=''
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRA_LIBS=''
GENCAT=''
GLIBC21=''
GMSGFMT=''
HAVE_ASPRINTF=''
HAVE_POSIX_PRINTF=''
HAVE_SNPRINTF=''
HAVE_WPRINTF=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
INSTOBJEXT=''
INTLBISON=''
INTLLIBS=''
INTLOBJS=''
INTL_LIBTOOL_SUFFIX_PREFIX=''
LDFLAGS=''
LIBICONV=''
LIBINTL=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run makeinfo'
MKINSTALLDIRS=''
MSGFMT=''
MSGMERGE=''
OBJEXT=''
P2M=''
PACKAGE='wol'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PERL=''
POD2TEXI_FALSE=''
POD2TEXI_TRUE=''
POSUB=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
USE_INCLUDED_LIBINTL=''
USE_NLS=''
VERSION='0.7.1'
XGETTEXT=''
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-cygwin'
build_alias=''
build_cpu='x86_64'
build_os='cygwin'
build_vendor='unknown'
datadir='${prefix}/share'
exec_prefix='NONE'
host='x86_64-unknown-cygwin'
host_alias=''
host_cpu='x86_64'
host_os='cygwin'
host_vendor='unknown'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/cygdrive/h/Temporal/wol/wol-0.7.1/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE "wol"
#define PACKAGE "wol"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "0.7.1"
#define VERSION "0.7.1"
#define _GNU_SOURCE 1
configure: exit 77

That seems to be reporting the expected problem when compiling a 32 bits program on a 64 bits platform.


Is it possible to solve this?
I have read some info about using the flag "-m32" on the gcc compiler, or sending some variables (exporting) before the compiling, but the problem seems to come rather from the configuring part, not the compiling. The order seems to be:



  • .configure

  • make

  • make check

  • make install

  • make clean


and the first step fails :-( .
Anyway, I tried:


export CFLAGS='-m32' export CXXFLAGS='-m32' export LDFLAGS='-m32'

But the ./configure script keeps failing.


And, by the way, I tried to ignore the error and continue (2nd step) compiling:


make

but it yields some error message reporting (sorry, my CygWin seems to be in spanish) something like No objective specified and no makefile found.


I think that solving this problem could help me to learn a way to compile 32 bits programs on CygWin 64.
I request some help, please.


P.S: I know this tool has a Win32 version available to download, as well as there are another programs for wake on LAN. But where is the learning on that way to solve things?


EDIT: I have installed the following package names on CygWin:


gcc-core
gdb
make
mingw-gcc-core
mingw-gcc-g++
mingw-w32api

EDIT-2: I have saved my day by uninstalling CygWin 64 bits and installing 32 bits version. This everything went smooth and fine.


Answer



Cygwin packages come in two versions, a 64-bit version and a 32-bit version. As the 64-bit library is newer than the 32-bit library, there are some missing libraries and programs.


You can have BOTH the 32-bit and the 64-bit Cygwin installed concurrently without any problems. Thus if you wanted to compile and go on using 32-bit mode, install the 32-bit cygwin and invoke its bash shell.


Cygwin 32-bit is usually installed in c:\cygwin and the 64-bit cygwin is installed in c:\cygwin64.


So in summary, if you need 32-bit capabilities install the 32-bit cygwin and all the necessary packages you need to complete your task.


NOTE: 32-bit programs WILL run on 64-bit windows platforms.


hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...