Sunday, March 31, 2019

partitioning - Dualboot Windows can't boot after cloning partitions to new SSD


I have a dual-boot system with Kubuntu 16.04 and windows 7, both systems spread over multiple partitions, when I added a new SSD to the system.
The plan was to copy the windows system-partition, the kubuntu system-partition and the kubuntu home-partition to the SSD and then expand the remaining partitions on the old drives. Now I'm not able to boot windows from the SSD.

Here is the output of fdisk at my current state. sda is the new SSD.


nk@nk-desktop:~$ sudo fdisk -l
Medium /dev/sda: 465,8 GiB, 500107862016 Bytes, 976773168 Sektoren
Einheiten: sectors von 1 * 512 = 512 Bytes
Sektorengröße (logisch/physisch): 512 Bytes / 512 Bytes
I/O Größe (minimal/optimal): 512 Bytes / 512 Bytes
Typ der Medienbezeichnung: gpt
Medienkennung: 0459D5F1-2A66-46F5-9009-689A496A5C55

Gerät Start Ende Sektoren Größe Typ
/dev/sda1 2048 10239 8192 4M BIOS boot
/dev/sda2 354947072 600700927 245753856 117,2G Linux filesystem
/dev/sda3 600700928 976773119 376072192 179,3G Linux filesystem
/dev/sda4 10240 354947071 354936832 169,3G Microsoft basic data


Die Einträge der Partitionstabelle stimmen nicht mit der Reihenfolge der Medien überein.


Medium /dev/sdb: 931,5 GiB, 1000204886016 Bytes, 1953525168 Sektoren
Einheiten: sectors von 1 * 512 = 512 Bytes
Sektorengröße (logisch/physisch): 512 Bytes / 4096 Bytes
I/O Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Typ der Medienbezeichnung: dos
Medienkennung: 0x58e31cc0


Gerät Boot Start Ende Sektoren Größe Id Typ
/dev/sdb1 * 2048 478965759 478963712 228,4G 7 HPFS/NTFS/exFAT
/dev/sdb2 478965760 1707765759 1228800000 586G 7 HPFS/NTFS/exFAT
/dev/sdb3 1707765760 1953519615 245753856 117,2G 83 Linux


Medium /dev/sdc: 931,5 GiB, 1000204886016 Bytes, 1953525168 Sektoren
Einheiten: sectors von 1 * 512 = 512 Bytes
Sektorengröße (logisch/physisch): 512 Bytes / 4096 Bytes
I/O Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Typ der Medienbezeichnung: gpt
Medienkennung: EB2C9293-03F5-4F36-B907-4BE2FA71A17A


Gerät Start Ende Sektoren Größe Typ
/dev/sdc1 2048 308975615 308973568 147,3G Linux filesystem
/dev/sdc2 1912559616 1953519615 40960000 19,5G Linux Swap
/dev/sdc3 308975616 1912559615 1603584000 764,7G Microsoft basic data


Die Einträge der Partitionstabelle stimmen nicht mit der Reihenfolge der Medien überein.

I already copied the two linux partitions /dev/sdb3 and /dev/sdc1 (and resized the home-partition) to the SSD and created a bios-boot-partition for the grub-loader. The remaining space on sda was to small for the windows-partition /dev/sdb1, which I anyway planed to shrink down, so the plan was to clone it to an external drive, resize the copy and then clone it to the SSD.


For some reason GParted tells me it cannot read this partition because of missing packages (ntfs-3g / ntfsprogs). ntfs-3g is already installed, ntfsprogs doesn't seem to exist and GParted works fine on other ntfs-partitions, so I finally dded the partition to the external drive (without any errors) and booted to windows, to use the partitioning-tool from windows 7 to resize the partition.


After that I dded it to the SSD, and installed grub on it, by chroot to the kubuntu-partition on the SSD and then using grub-install. The grub-menu shows all four systems (I left the original partitions on the other two drives, as backup). I can boot to all two kubuntu-systems, and the old windows-system, but when I try to boot windows from the SSD, the screen just shows a blinking underscore in the upper left corner and nothing else happens.


I'm not sure, what the problem is, because there is no error message when I try to boot windows. Did I forget something while copying the partition or did the resizing cause the partition to become unbootable?


Answer



I reinstalled both systems in UEFI mode. I had to create a new ubuntu installation cd, which was able to boot in uefi mode. I'm not sure, why the live-stick, I tried before didn't work.
I run into more problems by reinstalling windows first. The windows installation-cd installed an unreadble bootvariable in the efi partition, which prevented any uefi-related programm from executing without errors, so I saved the microsoft folder from the efi partition, reformatted the partition and let the kubuntu-installer create the efi partition. After that I copied the microsoft folder to the new parition and added the boot-entry manually with efibootmgr, so the windows installer didn'T had a chance to screw up the partition this time and it worked.


drivers - Windows 7 login screen displays CTRL+ALT+DEL then goes black, cursor visible


