Sunday, June 30, 2019

encryption - removing sensitive data from laptop (ssd drive) before sending to support


Here is my problem. My computer has a screen problem and needs to be sent to the manufacturer's support desk.


However I have some private files on the computer I dont want the support to (possibly) access. My computer is on win 8.1 pro and I have two internal ssd drives encrypted with bitlocker.


My question is, if I re-install windows (win 8.1 allows to do that easily), is anyone able to recover my files? I mean, the files were encrypted AND I re-installed the OS completely. Am I safe or I am missing something here?


Thanks


Answer



If you are so concerned about data privacy, I would like to recommend to do a complete disk wiping, that is by filling the disk with 0 or 1's, depending on the software used.
You should check this out.
http://www.techrepublic.com/blog/five-apps/five-hard-disk-cleaning-and-erasing-tools/


Laptop Windows 10 stuck on boot logo after anniversary update [dual-boot Ubuntu]


I have an ASUS Laptop and recently installed Ubuntu 16.04 LTS as dual-boot alongside my Windows 10. Grub and booting between those two worked without any issues. Today I started the Windows 10 Anniversary Update and hell began.


As you might know, after some time the update process enters the stage where the computer gets restarted several times. I left the laptop alone during the update, and when I came back the screen was just on and nothing was displayed. I left it for a long time until I got impatient and closed the lid: I expected just the screen to turn off, but instead when I re-opened it immediately after, a BSOD with Driver Power State Failure appeared (it was a new kind of Windows blue screen since it had a QR-Code on it; so probably from the update). It did a restart and instead of Grub the ASUS logo appeared. After some time the loading circle also appeared. But no hard-drive activity. I left it there for some time until I forced it to shut down and restarted it. In the past I once had this loading issue and a force shutdown and restart did it. But this time it did not help: after selecting Windows in Grub, the same thing happened: ASUS logo, loading circle, no hard-drive activity, forever... I did it several times, but no luck...


Then I tried booting into Ubuntu: it worked like a charm! While in Ubuntu I looked inside my Windows partition, but I could not find any of my personal files; only the Windows files and folders showed up. Luckily there was a Windows.old folder where I could find my recent files.