I have a Dell Precision 450 (Win7 Ultimate x64). We were moving house, so it spend a good bit of time in a storage unit, just set it up a few days ago (hasn't worked since I got it back).


When I power up everything looks fine.. Then I get to "Press C+A+D to login", when I do it displays the usernames, login background as normal. If I try click on something (anything, even 'blank' screen (wallpaper) or sometimes just moving the mouse will cause the entire screen to go black (actually 3x monitors). Cursor is still visible and moves, will move between monitors ok.


Pressing CAD again will bring back the login screen for a second, moving the mouse etc goes back to black.


I read about DirectX updates causing similar problem so booted into safe-mode successfully (works fine for safe-mode, so in my limited experience this tells me it may be a driver issue).


Did a system restore (earliest I could), no luck. Rolled back drivers for my graphics card (Radeon Sapphire), no luck..


Any ideas/suggestions very much appreciated!


Answer



If you're experiencing visual artifacts when you move the mouse, and they disappear in safe mode then it's definitely an issue with your graphics driver or your video card. Did you try with less monitors connected? 3 monitors could possible be causing a problem with your video card, i.e. the combined resolutions you set could not be supported by the available bandwidth on your card. First try lower resolutions and less monitors. Also update your driver to the latest version, don't roll back, the latest drivers will have the latest fixes for such issues. If these don't fix it do a clean install of the graphics driver (i.e. remove the old driver completely, google for how to do this).


Office 2007 switch to English language

One of our costumers has purchased a non-English version of MS Office 2007, and he wants to switch the whole suite to English interface.


Is that possible? If yes, does anyone have a link to it?

Access RAID hard disk drive externally on Windows 7 or 8

We are using Iomega StorCenter ix2 for making our backup. Unfortunately last week it stopped responding and accessing. Earlier I was able to ping the device and only able open it through browser, but could not access the data by browser or by even file explorer. But yesterday ping and opening through browser also stopped. I have a huge data stored on that hard disk which i need to access.


I have attached the hard disk drive externally to my Windows 8 pc. In disk management, it shown up but only option available was delete volume, rest of the options were disabled. The size is 100% free. It’s a normal desktop PC which does not have any raid configured.


Please guide me how to access the data of RAID hard disk attaching externally to Windows 7 or 8.

windows 10 - Files on my secondary hard disk keep disappearing and can be recovered with CHKDSK /F, but CHKDSK /R and SMART find nothing wrong

My desktop has an SSD (840 Evo) as my boot drive and a 3TB WD Red as my data storage drive. I recently reinstalled Windows 10 on my desktop because it was becoming pretty bloated, and since then I've been getting issues with folders frequently disappearing off of the secondary drive.


I'm using directory junctions to move my user folders like Documents, Downloads off of my SSD onto the HDD because I don't have much space on my SSD. From what I can tell I've only had folders disappear from the directory where I keep all of my migrated 'user folders'.



  • Wasn't an issue until I reinstalled windows 10

  • The folder contents can be recovered using CHKDSK /F to found.000, found.001

  • Happens daily, but generally only after using the computer and writing to the directories

  • SMART reports no bad sectors, CHKDSK /R gave it a clean bill of health

  • The SSD is not having any issues with file corruptions, nor is another SSD I've been using in the system to hold things like VM's where disk performance is a bottleneck.


Does anyone have any ideas? This is getting irritating and I'm wondering if it indicates impending drive failure or some other hardware problem.
I've got a backup of the most important files and folders off the disk.


A pastebin of the most recent output of CHKDSK /F can be found here: http://pastebin.com/Xk2wPjvc


Any help would be greatly appreciated.

ubuntu - What is the best way to keep subversion users and passwords in synch with Linux users?

I'm not sure what is best, keeping subversion users and passwords in synch with linux users and passwords or just having linux somehow provide subversion authentication service.


I'd prefer to just maintain only linux users since I find it easy to add and remove users on ubuntu. I'd like to issue the command "sudo adduser developer" and "developer" immediately have access to subversion repositories.


At the moment, I must first create a linux user then create subversion user with the following:


sudo htpasswd -m /var/lib/svn/mainrepo/conf/htpasswd developer


Is there a better way?

windows 7 - You don't currently have permission to access this folder

I'm trying to understand an error on Windows 7 Professional Edition:



You don't currently have permission to access this folder



This error shows two buttons, Continue and Cancel. The folder is C:\windows\system32\tasks, but it could be any system folder.


I'm in an Admin account. I click Cancel, open Explorer and check effective permissions on C:\windows\system32\tasks for the Admin account.


Everything is checked.


So why do I get the "You don't currently have permission to access this folder" error when trying to open the folder?


And what permissions does the Continue button set that hasn't already been set?


Just trying to understand how this works, and eventually to set permissions on a task so a non-privileged user can run it.

Saturday, March 30, 2019

Windows 10 Pro Fall/Creators Update (1703 & 1709) losing local admin password or account after joining domain

We are on a Windows Server 2008 R2 domain (planning to upgrade to 2016) and have recently starting having trouble with the local admin account losing its password and, more recently, disappearing altogether. We also have a GPO policy that enforces the default admin account to have "Password never expires" and "User cannot change password" enabled.


Starting with Windows 10 Creators Update (1703), I started finding computers where the local admin account had no password. At first, this escaped my notice, thinking that I somehow neglected to give it a password, but I started noticing it more often and realized it wasn't just me spacing off on a repetitive task (besides, standard Windows setup walks you through that step, so it would take extra effort to skip it). The common thread is that these were machines that were originally setup with a fresh install of Windows 10 1703--machines that were upgraded from an earlier edition to 1703 are not having this issue. Now I am starting to set up machines with Fall Creators Update (1709) and there is a new twist: it may also delete the local admin with or without also obliterating its user folders as well.


In my third re-install of 1709 on a particular machine, I took careful notice of what was happening and when. When you first install 1709, the primary user (we set up as default local admin) account and password is fine. Upon joining to 2008 R2 domain, the password disappears and the machine will not allow you to check BOTH "user cannot change pwd" and "pwd never expires," giving a message that "This operation is disallowed as it could result in an administration account being disabled, deleted or unable to logon." Having re-entered the password and leaving "User cannot change pwd" UN-checked, everything seems fine. It appears that it's specifically the "User cannot change password" that creates the conflict. The biggest problem is that the password gets erased or the account gets annihilated without any notice whatsoever.


Has anyone seen this and have a solution? What changed in 1703/1709 that may be causing a conflict? Is it just the combination of Server 2008 R2 and Win10 1703 and later?

regex - Unix delete with find: Delete all files that are listed in a file



In my root directory, I have a couple folders named something like AA, BB, CC etc., each containing files in the format AA1001.txt, BB1002.txt etc.
In my root folder, I also have a file all_to_delete which has a bunch of file names separated with newlines, thus looking something like this:





AA1004.txt



BB3004.txt



BB3005.txt ...




I now want to go through all subdirs in my root directory and delete all files that match the given filename. Until now, I have tried something like:



while read line; do find . -type f -name $line -exec rm -f {} \;; done

Though, this cannot work as already while read line; do find . -type f -name $line; done does not match any file (as the find gives its output as ./AA/AA1001.txt ...)



Do you guys have a solution for me?


Answer



Given a file with filenames, the easiest thing to do would be to read it line by line, and pass it to find. However, this will result in a separate instance of find for each file name and can become very slow for large lists of files and many files in a directory tree.



Instead, I would do something like this:



find . -type f -name "*txt" | grep -wFf to_delete.txt | xargs -I{} rm '{}'



The trick is to give grep your file as a list of patterns to search for (-f). The -F makes sure your filenames are treated as strings and not regular expressions, that way your file names ca contain special characters like * or [ or |. You then pass to xargs and use quoted '{}', otherwise it fails on white space, to delete the files.



NOTE: This assumes that your file names are all unique, that one name cannot be contained in another. For example, that you don't have files called foo and foobar. If you do, given a pattern foo, this will delete both files. To avoid this use:



while IFS= read -r line; do find . -name "$line" -delete; done < to_delete.txt 


From man find:




   -delete
Delete files; true if removal succeeded.

macos - iTerm2 hotkey window activates non-hotkey windows

When I set iTerm2's hotkey mode on Mavericks, opening the hotkey window also brings any open non-hotkey terminal windows to the front. Is it possible to have iTerm bring focus only to the hotkey window rather than bringing all its windows into focus? I've considered running two iTerm processes, but since they source from the same preferences file, I can't turn the hotkey off for one and on for the other.

macos - How come my Intel 520 180GB SSD performs extremely poorly?


I recently installed a new Intel 520 series 180GB SSD in my brand new MacBook Pro.


The system is as follows:


Model: MacBook Pro 15-inch, Late 2011 (MacBookPro8,2)
Processor: 2.4 GHz Intel Core i7
Memory: 16 GB 1333 MHz DDR3
Graphics: AMD Radeon HD 6770M 1024 MB
Software: Mac OS X Lion 10.7.3
Main Drive Bay: Intel 520-series 180GB SATA-3 (6GB/s negotiated link) SSD (Firmware: 400i) [80GB free]
Optical Bay: Toshiba 5400 RPM 750GB SATA-2 HDD
Trim: Enabled (according to Trim Enabler App)


And here are the speeds I'm getting:


enter image description here



Read: 412 MB/s
Write: 186 MB/s



What have I done wrong?


Ok, so I was informed in an answer that this could be because the test uses compressed data which will not allow the Intel 520 series SandForce controller to reach it's high write levels to to its architecture.


Here's another test (don't know if it uses compressed data or not):


enter image description here


It's better, but still not what I'm looking for.
By the way, what's up with 32MB/s for 4k read operations?


Results expected:



Read/write both > 500MB/s



I have seen benchmarks with lesser SSD:s (SATA-2 even) outperform my write-speeds by far.
Also, Intel 520 SSD:s are supposed to be the top class of SSD:s.


Trim Enabler report:


Trim enabler report


This looks a bit odd compared to screenshots from their site:


Trim enabler sample report


These is the defined S.M.A.R.T attributes (taken from Intel):
enter image description here


And here are my S.M.A.R.T attributes read using smartctl tool from smartmontools:
enter image description here


They don't seem very compatible. I'm going to try and look for a S.M.A.R.T attributes reader tool for OS X which might support Intel 520 series.


EDIT:


I've solved my problem by buying a MacBook Pro Retina which uses a PCIe2-2x SSD. Benchmarks below:


Benchmark for MacBook Pro Retina SSD


Answer



The drive you are testing (Intel 520) is based on a Sandforce controller, these controllers rely heavily on data compression to achieve the stated speeds. As a result you will happily saturate a SATA-III link when doing sequential tests on compressible data, however these speeds can drop by up to an order of magnitude (depending on the exact drive) when running tests with incompressible data.


From what I can gather from the attached screenshot, the test you are using appears to be writing image frames to disk to test its performance - images are not trivially compressible even when in uncompressed/lossless form. From my experience those numbers are in the correct ballpark for a SF-28xx controller doing sequential benchmarks on incompressible data.


The following comparison on AndandTech shows the difference between the Intel 520 (60GB) when doing tests with compressible vs incompressible data. This is a smaller drive capacity than yours meaning the effect will be less pronounced at higher capacities (240GB), but the I feel this illustrates the issue.


Other drives based on non-Sandforce controllers exist, such as the Crucial M4 (Marvell), Samsung 830 (Samsung) or Intel 510 (Marvell), these do not leverage compression and as such don't suffer from the same variation in write speed.


vba - Excel - Copy data from multiple sheets to one sheet



I use a program that exports data to multiple sheets and I need these all in the same sheet under one another.



About the worksheets - They vary in names every export, so this needs not be defined, as there are sometimes 100+ different sheets.




Inside the worksheets - Is data of varying rows and columns (and I need it to copy until blank row into the main sheet at the next available row that is blank).



The worksheet that all the data needs to be copied too - This will initially be blank, however I need all the data on top of one another based on a row copy from the other worksheets. (this can have a defined name if required)



I'm new to VBA, so hopefully explanation above helps.



My current VBA not working:



 Sub SheetLoopPasteData()


Dim ws As Worksheet
Dim wsSheet As Worksheet
Set wsSheet = Sheets("Sheet2")

For Each ws In Worksheets
ws.Activate
variable = Cells(Rows.Count, 1).End(xlUp).Row
Rows("1:" & variable).Copy _
Destination:=wsSheet.Range("A" & (wsSheet.Range("A" & wsSheet.Rows.Count).End(xlDown).Row + 1))


Next



End Sub

Answer



I would like to suggest VBA (Macro) will help you to Copy used range from all Worksheets into New, exactly works as Data Consolidation.



Sub CombineData()


Dim I As Long
Dim xRg As Range

On Error Resume Next

Worksheets.Add Sheets(1)

ActiveSheet.Name = "MasterSheet"


For I = 2 To Sheets.Count
Set xRg = Sheets(1).UsedRange

If I > 2 Then
Set xRg = Sheets(1).Cells(xRg.Rows.Count + 1, 1)
End If

Sheets(I).Activate
ActiveSheet.UsedRange.Copy xRg
Next


End Sub


How it works:




  • Copy & Paste this code as Module.

  • Macro will create new sheet in existing Workbook named as MasterSheet, which is editable.

  • In place of copy data from Top Row to last, I've used the UsedRange method, since will accommodate every updates.



Friday, March 29, 2019

windows 7 - How to find out what program took over control over Print Screen key?


How to find out and change what program responds to PrintScreen key press? Right now I use Greenshot and it fails to assign "Capture region" to PrintScreen.


The error still persists:


http://i.stack.imgur.com/nAFxx.png


Answer



The utility Hotkey Commander should be able to show which application has claimed Alt-PrtScn.


You might also try the following.



Why does the Print key not work in some windows?


If you are using Windows Vista or later and have Greenshot running
without admininstrator privileges, while the currently active (i.e.
focused) program window is running with administrator privileges,
Windows’ User Account Control will not notify Greenshot that the
Print key has been pressed.


However there are some easy workarounds for this problem:



  • Run Greenshot with administrator privileges.

  • Click somewehere else (e.g. task bar) to deactivate the current window, before hitting the Print key.

  • Use Greenshot’s systray context menu to create a screen capture.



http://getgreenshot.org/faq/why-does-the-print-key-not-work-in-some-windows/


wireless networking - 412 Precodition Failed error only occurs on certain networks

One of my favorite websites: http://jessiejofficial.com (yes, I'm a Jessie J Fan :')) has recently started displaying the error message "412 Precondition Failed" whenever I visit it from my home network, even when I use Tor Browser.


At first I thought that this was an issue with the whole website, however I have contacted the web developer and he has said that they has been plenty of hits within the last 48 hours. Plus, I discovered tonight that I can access the website from my phone, through the mobile network.


So it appears to just be my network as all of the devices in my house connected to the WiFi display the same error when I try to visit any page of the site. However there have been no changes that we are aware of or are noticeable to our network since the website was accessible, and I have just heard that another person in a different part of the country is experiencing the same difficulties also.


Any help/advice/suggestions would be appreciated greatly


Update: When trying to ping 'jessiejofficial.com' in Windows command prompt the request times out on all four attempts, on any computer connected to the wireless network. I can now also confirm that the same thing occurs on my MacBook Pro.

windows 10 - What's the Proper Way to Shutdown / Restart a laptop, if it is not responding?

I came across a program that is not responding, and I don't know how to restart the laptop properly.



If you're thinking that I should long press the power button to turn off the computer, no! Yes, it will shutdown the computer improperly, and I could just power it back on. (Just like a restart ...)



But, if I do the things mentioned above, it would damage my hard disk (my laptop only have 1 hard disk). If I power it back on again (after long - pressing the power button), it would do a Disk Check (Scanning and Repairing of the Drive), which takes a long time.




The Disk Check starts quickly, but when it reaches 60%, it runs slowly; but then, when it's 66% / 67%, after some time it would immediately be 100%.



Some things, I think, that is slowing down my computer:




  1. IRQ8




    • I had enabled this setting through Ultimate Windows Tweaker for Windows 10, and everything is just freezing.



  2. Windows Insider




    • I had enabled this on my laptop, and the results is what is expected. It is running very slow, so I decided to just disable this setting.




One more thing, I had disabled the Windows Update service through services, to get rid of that "Getting Windows ready, Don't turn off your computer", which appears at boot.



So, what is the best and the proper way to shutdown / restart a laptop, if it is not responding?

Windows Server 2003 Graphics Issue

A few days ago I restarted my server, it may have installed a few updates, but after it started it looked really off. The drop shadows are not showing even though they're enabled, MS Office 07 and Frontpage 03 look like something from the 90s, and IE is displaying fonts and colors strange. The theming service is active and "Windows XP" theme is enabled. I'm trying to test in IE and everything is distorted. (Chrome and FF work fine, as does CS6) How do I fix this?


Some Pictures:



64 bit - Getting 'running low on memory errors' on Windows 7 64-bit with 8GB RAM



I have a new Dell laptop running Windows 7 64-bit with 8GB RAM. If I leave the system running overnight I start getting low memory errors the next day. Looking at Task Manager it shows 6.27GB used but looking at the processes list the totals don't show nearly that much. I am showing all processes from all users.



I have also looked at the processes with Process Explorer and see the same results.



Using Resource Monitor I see 4165MB in use, 2328MB modified and 1352MB standby with only about 345MB free. These numbers don't seem to add up to what I have running (Visual Studio 2010 along with a number of IE8 sessions).



I have run the same set of apps on Windows XP SP2 32-bit with 4GB of memory and never had this sort of problem.




What is modified memory? What is standby memory?



Any suggestions on what might be the issue and how to fix it?


Answer



If you have process explorer, check under Kernel memory - when my nvidia graphics driver crashes, I leak about 2gb of memory into there.



If you're looking at the paging lists in process explorer, it breaks down as follows:
Zeroed - These pages are unused and have been overwritten with zeroes.
Free - These pages aren't allocated at all.

Modified - An application has changed this page, and it needs to be written to disk before it can be replaced.
ModifiedNoWrite - An application has changed this page, but it doesn't need to be written back before being replaced.
Standby - These pages were recently in use. If they are needed, then they can be reallocated to another application.
The priority levels below show how likely windows thinks the page is going to be needed again. If an application uses a page once every second, then if windows reallocates that page to another application, it'll have to allocate it back every second, so that's not very useful if we have a page that was used 20 min ago by a background application and hasn't been used since that we could reallocate instead of shifting the same page back and forth between two applications every second.
Your "available" memory is Zeroed+Free+Modified+ModifiedNoWrite+Standby



As for fixing it, if it's a driver that's crashing or leaking memory, you just have to replace the driver with a newer or older version that doesn't have this problem. Sadly I don't know of any way to see how much memory is allocated to each driver, though on a high-end system with 150 processes and 50000 handles open (steam, WoW, several editors, google chrome w/40 tabs), I'm using about 500mb of paged physical kernel memory, 500mb of paged virtual kernel memory, and 150mb of nonpaged kernel memory. If you're off by whole gigabytes when it's complaining about memory issues, a driver is misbehaving somewhere. The rest of your memory should be accounted for in the process list.


Thursday, March 28, 2019

microsoft excel 2010 - Counting commas in a text string and adding a new line


I have a huge file (1400 pages, a single string of text) I am trying to make readable in Excel. The file contains comma seperated values, getting this into Excel is normally not a problem, except that the information should be on multiple lines in Excel, and not all on the same line as it is in the document.


What should be one line of information is seperated by 115 commas.


My plan was to use Notepad++ to count 115 commas, make a new line, count 115 commas, make a new line until it has gone through the whole document. After this operation it should be easy to get it structured in Excel. I have however been struggling putting the needed expressions together.


If there is another more sensible way to do this I am all ears, it might be I'm on the wrong path. I've been trying to use the find/replace tool (CTRL+H) in Notepad++.


I have been trying to use "find what":


(,*?)\,{115}


The problem is that this is looking for 115 consecutive commas, but I need it to count the 115 first commas in a line of text, and then make a parapraph/new line and do it again. Any help/pointers would be much appreciated. I've been spending quite some time trying to find the answers.


Answer




  • Ctrl+H

  • Find what: (?:.+?,){115}\K

  • Replace with: \n or \r\n

  • check Wrap around

  • check Regular expression

  • NCHECK . matches newline

  • Replace all


Explanation:


(?:         # start non capture group
.+? # 1 or more any character, not greedy
, # a comma
){115} # end group, must appear 115 times
\K # forget all we have seen until this position

Replacement:


\n          # a line feed, change it to \r\n for windows files

This will keep the comma at the end of each line. If you want to remove it, use:


(?:.+?,){114}.+?\K

ubuntu - Is it possible to mount an LVM built on one machine onto another?


I've got a system with three drives that's build as a set of volume groups, under Ubuntu.


I'm moving the drives to my Gentoo server, which has space for all three.


Is it possible to somehow get the Gentoo box to see the existing volume groups somehow? vgscan and vgchange -a y don't seem to indicate that they see any of the volumes - is there some other sort of hackery I need to do to accomplish this?


Many thanks.


Answer



I've scored everyone up as you've all helped in some way of getting me to where I needed to be. I'm filling out this answer for completeness should anyone else ever find themselves in the same bind.


My issues were several, so I'll try and outline them:


On the new box, I failed to (in no particular order):



  1. Have the appropriate file system
    module available (ext4)

  2. Have the appropriate RAID kernel
    modules available (RAID456)

  3. Mount the software RAID devices I
    had created (mdadm --assemble
    --scan)

  4. Marked the filter in
    /etc/lvm/lvm.conf to accept the md
    device as a possible vggroup


After all that, the VG loaded fine and I am able to mount the LV that were created.


Now I just have to figure out a way to remove the miscellaneous md devices I created and merge it all into the VG... If that's possible. Expect another SuperUser question from me shortly. :)


Thanks everyone!


Windows 8.1 standalone updater hangs searching for updates on computer


There are some similar threads but I am quite certain this is not quite a duplicate of any of them.




I have a machine at home with dual boot openSuse Linux and Windows 8.1. I don’t use Windows that much and auto updating was disabled so as a result my Windows instance has not received any updates since 2016/1/13. I tried to update but I’m having trouble doing so. Here is what happened in chronological order



  1. Attempted to update. Going to Windows Update triggered a search for updates which failed and threw an error code (which I will place here if I remember/can find it)

  2. Investigated this error code and found that it is possibly due to the long time that had elapsed since my last update which caused a large response for updates hence causing the process to crash (?). The solution was given to be to simply try again.

  3. To speed things up I tried to set up a WSUS mirror(?) from my university. I was given a pair of registries (one for automatic update and one for manual). Added automatic update registries and tried again. (I stopped wuauserv during this process then restarted it).

  4. Windows Update cheerfully informs me that not only am I set up for automatic updates, but that it had just that moment checked and there are none to download and install. This is egregious since I know there has been at least one update between 2016/1/13 at 4pm and 2019/9/29 at 12:55pm.

  5. Force it to check again. It’s taking a while so I leave my desk for a few hours and come back. The window is now showing the control panel home page. I go back to updates and it shows the same thing: Auto updates good, no updates, last checked 12:55.

  6. Reboot. No auto update on startup. Try again in Windows Update. Same result.

  7. Try the non-auto-update registry. Windows update still tells me I’m set up for auto updates by my administrator. And that it’s checked at 12:55 and there’s nothing to do. Force it to try again and no cigar.

  8. give up for the day

  9. Use a third registry from my university’s computer center which is supposed to disable the other two, and set up only the non-auto-update registry. Nope (see VI).

  10. use that third registry again. Go to HKEY_LOCAL_MACHINE/Software/Policies/Microsoft/Windows/WindowsUdate/AU and ensure those registries are not there. Side note: I now suspect they could still be active, but somewhere other than where I checked. I tried Windows Update one last time to the same result.

  11. Out of desperation ask Microsoft Support’s AI assistant. Actually get pointed to some useful threads.

  12. Take the recommendation to download this manual patch: KB3102812 which starts a process wusa.exe (presumably standing for Windows Update StandAlone). This opens a window, which says that it’s starting updates or something of that nature, but then gets stuck at “searching for updates on this computer”. Cancel button does not work.

  13. Investigate this occurrence. I find some results, in fact on the StackExchange network (I will add a link when I find it), which say I should disable wuauserv before doing this. And that there is a newer wusa: KB3138615

  14. Disable wuauserv and try both. No change in behavior.

  15. Disable WindowsUpdate in services.msc and try net stop wuauserv just to make sure, and try again. Reboot and try again. Again, in both patches, no change in behavior.


I am at a loss at this point and I’d appreciate to know what others think I should do. If it wasn’t clear from my idiocy I am not particularly familiar with Windows.


P. S. the patch seems to restart wuauserv again (although it does not appear in services.msc).




Update: I could not find a good way to integrate this new information to the existing body, so here it is in this new block of text. A few events have transpired.


Here is some (incomplete) CSV information about the update on 2016/1/13


Description, ID
Update for Windows 8.1 for x64-based systems,KB2976978
Security Update for Windows 8.1 for x64-based systems,KB3109560
Security Update for Windows 8.1 for x64-based systems,KB3114500
Security Update for Windows 8.1 for x64-based systems,KB3109853
Security Update for Windows 8.1 for x64-based systems,KB3121461
Security Update for Windows 8.1 for x64-based systems,KB3121212
Security Update for Windows 8.1 for x64-based systems,KB3124001
Security Update for Windows 8.1 for x64-based systems,KB3123479
Security Update for Windows 8.1 for x64-based systems,KB3121918

I have omitted the MSOffice, etc. updates


Here is some more information:



  1. Seems to be that the last update before 2016/1/13 was on 2015/12/9.


  2. The most recent “cumulative update” is KB3000850 on 2015/7/11.


  3. There don’t seem to be any recorded updates in the update history before that.


  4. KB2976976 unlike some suspected is an update that Windows released soon after Windows 10 and kept re-releasing once every couple of months to get people who hid it to install, which does something like checks to see if you have the latter installed on your machine and also periodically sends some data to Microsoft! Yuck. This kind of tomfoolery is one of the reasons I don’t like to use Microsoft products. (Failures like the subject matter are another).


  5. So what happened after I wrote this post is I tried to install 3138615 again. It again looked like the operation was DoA. But, the devil on my shoulder suggested I let it run for a while, so I did, and left my house. Upon returning some 3-odd-hours later I saw that the install very much did complete! And not only that, it seems to have woken up the updater, since before I clicked reboot I took a look at the updater which had magically found “500M-2.2G” to download and install (despite claiming it hadn’t searched since 9/29/2019 when apparently there were none). What a great day.


  6. But don’t think the fun is over. I have started the install process and it seems to be dead. I will observe this behavior and (if it doesn’t work) try the older KB3102812, and update. If it does work, I will answer my own question to help any others who have this issue.



Thank you to @Ram in the question comments.


Answer




So what happened after I wrote this post is I tried to install 3138615 again. It again looked like the operation was DoA. But, the devil on my shoulder suggested I let it run for a while, so I did, and left my house.



KB3138615 was replaced by KB4516067. Technically, KB3138615 was replaced by three dozen different updates, the most recent is KB4516067. KB4516067 is the only update you should attempt to install, this will decrease the amount of time, it takes your system to search for updates. Your system will still have to download other required updates, if your system does not have a required update, attempting to install KB4516067 provide the appropriate notification.



KB2976976 unlike some suspected is an update that Windows released soon after Windows
10



Due to the fact KB2976976 does not exit on the Windows Update catalog website it cannot be downloaded. I cannot tell if the update was superceeded by another update, however, I suspect the update was optional.



But don’t think the fun is over. I have started the install process and it seems to be dead. I will observe this behavior and (if it doesn’t work) try the older KB3102812, and update. If it does work, I will answer my own question to help any others who have this issue.



Spending your time trying to install old updates that have already been superceeded by another update is not a productive use of your time. You should not spend time trying to get KB3102812 to install. Any issues with Windows Update will be resolved by installing the more recent Monthly Quality Rollup updates like KB4516067



This kind of tomfoolery is one of the reasons I don’t like to use Microsoft products. (Failures like the subject matter are another).



This entire issue could have been avoided if you had kept your system updated.
The problem you are experiencing is due to the fact, you are attempting to install hundreds of updates, released over a very large timeframe. Windows Update recieved numerious improvements over the years, to make the process of finding, processing, and installing appliciable updates actually faster. Due to the fact your system did not recieve those patched, due to manual intervention, your system now has problem finding the newer updates. This issue would exist if you were to install an unmodified Windows 7 RTM installation today. I can confirm the problems you are encountering would been a problem for any version of Windows 10 that is no longer supported. Windows Updates improvements were released to all supported versions of Windows in 2016 timeframe. In the 2016 timeframe Microsoft, went to cumaltive updates, instead of individual patches for each issue. Windows 7, Windows 8, and Windows 8.1 Update recieve monthly Security and Quality (Quality of Life) and Security Only cumlative updates.


windows xp - 8GB RAM on XP Professional

I recently installed 8GB of RAM onto a quad core workstation (HP xw8600) running Windows XP Pro (32-bit). I added the /PAE switch in the boot.ini file, but the SysInfo is saying 3GB total memory still. Is Windows recognizing the extra memory? Is there a way to tell?


Any help is appreciated. Thanks.

Wednesday, March 27, 2019

data recovery - Trying to recover an SATA HD




I had a external USB SATA formatted with FAT32, which is dead, with documents, photos, etc. I changed the PCB of the drive and now at least is spinning and making some noise.



Now I'm plugging it into my openSUSE linux (with a SATA quickport XT) but nothing happens.



The USB is mounted in /dev/sdb



I tried the following:



# mount /dev/sdb /mnt 
mount: /dev/sdb: can't read superblock



# fsck /dev/sdb
fsck de util-linux 2.25.1
e2fsck 1.42.12 (29-Aug-2014)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb1
Could this be a zero-length partition?

# smartctl -d ata -A /dev/sdb smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.16.7-7-desktop] (SUSE RPM) Copyright (C) 2002-14,
Bruce Allen, Christian Franke, www.smartmontools.org Read Device

Identity failed: Invalid argument


Reading this web page I think I ruined the partition with this command... Yes, I'm fool enough to execute commands without understanding at all! :(



# sudo mke2fs -n /dev/sdb
mke2fs 1.42.12 (29-Aug-2014)
¡/dev/sdb es todo el dispositivo, no sólo una partición!
¿Continuar de todas formas? (s,n) s
Se está creando El sistema de ficheros con 244190646 4k bloques y 61054976 nodos-i


UUID del sistema de ficheros: e986eb08-a919-4fe8-98f3-30cc8ff49572
Respaldo del superbloque guardado en los bloques:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848


But anyway, hard drive still is not recognized, fsck is not working.




Now I have fear. I don't want to lose the data, I want to recover it.



What can I do?


Answer



Try to run fdisk -l /dev/sdb to see if the partitions are valid. If so, you could be trying to access the wrong partition (/dev/sdb instead of /dev/sdb1). If the partition are valid and you are acessing the wrong one, you could try to access the correct one instead.



But if the partitions are not valid, I don't think you will be able to recover anything from this drive in the current state. Using a data recovery program (or company) could recover some data from it, but if the partition is damaged, probably the disk is damaged as well.


windows - MDT 2013 Update 1 - Stalling at "Processing Bootstrap Settings"


Current setup



  • Microsoft Deployment Toolkit (MDT) 2013 Update 1 (recently released version)

  • All images done from Windows 10 Enterprise machine using HyperV

  • Windows 10 and Windows 7 images and task sequences

  • Windows 7 image works both deployment and capture of VM

  • Windows 10 stock image (install.wim from ISO) deploys fine


Goal



  • Deploy Windows 10 image from MDT

  • Customize image (remove stuff, update stuff, install stuff)

  • Recapture new Windows 10 image


Problem


Following the customization of the deployed image, the attempt to capture fails. I take a snapshot first, then I map the drive to our network share, and can access it without issue. I navigate to the scripts folder, and run litetouch.wsf. **It stalls at "processing bootstrap settings". The progress bar just doesnt move.


What I've attempted so far



  • Running from the default administrator account, as well as a secondary account

  • Regenerating the boot image completely

  • Mapping to the IP instead of the FQDN

  • Running the litetouch.wsf in a command line.

    • This produces a bit of text that you can see here this screenshot



Question


Since this is fairly new as far as updates go, there isn't much that I can find out there as to why my capture task sequence works with Windows 7, but fails to get past this part in Windows 10. I can post my bootstrap.ini if requested (with identifying markouts) The command window starts the "About to run command" portion, stalls for a second, and then gives me the "command completed" without the progress bar moving.


Anyone have any thoughts?


EDIT: As requested, here is my bootstrap.ini:



[Settings] Priority=Default


[Default] DeployRoot=\IPOFMYMDTSERVER\CaptureShare


UserDomain=OURDOMAIN



And here is the customsettings.ini file:



[Settings]


Priority=Default


Properties=MyCustomProperty


[Default]


OSInstall=Y


SkipCapture=NO


SkipAdminPassword=NO


SkipProductKey=YES


SkipComputerBackup=YES


SkipBitLocker=YES


EventService=http://MDT:9800



I have kept both fairly simple.


Answer



Found the answer for this issue from a page specifying another issue.



To workaround this error, simply create a .bat file in the root of
your Deployment Share to map the z: drive and call the Litetouch.wsf
script. .Bat files can be Right-Clicked and “Run as Administrator”.



http://supportishere.com/429-createobjectmicrosoft-bdd-utilityactivex-component-cant-create-object-error-when-running-mdt-from-winvista-or-win7/


My .bat file ended up working when Run as Administrator was used.


Now on to the next deployment roadblock!


Is there a way to know what the Windows Disk Cleanup utility will delete?

When I run the Disk Cleanup utility that's built into Windows 8, it tells me that it can free up 53GB by deleting 'Temporary Files'. However, a CCleaner analysis on default settings only finds about 300MB worth of space to free up, so I'm wondering what Disk Cleanup has found that CCleaner does not.



Note that this question appears to be similar to what I'm asking, but the accepted answer says that 'Temporary Files' refers to %TEMP%. I've already cleared out most of C:\Users\Cam\AppData\Local\Temp, and it now has only 230MB of stuff in it, even with system files showing.



So where is this 53GB located? Is there a way to find out what it is?



Edit: I should note that this is on a 110GB SSD, so it's almost half the drive. And in fact I'm only using 86GB, so if it's really going to clear out 53GB, that would be more than 60% of the stuff on my C drive. I'm starting to think that Disk Cleanup caches its analysis, and hasn't updated since I started cleaning up the drive earlier today. Although when I run it it says that it's 'Calculating' how much space can be saved, and it takes about 5-10 seconds to do so. Hmmm...




Edit2: Here is what my hard drive looks like, according to SpaceMonger (Right click->Open image in new tab, so you can see it properly): C:\



You can see why I was starting to think that the 53GB figure is actually wrong. Even if 'Temporary Files' includes my hiberfil and everything in WinSxS (about 13GB total), that would be 26GB, which is only halfway there. Hard to see where there's 53GB of stuff to delete.

windows - Automatically find installation directory of application and run batch command inside folder

Basically, assume I have program called ABCD installed.


I want to automatically find out where exactly (which folder) it is installed (sometimes not installed in C drive, that's why), and run a batch file command inside that folder.


An idea I'm having is to check for the name in control panel programs list automatically, but I don't know how.

ubuntu - sudo not working alongwith su


I am using a Ubuntu system. Today, I accidentally changed the sudoers file in /etc due to which my normal user prathmesh is not able to perform sudo operation. I don't know how to go to the root mode. I am trying "su" but it is giving me authentication failure error. Plus I don't remember setting root user's password ever.


What is the best way to solve this situation ?? Use a live CD to change the sudoers file or something else ??


Answer



You have two easy ways:



  1. use the Ubuntu installation CD, choose the "rescue a system" option and then drop into the shell (of the target system) to change the password of the user(s) or modify the /etc/sudoers to your liking.

  2. boot into single user mode and modify the passwords or /etc/sudoers.


The second method may be hard on more recent Ubuntu versions where GRUB doesn't wait for you to choose the single user mode.


Tuesday, March 26, 2019

macos - How to check hardware compatibility for Mac Mini before upgrading to Snow Leopard?


I am using a Mac Mini (having a light white logo – an older Mac Mini model). It is using Leopard 10.5.8. I want to upgrade to 10.6.8.


I want to check is it possible to install?
If it is possible, then I will start downloading the combo upgrade.


Answer



Snow Leopard needs a …



Mac computer with an Intel processor (IA-32).



  • "Yonah" processors such as Core Solo and Core Duo can run only 32-bit applications;

  • later x86-64 architecture processors such as Core 2 Duo will also be able to run 64-bit applications.



Additional requirements are 1GB of RAM and a DVD drive. More than 1GB of RAM would be preferred though (from my personal experience). See also Snow Leopard's installation instructions.


This means, Snow Leopard does not run on pre-February 2006 Mac minis and runs on any newer products, yet with restrictions (see above). You can check the specific Intel-based models here.


So, you need to know your specific model number or the processor type. Check your processor by clicking the logo in the top left menu bar, and then "About this Mac". You'll find your processor name and speed there.


raid - Storage Spaces - Parity vs Mirrored or Single with Robocopy

So I'm thinking of dropping my Synology RAID 6 NAS and upgrading to Storage Spaces. I have a number of dissimilar sized drives and Storage Spaces would allow me to use those. My NAS is maxed out at 4 drives. I've had a wonderful experience with 4 x 1.5TB drives not having one issue over 5 years.


I attribute that to the SHR (synology hybrid raid (maybe EXT4)). I'm wondering if Storage Spaces will be that reliable? Would I use Parity or Mirrored? I see Mirrored has "scubbing".


My other option is to simply create a "simple" JBOD pool and set up a robo-copy to transfer the data. (The data is all archival). For the Simple is there drive maintenance (scrubbing)?

RAID 0: how identical do the drives have to be?


I have a spare 1Tb. Seagate Barracuda HD, and I was planning on buying another one and creating a RAID 0 array using my motherboard's SATA controller... but I have a doubt: how "identical" do the two drives have to be? I can buy another 1Tb. Seagate Barracuda with the same specs (speed, cache size...), but it will be difficult to get another one from the same batch or with the exact same model number. Will this cause me any trouble?


EDIT: forgot to mention: my motherboard is a Gigabyte P55-USB3, so I'm using the Intel SATA controller on it for the RAID.


Answer



This entirely depends on your RAID controller, which you havent mentioned. From my experience RAID controllers are very forgiving when it comes to non matching drives. However, there are some that will complain, or wont even work drive if a drive is different enough. Low end RAID controllers that are found on motherboards tend to be the former, so you should be OK.


Windows boot manager was destroyed after installing Ubuntu 14.04

I tried installing Ubuntu 14.04 in Lenovo G50 which runs on Pentium processor. The system already had Windows 8 (manually installed). I separated 50 GB from a partition and turned off Fast boot and set secured boot off and turned boot options to legacy mode. I tried installing Ubuntu , but the separated partition was mentioned as unusable. Then i separated 50 GB from C: partition and tried again. It got installed finally.
Now when i boot , I dont see the grub . It directly goes into ubuntu. I also tried in boot menu , the windows boot manager is missing. I used commands in Ubuntu to see the possible OS in the system. It didn't list windows in any partition.



What should i do to bring Windows boot back and how to set the grub back? I am sure that Ubuntu didnt destroy Windows, but only the boot file. How to put back the boot alone ?

Monday, March 25, 2019

laptop - Dell Inspiron 6400 indicates the wrong power adapter is plugged in and will not charge the battery



I am using the original power adapter with the Dell Inspiron 6400 laptop and now when it boots up I get the following error message.




The AC power adapter type cannot be determined. You system will operate slower and the battery will not charge.



Please connect a Dell 65 W AC adapter or higher for best system operation. To resolve this issue, try to reseat the power adapter."





I don't have another power supply or laptop to try.



Is there a way to test the power supply, or whatever the computer uses to determine the power supply size?


Answer



Having just paid over £100 to have the the power board inside my daughter's Inspiron replaced and had the explanation confirmed by the Dell engineer, here is what happens:



The power connector consists of 3 pins, 2 are power and earth, the 3rd is a signal line to identify the PSU as a compatible (Dell) unit. If the Laptop does not get the signal, it does not allow the PSU to charge the battery, it will, however, allow it to power the laptop. The fault is a common one and happens because the plug sits so proud from the side of the laptop that it constantly gets knocked and causes the connector on the power board to fail, most commonly open circuiting the signal line.



To clarify, the power board on some Inspiron models is a separate unit to the motherboard and has the power socket mounted directly on it.



How to change MongoDB storage engine for replica set member from MMAPv1 to WiredTiger

I am running Mongodb-3.4x version in a Replica set environment (in all 3 different systems on AWS) i.e. One Primary, One secondary (replica) and an arbiter.




Issue that I am seeing is for some reason; the Primary node is running on "mmapv1" but the Replica (secondary node) is running on "wiredTiger" storage engine.



Now, how can I change Primary to use "WiredTiger" storage engine instead of "MMAPv1" ?



Any help/suggestion in this case would be much appreciated.



Thanks

partitioning - How to create multiple partitions on a USB pen drive

I would like to be able to create 2 partitions on my USB pen drive: 1 readonly (cdrom) partition, and 1 writable partition (FAT32).


What I have tried so far with no success:



  1. Using /sbin/gparted on Linux, I created two FAT32 partitions on the pen drive.


  2. Next, I created a small iso image (~300KB in size) , like so:


    $ genisoimage -V myLabel -rJ -o /tmp/my.iso /path/to/data

  3. Next, I dd'ed this iso to the first FAT32 partition, like so:


    $ dd if=/tmp/my.iso of=/dev/sdb1 bs=1M conv=notrunc
    $ sync

    (Here, /dev/sdb corresponds to my pen drive.)



Results:



  1. The Nautilus file manager can see both the CDROM and the FAT32 partitions just fine. But gparted shows the overwritten (CDROM) partition's file-system type as 'unknown'!


  2. Just like gparted, Windows 7 is unable to recognize the file-system on the first (CDROM) partition (that Windows is hardwired to see anyway), and so prompts me to format it!



I'm unable to understand why Nautilus can show my partitions just fine but not gparted and Windows.

Sunday, March 24, 2019

what can impact windows performance besides Page File Usage, Available Physical memory and CPU usage?

Usually if windows is running slow (e.g. takes 7 seconds to open an explorer folder when it is usually sub-second), I identify that something chewing up memory or CPU. However, sometimes both are very low and the computer is still slow. In these circumstances, windows behaves like it is waiting for some slow message to get back before it will release reserved CPU to other processes and troubleshooting has proven tricky. I've seen this behavior on multiple computers not just one and am not sure how to troubleshoot it. Right now, I typically open task manager:



  1. click on the processes tab. see if a is spiking the memory, cpu, i/o

  2. spotcheck performance and networking tabs, but don't usually
    find anything.


When I don't find anything useful in memory/cpu where else should I look?


Thanks.

cpu - ECC ram memory in MSI X99S


I bought motherboard MSI X99S Krait Edition and I found 1x16 GB RAM DDR4 with ECC. Can I run motherboard with this RAM? I don't know if it supports ECC. Where I can find? Can I use ECC memory on non-ECC motherboard?


Answer



Because the memory controller is in the processor, ECC support depends on the processor, not the chipset or motherboard. You'll need a Xeon processor to use ECC memory on X99.



  • The memory controller determines the types of memory that can be used. Because most systems today have the memory controller on the processor (where it is called an integrated memory controller, or IMC), the type of memory you can use depends on the processor, not the chipset or motherboard. Most consumer processors, except for certain desktop Pentium and Celeron parts, cannot take advantage of ECC memory. Xeon processors, which are designed for server/workstation use, do support ECC.


  • The Intel X99 chipset, with its LGA2011-3 socket, can accept either consumer (Haswell-E) Core i7 processors or server/workstation (Haswell-EP) Xeon E5 v3 processors. If your application requires ECC memory, you'll need to invest in a Xeon processor. A system equipped with a Core i7 processor and ECC memory will not be able to use the ECC functionality of the memory and may not boot at all.


  • However, registered (buffered) memory, which is used in some servers, is mechanically and electrically incompatible with unregistered (unbuffered), memory. Although X99 by itself does not prevent the use of registered memory (again, that depends on the processor's IMC), most X99 boards (except for some workstation boards such as the Asus X99-E WS) do not accept registered memory modules. ECC modules may or may not also be registered, so be sure to check the product specs before buying.



microsoft excel - Enable Macros after message box closes



Is there a way to enable Macros after the message bar with the Enable Macros button has closed?



I opened the Excel file and immediately went to edit the VBA. When I went to run the VBA, it stated,




The macros in this project are disabled. ...





and




Because of your security settings, macros have been disabled. To run macros, you need to re-open this workbook, and then choose to enable macros. ...




To get the Macro to run, I had to close the file and reopen the file to get the message bar and click the button to enable macros. While that procedure is not terribly painful, it is inconvenient.




I could allow ALL macros to run, but I would prefer to keep some security against malicious code.



Is there a way to get the message bar and/or Enable Macros button to reappear without reopening the file?


Answer



If you trust the workbook running macros.




  1. Go to the Developer tab


  2. Click Macro Security
    Screenshot for steps 1 and 2



  3. Change it to enable all macros
    Screenshot steps 5 and 6




As far as I can tell, there is not way to make the "Enable Macros" button reappear.



We run macros frequently at work and do not open unknown files. So this works well and bypasses the "Enable Macros" message bar completely.



When you're done, you can always set it back to "not allow macros with notification".




This will solve your issue of having to reopen your file at least.


keyboard - Using Autohotkey for Emacs

I am using emacs in Cygwin and have used Autohotkey to re-map the lefthand 'Alt' key and the lefthand 'Windows' key to be (left)Ctrl and (left)Alt respectively.



This means that an emacs sequence like Ctrl-xCtrl-c is done with my left thumb pressing on the key labelled 'Alt' to produce the Ctrl. Ok.



All seems okay except that I cannot get M-SPC to work, so my question is to ask for help on that.



Here is the Autohotkey script I am using (by the way it is only for theoretical completeness that I re-map the lefthand Ctrl key to be the lefthand Windows button -- I have never actually pressed it when using emacs):



#IfWinActive ahk_class mintty

LWin::LAlt
LAlt::LCtrl
LCtrl::LWin


To be clear, when I say 'all is ok' I mean that within emacs I use the 'describe key sequence' feature (C-h then k) and then try out the key combination I want. For example, all of these show the emacs documentation for the sequence I expected:




  • Key labelled 'Alt' + g reports emacs documentation for C-g. Good.

  • Key labelled 'Alt' + SPACE reports the documentation for C-@, which emacs says is also mapped to C-SPC, so that seems okay. Good.


  • Key labelled 'MSWin Symbol' + x reports documentation for M-x. Good.

  • Key labelled 'MSWin Symbol' + key labelled 'Alt'+ k reports documentation for C-M-k. Good.



But:




  • Key labelled 'MSWin Symbol' + SPACE shows me the 'right-click' menu for the cygwin window rather than taking me to the documentation for M-SPC. Bad.

  • By the way, I can get to the documentation for M-SPC by instead doing ESC followed by SPACE.




Let me add another point which has come up in the process of reacting to comments on this question:




  • Key labelled 'MSWin Symbol' + key labelled 'Alt'+ SPACE takes me to the documentation for C-@, so I suspect it is being understood by emacs as C-SPC rather than as C-M-SPC as I thought my Autohotkey script would map it to. Bad.



Any ideas on why Autohotkey won't do the M-SPC as I would expect, or why C-M-SPC is understood by emacs as a C-SPC (I suspect)?



Thanks

Saturday, March 23, 2019

command line - Linux: which is "most appropriate" directory to place an exectuable for all users?


A bit of newb question.. I usually install packages and don't worry about these things.


But, now I have a one file executable CLI program (Kindlegen from Amazon). I want it to be in the path of all users on the computer.. from whatever directory they may be in.


Question: which is the most appropriate linux directory to put the kindlegen file into?


(Amazon's directions were to place in your own home directory and use a custom command to start it.. that's not how I want to do it)


I was thinking /bin or /usr/sbin would be best. Similar Q led to /opt and /localusers.. with symlinks.. which seems laborious, especially for a simple CLI program.


(I'm running Linux Mint)


Thanks!


Answer



Use /usr/bin or /usr/local/bin.


The latter is usually used for additional software that you install, to keep it separate from what the system provides out of the box and is probably the technically correct choice.


However, the former is more commonly on the PATH by default and might therefore be easier to use.


/bin is primarily for essential system software required in single-user mode.


See the Filesystem Hierarchy Standard or its Wikipedia article for more information.




/opt is for software packages (usually with many files and its own directory hierarchy), and a single binary hardly makes it a package.


Meaning of last 4 digits in a Samsung RAM memory stick

I have a Samsung 2GB memory stick installed on my desktop with the following specs: M378B5773CH0-CH9 1042.


My question is what do the last 4 digits stand for?

usb - Install Windows 10 in UEFI mode without pen drive


Current Installed OS: Windows 7 x64 In UEFI mode


Motherboard: Asus H81M-CS In UEFI Mode


Wanted: To Install Windows 10 Pro x64 Version In UEFI Mode


Problem is: The ISO is of 3.80 GB and my pen drive is of 3.77 GB only!
So I cannot install make pen drive bootable through Rufus


So is there any way to install windows 10 UEFI from ISO without pen drive - through a partition of my HDD? or any work-around?


Answer



Okay, so it’s really easy, at least with a proper UEFI firmware:



  1. Create temporary partition near the end of your disk

  2. Format it with FAT32 (important!)

  3. Copy over files from Windows ISO

  4. Reboot and bring up the boot selection menu

  5. Select the appropriate entry that does not read “Windows Boot Manager”


If you don’t get the required boot entry, or all you can get to boot is Windows 7, try with rEFInd on your USB drive. You can put the image (“A USB flash drive image file”) on your USB drive using Rufus or any other image writer.


In rEFInd, the boot entry will look like this:


enter image description here


Friday, March 22, 2019

windows 7 - Laptop RAM upgrade: max out more than recommended?



I have a Dell Studio 1735...currently with 3GB DDR2 RAM...Max RAM is 4GB.




Currently have Windows 7 32-bit installed, want to upgrade to 64-bit...



Everything on this page is compatible with this laptop, for sure...




http://www.pcmemorystore.com/Dell-Studio_Laptops-Studio_1735-ram.htm




My question: can I make this laptop handle more RAM than 4GB, say by buying one 2GB stick, and a 4GB Stick and putting them in together? Is it possible?




Side/harmful effects? Bad idea? Hard on the laptop or shorten it's life?


Answer



Your exact question is answered in this question and this questions. However, my suggestion is to buy two identical sticks to get the most out of it if you do choose to try. Meaning make sure the ram speed between them the same since it is DDR2 ram. Here is post from Tom's Hardware form about mix matching ram. Here is another page with FAQ about memory upgrade.



Answers to your three questions




  1. Side/harmful effects?



    • Side effects yes but not harmful. Worse case it will not work.


  2. Bad idea?


    • Well, not the best idea unless you have money to waste if it doesn't work.


  3. Hard on the laptop or shorten it's life?



    • No. Will not shorten its life.



windows vista - Installation of Microsoft SQL Server 2008 R2 Developer Edition fails with unknown property




Installing MS SQL Server 2008 Developer edition on a Vista Ultimate 64 Bit machine keeps returning the following error message:




SQL Server Setup failure



SQL Server Setup has encountered the following error:
Unknown property.




I've tried the following:





  • Uninstalled the previous installation

  • Deleted all folders that were installed and had to do with SQL Server 2008

  • Cleared my registry using ccleaner

  • Tried 'fixit' utility from Microsoft uninstalling left overs



I'm totally out of ideas.


Answer




I just installed sql server 2012. That went flawless. Problem solved.


microsoft excel - How to convert .xlsm to .xls without losing macros?

I have an excel file (.xls) with macro, which was not created created by me. I pressed Alt+F11 and tried to expand the VBA project but I am prompted with "Enter Password" popup. Also the macro seems to work.


On the other hand I have another macro enabled excel (.xlsm) I am not able to save this file as .xls and retain the macros as well.


Can this be done?
Convert the file to .xls with macros enabled?


I have both MS Office 2010 as well as MS Office 2016 versions.


I want the file to be in .xls file format for my file handling library NPOI can read and write into the file from my ASP.net MVC application. I am not allowed to go for another library which can handle .xlsm files.


Warning I faced:
enter image description here

How to boot my PC to Windows 10 after installing Ubuntu to an External HD?

I've installed Ubuntu 12.04 to an external Hard Drive, planning on having Dual Boot on my laptop - which runs Windows 10. I have successfully configured the Dual Boot to have Windows as default, ran boot repair and everything, but whenever I don't have my external HD plugged in, I get the GRUB “MINIMAL BASH LIKE LINE EDITING IS SUPPORTED” black screen. I would like to be able to use my computer even without the external HD. One more detail: I selected the external HD as the device for boot loader installation, which might have caused the problem.

What is the difference between a Virus and Spyware?


Is the distinction largely semantic? (I.e., Spyware collects information and incidentally slow your computer down, Viruses are designed to malicious?


Answer



The difference is in how the code affects you.


The generic term for malicious software is malware. As viruses came about first, many people will use the word "virus" as the generic term. Thus you have to take a look at how the malware operates, hides, and spreads to put a more accurate term to it. Additionally, it's not always clear which category a piece of malware falls into. This is more than most people care to think about, and it's not very practical as anti-virus software cleans them off without making a large deal about the differences. The most practical use of the distinction is to know what your anti-virus and/or anti-spyware software protects you against.


Some specific types of malware:



  1. Virus - attaches to files; multiplies on your computer and eats up resources

  2. Rootkit - hides on your computer and may require special anti-rootkit software

  3. Spyware - logs computer events

  4. Trojan - masquerades as something else to get you to install it, may allow someone else to control your computer

  5. Worms - spreads over networks, may damage your computer by doing things like deleting files

  6. Adware - more annoying than malicious, it serves ads


Thursday, March 21, 2019

windows 8 - Is it better to leave on or turn off external hard drive?




Okay here is my situation, I have a 1tb internal hard drive that is plugged in via USB Dock, and has external power, that I use for weekly backups, but my question is, is it better to leave this hard drive on all the time, or turn it it off manually when it is not being used? What is the best case scenario?


Answer



Turn it off, so the data are less likely to be damaged if you accidentally knock it down. By the way, Debra suggestion on don't move is valid, but aging is actually irrelevant. On modern day electronics. They just have a "designed" life, no matter you used it or not. idea: the drying contacts ink, electronic conduct rubber.


windows 7 - When pressing Up+left + another key, the last key doesn't 'work'

I hope I'm right in thinking this is the site where you post general computer-related problems...




A problem I have when playing games (since you won't be pressing multiple keys simultaneously anytime else), is that when I press up/left and then another key, it fails to 'register' as if that last key is never pressed. This doesn't happen when I'm pressing any other two arrow keys, e.g. down/left or up/right.
The weird thing is that when I'm playing with WASD instead of the arrow keys, i still have this problem! Meaning W+A+another button doesn't work.



If anyone knows what I should, I'd appreciate the help. (My reflexes are fast and I can always circumvent this problem, but it's quite annoying and shouldn't exist to begin with!)

linux - System really limited by disk IO? Rate in atop much lower than expected

I have a system with two 2TByte SATA disks configured as a Raid1 array.


There are times when the cpu is waiting for I/O for more than 20% of the time (output from sar) e.g.


09:25:01        CPU     %user     %nice   %system   %iowait    %steal     %idle
09:35:01 all 57,65 0,00 6,53 25,54 0,05 10,23
15:45:01 all 0,90 0,00 1,47 54,90 0,06 42,68
15:55:04 all 1,74 0,00 1,58 88,52 0,10 8,06
16:25:03 all 0,59 0,00 0,38 24,14 0,05 74,84
23:45:05 all 2,45 0,00 1,43 31,56 0,05 64,50

I collected additional information using atop which shows, that disk-I/O on one of the raid-disks is at the upper limit (disk sda, busy to 90%) e.g.:


MDD | md1 | busy 0% | | read 10174 | write 425 | | KiB/r 6 | KiB/w 7 | MBr/s 1.2 | | MBw/s 0.1 | avq 0.00 | | avio 0.00 ms |
DSK | sda | busy 90% | | read 9091 | write 507 | | KiB/r 6 | KiB/w 7 | MBr/s 0.9 | | MBw/s 0.1 | avq 1.14 | | avio 5.65 ms |
DSK | sdb | busy 18% | | read 1082 | write 507 | | KiB/r 11 | KiB/w 7 | MBr/s 0.2 | | MBw/s 0.1 | avq 1.39 | | avio 6.82 ms |

The man-page to atop states:



Such line shows the name (e.g. VolGroup00-lvtmp for a logical volume
or sda for a hard disk), the busy percentage i.e. the portion of time
that the unit was busy handling requests (busy), the number of read
requests issued (read), the number of write requests issued
(write), the number of KiBytes per read (KiB/r), the number of
KiBytes per write (KiB/w), the number of MiBytes per second
throughput for reads (MBr/s), the number of MiBytes per second
throughput for writes (MBw/s), the average queue depth (avq) and
the average number of milliseconds needed by a request (avio) for
seek, latency and data transfer.



Information can be read in parallel from both disks for raid1, but this is not used for a single stream of sequential input according to the md man page , explaining the fact that the second disk is not fully used


Looking at the MBr/s and MBw/s entries for sda, it looks like the disk is 90% busy with


0.9 + 0.1 MiBytes per second = 1 MiBytes per second = 8 MiBit per second


However, the expected rate for current disks is on the order of 1000 Mbit/s, which is roughly 100 times higher (neglecting the conversion from MiBit to Mbit).


The disks are (ouput of hdparm -I /dev/sda)


/dev/sda:
ATA device, with non-removable media
Model Number: TOSHIBA DT01ACA200
Serial Number: 54A8UH4GS
Firmware Revision: MX4OABB0
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
Used: unknown (minor revision code 0x0029)
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 3907029168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 1907729 MBytes
device size with M = 1000*1000: 2000398 MBytes (2000 GB)
cache/buffer size = unknown
Form Factor: 3.5 inch
Nominal Media Rotation Rate: 7200
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: disabled
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
Advanced Power Management feature set
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
Media Card Pass-Through
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
* URG for READ_STREAM[_DMA]_EXT
* URG for WRITE_STREAM[_DMA]_EXT
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* unknown 119[7]
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* NCQ priority information
Non-Zero buffer offsets in DMA Setup FIS
* DMA Setup Auto-Activate optimization
Device-initiated interface power management
In-order data delivery
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
not supported: enhanced erase
320min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000039ffac402a6
NAA : 5
IEEE OUI : 000039
Unique ID : ffac402a6
Checksum: correct

Is the output or the man-page for atop wrong or are the hard disks underperforming very much compared to the expected value or is there a missunderstanding on my side?


Or the wider question is: is my system really limited by the disk I/O capacity?

Wednesday, March 20, 2019

license - How can I downgrade Windows 7 Ultimate to Home Premium?


How can I downgrade from Windows 7 Ultimate to Home Premium without reinstalling Windows? I want to use a Home Premium key and uninstall the Ultimate features. How can I do this?


Answer



You cannot downgrade editions. You need to re-install the operating system using the correct edition, then you can use that key.


You can go up in editions using anytime upgrade.


Edit:


Bonus Chatter:
The reasons are dependencies and money. Allowing downgrades means developing a UI, and then endless testing and stomping bugs(this is IMP the biggest pain point). I'd rather the company spend time on features I will use more than once.


remote - Can you reinstall Windows remotely?


I have noticed a company offering to reinstall Windows (XP,Vista,7) remotely over the internet (like remote support package)? How can this be done?


Answer



Mehrdad suggested an unattended installation, and even though that greatly reduces the amount of user intervention required during an installation it still requires a user to physically be at the machine at some point.


What you want is Windows Deployment Services (WDS). We use it at my university in conjunction with Symantec Ghost and it works very well. There are of course many prerequisites you must meet before being able to use this solution, and since you want to do it over the internet you would probably need to set up a VPN. Typically WDS is used in organizations with large domains, not just for home users.


If you were using Linux you could try PXE (PXE on Ubuntu). I read good things but I have no experience with it.


Dell laptop dies when unplugged but the battery appears fully charged



To expand on what I mean, I checked the voltages of each cell in the battery pack and they each read about 4.0v ea (6 green Li-ion cells in a 11.1v 53WH battery) and the total voltage reads 12.4v.



At this point I'm thinking that the problem lie in how the laptop uses the battery though I'm not sure how to test this.



Once the power cable is unplugged, the laptop will remain on but the built in battery light turns orange. It abruptly shuts down after about 10 minutes so it is using the battery to an extent.



This is a Dell Inspiron 6400.


Answer




If the battery voltage shows it really has been depleted when the indicator turns orange, than it would seem that the battery is at the end of its life. The amp hour rating of laptop batteries decrease with each charge/discharge cycle, and it seems that this battery has reached the point of being measured in "amp minutes". Sadly, sometimes a battery will reach this point rather suddenly. And when it does, its time to bite the bullet and get a new battery.


Tuesday, March 19, 2019

bootloader - How do I create a bootable flash drive running MS-DOS 6.22?


I'm trying to create a bootable USB for MS-DOS 6.22. I can't risk using FreeDOS or any other version of DOS because I'm working with a very niche utility that has the potential to break expensive things if things are wrong.


I'm using the ISO for MS-DOS 6.22 found at AllBootDisks.


So far I've tried this ISO in several versions of Rufus and the latest version of UNetbootin.


I've tested the following versions of Rufus from this link:



  • V1.3.0 Beta (w/o FreeDOS)

  • V1.2.0 (w/o FreeDOS)

  • V1.2.0.183 (w/o FreeDOS)

  • V1.1.7 (w/o FreeDOS)


...all of which produce the following error when selecting the ISO:



This version of Rufus only supports bootable ISOs based on 'bootmgr/WinPE' or 'isolinux'. This ISO image doesn't appear to use either.



From the main Rufus page, I've tested versions:



  • V2.15

  • V2.14


...which both produce the following error when selecting the ISO:



This image is either non-bootable, or it uses a boot or compression method not supported by Rufus.



According to this link, it's not possible at all to use Rufus to create a bootable USB for specific versions of MS-DOS.


By contrast, UNetbootin seems to accept the ISO when creating the bootable USB, but booting into it causes the boot loop described here.


Is it at all possible that the ISO from AllBootDisks is faulty? If it's not the ISO, then how else can I create a bootable flash drive for MS-DOS 6.22?


Answer



Around the time when Windows 98 was mainstream, bootable MS-DOS CDs and USB drives used a 1.44MB floppy disk image as the actual boot target. The CD/USB drive stores the floppy image either visibly on the file system or invisibly outside of a partition, and the computer would boot to a virtual A:\ drive. If access to the CD/USB drive is desired after boot, the appropriate driver must be present on the floppy image and loaded.


At least in some cases, booting from the floppy image requires features implemented in BIOS. (I remember trying to make a rescue disk on a state-of-the-art 32MB USB drive, and there being different instructions for BIOS that support USB-FDD, USB-ZIP, USB-HDD, etc.)


If you don't feel like hunting down period-appropriate documentation and tools, your best bet is probably a MS-DOS floppy image paired with a modern bootloader that supports memdisk features. syslinux/isolinux and GRUB4DOS comes to mind.


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