The next thing I did in Ubuntu was installing Boot-repair and running it with the recommended settings (Paste-bin: http://paste2.org/tEH5bjBF). I restarted and now Grub showed me more Options for Windows:



  • Windows UEFI bootmgfw.efi

  • Windows Boot UEFI loader

  • Windows Boot Manager (on /dev/sda1) (this was previously the only one)

  • And another Windows one containing something with "64" and "uefi" (sorry, I don't remember exactly)


But neither of them seemed to work. Each one of them showed the ASUS logo and then stuck there forever like I described above. Ubuntu still worked.


Then I went to another computer and created a bootable Windows 10 USB drive by downloading the Windows 10 ISO with the Media Creation Tool and then flashing it to a USB stick using rufus. I was hoping to being able to repair Windows by booting from the USB drive so I plugged it in, changed boot order in UEFI and restarted. Then again: ASUS logo, forever... I left it there for about 40(!) minutes and still nothing happened.


I then created a bootable Ubuntu USB drive and tried booting from it: it worked! I could try Ubuntu and everything worked.


What probably has happened to my Windows 10 during the update and what else can I do to successfully boot into Windows again? Usually the Automatic repair appears when something went wrong during an update, but in my case it sadly did not. And why the heck I can't boot from the Windows 10 USB drive?! My last hope was to completely reinstall Windows, but when I can't even boot from a Windows 10 USB drive I'm lost...


Answer



I finally fixed it by uninstalling Ubuntu:



  1. I booted from the Ubuntu live USB stick and installed and run OS-Uninstaller. I uninstalled the installed Ubuntu. After a restart grub was still there, but it didn't look like normal, instead it more looked like a terminal and I could not choose between any OSs.

  2. I again booted into the live Ubuntu and run GParted. I deleted the Linux partition and the Linux swap partition as well as another partition called "Restore" (I don't know if it belonged to Ubuntu or Windows, since there was another partition called "Recovery" which was marked as Windows). All three partitions however were behind each other. I then merged the unallocated partitions back into my big DATA partition (D:).

  3. Next I went into UEFI and changed boot order. There still was an boot option called "ubuntu...", I believe this was grub. I put Windows Boot Manager to the top and restarted.


It worked! ASUS logo came, but shortly after the Windows Update continued at 32% percent. Seems like it returned right to the point where my computer crashed. The update finished and I can finally boot normally into Windows.


Win10Pro -> local group policy ( No Domain ) -> Lock Windows Defender Settings ( Force Firewall & Antivirus to be enabled)

I have a win10Pro 1709 OS. The computer is NOT connected to a Domain.



There is one user with user type "Administrator".



I want to configure Windows Defender ( Firewall & Antivirus) only with the local Computer Policy and disable the configuration through the local user interface "Control Panel".



This means that the possibility to disable the Windows Defender Firewall through the normal settings is disabled:



The Settings should be greyed out and a warning like "Some settings are managed by your organization" should appear:
enter image description here




I know that an administrator user can then use the gpedit.msc to change the settings, but he cannot use the "normal" settings app anymore.



I cannot find local Group Policy settings to do that.
The closest I can find is this:



Computer Configuration > Administrative Templates > Windows Components > Windows Defender Antivirus > Turn off Windows Defender Antivirus policy



I look for the opposite "force Windows Defender Antivirus/Firewall" to be enabled.

windows 7 - how to make a bootable partition on an external hard drive? or solve my dynamic disk woes

I have a 250 gig external hard drive and I need to make a small partition on it and run Ubuntu live from it to recover files from a corrupt hard drive that Windows can no longer read. I want to make sure that I can use the rest of the external hard drive to store the recovered files on while im in Ubuntu. using Windows7 how do I go about doing that?


as a side note, the reason my hard drive is corrupt is because something happened(sudden power outage, apparently) to it and now Windows can no longer read it as a dynamic disk and therefore I need to convert it back to a basic disk before I can use it again. but I cant do that without losing 160+ gigs of files first.

Saturday, June 29, 2019

How to save environment variable on my Ubuntu Linux system

I am using Maven to the build process of my Java project.


To launch the mvn command in any position within the shell I am using the following command to declare the environment variable in this way:


export MAVEN_HOME=/home/andrea/SpringSource/apache-maven-3.0.4


export PATH=$PATH:$MAVEN_HOME/bin


The problem is that if I close my shell, when I open it again I have to give again the previous commands...how can I solve this problem and "save" the environment variable on my system?


Thank you


Andrea

windows - keyboard stops responding for a few seconds, then resumes


I have a Dell Inspiron laptop running Windows Vista (SP2). Recently the keyboard has developed an annoying habit of stalling every 15-20 seconds for around 3 seconds.


If I'm typing something or hitting a keyboard shortcut, in whatever application, my input is just ignored. After the 3ish seconds elapse, the keyboard springs back into life and anything buffered during those seconds is applied.


No input seems to be ever lost while the keyboard is unresponsive, but it's still incredibly frustrating.


During this time the mouse is movable, but the buttons don't respond.


The computer itself doesn't seem to stall - I can watch movies or listen to music without interruption.


I've had a look at procmon, procexp and MooO but nothing highlights anything unusual running. I've swapped virus protection from AVG to Avast on the off chance that it's something to do with that, but to no avail.


The only unusual thing I've done on the laptop recently was install Visual Studio 2010 Beta 2, but the problem didn't develop until a week or two after that so I don't think it's related.


Any help would be greatly appreciated.


Answer



The first thing I would suspect are hardware interupts. Try running Process Explorer. It will show you not only process & memory usage, but hardware and IRQs. Something may jump right out at you just by running this.


If you suspect a driver, i.e. keyboard driver, then this might help.


Buy Windows 10 key for Fujitsu OEM Image

I have two Fujitsu LIFEBOOK E756. One is a little older and came preinstalled with Windows 7. The second one is recently bought and comes with Windows 10. Of the second one I have created an image and want to deploy that image on the first Notebook. But I am fairly sure that I will get licensing problems. Neither of those Notebooks has a sticker on the bottom where I can find the license key.




My question would be: If I buy a retail Windows 10 key will the OEM image from Fujitsu accept it?

Windows 10 latest insider builds crashes when save file or browse file

In recent insider builds, lots of desktop apps crashes upon saving a file or browse for a file. The error is something as below




Unhandled exception at 0x00007FFA166E134D (shell32.dll) in Xamarin Workbooks.exe: 0xC0000005: Access violation writing location 0xFFFFFFFFFFFFFF8B.


Now I am using the Build 15063.14 with latest updates. This is really really frustrating as I cannot attach a file as attachment in outlook.com with Google Chrome or save a workbook in Xamarin Workbooks.



This error happens on both my machines which both run insider builds

windows - Why does it seem like 40GB of deleted files on my SSD are still taking up space a month later?

So about a month ago, I deleted about 40GBs worth of files to my recycle bin and then emptied recycle bin. My system is running on a SSD and it’s 220GB in size.


Today, I had to resort to downloading a data recovery software due to my stupidity. I noticed that all 40 GB was still located in $recycle.bin as well as everything I have deleted since then.


Now, I know it takes a while for files to be overwritten on SSD’s, but I do write quite a lot to my SSD, and TRIM has ran since then. Is this normal behaviour, or is there a problem with my $recycle.bin file?

Friday, June 28, 2019

macos - OS X: Best method for Time Machine-like backup of one external HD to another?


Time Machine is great, but it only backs up your boot drive. I'm looking for a way to one-click synchronize one external hard drive to another, without simply overwriting everything every time (ie, only the differences should get copied).


rsyncX looked promising, but it looks like development has been abandoned. Any suggestions?


Answer



If your Time Machine hard drive capacity is high enough, Time Machine can back up your external drive. It's just that external drives are excluded by default. You can include the drive by going to Time Machine Preferences -> Options. In the "Exclude these items from backup" list, remove your external drive. This also applies to DMGs and Sparseimages that you may be using.


Having said that, I don't think its possible to use two separate Time Machine drives to back up your internal and external drives separately (i.e. internal to drive A, and external to drive B).


Edit
SuperDuper! or Carbon Copy Cloner are other excellent options for this, if you don't need the incremental backup plan that Time Machine provides. The pay version of SuperDuper allows for Smart Updates, which only transfers the changed files. Carbon Copy Cloner also does this, using rsync as the underlying transfer method.


I use SuperDuper! every night to make a bootable backup of my internal drive, and have also used it to clone external drives as you wish to do.


linux - simplify ssh hostnames with wildcard

I got many servers with names ending in 001, 002, 003 and I want to rename them into something simpler; something like this:


Host server*
User user
HostName server-xxx-yyy-zzz-*
Host client*
User user
HostName client-xxx-yyy-zzz-*

And then ssh server001 is executed like ssh server-xxx-yyy-zzz-001


Is there any way to do this with only ssh-config? can I do some maneuver in /etc/hosts? or I have to create a script to generate the config for each host?

linux - EFI dual boot windows 7 under fedora 23


I recently installed Fedora 23 on my Windows PC, which is running Win 7 Prof 64 bit.


Before that I had a dual boot system with my above Win Sys and OpenSuse which was running after couple of minutes configuring the grub boot loader in yast.


So I created a bootable usb stick and installed fedora like my opensuse with a root-, home- and swap-partition and of course the mountpoint /boot/efi in the efi-partition on my /dev/sda1. (similar to opensuse-installation!)


The Installation was successful without errors and after the first reboot i tried to configure grub and the menu entries. But nothing helped and I'm trying since 2 days every solved forum answers.


for example:


Missing win7 entity


dual boot system using uefi


Rebooting after trying out the above shows up the new MenueEntry.
Booting from this selection gives the following Error:


Missing Signature. You need to load the Kernel first.

After some tryouts to configure some grub menu entrys, booting fedora also threw an error message :


file 'boot/grub2/grubenv' not found

hitting enter ignores the problem and still boots fedora though.


fDisk Output:


fdisk -l
Festplatte /dev/sda: 931,5 GiB, 1000204886016 Bytes, 1953525168 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: ADD7D9F2-CF60-40BF-AB36-440D08986EE4
Gerät Anfang Ende Sektoren Größe Typ
/dev/sda1 2048 206847 204800 100M EFI-System
/dev/sda2 206848 468991 262144 128M Microsoft reserviert
/dev/sda3 468992 717268991 716800000 341,8G Microsoft Basisdaten
/dev/sda4 717268992 1434068991 716800000 341,8G Microsoft Basisdaten
/dev/sda5 1434068992 1748721663 314652672 150G Microsoft Basisdaten
/dev/sda6 1748721664 1748725759 4096 2M BIOS boot
/dev/sda7 1748725760 1951543295 202817536 96,7G Linux LVM
Festplatte /dev/sdb: 238,5 GiB, 256060514304 Bytes, 500118192 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: 6407EE3B-8043-4E6D-A844-C553572E4C46
Gerät Anfang Ende Sektoren Größe Typ
/dev/sdb1 2048 264191 262144 128M Microsoft reserviert
/dev/sdb2 264192 481243135 480978944 229,4G Microsoft Basisdaten
Festplatte /dev/mapper/fedora-root: 23,3 GiB, 25002246144 Bytes, 48832512 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Festplatte /dev/mapper/fedora-swap: 12,9 GiB, 13828620288 Bytes, 27009024 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Festplatte /dev/mapper/fedora-home: 60,6 GiB, 65003323392 Bytes, 126959616 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes

other outputs of


lsblk // blkid | grep -i efi // grep -i efi /etc/fstab //
gdisk -l /dev/sdb // ls -l /boot/efi/EFI/ //
grub2-mkconfig /boot/efi/EFI/fedora/grub.cfg // ...


output of various relating commands


Thanks for your help in advance!


Answer



Your GRUB configuration is using BIOS syntax to try to boot Windows. This won't work on an EFI-mode installation, which you seem to have. Broadly speaking, you have two options:



  • Fix the GRUB configuration -- Tools like GRUB Customizer are supposed to help with this, although I have no experience with this program, so I can't help beyond pointing you to it. You can tweak it manually, too, as described (among other places) here.

  • Switch boot loaders -- About half a dozen EFI boot loaders for Linux exist, so you can switch away from GRUB 2 if it's not working for you. See this page of mine for my detailed thoughts on them. My own rEFInd is likely to be the easiest to install and switch to, should you decide to move from GRUB 2.


The biggest single advantage of GRUB 2 is that it's the default boot loader of most Linux distributions, including both Fedora and OpenSUSE. Thus, these distributions' maintainers put a lot of effort into creating a working configuration. The trouble is that GRUB 2's configuration is rather complex, so when the distribution maintainers' efforts fail, it can be a challenge to fix the problem. You'll have to decide for yourself whether to accept that challenge or to "abandon ship" to something else.


linux - Do I need to format/partition ddrescue destination drive?


I am trying to recover data from a failing hard drive using GNU ddrescue on Ubuntu. I used the following command:


sudo ddrescue -f /dev/sda /dev/sdb [path to mapfile]

So far it is working speedily and without issue. My concern is about the destination drive 'sdb'. In the Ubuntu 'Disks' utility, it's contents are listed as 'Unallocated Space' and partitioning is 'Master Boot Record'. What will I see when ddrescue is done? Should I have prepared the drive differently?


Both drives are of equal size and I can see activity on each drive. I'm not sure if the drive I'm recovering data from ('sda') is MBR or not. Thank you for your time.


Answer



No. ddrescue will prepare everything for you. You just need to setup things after the rescue, but only if the partition table was damaged. From GNU ddrescue Manual:



Example 1: Fully automatic rescue of a whole disc with two ext2 partitions in /dev/sda to /dev/sdb.


Note: you don't need to partition /dev/sdb beforehand, but if the partition table on /dev/sda is damaged, you'll need to recreate it somehow on /dev/sdb.


 ddrescue -f -r3 /dev/sda /dev/sdb mapfile
fdisk /dev/sdb
e2fsck -v -f /dev/sdb1
e2fsck -v -f /dev/sdb2


After ddrescue is done (and you have done everything safely, for example not having mounted any of /dev/sda or /dev/sdb during the rescue, be careful with interruptions and "repairing" the failing drive), you will see that all possible data from the failing disc was copied to the new one. Saying "all possible data" I mean also the partition table and partition flags.


Thursday, June 27, 2019

Windows 10 doesn't start UI/Explorer after scheduled update

Windows asked for a time to update. When the scheduled update happened I wasn't at my computer. Now, I restarted Windows and I find that it doesn't start the UI. There's an empty screen. I can start the Task Manager
via Ctrl+Alt+Delete
I can start Chrome via the Task Manager and it starts without any problems, but I can't start Explorer. When I try, nothing happens.


What do I have to do to get my computer working again?

windows 7 - Why would my computer automatically restart after "shutdown" and "sleep"?


After my "firmware lost the hibernation information of my Windows 7 computer" I have fixed everything except the problem that the computer now will not shut off.


If I choose "shut down", it shuts down, then waits two seconds and starts back up again.


If I choose "sleep", it goes into sleep, waits two seconds, then starts back up again.


Here's the basic info about my computer hardware / software:



  • Asus P5QL Pro Sockel 775 Intel P43 max. 8GB DDR2-1066 ATX

  • Intel Core2 Quad Q9300 Sockel 775 2.5 GHz FSB 1333 MHz Boxed 2x3MB L2 Cach 95W Yorkfield

  • 2x Team Group TVDD2048M800C5 2038MB (2GB) DIMM DDR2-800 / PC2-6400 CL5 184pin Non-ECC

  • Arctic Cooling Freezer 7 Pro CPU-Cooler Socket 775

  • BE Quiet System Power BQT S6-SYS-UA-450W Netzteil 450Watt

  • BE Quiet SilentWings BQT-T9225-LF Case Fan 92mm 16 dBA 32.6 CFM 1800rpm

  • Windows 7


I suspected the network card was waking up the computer after shutdown but its wake-up functionality is disabled:


alt text


I looked all around in the BIOS and the only type of wake-up setting I can find is this page, but everything was set so that it would not wake up in any case (however, I can imagine this is the right section since I have read that APM is responsible for "powering down the computer to an acceptable power level when it was not in use"). And this has only been happening since the firmware/hibernation issue I mentioned above where everything in BIOS got reset, so I can imagine the solution lies in finding the right BIOS setting but these all seem to be set correctly:


alt text


How can I get my computer to shut down and sleep without starting up again?


Answer



This happened to me when I had a bad video card pluged in. I swapped out that card and the problem was solved.


I would recomend removing all add-on cards and usb devices and booting the computer with just a monitor, keyboard and mouse attached. Then if the problem is gone, add one device at a time until the problems comes back. Then you will know which device has a problem.


Excel drop menu selection

I'm trying to figure out how I can populate a table from another tab onto my screen from a drop down menu selection. I've tried index, indirect, and vlookup but I am missing something somewhere. Anyone have any advice??


Thanks

Wednesday, June 26, 2019

memory - I bought a motherboard that supports DDR3 RAM


I bought this ASUS Sabertooth X58 motherboard from http://msy.com.au/product.jsp?productId=7301


But I'm not sure what DDR3 RAM to buy.


I haven't built a PC from scratch in about 3 years, and I'm wondering the following:



  • Do DDR3 ram chips need to be installed in three at a time? Or can I just install one or two now and install more later without any particular pattern?

  • If I buy 2000MHz RAM from Corsair, will that work at 1866 MHz? (which is the highest frequency the motherboard supports)

  • Is it just me or is 1866 RAM not around?


Answer



You can install DDR3 sticks in any way you want. If you do chose to install them in groups of two or three, you can use dual or triple channel for access. You can also add sticks later if they are sufficiently similar.


RAM can generally be downclocked, so it should work fine at 1866 MHz. Also note that there may be some restrictions on frequency, so do read motherboard manual.


windows 8 - CPU gets stuck at 0.90 GHz and 53% usage cap



Configuration in question:





  • Model - Dell 1558

  • CPU - Core i7 740 @ 1.73Ghz - 2.93GHz

  • RAM - 6GB DDR3 1333Mhz

  • OS - Windows 8 Pro MSDN



Now this problem has started since yesterday.



My computer blanked out suddenly (like absolutely suddenly). And when I rebooted, the operation was sluggish. I figured out that the CPU was stuck at 0.90Ghz (which is the lower limit at which my i7 'rests' generally. Further, the CPU consumption at this 'low' frequecy is also capped at 53% - making my device a Quad-Core running at 450MHz (:-O). The device manager isn't showing any erroneous drivers and neither was any update installed in the vicinity of a few days.




Hence I did System Restore to a fortnight back. It took a lot of time due to the low frequency it was locked at - but once rebooted, the CPU started functioning normally. However, only a few minutes into the operation it again went back to 0.90GHz - and just stayed there. This is happening at every reboot now - a few minutes of sanity then everything is just a drag.



I don't think its an issue with the CPU heating up because the temperatures are staying within the same limits as any earlier time (HW Monitor). But, now, when I'm shutting down, it doesn't reboot immediately - as if it is overheated (which it is not - I even set the fan throttle to full 100%).



Any ideas on what the problem seems to be with my CPU and how to treat it?


Answer



Okay - so the problem is solved now - and I guess I know the true reason now. Some parts are mentioned in the comments above - so I will just summarize it up.





  1. The fan was alright - except for the usual minor efficiency reduction that happens due to dust accumulation.

  2. The CPU was alright - no throttling problems based on the CPU alone.

  3. The problem was with the thermal paste on the graphics card chip.

  4. Now in Dell Studio 1558 - the CPU and the Radeon chip are connected to the same heatsink via heatpipes. Further, the GPU is onboard. The thermal paste over the GPU had hardened due to lot of heating over-time and as a result it was not in good contact with the GPU.

  5. Since the GPU would not cool appropriately, I guess the motherboard sensors would throttle the fan at full speed. And even then when it wasn't cooling properly, the system was simply under-clocking the components - both the CPU and the GPU. As a result the display performance was very sluggish - windows took several seconds to display, web pages were a crawl and so on.

  6. Now the heat-sink has been replaced. And so is the motherboard - to avoid any potential overheating damage.



Thanks to all for the concern :)


operating systems - Will applications running in root mode be able to overwrite OS's or other program's memory section?


I read here that any application running in root mode can issue a kernel call and execute in kernel mode. Is is possible that ANY application running in root mode can make a kernel call, go to kernel mode and tamper other program's memory area or mess with the operating system's memory section, cos almost all the tutorial's I find say's that kernel mode gives COMPLETE ACCESS to my hardware, and if it is this way wouldn't that be a great security flaw where the program just after acquiring the root level access would have access to any memory location on RAM/DISK ?

(I have Linux in my mind while I ask this question)

EDIT:
Well i am rreally convinced about the fact that in linux the memory is completely exposed, can someone explain if it is the same way in Windows and Unix


Answer



Yes, it's certainly possible - many Linux systems even expose memory via the two device files /dev/mem (for physical memory) and /dev/kmem (for virtual memory). You can access the kernel's virtual address space via /proc/kcore. Of course, it's not recommended to write to these devices, as you could easily trash your system.


I'm not sure why this could be considered a security issue, though - you generally have to be root to write to these devices, and if you have root access, you can already do anything you want.


windows 7 - why Thinkpad T410s intermittent keyboard death?


I have a Thinkpad T410s running Windows 7 64-bit. I have had it for three months. It has the latest BIOS (1.41) and trackpad drivers.


In the last week I have started to notice that the keyboard intermittently stops working.


Specifically, keystrokes have no effect, including Fn-F12 (shutdown) and Ctrl-Alt-Del. The LED on the capslock key does not turn on or off. Whatever state the lighted keys (e.g. mute) were in remains. The trackpad and trackpoint work properly, and I can close apps and properly shut down the machine. When I attach a USB keyboard it is recognized, but no keys work.


If I run the Lenovo keyboard test, all the keys register properly and the caps lock light works again. When I quit the test app, the caps lock light stops working. If I hit Fn-F12 while the keyboard test is running, it goes into hibernation. When the machine comes back from hibernation, once I exit the keyboard test I again cannot do any input on the keyboard.


I'm pretty convinced there is a software or driver problem. I never saw this the first three months I had the laptop. I do not recall installing anything recently. I am sure I've received some Windows security updates. I tried using wired networking instead of wireless - no difference. There doesn't appear to be any inciting event; it usually happens when I am working over ssh. I switched from rxvt+ssh to Putty and the problem still occurs.


Any ideas?


Answer



I was experiencing Windows 7 "Filter Keys". By default, if you hold down the right shift key for 8 seconds, the Filter Keys mode activates. This is supposed to slow down input, but in my case none of my keystrokes were having any effect. As a hint, the system does make a "tick" noise when you touch keys on the (disabled) keyboard, but since I usually have my system on Mute I didn't hear anything.


Why was I activating this in my SSH sessions? When I use terminals I frequently hold down right shift and page up/down to access the scrollback buffer. I can easily lean on it for 10 seconds or more.


Solution is to go to Control Panel -> Ease of Access Center -> uncheck "Turn on Filter Keys".


pdf - Printable version of whole site


I want a printable version of a whole site. I have read How can I download an entire website?
and similar answers to download a site, but I want every page as PDF (in my case, I want to save a Wordpress site).
Any solutions are welcome (download PDFs, or convert the local page I've already downloaded with HTTRACK to PDF).


Thank you!


Answer



If you already have all the HTML, you can use wkhtmltopdf.


There is also a way to batch convert, that sounds like what you're after. It should work on other systems even though the link says Mac OS X. You may want to change some of the options, so check out the documentation.


Is there any command line tool that can be used to edit environment variables in Windows?



Is there any command line tool that can be used to edit environment variables in Windows?




It would be nice if this was smart tool, for example:




  • When adding some path to let's say the PATH variable and this path is already there it shouldn't double this entry.

  • Inserting a new path to the PATH variable should be possible before/after some other path or in specific order (the first, the 7th, the last etc.).

  • It should be possible to change only part of variable's value (in case of the PATH a given path from a list of all paths).



And the last but not the least - I want my changes to persist between sessions so simple SET is out of question...




There's very nice GUI tool for this called Path Editor and I need something like this but for command line.


Answer



Path Manager (pathman.exe) from Windows Server 2003 Resource Kit Tools is the closest match I could find. It was already available in NT Resource Kit.


worksheet function - Use a button to send info from one excel sheet to another




I've got an excel spreadsheet that will collect data in the rows. I want to create a button that would send the cells from B3:I3 to a second sheet in the same workbook. After sending the data, the information from the first sheet should be deleted automatically.



I have the button created and the spreadsheet setup, but I have not used VBA in excel before and I'm having difficulty finding code to piece together to finish this sheet.



Can anyone provide some direction or help?


Answer



Try this:



Sheets("Sheet2").Range("B3:I3").Value = Sheets("Sheet1").Range("B3:I3").Value
Sheets("Sheet1").Range("B3:I3").Clear


windows - How can I determine if I have one process with two threads, or two processes?


I notice that chrome (famously now), creates loads of instances in task manager. Is that lots of threads and one process? Or is it multiple processes. i.e. is task manager showing threads, or is it showing processes?


Suppose I go to the orb/start, and I launch cmd, then I go there again and launch another cmd. Is that two separate processes, rather than one process with two threads?


Now suppose I launch a cmd, then from there, I launch another cmd. Is that one process two threads? Or is that two processes?


Answer



The Windows "Task Manager" only shows processes. (Otherwise you would see a lot of duplicates for everything, since almost all Windows apps are multi-threaded, including Chrome.) To see threads of a process, use Process Explorer or Process Hacker; both of them have a "Threads" tab in the process properties dialog.



When you run something via Run… or Command Prompt, it always starts as a new process. It doesn't make any sense for it to be a new thread in an existing process, since threads share memory and other resources, so a new thread created "from nowhere" just wouldn't know what to do with what it got; it'd trample all over the running app.



  • That said, once the new process starts, it can contact an existing instance. That's what both Chrome and Firefox do – they just send a "hey, the user wants a new window" IPC message to the 'master' Firefox process, and exit immediately afterwards.


  • As for that new window, usually it doesn't get a new thread on its own – most of the time, if a single process decides to open multiple windows, they all run on the same "UI thread", since only the main thread receives window messages. Instead, additional threads are used for background and/or long-running tasks.





As a side note, the Linux htop tool does show all threads by default (since Linux threads are no different from processes), and this confuses people every single time. If you use htop, make sure to select either "Show custom thread names" (as in the linked screenshot) or "Hide userland threads" (to get a traditional processes-only list).


For example, here's a small part of Linux Chromium's process tree, including both subprocesses and their threads (the main process didn't fit in the screenshot):



(Note that despite their green colouring, threads shown in htop are not green threads.)


Tuesday, June 25, 2019

windows 7 - RDP logout using bat file


Using Windows 7. When I RDP to a PC I'd like to be able to logout of the session without the screen reverting to a Ctrl+Alt+Del Login screen.


The PC's in question are kiosks running Chrome in full screen 'Kiosk Mode'. So it's important they revert back to the normal browser home page.


I have successfully managed to do logout by creating a .bat file in C:\bat called rdp_logout.bat. The contents of this .bat file are below;


tscon.exe 2 /dest:console
EXIT

I then created a shortcut on my desktop to this .bat file (send to > desktop). I changed the permissions of the .bat file to run as administrator. When I want to logout of the 'Kiosk' I do the following;



  • Open the browser in Kiosk Mode

  • WinKey+R

  • Input "cmd"

  • Enter


This opens the command prompt (on top of) the browser with the following displayed;


C:\Users\Administrator


I then type;


cd Desktop


"rdp_logout.bat - Shortcut.lnk"


This does run, and logs me out. However whenever I RDP to the same PC immediately afterwards, the command prompt window is still showing 'on top' of the browser.


What do I need to change in order to hide the command window after the .bat files has ran?


Answer



Try this.


Timeout 2
taskill /f /cmd.exe

to the end of you .bat


This will Kill the window to kill itself after you log out. The Pause is so it does not kill it before your logout command runs.


Saving excel sheets as separate documents in pdf

At work we export invoice data into an excel document where each invoice is put into a separate excel sheet.


At the moment we use BullZip pdf to print, but ideally I'd like to click print and the documents would save to pdf with the title of the sheet as its name. Is this possible?


Nb. We use BullZip as it adds on our letterhead to the document

firefox - newer version of Iceweasel on Debian Squeeze


I'd like to install as recent Firefox/Iceweasel as possible (for instance one that supports SVG images) on Debian Squeeze (stable). I don't mind installing testing packages if that's what it takes.


I have tried using http://mozilla.debian.net/, but it won't upgrade Iceweasel to 3.6 - it says that the package is already at newest version. Currently installed version is however 3.5.10. Any ideas?


Also, if anyone knows how I can use a newer version of Firefox/Iceweasel (ideally latest - FF7) without breaking my neck every time I update the system, I'd be very grateful. :) I have found this tutorial, but I am afraid I will have problems library dependencies if I go that route.


Note: I don't care if it is Firefox or Iceweasel, I would just like a recent version and auto updates (either debian or mozilla-style, whichever works). Please avoid flame war.


Answer



Here is a link that allows you to install the latest Firefox without uninstalling your old version. The old version is renamed and you can still run it if you wish. The new version is installed into /opt and links are created so that menus still work. I've been using this on Debian squeeze a couple of weeks with no problems. It advertises automatic updates, but I can't confirm that automatic updates work.


how-to-install-firefox-on-ubuntu-linux-mint


What does 4 + 1 CPU cores mean?



For example, the Nvidia Tegra 4 is described as having 4 + 1 CPU cores. Is this simply a conventional way of saying that it has 5 cores, or does that phrasing imply something different?



http://www.nvidia.com/object/tegra-4-processor.html


Answer




It's an extra core used when the higher power CPU (4 cores) isn't necessary.




PCMag

Nvidia has settled on a name for the unique processor architecture
used for its quad-core Tegra 3 chip – 4-PLUS-1. The "PLUS-1" refers to
the mobile processor's fifth core, a "battery-saver" core that runs on
very low power and executes tasks at low frequency when the chip's
more powerful and power-hungry ARM Cortex-A9 cores aren't needed.



Sorting in Microsoft Excel

When I use the Sort "oldest to newest" in the Filter dropdown and I am sitting on, for example Row 400. After I do the sort my screen resets so I am sitting at the top of the spreadsheet instead of down in Row 400.



is there a setting to change this. Its an issue for users not compfortable with jumping around a sheet.

Monday, June 24, 2019

Is there a way to change the look of the expand / collapse boxes and lines in Notepad++?

I was wondering if anyone knows of a way to change how the Expand / Collapse boxes and lines look in Notepad++.


For example currently when you place your cursor within a xml or html tag, Notepad++ will turn the expand/collapse box and the lines connecting them to a thin red line.


If possible I would like to achieve some of the following....



  1. Thicken up this red line and make it very bold so it stands out.


  2. Maybe an option to change what the expand/collapse boxes look like (not that important)


  3. Way to have Notepad++ highlight the background of the entire tag selected with a user definable color. This would really help even more to make tags stand out.



If anyone has anything information they can share on the subject it would be greatly appreciated.

linux - Use a symbolic link to create a new symbolic link



I have 2 directories (FOO, LALA). I create a symbolic link in one of them like this




ln -s /etc/apache2 FOO/apache2


Afterwards I want to create another symlink, pointing to the same directory, but not using the initial directory but the symlink created. So I try



ln -s FOO/apache2 LALA/apache2


The problem is that the second link is invalid.




ls FOO/apache2


The above works and lists files in /etc/apache2



ls LALA/apache2


But this one doesn't. It just lists the link itself.

If I add a slash at the end of each ls



ls FOO/apache2/


Works as well.



ls LALA/apache2/



I get ls: cannot access LALA/apache2/: No such file or directory/






If instead of



ln -s FOO/apache2 LALA/apache2


I do




cd LALA ; ln -s ../FOO/apache2 apache2


Then the symlink is valid



Any idea what's the difference?







Initial question from here
https://stackoverflow.com/questions/10656666/use-a-symbolic-link-to-create-a-new-symbolic-link


Answer



The difference is that relative symlinks are resolved at access time, not creation time.






In your first example, if the link's name is /somedir/LALA/apache2 and its target is FOO/apache2, it will be resolved to /somedir/LALA/FOO/apache2 when accessing it.





link name: link target: absolute target:
"/somedir/LALA/apache2" + "FOO/apache2" = "/somedir/LALA/FOO/apache2"


In the second example, the link's name is same – /somedir/LALA/apache2 – but its target, ../FOO/apache2, is now resolved as:




link name: link target: absolute target:
"/somedir/LALA/apache2" + "../FOO/apache2" = "/somedir/LALA/../FOO/apache2"
→ "/somedir/FOO/apache2"






This means that you must always give "../FOO/apache2" as the target to ln -s when creating the second link, regardless of what directory you are currently in.



Note: In the latest version of coreutils, the ln command has a new option -r/--relative, which does the job for you. For example, ln -r -s FOO/apache2 LALA/apache2 would work correctly.



For older versions, you could hack something with realpath --strip --relative-to...
I wrote sym for my own use.


Sunday, June 23, 2019

windows - Is there any way to get a list of the system-wide keyboard shortcuts currently in use?

Is there any way to get a list of the system-wide keyboard shortcuts currently in use, including what programs they are attached to?


I have noticed that some are overriding others unexpectedly and a couple are mysteriously tied up with something, on my main computer.

laptop - How to remove unneeded features and extras on Windows 7?



My laptop came with preinstalled Windows 7 Ultimate x64. I can't change the OS on laptop, but Windows 7 Ultimate is much of an overhead for the computer and my intended use as well. Is there a way to remove any features, to make the installed OS closer to say Windown 7 Home Premium? I would like to speed up the laptop and get some memory freed.


Answer



Windows built-in features does not use much memory. however you can turn the features ON or OFF by doing these steps:



  1. Fist, open your Control Panel and go to Programs and features.


    enter image description here


  2. Now at the left side of the window, you can see a link named "Turn Windows features on or off", open it.


    enter image description here


  3. Another window will open which allows you to turn the features of or off. just mark the features you want to turn them on or unmark the features that you want to turn them off.


    enter image description here


  4. Now, just press OK and the changes will affect.



Note that some applications need to use these features and windows may not able to do some tasks without them.


Installed Linux Mint (debian) "Reboot and Select proper Boot device..."


"Reboot and Select proper boot device or Insert boot media in selected boot device and press a key "





This is what I get, once I installed Linux Mint from a Live USB pendrive. On this machine GigaByte BXBT-2807 [ http://www.amazon.com/Gigabyte-Intel-Celeron-Barebones-GB-BXBT-2807/dp/B00KR0QHXW/ref=cm_cr_pr_product_top?ie=UTF8 ]



I tried (F12) (keyboard works fine)and I got:




UEFI: Built-in EFI Shell



UEFI: Built-in EFI Shell [yes, twice]




KINGSTONDataTraveller 3.01.00 [my usb pendrive]



PO: HGST HCC4545421AZ45



Enter Setup




Then :





  • I tried to boot from the USB pendrive,

  • I tried to boot from the default UEFI,
    brief I tried the 4 options (UEFI, HDD and USB live CD), I get the same message. I tried a second UEFI and I Get Shell>terminal-like.


  • I tried to remove/reinsert the disky battery to reset BIOS (?), no success.




Now I cannot reinstall Linux nor boot from anywhere.



What should I do ?




Thanks --

security - Windows 8.1: administrator account has access denied to other partitions



UAC is activated for the administrator.
With Windows 8 everything is okay.
After the upgrade to 8.1, the administrator account is denied to access the every partition except the one containing Windows, Users, Program Files, etc.




The message is the same as when a regular user is denied access to whatever folder.
It is impossible to see and change ownership and permissions.



Same error for every user belonging to the Administrators group,
even a user created for the test after the upgrade.



When we deactivate UAC for the administrator, access is okay.
But then we can no longer perform some actions, so UAC is important for us.




Update:




  • the permissions already grant full access to the Administrators group

  • chkdsk reveals no error


Answer



You may have restricted the permissions on your partitions to keep access only for administrators.



If this is the case, you face a Windows's bug. This bug is since Windows 7 I think. Seems nobody found a clean way to avoid it. Some people sais this is a bug into Explorer, but the command line exhibit the same behavior, as PowerShell, as other applications I tested.
It only fire when UAC is enabled and you belong to the Administrators group and the folder is restricted to the Administrators group only.




If you want to keep UAC, you have to modify the permissions to allow someone else to read the folders you want. Remember: this user must not belong to the Administrators group.
Personaly I create a special user for this usage only.



To modify the permissions, you may have to disable UAC. Once done, you enable it.


Unable to format usb stick

I have 4GB pendrive. while trying to formatting, it gives Write protected message. The pendrive is not having write protection notch. I have tried is on Windows as well as on Fedora 13.


cfdisk & fdisk or mkfs; nothing is working they are giving the same message that could not format write protected drive.


Disk /dev/sdb: 4016 MB, 4016046080 bytes
90 heads, 25 sectors/track, 3486 cylinders
Units = cylinders of 2250 * 512 = 1152000 bytes
Disk identifier: 0x000ae90f
Device Boot Start End Blocks Id System
/dev/sdb1 * 4 3487 3917824 b W95 FAT32
cfdisk /dev/sdb
Opened disk read-only - you have no permission to write
sudo tune2fs -l /dev/sdb
tune2fs 1.41.9 (22-Aug-2009)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb
Couldn't find valid filesystem superblock.

Saturday, June 22, 2019

logging - Wget write log to file and verbose


I am writing a script that will download Wikipedia dumps. I want wget to write all message to a log file but I also want it to write all message to the screen. Any answer? I use this script and it only write infomation to the log file.


wget -r -np -nH -R index.html -a ./$logn-viwikibooks.txt http://dumps.wikimedia.org/viwikibooks/latest/

Which


logn=`date +%d-%m-%Y'

Even if I add '-v' option, there is nothing on the screen


Answer



Use tee:


wget -o /dev/stdout -r -np -nH -R index.html http://dumps.wikimedia.org/viwikibooks/latest/ | tee -a ./$logn-viwikibooks.txt

pdf reader - How does a PDF prevent itself from being printed?


I have a PDF for my camera's manual, and Adobe Reader won't let me print it (the print option is grayed out). SumatraPDF also does the same thing (it even says print denied). How does the PDF prevent itself from being printed? It seems that if the program can display it on the screen, then it can also print it. Maybe Adobe Reader respects the PDF not printing, but surely an open source PDF reader wouldn't be so restrictive. So is there something more to this than merely the PDF reader software respecting the PDF's request to not be able to be printed?


Answer



The print permission is in the pdf file itself and is mostly used by Adobe products. Some products pay it attention, and some others print it anyway.
It is quite easy to remove.


See the article How To Unlock Adobe PDF Files, where it explains how to use Freeware PDF Unlocker to remove this and other passwords.


Warning : Comment by Chris Betti says



As of Oct 7, 2013, the Freeware PDF Unlocker setup installs unwanted
software without confirmation, and fails to install the product
itself.



Use older versions (if can be found) or search for another product.


microsoft excel - Count cells based on a comparison with value in the same row of another column


There are many questions about counting cells based on conditions, but I can’t quite find a way to count cells when a value in another column, in the current row, is less than / greater than etc. the current cell. Example:


How many cells in column A (below) have a non-blank value AND that value is less than the value in the same row in column B?


A     B
-- --
6
2 1
3* 6
2
4* 6
4 1

The answer should be 2, which is the two I have added as asterisk to (asterisks are not normally in the data).


What I want to use is:


=COUNTIFS(A1:A6,"<>",A1:A6,"<"&cell in column B for whatever row Excel is currently looking at)

… but you can’t do that. Any ideas, preferably avoiding VBA?


NB If there is a solution, ideally it will still work when referring to column names in Excel tables. Using things like offsets is prone to future errors.


Answer



To avoid having to add counter column, I think you can use a SUMPRODUCT formula:


=SUMPRODUCT((A1:A6<>"")*(A1:A6


Friday, June 21, 2019

windows xp - Blue Screen of Death when accessing a mapped network drive



I'm facing a hard time solving a BSOD which happens whenever I access a mapped network drive. It only happens when I access a particular folder in this drive.



The error code is:




BAD_POOL_HEADER
STOP : 0x00000019(0x00000020, 0x88EE2E28, 0x88EE2ED8, 0x0A160001)


Is there any way to fix this besides formatting my hard drive? I have tried updating my drivers and performing a registry clean but it hasn't helped.


Answer



Firstly, try booting your computer in to "safe mode with networking", if you don't get it, it was down to third party software/drivers which you will have to examine/uninstall.



If you still get it, I would say this is most likely a network driver. You said you have updated them, I would say this is also bad and to try another version, or an alternate card. It could also be actual hardware damage to the network controller.


macos - Same Windows installation as both a host and guest

First off: There are other, similar questions to this (e.g. Why is it I can't use my Windows installation both as a host and a guest?), but the questions either don't provide enough information, and/or the answers are technically and factually incorrect (as with that example). It is possible - technically and legally - to boot the same physical Windows instance both natively and virtually (obviously not at the same time), without having to reactivate, and without having to legally buy two licenses. I just need help accomplishing it (as I imagine scores of others would like to do). I also imagine this could become be an interesting or useful reference for others, especially given the lacking and/or incorrect information about it elsewhere.



I once found an exhaustive walkthrough on how to do it several years ago (which worked), using VirtualBox, but I can't seem to find any guides now. But surely this nut has been cracked, and others would like to know how?




I should provide a good amount of detail with this question - to head off the inevitable, well-intentioned, and occasionally wrong comments such as:




  • "It can't be done" (it can and has - quite robustly and reliably)

  • "It would violate the Windows EULA" (possibly with Windows 10 but not older versions)

  • "Why not just use Wine, or a fully virtual Windows image, or comparable Linux apps" etc. (I'll get to that.)

  • "Why not use two computers and a KVM?" (My main computer is a laptop with two mSATAs and always on the go; can't be tied to one desk. Also I regularly copy and paste between OS instances, can't do that with a KVM. Plus, how boring is a KVM? And a desk?)




Table of Contents




  • Desired scenario and high-level use-case

  • But...why?

  • Evidence that it is possible, robust, and useful

  • Evidence that it is legal

  • My specs (just in case asked).




Desired scenario and high-level use-case




  1. One machine, two drives.

  2. One drive has Windows installed (specific version up for debate), the other has Linux (Xubuntu 16.04.1).

  3. Boot up Windows, then load the physical Xubuntu instance in a virtual machine (via VirtualBox 5.1, a raw vmdk pointing to physical drive, and a robust custom CMD script to set it up and launch it).

  4. Exit both, physical reboot.

  5. Boot up Linux, then run the physical Windows instance in a virtual machine. (Preferably also VirtualBox but I'm open to suggestions.) Also with similar script helpers, but bash (which also exists).




I already have #s 1 through 4 in place and working flawlessly, reliably, every day, for years.



The bash script is already written to make #5 work. It already works for running a physical installation of Linux in a virtual machine... on a (different) real running instance of Linux. (Why that is a very different story and related to a secure, portable, traveling development environment.)



(BTW - the scripts [CMD or bash] are needed to set up the raw VMDK instances [which become invalid after every boot], connect them to the VM, and start the VM. It just makes it painless, easy, and reliable. This scenario also works absolutely brilliantly for installing and running an OS on, say, an SD card or thumbdrive [which is challenging to do the "traditional" way]. Just point a raw VMDK to the entire thumbdrive, attach the VMDK to a VM, boot the VM to a live CD ISO, and install the OS to the "thumbdrive" just as if it were a regular hard drive - which it thinks it is. After that, you can boot the OS on the removable media either in a VM, or for real. At least, if it is Linux. Works like magic, but writes are slow depending on how cheap the media is.)



What I don't have working for #5, is the Windows VM not squawking about drivers or activation when switching back and forth between booting natively, and booting virtually. (And again - this is perfectly possible and proven so below. I just don't know how to accomplish it.)



But...why?





  • Linux is my main OS, going back to Ubuntu Feisty Fawn. It has most of my productivity apps and data. I vastly prefer it to Windows for numerous reasons. I use it most of the time natively.

  • I also have a series of required communications and development programs that only run in Windows, so I currently run those in a "regular" Windows VM - a fully virtualized Windows 7 instance on a regular virtualized HDD image.

  • Keep in mind, the above point only applies to applications that don't run reliably or at all on Wine, and have no Linux counterparts that meet the same requirements. But there are plenty of other Windows applications I use, that do run just fine on Wine, and obviously I have found acceptable or superior Linux replacements for the rest.

  • I occasionally must spend long sessions in native Windows, for low-latency, hardware-accelerated photo/video/audio editing. (At which time I also need access to my Linux productivity apps, hence the physical Linux install running in a VM, which as I said has worked flawlessly for years.)

  • My "real" Windows install is currently Windows 10, but I'd gladly wipe it with an old Windows 7 or 8.1 installation (with their own non-upgraded licenses). I'm not crazy about 10 anyway. Or like I said, even down to Vista64 and I could probably even get XP64 to work with my hardware and software. I honestly don't care what Windows version I'm running, I only need it for a few important applications.

  • Maintaining two copies of Windows (real and virtual) is a major pain, and is causing problems with some not-very-well-thought-out software packages which are beyond the scope of this, other than to say it would be a major time-saver to have just one install of Windows work either physically or virtually, at will, back and forth, just as my Linux install does.

  • I like technical challenges. It took lots of effort to get the "physical Linux in a VM" working, mainly due to challenges with Windows security. (Linux itself doesn't care and is quite happy figuring out whether it needs paravirtualized or native hardware drivers at boot-time.) Once I solved the problems, it "just works" and is rock-solid, back and forth either in Windows or Native. There's a good deal of personal satisfaction just in that.




Evidence that it is possible, robust, and useful




  • Parallels running on Mac OS [/X] supports, or at least did support for many years, doing exactly what I'm talking about: Booting to Windows on a "Bootcamp" partition natively, or booting to Mac OS and running the same physical Windows installation virtually via Parallels hypervisor - without a single Windows Activation and/or driver complaint. I used to work at a company where most people did just that. (Note that there is nothing magic about Apple Bootcamp. It's just a partitioning scheme and a utility. Bootcamp is special only because it emulates BIOS & MBR for Windows in a native EFI/GPT setup, and it also automates the tricky and laborious partitioning and installation chores. But all of that can also be done manually.)

  • I have an old Macbook triple-booting with Mac OSX Snow Leopard, Ubuntu 12.04, and Windows 7. (All on the same disk in an elaborate partitioning scheme that has worked flawlessly for years.) In Mac OSX, I run the same physical Windows 7 install in a virtual machine, via Parallels. I used to do fairly intensive photo editing session in Windows that way. It's pretty cool, even though I rarely use Mac OSX any more. This is all older software so I'm not sure the same setup is still supported, but this is living proof - right now - that it is not just possible, but actually exists in the wild. Windows under Parallels/Mac is arguably way more stable than Windows on it's own (possibly due to Apple's buggy Macbook hardware drivers for native Windows). Windows never complains about licensing, nor did I have to activate it twice. (And it's within the EULA, at least for Windows 7.) Sounds like magic, but it was all thanks to Parallels - it had (has?) a wizard that figures out what Windows needs to "see" in order to not complain, and configures the hypervisor settings accordingly. With no hacking of Windows involved, other than installation of guest additions / paravirtualization drivers. (Strangely, Parallels uses a virtual ATA interface, while natively Windows is on SATA - so I'm not sure how Windows doesn't complain about that. Maybe the paravirtualized drivers take care of all that.)

  • Parallels explains it: http://kb.parallels.com/en/112941

  • So that's incontrovertible evidence that it can work, right? (Because I can see it and touch it with my own eyes and hands, and Parallels' website shows you how to do it.)

  • Admittedly weaker evidence that the same magic works with other hypervisors, is that there used to be more than one online guide findable through Google, that explained how to do it with VirtualBox. (And IIRC Vmware Workstation.) The steps included manually editing a .vbox definition file, to override attributes VirtualBox provides to Windows about the environment. (To make it look more like what it sees natively.) All perfectly well supported by VirtualBox, there's just no GUI interface to the specific parameters involved, because it's such a fringe use-case for them. I'm not sure how the network adapter MAC address issue gets solved, but it is solvable. (Basically both virtual and real have to have the same MAC address for activation reasons, without conflicting on the network.)




Evidence that it is legal



I understand that for legal licensing issues, it may not be possible with the Windows 10 EULA. I do need to be legal, and more importantly, I'd like this to not get sidetracked over licensing debates as every other similar question has. I still own every version of Windows from 95 through 10 (except ME), I will literally downgrade to Vista64 or XP64 if necessary to be in legal compliance. I'm pretty sure that with some versions of Windows 7, this is legally possible. Maybe or maybe not the way they intended, but in violation of no license clause.



I tried to paste the specific relevant quotes from both Vista's and Windows 7's EULAs that make it pretty clear this setup is OK, but superuser is flagging them as spam for some reason.



My specs



Dell Latitude laptop, Core i7, 2.7 GHz, 16gb RAM, Two internal mSATA cards. Have two docks in two different locations with two different monitor configurations and USB accessories, also often run undocked.




Thanks!

keyboard shortcuts - How do I copy without formatting with Ctrl+Alt+C in AutoHotkey?

I'm trying to use AutoHotkey to define a keyboard shortcut such that if I press these three keys simultaneously: Ctrl+Alt+c, AutoHotkey would copy the selected text without formatting to the clipboard.



Does AutoHotkey support this? If so, how? Most of what I have seen in the documentation at the official website relies on keyboard shortcuts made of two keystrokes, e.g.:



LControl + LAlt:: 
; Do something



Is there a way to do this with three keys? Also, how could I copy and remove the formatting from the selected text?

linux - Recovering a Windows 10 password when the partition is read-only


On my new laptop I entered a new password for my account the first time I booted Windows. I no longer remember this password.


The account was just a local account and not a Microsoft account, so I can't recover the password that way.


I am a linux user and have installed Debian alongside Windows. I tried using the 'chntpw' software to change/remove the account password, but when I run the program in the correct folder I get the following error:


root@sam:/media/sda3/Windows/System32/config# chntpw -i SAM
chntpw version 1.00 140201, (c) Petter N Hagen
openHive(SAM) failed: Read-only file system, trying read-only
openHive(): read error: : Read-only file system
chntpw: Unable to open/read a hive, exiting..

I did a bit of googling and found out that Windows 10 has a half-hibernate feature that allows it to boot faster, but requires the partition to be read-only even when Windows has shut down. There is a way to turn this off in the settings, but I can't access the settings as I can't log in!


Is there a way to use chntpw while the partition is locked, or alternatively a way of shutting down Windows so that I can write to the partition?


Answer



Start booting Windows and press F8 during the boot process. Select to discard hibernation data and start Windows normally, then shut it down. That should remove hibernation data and make the partition read-write again.


As a last resort, boot Windows till the password prompt, wait for the HDD to settle down then switch the laptop off with the power button.


Then boot into Debian and try the chntpw trick once more.


memory - Will these RAM work together?


I'm planning on upgrading my PC's RAM. My current RAM is a Kingston 8GB DDR3 stick. Further specifications are in the images here: http://imgur.com/a/ff7yg


Anyway, I'm planning on buying a Kingston HyperX Fury 8GB DDR3 1600Mhz stick as my second RAM stick; http://www.kingston.com/dataSheets/HX316C10FB_8.pdf


Will both of these RAM work together in dual-channel mode just fine?


Thanks in advance.


Answer



I would buy the exact same stick that you already have again to be 100% sure that it will work.



Well RAM is sold in kits for a reason. Some motherboards react very
sensitive to this and that is also the reason why the vendors do not
support RAM that is not bought in one kit.


Altough, I think the problem with newer intel chipsets is less. But I
would choose the safer path by buying RAM in one kit instead of loose
sticks. You can try to put in that 8GB HyperX but the ram should have
the same voltage, speed and cas numbers.



However some things changed. The 3 most critical things that should match are Timings, CAS latency and Voltage. If you have 2 ram of different speeds they will adjust to the ram at the lowest speed. I personally would't risk it and buy 1 of the exact same RAM that you already have.


source


Thursday, June 20, 2019

windows 7 - Will moving a computer's hard drive move the entire operating system as well?

My laptop caught a virus. So I tried to reinstall the whole OS. But it keeps failing, says Windows cannot copy files and the installation is cancelled.


Now I can't even boot the computer. It keeps failing at the Windows logo.


I have another hard drive from my other laptop.


If I connect that to this laptop, will the operating system from that just boot as normal or is the OS and files stored somewhere else in addition to the HD and therefore operating systems cannot be moved?


EDIT


Thanks guys for the responses. When asking this I forgot the fact that the hard drive connector I had worked via a usb, so it would be useless on a computer that wasn't booting. I was in a panic when asking the question so it didn't come to mind.


Anyway I'm glad to report that all is working now. Here's what happened:



  • for the past few weeks I would notice my fans go real loud and my laptop get heated, then there would be a blue screen with the message that the computer was shut down to prevent damage to my system.


I couldn't figure out why this would happen since I wouldn't be doing anything that intensive to cause the cpu to get overworked like that. It was as if someone was using my cpu cycles to power a botnet or something.



  • another thing that would happen was when I searched something on google and clicked a link it would take me to some random ad. I have adblock installed so I would just see a blank page but the url indicated that it was an ad. Then if I googled the same term again and clicked on the link it would take me to the right site.


  • the last straw came when I started to hear auditory ads when there was no running programs on my machine. At that point I knew for sure I had a virus. So I uninstalled AVG and installed Avira and right away Avira started to popup messages saying it blocked this url and that url every 2 seconds. All these urls were ad urls.



When I tried to do scans with Avira my system crashed every time and blue screen. I managed to run scans in safe mode with both Avira and Malwarebytes and removed the infections but when I would start again in regular mode the same crashes happened and Avira telling me it blocked this and that url.


Finally I decided to reinstall and backed up my files on my external hard drive.


Then came a whole new slew of problems. Long story short I was unable to reinstall the OS and couldn't even access safe mode for a while. Finally I was able to install a old copy of windows vista. And from there a copy of Windows 7.


Now here's the funny part, after booting up my brand new copy of Windows 7 which was installed on a formatted HDD FYI, I once again was told by Avira that the same urls were being blocked. Luckily this time there were no crashes.


Then I tried TDSKiller:


http://support.kaspersky.com/faq/?qid=208283363


And did a scan with it. It found the infection and asked me to reboot to complete the cure. And since I rebooted no more alerts from Avira and things are running smooth. I have no idea how this virus survived a formatted hard disk and OS reinstall and keep in mind that I haven't even moved my old files from the external hard drive yet. But the TDSkiller seems to have fixed the issue.


Thanks again for the support.

mac - why curl certificate pinning test not work using sha1 digest?



I have a problem using sha1 digest on certificate pinning test. Using sha256 works fine, but if I use sha1 it does not work.
Why?


version of curl:
 
➜ src ./curl -V
curl 7.55.1 (x86_64-apple-darwin16.0.0) libcurl/7.55.1 SecureTransport zlib/1.2.8
Release-Date: 2017-08-14

Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets

TEST 1 using sha256
 
➜ src openssl s_client -connect uol.com.br:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst sha256 -binary | openssl enc -base64
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=19:self signed certificate in certificate chain
verify return:0
writing RSA key

d9W9zyq64Gw8JEA/siAixfvoRRwZVpSgbYJV//0CeKM=



➜ src ./curl --head --verbose --pinnedpubkey "sha256//d9W9zyq64Gw8JEA/siAixfvoRRwZVpSgbYJV//0CeKM=" https://uol.com.br
* Trying 200.147.67.142...
* TCP_NODELAY set
* Connected to uol.com.br (200.147.67.142) port 443 (#0)
* public key hash: sha256//d9W9zyq64Gw8JEA/siAixfvoRRwZVpSgbYJV//0CeKM=
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: www.uol.com.br
* Server certificate: RapidSSL SHA256 CA

* Server certificate: GeoTrust Global CA
> HEAD / HTTP/1.1
> Host: uol.com.br
> User-Agent: curl/7.55.1
> Accept: /
>
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Date: Fri, 29 Sep 2017 19:32:18 GMT
Date: Fri, 29 Sep 2017 19:32:18 GMT

< Server: Apache
Server: Apache
< Connection: close
Connection: close
< Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1
 
<
* Closing connection 0




TEST 2 using sha1
 
➜ src openssl s_client -connect uol.com.br:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha1 -binary | openssl enc -base64
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=19:self signed certificate in certificate chain
verify return:0
writing RSA key
BQr5oEtKUmTzlcelRcWvGvMnQzk=



➜ src ./curl --head --verbose --pinnedpubkey "sha1//BQr5oEtKUmTzlcelRcWvGvMnQzk=" https://uol.com.br

* Trying 200.221.2.45...
* TCP_NODELAY set
* Connected to uol.com.br (200.221.2.45) port 443 (#0)
* SSL: public key does not match pinned public key!
* Closing connection 0
curl: (90) SSL: public key does not match pinned public key!


Answer



Because curl only checks SHA256 hashes; not SHA1 hashes.



From the man page:





--pinnedpubkey



          (SSL) Tells curl to  use  the  specified  public  key  file  (or
hashes) to verify the peer. This can be a path to a file which
contains a single public key in PEM or DER format, or any number
of base64 encoded sha256 hashes preceded by ´sha256//´ and sepa‐
rated by ´;´



Wednesday, June 19, 2019

Is there any automatic Windows software to check status of website




Is there any automatic Windows software application to check status of website and alert me through mail or message or trigger am alarm..



Example:
Consider I am waiting to buy a new latest movie ticket online (through) and the ticket booking has not been informed properly (online booking is opening at a random time). In this situation I will be forced to slave for my PC to get the tickets. To avoid such situation, can you suggest me a software?



So I need a software which will alert me when the online booking is open.. Can anyone please help me?


Answer



Such an application will heavily depend on the functionality and architecture of the web site, the technologies it uses, whether it provides RSS/API or not etc. Try these methods:





  1. Check to see whether the web site provides notification options through subscription. For example, on this web site () one can subscribe to tags, and they can get daily/hourly emails when a question related to that tag is asked.

  2. Check to see whether the web site has RSS/Atom functionality and they publish a post in these formats when online booking has opened. If so, you can subscribe to RSS/Atom feeds and you will get notified through your RSS/Atom application or web browser.

  3. Check to see whether the web site provides an API for checking booking status at random/regular intervals. If so, you can develop or ask some friend or hire a developer to develop a simple application for you for that purpose. A small script or desktop/web app with email or notification functionality will suffice.

  4. If it's a popular web site, probably someone has developed an extension, gadget, widget etc. Check Google.

  5. Finally, try these websites, they seem to provide the service you're asking but I don't know whether the site you're mentioning is in their database, I haven't tried them. Use at your own risk!



windows 7 - command for restart system properly making it ask for save/close open applications

I'm trying to edit a notepad's .txt on the desktop, and then restart


Normally, when I press the restart button from the start menu, it allows me to save the .txt file


save notapad txt


And then it shows a screen asking if I want to force applications to close


proper shutdown


This is absolutely NORMAL..


But when I use command line or batch files, it does not allow me to close/save applications, and there is no force screen... It restarts the system without saving files...


I'm trying to use these commands with no success:


shutdown /r


and


shutdown /r /t 10 /c "this is a comment"


Please tell me what I'm doing wrong?

partitioning - Is there a way to partition USB flash drives, so that both/all partitions appear in Windows?



In Windows, 'removable' drives cannot be partitioned, without the partitions not appearing and receiving drive letters, apart from the first partition. Partitioned flash drives work fine in Linux.



What I want to do is partition a 8GB flash drive into two, with the first partition containing various boot disc images, which can be selected to boot from, and have various portable apps, documentation, utilities, scripts, etc, on the other partition.




I currently do this using two separate flash drives, but I want to be able to use a single flash drive for everything, which I keep on my keyring. It is not possible to do this without having at least two partitions, as the ISO boot selector for the boot disc images will not work otherwise.



I know there is a method where you can flip a bit, using Lexar's USB Format Tool, which fools Windows into thinking that the partitions are on a fixed hard drive. However, this apparently makes it difficult to eject the flash drive.



Flash drives with U3 from SanDisk had two partitions, presenting itself to the host system as a USB hub with a CD drive and standard USB mass storage device attached. This is what I would like to emulate, if possible.


Answer



Will U3 Tool do what you want?
http://u3-tool.sourceforge.net/
You can modify the CD part of a U3 stick to be larger and have different ISO images.
Not sure how to set it up to boot from the stick though, according to the info here https://en.wikipedia.org/wiki/U3_(software) it can be set up that way



windows - Command Prompt being Illogical? Want to add numbers using Rename

My camera only numbers photos using 4 digits, but I am now well into the 5 digit realm. So for thousands of photos, I would like to add a fifth digit. E.g. rename IMG_2450 to IMG_12450.


I did this before about a year ago using Command Prompt, but I'm having trouble replicating those results today.


I tried: ren IMG_.jpg IMG_1.jpg
and variations like: ren IMG_????.jpg IMG_1????.jpg


But what ends up happening is that instead of adding the number 1, command prompt ends up replacing the first character of the existing string of numbers.


So, IMG_2450 becomes IMG_1450 rather than IMG_12450.


What am I doing wrong here?

smart - How close to death is my hard drive?


I ran Crystal Disk Info to look at the SMART information on my external 2 TB drive and it's reporting a "Caution" health status. The specific error is the Current Pending Sector Count, which is 196. I have tried power cycling the drive, and it didn't get fixed. Should I be worried yet? Is this a situation where I should immediately buy another hard drive and back everything up or is there a way to fix it?


Answer



Quoting from SecurityNow! podcast number 81:



STEVE: The problem is, and in fact the reason that we’ve always used the slogan “SMART is dumb” at GRC, is we see dead drives all the time where the SMART system says, oh, everything’s fine.


LEO: It’s all working, no problem.


STEVE: Exactly. The drive can die spontaneously while SMART is completely happy and sees nothing going wrong. At the same time there are drives which look like they’re on their last throes from a standpoint of the SMART data that just keep on going for years.



Long story short, you cannot rely on SMART data in any meaningful way. If you want to play it safe, back up your data, if you want to be really safe, back up and get a new drive.


Tuesday, June 18, 2019

mac - Trying to grep the output of fs_usage with poor results

I'm trying to figure out what process is periodically and silently erasing the contents of the /etc/hosts file on a Mac. I tried using:


sudo fs_usage | grep hosts

but it only generates a few seconds of output and then returns me to the command prompt, after which trying to restart fs_usage tells me:


ktrace_start: Resource busy

Once that happens, the only way I know how to re-enable fs_usage is to restart the computer, as I can't find either fs_usage or the ktrace process. Piping the output of grep to a text file generated nothing and behaved the same way.



  1. Why is grep ceasing all output after a few seconds?

  2. How can I make fs_usage available again without restarting?

Do virus definition files typically contain definitions for other OS viruses?

Let's say I have a Mac which I believe is infected with virus. I understand the best course of action is to scan the drive from a bootable DVD. However, will this work if my DVD is a Linux distro? In other words, will the Linux antivirus download the definitions for Mac viruses and look for those?


I'm thinking that they might, to prevent using other OSes as a virus vector, but I'd like to know for certain one way or the other.


Also, I suppose that this is probably vendor-specific, but I'm wondering what the industry standard is.

boot - Can only install Windows 7 in UEFI-Legacy Mode

I have had an issue installing Windows 7 on an MSI system (FM2-A75IA-E53) in full UEFI mode which seams to be the same problem many have had without a solution. From everything I have read, this Windows 7 Ultimate 64bit OEM DVD has the needed EFI files to boot and install in this mode. However. after the files load and windows starts up the system always freezes right at the end of the red, blue, yellow, green graghic that forms the MS logo comes together just an instant before the display would normally go black for a second or two before you get the first install page to choose your language.


This system doesn't have a well defined UEFI setting in the setup. It says 'Windows 8 Compatibility' You either enable or disable it. Even though MSI does not have any good documentation on this MB detup feature, the consensus is amoung most that 'Enabled' is UEFI mode and sidabled is UEFI-Legacy or CSM mode. I had to 'Disable' this setting in order to get Windows installed. I was wanting to install in UEFI and upgrade it to Windows 10.


Do I need the UEFI mode? Does UEFI-Legacy or this CSM Mode install Windows 7 and Windows 10 in UEFI by default on a GPT disk? In other words, Does installing a Windows 7 or above OS on a UEFI machine in UEFI-Legacy or CSM mode automatically install an OS in Full UEFI mode on a GPT disk? Or does a Windows 7 install default to MBR emulation in UEFI-Legacy mode? Is there any standard practice for a system UEFI-Legacy mode to try to check drive and install system compatibility and install UEFI as a defualt.


It does have an EFI partition but no MSP (MS System Reserved) partition.


If I ultimately want a UEFI installed system, is it possible to install this UEFI or to change the type of system to UEFI afterward?

laptop - Dell Latitude D-series - battery LED blinks orange 3 times

My Dell Latitude D530 battery LED blinks orange 3 times, then turns green for a while and then again - blinks orange 3 times... over and over. What does it mean?


I found this advice on the dell.com, which says: "Flashing orange — The battery charge is low". This doesn't make much sense though, because my laptop is plugged in (charged using a power cable connected to 230V socket).




PS: How it happened: I experimented with external battery and probably did a shortcut accidentally on the external battery. The ext. battery completely discharged and the laptop turned off. Then I unplugged the external battery's power cable, plugged the 230V socket power charging cable and turned on the computer. Then the blinking started and it's still going on even after like 10 minutes. The computer seems to work normally.

USB 3.0 and USB 2.0 motherboard headers compatibility


I have a Gigabyte GA-Z77X-UD3H motherboard which comes with 2 USB 2.0 internal headers (2*5-1 pins) and 3 USB 3.0 internal headers (2*10-1 pins). The two USB 2.0 headers are occupied, as are 2 of the three 3.0 headers.


I have an additional internal USB 2.0 cable that needs to be plugged in. This answer seems to say that the 2.0 connector will not and should not be connected directly into the USB 3.0 header. Can I still use the remaining USB 3.0 header? And if so how (i.e. what kind of adapter)? At this time, I do not feel comfortable playing with the individual wiring.


I also have a PCI USB expansion card which has an internal USB plug. Could this be somehow used to connect the internal USB 2.0 cable, and what kind of adapter would let me do this?


Answer



Basically they're physically incompatible on the motherboard side, but there's very little stopping a USB 2.0 device or connector being used with a USB 3.0 header with an appropriate adaptor - a quick google search reveals there's quite a few appropriate adaptors with a USB 3.0 female to USB 2.0 male adaptor.


If you want a USB type A Male to usb male header, for use with that PCI cards try this search. You should be able to plug in the header on the device side to the male header, and plug that right in.


So yes, physical incompatibility aside, USB 2.0's pin out is a subset of USB 3.0, and with the appropriate parts, you can, in fact, plug in a USB 2.0 plug into a USB 3.0 header on the motherboard.


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...