Tuesday, June 30, 2015

windows 7 - How can I tell if I will benefit from an upgrade?



I have a Dell Latitude E6320 with 2GB of DDR3 RAM running Windows 7 (32-bit).



I plan on buying 4 more GB of RAM (for a total of 6GB) and then replacing Windows 7 32-bit for Ubuntu 64-bit (if possible).




  • How can I tell if my machine is capable of a 64-bit OS?

  • If it can't handle a 64-bit Ubuntu OS (because, say, the motherboard is only 32-bit, etc.), then is buying more RAM even worth it? I've heard 32-bit systems max out at 4GB of RAM because there are only 2^32 memory addresses. Is this true?




Basically, I'm going to end up with Ubuntu (64-bit if I can, otherwise 32-bit). But I need to know which one of those I'm going to need, and if I'm stuck with 32-bit, do I even bother buying more RAM? Thanks in advance!


Answer



Your laptop should have an intel core i3 or i5 processor. All the core i processors are 64 bit.



On the other hand, it is true that 32 bit architecture supports a maximum of 4 GB ram, BUT there are PAE (physical addres extension) kernels available for most linux distros.
So even in the case of a 32 bit processor you could (with some tweaking) make full use of your 6 GB of RAM (up to 64 GB RAM).



PS: a quick update. Ubuntu 32 bit should have a PAE kernel installed by default



What can I do if my USB flash drive is write-protected or read-only?


When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.


Why did this happen and what can I do about it? Is there a way to remove the write protection?


(Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)



This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.



Answer



If the drive appears to be write-protected, start by inserting the drive into another computer to isolate the cause of the issue.


If you're able to write to the drive from another computer, you might be experiencing one of the following problems:



  1. Filesystem corruption. The drive might have a corrupted filesystem or other issue (possibly specific to a particular computer or OS) that can be corrected by using CHKDSK or a similar utility. If this addresses the problem, your drive is probably working normally. It's also important to eject the drive properly before removing it or at least wait until the drive has finished writing, as removal of the drive while it is writing data can cause low-level data corruption.


  2. Incorrect Group Policy settings. If you're running Windows, it's possible that your system's Group Policy may be disallowing writing to external storage devices, including USB flash drives. The registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\StorageDevicePolicies should either be absent or set to 0; if it is set to 1, Windows will not allow writing to external storage devices.


  3. (SD cards only) Broken or altered write-protect switch in the card slot. The mechanical lock switch on an SD card is not connected to its electronics:



    It is the responsibility of the host to protect the card. The position of the write protect switch is unknown to the internal circuitry of the card.



    This means that hardware and software other than the card itself is responsible for checking the lock state of the card. If this mechanism isn't working as designed, a SD card can appear to be write-protected even if it is otherwise functioning normally. Typically, this can be addressed by replacing the card reader, although faulty drivers or incorrect software configuration can also cause this problem.





If the drive is read-only no matter what computer you plug it into, or you've tried the above steps to no avail, then the drive has probably experienced a fault condition, and it's generally not possible to remove write protection from a faulty flash drive. This behavior is typical of flash drive controllers when they detect a problem with the underlying NAND (e.g. too many bad blocks). The write protection is intended to prevent this condition from actually causing data loss, e.g. the NAND becoming unreadable altogether. For example, SanDisk customer support says:



Write protection errors occur when a flash drive detects a potential fault within itself. The drive will go into write-protected mode to prevent data loss. There is no method to fix this.



Note that depending on the drive, there may in fact be ways to disable (or more accurately, reset) the write protection by reprogramming the flash memory controller, such as by using the techniques listed under "Potential Hardware-Specific Restoration" in this answer. Doing this is not a good idea because the write protection signals that a problem has been detected by the controller; overriding this and continuing to write to the drive could result in data loss.




The upshot of this behavior is that any data on the drive is still accessible. Because the drive is failing, you should back up the contents of the flash drive as soon as possible and replace the drive. (If the drive contains sensitive information, be sure to physically destroy it before you dispose of it.)


Getting data off the drive may be tricky because some data corruption may have already occurred by the time drive went into read-only mode. This commonly manifests itself as the filesystem experiencing low-level corruption causing the filesystem to appear as RAW or the OS prompting the format the drive. Recovering from this kind of corruption can be complicated because the filesystem cannot be directly repaired—the drive is, after all, write-protected.


You may be able to retrieve data from a drive corrupted in this manner by using data recovery utilities such as the open-source TestDisk. You can also get a drive of equal or greater capacity and copy over the failing drive's contents sector by sector onto the new drive using GNU ddrescue, and follow up with a CHKDSK to fix the filesystem errors. If these fail, and the data is particularly valuable, you could send the drive to a dedicated data recovery service; however, these services tend to be very expensive due to their highly specialized nature and are rarely worth it.


memory - High non-paged pool with no stack specified

So, I followed a guide https://superuser.com/a/988819/662442 to trace a non-paged leak of 4Gb of RAM. In vain. After loading symbolds, no stack is shown for my tag. I can't find any clue as to what to do next.


WPA


taskmgr

linux - Setting Keyboard Shortcuts in Ubuntu

Is it possible to do the following in Ubuntu? If so, can someone point me in the right direction.


Say you want to set a keyboard shortcut to do the following:


For examples sake, set Alt+F to open Firefox and maximize it, but only if Firefox is not already running. If it is running and not maximized, then maximize the most recently touched Firefox window. If it is maximized, then minimize Firefox.

How to create a Windows To Go that can be updated with OS updates

rem These commands copy the selected image file to
rem predefined hard disk partitions on a UEFI-based computer.
rem Usage: ApplyImage WimFileName
rem Example: ApplyImage E:\Images\ThinImage.wim
rem === Copy the image to the recovery image partition =======================
copy %1 F:\sources\install.wim
rem === Apply the image to the Windows partition =============================
dism /Apply-Image /ImageFile:F:\sources\install.wim /Index:1 /ApplyDir:W:\
rem === Copy the Windows RE Tools to the Windows RE Tools partition ==========
md T:\Recovery\WindowsRE
copy W:\windows\system32\recovery\winre.wim T:\Recovery\WindowsRE\winre.wim
rem === Copy boot files from the Windows partition to the System partition ===
bcdboot W:\Windows
rem === In the System partition, set the location of the Windows partition ===
W:\Windows\System32\reagentc /setosimage /path R: /target W:\Windows /index 1
rem === In the System partition, set the location of the WinRE tools =========
W:\Windows\System32\reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows

Taken from https://technet.microsoft.com/en-us/library/hh825089.aspx and modified to my PC.


F:\ is the mounted Windows 10 Anniversary Edition ISO


The other drive letters were created using https://technet.microsoft.com/en-us/library/hh825686.aspx


When I attempt to run this command **dism /Apply-Image /ImageFile:F:\sources\install.wim /Index:1 /ApplyDir:W:**


I get a 1005 Error



Error: 1005


The volume does not contain a recognized file system. Please make sure
that all required file system drivers are loaded and that the volume
is not corrupted.


The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log



The dism log file is below




> 2016-10-10 09:27:34, Info                  DISM   PID=9312 TID=12912
> Scratch directory set to 'C:\Users\SHAYAA~1.SID\AppData\Local\Temp\'.
> - CDISMManager::put_ScratchDir 2016-10-10 09:27:34, Info DISM PID=9312 TID=12912 DismCore.dll version: 10.0.14393.0 -
> CDISMManager::FinalConstruct 2016-10-10 09:27:34, Info
> DISM Try to initialize Panther logging 1 times, last error: 0x0
> 2016-10-10 09:27:34, Info DISM PID=9312 TID=12912
> Successfully loaded the ImageSession at "C:\WINDOWS\System32\Dism" -
> CDISMManager::LoadLocalImageSession 2016-10-10 09:27:34, Info
> DISM Try to initialize Panther logging 1 times, last error: 0x0
> 2016-10-10 09:27:34, Info DISM DISM Provider Store:
> PID=9312 TID=12912 Found and Initialized the DISM Logger. -
> CDISMProviderStore::Internal_InitializeLogger 2016-10-10 09:27:34,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Failed to get and initialize the PE Provider. Continuing by assuming
> that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
> 2016-10-10 09:27:34, Info DISM DISM Provider Store:
> PID=9312 TID=12912 Finished initializing the Provider Map. -
> CDISMProviderStore::Final_OnConnect 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Getting Provider
> DISMLogger - CDISMProviderStore::GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has previously
> been initialized. Returning the existing instance. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM Try to initialize Panther logging 1 times, last error: 0x0
> 2016-10-10 09:27:34, Info DISM DISM Provider Store:
> PID=9312 TID=12912 Getting Provider DISMLogger -
> CDISMProviderStore::GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has previously
> been initialized. Returning the existing instance. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Manager: PID=9312 TID=12912 Successfully created the local
> image session and provider store. -
> CDISMManager::CreateLocalImageSession 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Getting Provider
> DISMLogger - CDISMProviderStore::GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has previously
> been initialized. Returning the existing instance. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM.EXE: 2016-10-10 09:27:34, Info DISM
> DISM.EXE: <----- Starting Dism.exe session -----> 2016-10-10 09:27:34,
> Info DISM DISM.EXE: 2016-10-10 09:27:34, Info
> DISM DISM.EXE: Host machine information: OS Version=10.0.14393,
> Running architecture=amd64, Number of processors=8 2016-10-10
> 09:27:34, Info DISM DISM.EXE: Dism.exe version:
> 10.0.14393.0 2016-10-10 09:27:34, Info DISM DISM.EXE: Executing command line: dism /Apply-Image
> /ImageFile:install.wim /Index:1 /ApplyDir:W:\ 2016-10-10 09:27:34,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Getting the collection of providers from a local provider store type.
> - CDISMProviderStore::GetProviderCollection 2016-10-10 09:27:34, Info DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\FolderProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Connecting to the
> provider located at C:\WINDOWS\System32\Dism\FolderProvider.dll. -
> CDISMProviderStore::Internal_LoadProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\WimProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Connecting to the
> provider located at C:\WINDOWS\System32\Dism\WimProvider.dll. -
> CDISMProviderStore::Internal_LoadProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\VHDProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Connecting to the
> provider located at C:\WINDOWS\System32\Dism\VHDProvider.dll. -
> CDISMProviderStore::Internal_LoadProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\ImagingProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Connecting to the
> provider located at C:\WINDOWS\System32\Dism\ImagingProvider.dll. -
> CDISMProviderStore::Internal_LoadProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\CompatProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Connecting to the
> provider located at C:\WINDOWS\System32\Dism\CompatProvider.dll. -
> CDISMProviderStore::Internal_LoadProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\FfuProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Connecting to the
> provider located at C:\WINDOWS\System32\Dism\FfuProvider.dll. -
> CDISMProviderStore::Internal_LoadProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has not
> previously been encountered. Attempting to initialize the provider. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Loading Provider from
> location C:\WINDOWS\System32\Dism\SiloedPackageProvider.dll -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Warning
> DISM DISM Provider Store: PID=9312 TID=12912 Failed to Load the
> provider: C:\WINDOWS\System32\Dism\SiloedPackageProvider.dll. -
> CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) 2016-10-10
> 09:27:34, Info DISM DISM.EXE: Got the collection of
> providers. Now enumerating them to build the command table. 2016-10-10
> 09:27:34, Info DISM DISM.EXE: Attempting to add the
> commands from provider: DISM Log Provider 2016-10-10 09:27:34, Info
> DISM DISM.EXE: Attempting to add the commands from provider:
> FolderManager 2016-10-10 09:27:34, Info DISM
> DISM.EXE: Attempting to add the commands from provider: WimManager
> 2016-10-10 09:27:34, Info DISM DISM.EXE:
> Succesfully registered commands for the provider: WimManager.
> 2016-10-10 09:27:34, Info DISM DISM.EXE: Attempting
> to add the commands from provider: VHDManager 2016-10-10 09:27:34,
> Info DISM DISM.EXE: Attempting to add the commands
> from provider: GenericImagingManager 2016-10-10 09:27:34, Info
> DISM DISM.EXE: Succesfully registered commands for the provider:
> GenericImagingManager. 2016-10-10 09:27:34, Info DISM
> DISM.EXE: Attempting to add the commands from provider: Compatibility
> Manager 2016-10-10 09:27:34, Info DISM DISM.EXE:
> Succesfully registered commands for the provider: Compatibility
> Manager. 2016-10-10 09:27:34, Info DISM DISM.EXE:
> Attempting to add the commands from provider: FfuManager 2016-10-10
> 09:27:34, Info DISM DISM Provider Store: PID=9312
> TID=12912 Getting Provider GenericImagingManager -
> CDISMProviderStore::GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has previously
> been initialized. Returning the existing instance. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Getting Provider
> WimManager - CDISMProviderStore::GetProvider 2016-10-10 09:27:34, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Provider has previously
> been initialized. Returning the existing instance. -
> CDISMProviderStore::Internal_GetProvider 2016-10-10 09:27:34, Error
> DISM DISM WIM Provider: PID=9312 TID=12912
> onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:1054
> - CWimManager::Apply(hr:0x800703ed) 2016-10-10 09:27:34, Error DISM DISM Imaging Provider: PID=9312 TID=12912
> onecore\base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2535
> - CGenericImagingManager::InternalCmdWimApply(hr:0x800703ed) 2016-10-10 09:27:34, Error DISM DISM Imaging
> Provider: PID=9312 TID=12912
> onecore\base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535
> - CGenericImagingManager::ExecuteCmdLine(hr:0x800703ed) 2016-10-10 09:27:34, Info DISM DISM.EXE: Image session has
> been closed. Reboot required=no. 2016-10-10 09:27:34, Info
> DISM DISM.EXE: 2016-10-10 09:27:34, Info DISM
> DISM.EXE: <----- Ending Dism.exe session -----> 2016-10-10 09:27:34,
> Info DISM DISM.EXE: 2016-10-10 09:27:35, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Found the OSServices.
> Waiting to finalize it until all other providers are unloaded. -
> CDISMProviderStore::Final_OnDisconnect 2016-10-10 09:27:35, Info
> DISM DISM Provider Store: PID=9312 TID=12912 Disconnecting Provider:
> FolderManager - CDISMProviderStore::Internal_DisconnectProvider
> 2016-10-10 09:27:35, Info DISM DISM Provider Store:
> PID=9312 TID=12912 Disconnecting Provider: WimManager -
> CDISMProviderStore::Internal_DisconnectProvider 2016-10-10 09:27:35,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Disconnecting Provider: VHDManager -
> CDISMProviderStore::Internal_DisconnectProvider 2016-10-10 09:27:35,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Disconnecting Provider: GenericImagingManager -
> CDISMProviderStore::Internal_DisconnectProvider 2016-10-10 09:27:35,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Disconnecting Provider: Compatibility Manager -
> CDISMProviderStore::Internal_DisconnectProvider 2016-10-10 09:27:35,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Disconnecting Provider: FfuManager -
> CDISMProviderStore::Internal_DisconnectProvider 2016-10-10 09:27:35,
> Info DISM DISM Provider Store: PID=9312 TID=12912
> Releasing the local reference to DISMLogger. Stop logging. -
> CDISMProviderStore::Internal_DisconnectProvider

I am trying to create an external bootable WIndows 10 PC that can be updated with software updates. Using Windows To Go was great until we found out that it can't receive updates.

macos - Why am I suddenly unable to install any variety of Windows on Macbook Pro?

I've got a MBP8,1 running El Capitan (10.11.2). Until recently, I had a perfectly serviceable Win7 installation via Bootcamp. A few days ago, I decided to clean-install Win10 to replace Win7. Since then, I've been chasing my tail.


My previously functioning Win10 installation DVD wouldn't work; I kept getting an error about "a needed file may be missing" or something similar. I tried installing via VirtualBox and get the same issue. Tried installing on the Power Mac 3,1 under my desk and get the same problem (on VirtualBox - haven't tried Bootcamp). So I tossed the installation DVD and downloaded a brand-new Win10 ISO from Microsoft.


I'm having the same issue with the new install media (also tried via USB - no dice). Several times, Bootcamp Assistant was unable to create a new partition. Ran Disk Utility, repaired permissions, etc. Still having the same problem.


I backed up my hard drive, plugged the MBP into the MP and booted into Target Disk Mode, and used the MP to format MBP drive (writing zeros over all sectors - took freaking forever), then reinstalled OS X.


I'm currently downloading VMWare and am going to try it that way.


EDIT: No dice under VMWare either. Same "missing file" nonsense. Also tried installing Windows Server 2012 under VirtualBox on the Mac Pro. Hangs at 92%. I guess I'll try that one on the MBP under VMWare, but I have zero faith it's going to work. Something is broken somewhere.


EDIT2: Win Server 2012 installed via VMWare on the MBP. Still no idea what the problem is everywhere else.

ubuntu - Is it possible to use a laptop as an external monitor?


I need to create a multi-monitor setup for my desktop computer but I have no additional monitors with me right now, aside from my laptop. Is it possible to use my laptop screen as an external monitor?


Note that I am not trying to connect a monitor to my laptop, rather, I am trying to connect my laptop screen to a desktop video card (if this is possible).


Answer



You can do something sort-of similar using synergy; you can control both computers from one mouse and keyboard using your network connection. This isn't quite the same thing, since windows won't drag from one machine to another. On the other hand, it does give you more processing power at your disposal, so it's a bit of a tradeoff.


Office 365 Offline installer package

I have a license to install Office 365 (Home Premium) on multiple computers. Unfortunately, all I can download on the Office website is a 550KiB net-installer, i.e. one that downloads the complete package from the web and installs it right away without asking too many questions.



Now, doing this once is okay, although it’s a huge annoyance because my internet connection at home is really slow. However when thinking about doing that again for the next machine, I kind of don’t even want to upgrade at all… What’s worse is that a failed update today apparently bricked my installation, so I spent the last few hours waiting for my computer to download it again to reinstall it.



So, is there some download-once offline installer for Office 365? Or can I just use a Office 2013 (Professional) ISO and install that instead and then just activate it using my Microsoft account?




Another thing that is somewhat related is that the net-installer asks no questions at all, so I always get the full package with whatever default options there are. For my notebook, given its limited SSD disk space, I would rather configure this a bit, for example exclude Access and Publisher (I use these very rarely). Is this somehow possible?

iso image - I have a legitimate license for Windows 7 but not the disc on me - can I download the ISO anywhere?








I think the title says it all.



There is this question, but there wasn't much of a response and the main answer was about being scammed!



I am away from home and need to reinstall Windows 7 on my laptop. Can I get the ISO anywhere and just use the key on the bottom of my laptop?!

Windows 7 won't boot (encrypted with Truecrypt 7.1a)

How the problem occured:
My laptop randomly shut's down (probably overheated).
After the last shutdown it could not boot windows anymore
I could choose to use startuprepair or start windows normally


What i tried:
I tried to use Windows Startup Repair which couldn't solve it.
I viewed the detail post of it and everything went succesfull without the last part. the errorcod was something like "boot??? 0x490"


So i googled that errorcode and followed these step's on this site:
http://tipsandtricksforum.com/thread-201.html?PageSpeed=noscript


Now i can't even choose startuprepaird or start windows normally.
I think i damaged the boot section with these commands, since it's encrypted with Truecrypt.


Can i revert this commands? If not can i still save my files?

ubuntu - How to log into Windows if I have deleted the EFI partition?

I've run into a problem while experimenting.




  1. I deleted my EFI partition while installing Ubuntu. I had Windows 8.1 pre-installed.

  2. I installed Ubuntu 14.04 LTS.

  3. Ubuntu runs fine. But there are no files of Windows on the EFI partition.

  4. I need now to have Windows boot files in the EFI partition. So that I can also boot into Windows again.




What do I do?



Extra info: Running grub2 as boot-loader, don't wish to change that if not fully necessary; And of course, I must be able to dual-boot; I have the Windows recovery files on SSD, but they cannot be accessed, i.e. cannot use Windows recovery or refresh Windows.



HDD details: enter image description here

networking - Definitive list of everything a entry level network or unix admin must know









I am interested in a list which would recommend what you feel is absolutely necessary for somebody who is looking for a entry level position as a network or unix admin, possibly windows also.



Is there a single book that can help one get started, maybe a CCNA book.


Answer




  • Network Management & Support


  • Confident within the command line



  • Understanding the TCP stack




I could go on... but in truth you may be better going to a job website and having a look there, as this list can change from company to company depending on what is important to them.


Monday, June 29, 2015

Windows 10: How do I delete a subdirectory in AppDataLocalPackages

How do I delete a subdirectory of AppData\Local\Packages? More generally, is there a way to actually get administrator access over my computer so I can delete or modify files whenever I need to?


I want to delete some subdirectories of my AppData\Local\Packages directory. When I try, I get a message that says I need permission from the user I'm already logged in as to perform the action. There's a "Try Again" button that just brings up the same message.


I've tried running Explorer as Administrator. I've tried running alternative file managers as Administrator. I've tried running a Command Prompt session as Administrator and using the del command. Nothing works.


enter image description here

memory - Two RAM sticks into a four DIMM slot motherboard... which slots?


I am installing two 8GB DDR4 DIMMs into this motherboard:


Gigabyte B150M-D3H-GSM


There are four DIMM slots of alternating colors, labeled in the following order:



  • DDR4_1 (gray)

  • DDR4_3 (black)

  • DDR4_2 (gray)

  • DDR4_4 (black)


The motherboard has dual channel DDR4, so I want to make sure there's one DIMM in each channel, right?


Answer



From the page you linked to, go to CPU / Memory / Support & Downloads, select the manual.


On the fourth page it shows the numbering of the DIMM slots. Use the slots numbered 1 and 2.


For more details, see the page 11 (section 1-4).


enter image description here


enter image description here


windows - Can't boot from HDD on HP NC8000, but booting from HDD via HirensBootCD works ok




I've moved my old 160 GB Samsung harddrive from my old notebook Compaq EVO N1020V to HP NC8000. Now it do not boots. It's mounted in internal bay and BIOS is set to boot from hardrive first.



I've got only blinking cursor on black screen.



I was guessing that boot sector is different. I've tried booting from installation disc and:




  • fixboot

  • fixmbr

  • OS reinstallation in repair mode




nothing helps.



The only way I can boot is to boot computer from HirensBootCD and then select fix NTDLR and first option. Then it boots right away into Windows.



How to correct this problem ?


Answer



Solution was to install Windows 7 on second partition which installed new Windows 7 bootloader on drive C. Then again start from Windows 7 DVD click Repair This Computer, then bcdedit /delete {current} and voila. System is booting in Windows XP directly from disk :) Then I've formatted partition D, merged partition C and D and all is working fine with single partition.


domain name system - Browser-based DNS failover using multiple A records

It has recently come to my attention that setting up multiple A records for a hostname can be used not only for round-robin load-balancing but also for automatic failover.



So I tried testing it:




  1. I loaded a page from our domain


  2. Noted which of our servers had served the page

  3. Turned off the web server on that host

  4. Reloaded the page



And indeed the browser automatically tried a different server to load the page. This worked in Opera, Safari, IE, and Firefox. Only Chrome failed to try a different server.



But after leaving that server offline for a few minutes and looking at the access logs, I found that the number of requests to the other servers had not significantly increased. With 1 out of 3 servers offline, I had expected accesses to each of the remaining 2 servers to roughly increase by 50%, but instead I only saw 7-10%. That can only mean in-browser DNS failover does not work for the majority of browsers/visitors, which directly contradicts what I had just tested.



Does anyone have an idea what is up with browsers' DNS failover behavior? What possible reason could there be why automatic failover works for me but not the majority of our visitors?




edit: To make myself clear, I made absolutely no change to our DNS settings; there's no TTL or propagation issue here, it's all about how the client handles the multiple A records.

compatibility - Will this charger/adapter work for my son's laptop?

thanks in advance for your help. I mentioned most of what was on each adapter, I know some will not be of any help but didn't want to miss anything.


His computer model is: ASUS G47VW-BHI5N43
The original adapter (the one that was packed with his brand new computer) shows the following values:
Model ADP180 HB D
Input 100-240V ~ 2.25A 50-60Hz
Output 19V 9.5 A
Roman numeral value "V"
C.C.: B REV. 3
S/N H00W2AN04FL


The one that a seller has on ebay list for this same computer model shows the following values:
(It is OEM ASUS adapter/charger and otherwise appears exactly like the original)
Model ADB-150NB D
Input 100-240V ~ 2.0A 50-60Hz
Output 19.5V - 7.7A
Roman number value "V"
C.C. A REV. 3
S/N W6W0944061108


The both show N193V85, not sure what that is.


It would be helpful to know whether or not this would work (and knowing why or why not would be even better)!


Thank you!

iso image - Is it possible to create bootable USB from "any" bootable ISO




I know its possible for Windows or most other OS. But I am talking about general purpose utility software. I have an bootable ISO of rescue software and I want to make bootable USB out of it. So is it there any software that can turn "any" bootable ISO to bootable USB (say Pendrive).

Windows 10 Home won't activate after clean reinstallation. Error 0x8007232B "DNS name does not exist"

I bought my laptop last summer, and it came with Windows 8.1. I did an upgrade to Windows 10 Home edition today with the ISO using the media creation tool, and it was activated.


I then did a clean install just to wipe everything clean because it's been a while. Afterwards, it was activated for a couple of hours, but now it's saying that it's not activated anymore. When I try to activate it, I always get Error code: 0x8007232B. Error Description: DNS name does not exist


I'm posting from the laptop so Internet works


Update: I plugged the laptop directly into the modem via Ethernet, and the error changed to Error code: 0x8007007B. Error description: The filename, directory name, or volume label syntax is incorrect...

Autohotkey, use F1 as prefix key but do NOT block Ctrl+F1, Shift+F1 etc


Using the following statement,


F1 & F9:: Msgbox, Got F1+F9

I can successfully use F1 as a prefix hotkey, quite a useful feature. However, I quickly find that Ctrl+F1, Shift+F1 etc lose their functionality, i.e. application cannot detect them.


I tried to add a tilde,


~F1 & F9:: Msgbox, Got F1+F9

but this always trigger F1 for application before I have the chance to press F9 -- not what I want.


How to achieve the desired result?


BTW: I can totally accept the minor side effect of firing F1, Ctrl+F1 or Shift+F1 when F1 is released.


Autohotkey 1.1.13.1


Answer



I figure it out myself.


F1 & F9:: MsgBox, F1+F9
*F1 up:: Send {Blind}{F1 down}{F1 up}

The {Blind} is important. Without it, pressing Shift+F1 will(may) cause application to get only F1. In my actual case, my application is EmEditor v14, and I have successfully achieve:



  • F1+F9 or F1+F10 to quickly switch between first row tabs.

  • F2+F9 or F2+F10 to quickly switch between second row tabs.

  • F3+F9 or F3+F10 to quickly switch between third row tabs.

  • F4+F9 or F4+F10 to quickly switch between fourth row tabs.

  • use **F5+...* if desired


I do this because EmEditor, although great at many other aspects, does not provide a quick way to switch document tabs by keyboard.


If you're interested, I can post my whole script later, about 30 lines.


logging - Apache logs full URL rather than URI



My Apache web server logged following messages to access.log:




46.22.173.131 - - [23/Dec/2014:15:34:54 +0100] "GET http://pl.wikipedia.org/wiki/Special:Search?search=&go=Go HTTP/1.1" 302 482 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
182.254.156.77 - - [23/Dec/2014:16:53:22 +0100] "GET http://www.ly.com/ HTTP/1.1" 302 433 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"`
182.254.208.62 - - [23/Dec/2014:17:57:49 +0100] "GET http://www.ly.com/ HTTP/1.1" 302 433 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"


I have two Virtualhosts defined - one for port 80 which just redirects to 443 ... and the Virtualhost for port 443 which logs into ssl_access.log.



I do not understand what these logs mean? Was someone trying to get to these URLs through my web server?



Please help me understand those logs.




Merry Christmas everyone!


Answer



http://wiki.apache.org/httpd/ProxyAbuse:




Why do I see requests for foreign sites appearing in my log files?



An access_log entry showing this situation could look like this:




63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0" 200 1456
For this log line, the 200
code (second to last field in this example) indicates that the request
was successful – but see below for an explanation of what “success”
means in this situation.



This is usually the result of malicious clients trying to exploit open
proxy servers to access a website without revealing their true
location. They could be doing this to manipulate pay-per-click ad
systems, to add comment or link-spam to someone else's site, or just
to do something nasty without being detected.




It is important to prevent your server from being used as an open
proxy to abuse other sites.



IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready & IPv6: ADDRCONF(NETDEV_UP): xenbr2: link is not ready on Ubuntu Server - Xen bridge



Hi all,
I am having some problems getting a Xen bridge up in Ubuntu precise with Xen.
I created a first bridge on eth1 with no problems, but the exact same process for eth2 yields the following problems:





/etc/network/interfaces

auto xenbr1
iface xenbr1inet manual
bridge_ports eth1
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off



auto xenbr2
iface xenbr2 inet manual
bridge_ports eth2
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off









ifup xenbr2
Waiting for xenbr2 to get ready (MAXWAIT is 20 seconds).
ssh stop/waiting
ssh start/running, process 10377
(Takes quite a while)








dmesg | tail
[108513.254296] device eth2 entered promiscuous mode
[108513.390125] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
[108513.410895] IPv6: ADDRCONF(NETDEV_UP): xenbr2: link is not ready









ifconfig eth2
eth2 Link encap:Ethernet direcciónHW 00:26:b9:46:61:1d

ACTIVO DIFUSIÓN MULTICAST MTU:1500 Métrica:1
Paquetes RX:0 errores:0 perdidos:0 overruns:0 frame:0
Paquetes TX:0 errores:0 perdidos:0 overruns:0 carrier:0
colisiones:0 long.colaTX:1000
Bytes RX:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupción:16







I have tried adding the following lines to sysctl:





net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1




No joy there...



Does anyone know where I am messing up?
Cheers for the help!


Answer



It was a driver issue.
Compiled ethernet drivers from compat-drivers and it worked.
https://backports.wiki.kernel.org/index.php/Releases


ubuntu - Dual monitor screens squeezed into single screen when remote viewing

My setup includes ubuntu 16.04 and dual monitors. Nvidia drivers are installed for the proprietary graphics card Quadro K1200. When using Nomachine to remote control this desktop from a windows laptop having one screen 1920x1080, the two 1920x1080 screens of the dual-setup get squeezed into one and are shown as one screen of 3840x1080.


Now obviously when such a large screen of size 3840 is tried to fit in only 1920 pixels, display quality is very poor and screen is unreadable. But clearly Nomachine claims that it can detect multiple screens and allow user to view one screen at a time. Even Nvidia x-server settings on ubuntu say that screen resolution is 3840x1080.


So is it possible that nvidia is merging the two screens into one and that is why Nomachine is not able to detect 2 screens? Is there any other software recommendation that can be made that will work out of box in such scenario?


EDIT:-


I installed several other desktop environments in Ubuntu unity like lxde, xfce, lubuntu, xubuntu, mate, enlightenment, plasma. Upon doing this, afterwards i turned off my dual monitors and tried remote viewing the ubuntu desktop from a windows laptop and voila!, the contents on the 2 screens were squeezed to one screen of 1920x1080 and there is no quality loss. This is because now Nomachine thinks my ubuntu desktop is single monitor of 1920x1080 and it has to broadcast it to my windows laptop which is also a single screen of 1920x1080. Things work out perfectly.


Everything is readable now with the 'Fit to Windows' Options selected. Earlier with this option selected for my 1920x1080 laptop, contents were rendered unreadable because as i was telling you that Nomachine was for some reason trying to capture the 3840x1080 screen onto my laptop's screen. So everything got squeezed and zero readability. When i unchecked Fit to Windows, readability was perfect but to move from one region of screen to another i had to use scroll bars which was annoying. The entire screen should be visible at once on my laptop.


Teamviewer handles this by creating separate screens for each monitor and allows switching between multiple displays and that worked. I don't know why it did not wokr earlier for Nomachine and now after installing different DEs, it works now. But it only works in the sense that now Nomachine reads my ubuntu server as a single 1920x1080 screen, not 2 screens of 1920x1080, so it combines the contents of the two screens on ubuntu computer to one screen while remote viewed using Nomachine from windows laptop. Maybe some dependency package installed during installation of DEs helped me out.

windows 7 - Hard Drive Remaining Space Not Matching up With Current Space

my hard drive is reported to have 65GB left out of a possible 223GB, however running WinDirStat and doing it via Windows, the hard drive only has about 60GB of used space. Where has the other 150GB of space gone?


I've googled this issue and most answers say some Windows files are hidden, but 150GB of hidden files seems rather extreme to me.


Here is a screenshot:


screenshot of the drives

centos - Do I need to restart/reload apache when adding a configuration file under /etc/httpd/conf.d



Do you need to restart/reload Apache when adding a configuration file under /etc/httpd/conf.d?



I know that editing the httpd.conf need a restart or a reload but unsure if file placed in the conf.d need apache to get restarted.




Thanks for the help



EDIT: I was under the impression that addition to /conf.d would need a regular/graceful restart but several times configuration files I've added to that directory made an effect without having to restart. This is the reason that led me to ask this question.


Answer



Yes. conf.d files are included in Apache's configuration with a line like:



Include conf.d/*.conf



so changes are only noticed when the main configuration is reloaded. Note you can also use the 'graceful' restart (/etc/init.d/httpd graceful on some, apachectl graceful on others) to reload the configuration without dropping existing connections.


Dell Inspiron N5030 restore factory settings from Windows 8



My stepson has a Dell Inspiron N5030 that did have a recovery partition on it. Early in the year we upgraded to Windows 8 but he is no longer happy with it and wants to go back.




We've tried a few things but don't seem to be able to find how to get back to Windows 7. We managed to get into the advanced boot options but the Dell system restore tool doesn't seem to be available.



Can anybody help, or have we lost our factory image?


Answer



If you have a product key for Windows 7 that came with the laptop then you should be able to use a retail CD or download an appropriate ISO (see Where can I download Windows 7 (legally from Microsoft)?) and use that key to activate it with an OEM license. There are many forum posts on the internet where people have reported success doing this, although some claim that you need to choose to activate by phone.


Sunday, June 28, 2015

port forwarding - How to use iptables to forward requests to a jBoss server running on a different machine?



I have 3 machines with the following IP addresses : -



Machine 1 : - 10.10.10.20 Machine 2 :- 10.10.10.21 Machine 3 : - 10.10.10.22




The jBoss server is started on Machine 1 and Machine 3 is client. If I type 10.10.10.21 (ip address of Machine 2) in the browser on Machine 3, I should be redirected to the the default jBoss page of the jBoss server launched on Machine 1. However, typing 10.10.10.20 (IP address of Machine 1) in the browser on Machine 3 should not work. That is, the client on Machine 3 should be able to access the jBoss server on Machine 1 only through Machine 2 and not directly.



Note that the 3 machines are a part of a private network with a firewall. I was thinking of using iptables on machine 2 (RHEL installed) but I am unable to use it properly.



Can anyone suggest how I can achieve this setup (using iptables or by any other means)



I tried running the the following iptables command on Machine 2: -



    iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to-destination     10.10.10.20



But I am still unable to access Machine 1 from Machine 3 through Machine 2.



Thanks, bot


Answer



I managed to forward requests coming to Machine 2 to Machine 3 by using iptables. Ignore the comments in the script as they may not be correct explanations for the commands.



    #!/bin/bash

#Execute the following command to enable ip forwarding if it is not already enabled.

#echo 1 > /proc/sys/net/ipv4/ip_forward

#nat to forward all requests to specified ports on Machine 2 to specified ports on Machine 1.
iptables -t nat -A PREROUTING -p tcp -d 10.10.10.21 --dport 80 -j DNAT --to 10.10.10.20:80
iptables -t nat -A PREROUTING -p tcp -d 10.10.10.21 --dport 1099 -j DNAT --to 10.10.10.20:1099
iptables -t nat -A PREROUTING -p tcp -d 10.10.10.21 --dport 1098 -j DNAT --to 10.10.10.20:1098

#Allow response from Machine 1 to Machine 2.
iptables -t nat -A POSTROUTING -d 10.10.10.20 -j MASQUERADE



This script causes all http,rmi and naming service requests made to Machine 2 to be forwarded to Machine 1.


Where have the Scheduled Tasks gone to in Windows 7?


I cannot find Scheduled Tasks under control panel.
Where did they move it?


Answer



Open up the Task Scheduler by either typing "task" into the Start Menu search bar, or by opening All Programs > Accesories > System Tools


Source: How to Create a Automated Task that Runs at a Set Time in Windows 7


networking - Network stops working on Windows 8.1 but existing connections continue to work until closed


I have a Windows 8.1 desktop machine (spec below) that has been running fine for over a year.


Over the last couple of months, roughly once a week, my network connections stop working. If I reboot Windows, it all starts working again until next time. Network is physical with static IP. Wireless on same machine also fails when this occurs. Other devices on wireless or physical cable continue to work.


What I see when this happens is:



  • The DropBox system tray icon shows there is no connection (i.e no sync or green tick icons)

  • No web page will load from any browser. I don't get an error, browser just does nothing, but shows URL in address field

  • RDP/SSH to other machines fails. I have a permanent RDP connection open to another local machine that continues to work when the rest of the networking stops. If I close it, it won't reconnect.


I checked the Event Logs, and have found nothing that points to the problem. I have also tried Google and found nothing.


Can't remember what happens if I try to PING an IP locally or remotely. I think it works, but as I am not in front of that machine right now I cannot say for sure. I will update later.


Although the reboots don't take too long, it is becoming annoying to keep having to do this. So I'd like to find a solution...


Machine Specification



  • Windows 8.1 Pro

  • Intel Core i7-4770K 3.5GHz

  • Asus Z87 Deluxe Quad Motherboard

  • 16GB RAM (4 x 4GB Crucial Memory)

  • Samsung 840 128GB SSD Hard Disk


Answer



This sounds like ephemeral port exhaustion.
When you start a new TCP connection to another network address, it needs to have a source port number. When lots of connections are established, Windows runs out of source ports, and cannot create new connections. Existing, established connections still work OK. Ping still works, because it uses ICMP, not TCP - and DNS lookups should still work because they largely use UDP instead of TCP.
To find out what's causing all these connections, you need to open an elevated command prompt. Run netstat -anb, and look for processes with a large number of connections in the ESTABLISHED or TIME_WAIT state. You can get a count of these by running netstat -an | find /C "TIME_WAIT".
If the process with the most such connections is SYSTEM (with PID 4), this means that the connections were started by a process which is no longer running, so keep an eye out for processes starting and closing very quickly.
Hopefully, you can identify which process is/was responsible for the port exhaustion and either fix it (maybe a patch available for the software?) or remove it.
You can tweak Windows a bit, too - by changing the number of ephemeral ports it has available to it. By default, it can use ports 49,152 to 65,535 - giving a total of 16,384. You can verify this setting with the command netsh int ipv4 show dynamicport tcp.
If you want to adjust this, you can change the setting with a command like netsh int ipv4 set dynamicport tcp start=32767 num=32768, which tells Windows it can use 32,768 ports, starting from port number 32,767 (taking it up to the highest port possible; 65,535). Changing the port range from the default isn't a permanent fix. It's better to find out what is causing the problem in the first place, and address that. It might be some kind of malware, eg a botnet infection which is causing your computer to send thousands of spam emails per minute, or might be being used as part of a DDoS attack. Or it could just be a bug in some legitimate software.


domain name system - SPF record when sending mails from two different IPs





  1. I have somedomain.com on IP 1.1.1.1


  2. I send/receive mail using Outlook connecting to mail.somedomain.com




So my DNS records for somedomain.com are the typical:



www.somedomain.com >>> A >>> 1.1.1.1
somedomain.com >>> A >>> 1.1.1.1
somedomain.com >>> MX >>> mail.somedomain.com
mail.somedomain.com >>> A >>> 1.1.1.1



But I also send some mails (using directly PHP mail function) from another server that is on anotherdomain.com and IP 2.2.2.2



I tried to setup SPF record using Microsoft wizard (the old days Open SPF wizard does NOT work anymore)



The SPF created by the wizard is this:



v=spf1 a mx ip4:1.1.1.1 mx:mail.somedomain.com ip4:2.2.2.2 -all



But I get some mails returning back when sent from 2.2.2.2 with the message: SPF Failed - not authorized message



Do you know what the right SPF value is for this scenario?






EDIT 1: as asked by Minsuk Song I post the SPF failed message



This message was created automatically by mail delivery software.


A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

private@tiscali.it
SMTP error from remote mail server after MAIL FROM: SIZE=120379:
host imp-3.mail.tiscali.it [213.205.33.247]: 550 5.1.0 SPF Failed - not authorized

------ This is a copy of the message, including all the headers. ------
------ The body of the message is 116808 characters long; only the first

------ 106496 or so are included here.

Return-path:
Received: from mild by server081.mildfred.com with local (Exim 4.77)
(envelope-from )
id 1SRRp1-001a8D-8Z; Mon, 07 May 2012 13:34:07 -0400
To:
Subject: ...






EDIT 2: as correctly noticed by nickgrim when I send mail from IP 2.2.2.2 I send them using an address that is on the somedomain.com (which is on IP 1.1.1.1). The reason I do this is that in case the mail gets rejected for any reason (as it happened) I get notified on an existing address .


Answer



At first, correct SPF record for your domain somedomain.com is...



somedomain.com. IN TXT "v=spf1 mx ip4:2.2.2.2 -all"


which means you will send mails only from your mail server (defined in MX record) mail.somedomain.com or a host with ip address 2.2.2.2.




And these mails should have somedomain.com in their "HELO" or "MAIL FROM" identity during mail transactions.



Marco, would you show the mail header that returned as authorization failed?


linux - I can't find the ghosts taking up space on my hard drive




No Free disk space





$df -h


returns



/dev/sda1              16G   16G     0 100% /
tmpfs 502M 0 502M 0% /lib/init/rw
udev 497M 116K 497M 1% /dev

tmpfs 502M 0 502M 0% /dev/shm
/dev/sdb1 2.0T 886G 1.1T 47% /srv/ftp
/dev/sdc1 16G 12G 3.9G 75% /var/opt/CrushFTP6_PC/TempAccounts


then



$du -hs * | sort -rh



returns



886G    srv
12G var
838M usr
119M lib
15M boot
5.8M bin
5.6M etc
4.6M sbin

2.4M lib32
120K root
116K dev


The 886GB is on /dev/sdb1



the 12GB is on /dev/sdc1



Please help me figure out where the space is going on /dev/sda1. Are there files that I deleted that are still in use? If so how can I find them?

hard drive - How can I repartition and format 'Toshiba USB 2.0 ext HDD USB device' containing CDFS partition?



[Edited 19 jan 2014]
I have rephrased the question and added additional info about failed attempts. The presence of the CDFS partition is essential and has blocked all attempts so far; also this makes this post not a duplicate as some people have suggested.
[end edit]




I have a Toshiba USB 2.0 ext HDD USB device that presents itself as two partitions named Password (G:, CDFS, 20 MB) and SECURE DISK (H:, FAT32, 300GB).
The G: drive is full of driver stuff (Mac and PC), and executables in the root named Autopoll Application V1.01.exe, ONSPCLCK.exe.



Copying a 4.6 GB file to the disk fails with 'disk is full'.



How can I reorganize/reformat the drive into one partition (NTFS). I don't need the fancy options of the stuff on the G: drive.



I'm running XP.



Under hardware, properties I see that it just uses the Microsoft driver.




Under hardware, properties, details it says the following:
Hardware-ID's:
USBSTOR\DiskToshiba_USB_2.0_Ext._HDD1.14
USBSTOR\DiskToshiba_USB_2.0_Ext.HDD
USBSTOR\DiskToshiba

USBSTOR\Toshiba_USB_2.0_Ext._HDD1
Toshiba_USB_2.0_Ext._HDD1
USBSTOR\GenDisk
GenDisk



It has no labels or names on the housing other than the word Toshiba.



[Added 14/1/2014] Failed attempts so far:
(TL;DR: No luck yet)



Attempt 1) Disk management



I was able to remove H: bit not the CDFS partition G: There's no option for that. It is 'recognized' as a CD-ROM, probably because of the CDFS file system.




Attempt 2) DISKPART



LIST PARTITION sees G:



Volume ###  Ltr  Label        FS     Type        Grootte  Status     Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 F Dvd-rom 0 B
Volume 1 Z Dvd-rom 0 B
Volume 2 X Dvd-rom 0 B
Volume 3 G Password CDFS Cd-rom-sta 20 MB

Volume 4 E DATA2 NTFS partitie 153 GB In orde
Volume 5 C SYSTEM NTFS partitie 233 GB In orde Systeem
Volume 6 D DATA1 NTFS partitie 233 GB In orde Wisselbe


C,D,E are my hard disks, X and Z are mounted drives in Daemon Tools Lite



Listing partitions on disk 3 fails:



DISKPART> select disk 3

Schijf 3 is nu de geselecteerde schijf.
DISKPART> list partition
Er zijn geen partities op deze schijf die kunnen worden weergegeven.
DISKPART> detail disk
There are no volumes


(Remember I had already removed H:)



I thought "Let's be bold":




DISKPART> clean
DiskPart heeft de schijf opgeruimd.


Next I started disk management and the Windows wizard for initializing disks came up.
I let it initialize disk 3, created a primary partition (H was the lowest drive letter I could assign), then let it be formatted for NTFS.



And then it turned out that the old G: partition was still there. ;-(



Attempt 3) MiniTool Partition Wizard 8.1.1




(recommended in this post)
It saw the H: partition, plus 8 MB unalloacted space, but not the G: partition
I told it to wipe the disk -> Same negative result, the G: drive remains



Attempt 4) BootIce
(as suggested in Julians answer)



I told it to wipe the disk, same results. Hex editing the disk is above my powers.



Attempt 5) ChipGenius version 4




This posts suggests using ChipGenius to detect the exact make of the chip in the usb, so that you can then flash the drive's firmware.
ChipGenius failed to detect the controller part-number, chip vendor, or chip part number, Maybe not a surprise, because it's not an 'ordinary' flash pen drive.
Note that it says 'Device Name: USB 2.0 CD + HDD' and 'Product Model: USB 2.0 CD-ROM/USB 2.0 Ext. HDD' which is exactly my problem ;-)



Attempt 6) SwissKnife
(Suggested in that same forum post)



I found an older free version 3.22, but that did not let me manage partitions or do anything with the G: partition ('access denied').
Paying for the premium version may be wasted money.



Attempt 7) GParted
I downloaded the Live boot CD. GParted sees the drive as the \dev\sdd device (unallocated).
I tried the only option that was available 'Create partition table'. Alas, after booting back into Windows, the CDFS G: partition was still there.



I will now attempt [Knoppix]. Never seen Linux before ;-)


Answer




You can't delete the CDFS partition because it's not on the hard disk, it's on a write-protected flash memory chip (probably on the board inside the USB enclosure). It's there to provide some kind of feature from Toshiba, possibly OnSpec's password protection.



The "ClickFree" brand of USB hard drives have something similar. There's a post here of someone replacing the firmware with a version that doesn't use the flash memory. I couldn't find firmware for a Toshiba PX1220E-1G25.


windows 7 - Swapping hard disks of systems with different configurations

I swapped hard disks of two systems, Windows 7 installed on both. Here are the configurations:
(1) Intel 845 chipset, Celeron processor 1.60 Ghz, 1 GB RAM, 80 GB hard disk
(2) Intel 945G chipset, Core 2 Duo processor 2.80 Ghz, 2 GB RAM, 160 GB hard disk


After swapping both systems are working fine same as before.


But before swapping my colleagues and my computer vendor were saying it will not work. They said the configuration difference is high, they have tried it on other systems with Windows XP installed and it don't work.


So I want to know is this just my luck or Windows 7 has such features? Is this possible with other operating systems also?

Windows update searches(error) with service disabled(win7)

I'm trying to run windows update on a machine with an image, a colleague made some time back. But every time I search for updates it gives me the 8007000E error.
I have tried turning the service off, but it still tries to search for updates and gives me the same error.


It's a 32-bit Win7 SP1 with latest updates being from January 2016.


I've tried a bunch of stuff from this MS article and so far nothing works.


Error message is:



An error occured while checking for new updates for your computer.



Edit: I ran sfc /scannow and it told me I had corrupt windows files that it could not fix. Same goes for the MS Fixit I ran.


Update: I tried to install the newest version of the Windows Update agent, it didn't work.


Update 2: I tried repairing with the windows disc, did not work either.

Adding bindings to multiple SSL certificates for the same site IIS



Given the following scenario; i have 2 domains - mysite.com and deploymysite.com, mysite.com is pointed at our live server farm which is created from an image of our deploy machine.



I want to point the domain deploymysite.com at this deploy machine. I have an SSL certificate for *.mysite.com which of course does not work for deploymysite.com.




If I purchase an additional SSL certificate for this domain, is it possible in IIS (8.5) to add a separate SSL certificate for the 'same site' but have it bound to a different domain?



I'm looking at the site bindings dialog, and specifically the IP address field, wondering if it is possible to configure this with 2 SSL certs for 2 different domains for the same site?



Many Thanks


Answer



If you need it to be one site you must have one certificate with entries for both domains.



You can host multiple sites with duplicate content on a single IP by using Server Name Indication (SNI) but then they won't share state.




Alternatively you can host a redirect on the 2nd site.


linux - Error reading from file: Input/output error



Good day everyone
I do not understand why i can't access the file on my flash drive. I edited the said file less than 2 minutes, saved it, made sure to click the unmount button and restarted my computer (i learned to click the unmount the hard way). Now when i tried to access the file its giving me the following error:
Unexpected error: Error reading from file: Input/output error


when i try to copy it to another location on the drive i get the following
Error opening file '/media/ubuntu/Drive Name/New Folder/file name': Read-only file system


When i copy the file to the desktop i get the following:
Error splicing file: Input/output error


But when i am able to open the file and a SIGNIFICANT AMOUNT of detail is missing. about 6 months worth of detail. Please i must recover the full amount of details in that document. Since i added info and saved it under that same name, will disk carving be of any help?


Thank you very much


Answer



Sound like a defective/corrupted drive/file/file system.


This is important:


You should immediately make an "raw" image of the drive and try to restore/recover the file form the image. Do not try to write to the flash drive. This might result on more loss. Better don't use the drive at all except for making the image.


Once you have the image, try to mount it and see if the corruption is only on the one file. After that you have to start to recover the file manually but it might not be possible at all. Please post the specific problems for further help.


And backup your data on a daily basis so you won't have to learn it the hard way again!


memory - Why our server with centOS i686 showing 14 GB usable RAM

We have CentOS server 6 i686 (installed by previous employee) on blade server which is having 32GB RAM (4GB x 8 slots).
The usable RAM is 14GB.


My question is why it is showing 14GB instead of 4GB, which is maximum for 32-bit OS.
Can I remove RAM in 4 slots to have total 16GB RAM, then what will be the usable RAM?

Forgotten BIOS supervisor password--Lenovo B570


I've tried everything possible to reset the supervisor password on my Lenovo B570 laptop: looking for a non-existent CMOS battery, trying to run some of those software tools that are supposed to give you the answer, etc. Everything. Does anyone here know what I can do? I assure you that it is my laptop, and that the reason I am trying to do this is that Wi-Fi is disabled via BIOS and I can't turn it back on without the password my Dad forgot.


Answer



A forgotten Supervisor password will prevent access to the ThinkPad BIOS setup utility. To regain access, the system will need to be serviced to have the system board and hard drive replaced. Proof of purchase is required, and this repair is not covered under the warranty.


I think you should take a look at these links : http://support.lenovo.com/en_US/detail.page?LegacyDocID=migr-59377


http://www.tomshardware.com/forum/67551-35-method-reset-bios-password-lenovo-motherboard


http://www.helpowl.com/q/Lenovo/B570/Reviews,-Ratings-and-Opinions/bypass-bios-password-lenovo-b570-laptop/196908


Unfortunately, there is no way to bypass the BIOS password of your Lenovo computer. This is set by the manufacturer to create security feature in your computer. However, the best thing you have to do is not to set any password in the BIOS if you don't need that security feature. You may only set your BIOS password if you believe that there are other people who might access you device without your permission.


VGA output to USB input

I have two computers here (A and B), and i would like to view computer A display on compter B. I'm aware that this can be done via VNC but its too slow. I am wondering if there are any cables+software available that will capture the video output from computer A and convert that to a USB video input for Computer B. Something like a VGA (or DVI or HDMI) output to USB input converter.


Cheers

data recovery - Diagnose sound of damaged hard drive



I'm trying to recover some data form a 3TB Western Digital drive (WD30EZRX) that was part of a MyBook USB 3 enclosure. I'm pretty new to data recovery, and I'm having trouble diagnosing the precise issue.



I believe it is damaged hardware based on:




  • The drive emits the same strange sound when connected via SATA or its USB enclosure (see video: https://youtu.be/DsOaV9svMK4)


  • My BIOS can read the model number from the drive, but it reports the size as 0 bytes and does not show any other information (Serial Number, etc.)

  • Ubuntu dmesg reports errors when attempting to spin up the drive

  • The disk is not discoverable by testdisk

  • In Windows Disk Management, the drive shows as Not Initialized. Of course, I haven't attempted to initialize it because from what I have read, that will cause the data to be lost.



Basically, I'm wondering if someone with a little experience can watch the linked video and give me any insights into that sound. I'm trying to determine if it's likely a PCB failure or something more serious.



Update




I worked on the drive a bit more. SpeedFan did not recognize the drive, so I was not able to use it to read SMART data (smartctl also failed to read any SMART data from the drive).



When I connected the drive via the USB enclosure, this is the dmesg output:



[ 3254.012111] usb 1-7: new high-speed USB device number 14 using xhci_hcd
[ 3254.140508] usb 1-7: New USB device found, idVendor=1058, idProduct=1140
[ 3254.140513] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 3254.140516] usb 1-7: Product: My Book 1140
[ 3254.140519] usb 1-7: Manufacturer: Western Digital
[ 3254.141227] usb-storage 1-7:1.0: USB Mass Storage device detected

[ 3254.141380] scsi host16: usb-storage 1-7:1.0
[ 3255.139027] scsi 16:0:0:0: Direct-Access WD My Book 1140 1019 PQ: 0 ANSI: 6
[ 3255.139198] scsi 16:0:0:1: Enclosure WD SES Device 1019 PQ: 0 ANSI: 6
[ 3255.140362] sd 16:0:0:0: Attached scsi generic sg11 type 0
[ 3255.140498] ses 16:0:0:1: Attached Enclosure device
[ 3255.140595] ses 16:0:0:1: Attached scsi generic sg12 type 13
[ 3255.141301] ses 16:0:0:1: Failed to get diagnostic page 0x8000002
[ 3255.141305] ses 16:0:0:1: Failed to bind enclosure -19
[ 3255.141615] sd 16:0:0:0: [sdk] Unit Not Ready
[ 3255.141622] sd 16:0:0:0: [sdk] Sense Key : Hardware Error [current]

[ 3255.141627] sd 16:0:0:0: [sdk] Add. Sense: Internal target failure


I tried running lshw -C Disk as suggested. It took a very long time, but eventually returned this:



*-disk UNCLAIMED
description: SCSI Disk
product: My Book 1140
vendor: WD
physical id: 0.0.0

bus info: scsi@16:0.0.0
version: 1019
configuration: ansiversion=6


The only thought I've had is that Western Digital has this proprietary SES driver which they describe as an alternative way to communicate with the drive. I was thinking it could possibly be used to recover data, but I have no idea how it would work. The drive does show up as an SES device in Windows Device manager.



Beyond that, I'm pretty much out of ideas. I guess it's time to get some data recovery estimates. Thanks to all who helped.


Answer



I'm pretty sure that sound is the drive resetting over and over while trying to initialize, because the drive is damaged.




So the drive is never finishing initializing properly, and therefore never goes into a mode that it can be read fully (firmware or data).



Additionally, the fact you can't get SMART data from it leads me to think the circuitry on the drive is malfunctioning.



If the BIOS can't recognize the size of the drive then most likely no data recovery software is going to be able to work.



Replacing the PCB on the drive with another from another (working) drive of the EXACT same make, model and revision may make it so the drive can be initialized, etc., but that rarely works in my experience.



If you really need the data, stop messing with it and send it off to a professional data recovery firm (the more you play with it, the more likely your data will be damaged further).




Good luck!


Saturday, June 27, 2015

mirror - Why don't these raid levels exists?



I've been looking at my raid setups and I am beginning to really hate raid 1. During a drive failure, you don't know if the data on the other drive is correct or not. And what if one drive reads 1 and the other 0 without failure? How do you know which drive is correct?



Sure you could go with raid 6, but its a minimum of 4 drives. I think you can do the same with just 2 drives.



I've come up with a few raid levels, but why don't they exist?





  1. Raid on a single drive that also uses forward error correction like par2

  2. Like #1 but also mirrored (now you can ensure data is correct during failure)



This would require some custom hardware to perform the par2 calculation quickly. Also since its par2, for each drive you add to the array the par2 files can be smaller and smaller, since the amount of redundancy is the sum of the total size of the par2 files. See this to learn more about par2: http://www.quickpar.org.uk/AboutPAR2.htm


Answer



You just need a ZFS mirror. You're guaranteed consistent data based on COW and constant checksumming.


boot - Remove Fujitsu Lifebook Bios Password on Startup

I Tried to remove the Boot up Bios password in a Fujitsu Lifebook Bios SH530 Model. But it still asking for password on bootup and now may password did not work. Can anybody help me? Here's what I did:



  1. Press F12 on Bootup

  2. Sign in using the old password

  3. Go to Security Settings Tab

  4. Change the Boot up Password by Typing in the Current Password and leaving the New Password Inputbox Blank. I just press enter 2x.

  5. exit the bios screen and save settings

  6. <-- The Worst next time I Boot up it still ask for password but my old password did not work. I tried just leaving it blank and press enter but it is Invalid! I tried 3x and wooops a non stop long beepp sounded with SYSTEM DISABLED on screen no Hash code or what so ever.


What did I do Wrong? Do anyone have this experience? What did you do to solve this problem?


PS. I do not know the supervisor password for it.


UPDATE:



  • It seems the Master Password will only show up on boot before loading windows 7. If will not show up on Bios Settings. I'm currently using this page to decrypt the hash code http://bios-pw.org/


  • My question now is how do you display the Master Password Hash in Bios Setup? If I can get it I can decrypt it and hopefully remove the password.


USB keyboard 'shuts down' when holding keys



When I do not create a keyboard event (i.e. pressing or releasing a key) for more than 5 seconds, the numlock and other LEDs on my keyboard go off. When I'm holding a key for more than 5 seconds and the keyboard 'shuts down', I also hear the device disconnected sound in Windows 8.1.




I've never had this until I got this new keyboard, a "microsoft wired keyboard 200". My USB mouse still seems to work properly even when the keyboard shuts down.



It's really annoying because I can't hold any key (including Shift or Backspace) for more than a few seconds and I constantly see the LEDs flashing.



When I press or release a button, the keyboard will go on instantly again, but when it's done by releasing a key, the "release event" will not be sent to the PC, causing the key to be "stuck" while it actually isn't pressed. This is solved by pressing it again.



Does anyone know a solution for this problem?


Answer



Go to Control Panel > Hardware and Sound > Devices and Printers




Right click on your USB Keyboard, go to Properties, then the Hardware tab.



Highlight USB Input Device (this is the part that doesn't show up under Device Manager) and click on Properties. Click on Change settings.



Go to the Power Management tab and uncheck 'Allow the computer to turn off this device to save power'



That should do it. The keyboard wont shut off after not using it, and it wont shut off from holding down a key for 5 seconds.



UPDATE:

as it was asked in comments
Fix: Allow the computer to turn off this device to save power is greyed out



enter image description here



It clearly shows that you can’t adjust the mouse which is an external hardware device; to be turned off / on while not in use. So how to change this settings? Well, a registry manipulation will help you to fix this. This fix is applicable to the devices supporting Plug-n-Play (PnP) capabilities. Here is how:




  • 1) Open Device Manager, by pressing Windows Key + R key combination and inputting devmgmt.msc in the Run dialog box and hit Enter.




DEVMGMT.MSC Fix: Allow the computer to turn off this device to save power is greyed out




  • 2) In the Device Manager, expand the Mice and other pointing devices, right click on the device and select Properties for which you’re facing the issue.



enter image description here



Cannot turn off Mouse 4 Fix: Allow the computer to turn off this device to save power is greyed out





  • 3) Now in the Properties window, switch to Details tab, select the Property as Driver Key. Copy the key as shown below. The last portion after \ of the Value so copied is device number which is 0000 in our case.



enter image description here
Cannot turn off Mouse 5 Fix: Allow the computer to turn off this device to save power is greyed out




  • 4) Moving on, press Windows Key + R combination, type put Regedt32.exe in Run dialog box and hit Enter to open the Registry Editor.




enter image description here



REGEDIT Fix: Allow the computer to turn off this device to save power is greyed out




  • 5) Navigate to the following location:



    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\Driver Key





Where you have to substitute Driver Key obtained in step 3.



Cannot turn off Mouse 6 Fix: Allow the computer to turn off this device to save power is greyed out



enter image description here




  • 6) In the right pane of this location, you’ve to look for the DWORD named PnPCapabilities. If the DWORD doesn’t exists, you can create it using right click -> New -> DWORD Value. It must be having the default Value data set to 0, which means that the device is getting power even while not in use. Double click on the same DWORD to modify its Value data:




Greyed Power Mgmt 2 Fix: Allow the computer to turn off this device to save power is greyed out



enter image description here




  • 7) In the above shown box, input the Value data to 24 in order to enable computer to turn off the device while it is idle. You may now close the Registry Editor and reboot the machine to make changes effective.




That’s it!


linux - SSSD on Centos, Active Directory search returns zero results



Basic Info



I'm running sssd (1.13.3-22) on Centos (6.8) to authenticate with Active Directory (2012). I do not wish to use uid numbers stored in AD, so I have ldap_id_mapping set to true.




When I run "id ValidUsername" I get the response "No Such User". I look in the sssd domain log and see the ldap search for ValidUsername returned no results. When I run the same query with ldapsearch it also returns no results, but I can modify the query to exclude uidNumber and it will return a result. See details below for ldap query info.



Detailed Info



sssd_VALID.DOMAIN.CORP.log Snippet



[sdap_search_user_next_base] (0x0400): Searching for users with base [DC=valid,DC=domain,DC=corp]
[sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&(sAMAccountName=ValidUsername)(objectclass=user)(sAMAccountName=*)(&(uidNumber=*)(!(uidNumber=0))))][DC=valid,DC=domain,DC=corp].
[sdap_get_generic_op_finished] (0x0400): Search result: Success(0), no errmsg set
[sdap_search_user_process] (0x0400): Search for users, returned 0 results.

[sdap_get_users_done] (0x0040): Failed to retrieve users
[sysdb_search_by_name] (0x0400): No such entry
[sysdb_delete_user] (0x0400): Error: 2 (No such file or directory)
[acctinfo_callback] (0x0100): Request processed. Returned 0,0,Success
[be_ptask_online_cb] (0x0400): Back end is online


The ldap query sssd used is listed in the log at [sdap_get_generic_ext_step]. If I take the same query and test it by running ldap search, I also get no result:



ldapsearch -LLL -Y GSSAPI -N -H ldap://dc1.valid.domain.corp -b "DC=valid,DC=domain,DC=corp" '(&(sAMAccountName=ValidUsername)(objectclass=user)(sAMAccountName=*)(&(uidNumber=*)(!(uidNumber=0))))'



However, if I remove the uidNumber lookup parts of the query, I get the expected user data as a result:



ldapsearch -LLL -Y GSSAPI -N -H ldap://dc1.valid.domain.corp -b "DC=valid,DC=domain,DC=corp" '(&(sAMAccountName=ValidUsername)(objectclass=user)(sAMAccountName=*))'


If ldap_id_mapping is set to true, why is sssd querying AD for uidNumber data? I checked the user attributes and the uidNumber attribute has no value, so sssd won't work unless I populate this value. Microsoft is deprecating the management tools for unix attributes, so I'd prefer to not bother with them.



I'd don't want to use winbind, which has been flaky for me in the past.




Is there any config item I can use to force sssd to send a valid user lookup query? Or is there something else I'm missing?



sssd.conf



[sssd]
config_file_version = 2
debug_level = 6
domains = VALID.DOMAIN.CORP
services = nss, pam


[nss]
debug_level = 6

[pam]
debug_level = 6

[domain/VALID.DOMAIN.CORP]
debug_level = 8


id_provider = ad
access_provider = ad
auth_provider = ad
chpass_provider = ad
subdomains_provider = none

dyndns_update = false

ad_server = dc1.VALID.DOMAIN.corp
ad_backup_server = dc2.VALID.DOMAIN.corp


ldap_id_mapping = true
ldap_schema = ad

fallback_homedir = /home/%d/%u
default_shell = /bin/bash


smb.conf




workgroup = VALID
client signing = yes
client use spnego = yes
kerberos method = secrets and keytab
realm = VALID.DOMAIN.CORP
security = ads
log file = /var/log/samba/log.%m
max log size = 50

Answer




It's because you set subdomains provider to none. It's a bit counter-intuitive, but the subdomains provider also retrieves information about the joined domain including the SID which is needed for ID mapping.



You have three options:




  1. enable the subdomains provider. I don't know why you disabled it, most people do that in order to work around trusted domain being unreachable

  2. if you need to keep the subdomains provider disabled, you need to manually set the domain SID, see man sssd-ldap and search for "domain_sid"

  3. If you are running 7.3, you can only enable the joined domain using ad_enabled_domains


windows - Reset Accounts on an old Computer

I’m interning at a small software company and trying to set up a local server. I’ve found two old machines that are available for use, running Windows XP and Windows Server 2003.



However, no one knows the passwords for these machines. Is there any way to reset the user accounts without any OS installation discs?

windows 7 - Can Sophisticated Malware, Spyware and Viruses Read Files?

I've recently began encrypting my personal files using veracrypt. I've got my resume, which, obviously contains personal information (name, address, phone number etc.) A little bit of reading here, would suggest that malware goes for the banking/credit card information, so it can read or capture data in some way.



Question:




If for example, my machine was infected with spyware/malware, can it read the data stored on my computer, i.e documents and pictures and send it to someone who might attempt to steal my information?

phpmyadmin having problems on nginx and php-fpm on RHEL 6



We have a web server setup with nginx and php-fpm on RHEL6. This machine already has Wordpress installed, and it runs great. We have wordpress set up to go to wptest.domain.local. We then created a new site in sites-enabled called servername.domain.local, where we wanted to host various tools.



PHP works fine throughout, we have no issues with Wordpress. But when trying to reach phpmyadmin, we get this error




2012/09/14 16:22:13 [error] 10065#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.15, server: servername, request: "GET /phpmyadmin/setup/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "servername"



And here is our sites config:




server_name servername severname.domain.local;
access_log /srv/www/severname/logs/access.log;
error_log /srv/www/severname/logs/error.log;
root /srv/www/severname/public_html;


location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}


location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;

include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/severname/public_html$fastcgi_script_name;
}


PHPmyadmin is installed at /srv/www/servername/public_html/phpmyadmin/.



Yesterday I noticed it said there were some SEGFAULT errors too from PHPMyAdmin.




If I put a phpinfo file in this directory, it works fine. The phpinfo included in Phpmyadmin (which has an include, etc) doesn't work.



The browser displays a '502 Bad Gateway'.



Also, usually after a php-fpm restart, I will see a red box saying 'phpmyadmin -error', then 'cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.'. I tried enabling php logging but get nothing.



I do get this in my error log for the site if I go to phpmyadmin/setup



`2012/09/18 08:12:43 [error] 16722#0: *22 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open(/var/lib/php/session/sess_5d9vhk4jv1f07v2jsltlnp8tdnp7s167, O_RDWR) failed: Permission denied (13) in Unknown on line 0

PHP message: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0" while reading upstream, client: 192.168.1.11, server: servername, request: "GET /phpmyadmin/setup/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "servername"


Answer



From the latest error you posted, it appears that PHP is trying to write session data to disk in a directory that's not actually writable, namely /var/lib/php/session.



Check the ownership and permissions on this directory:



ls -ld /var/lib/php/session


Compare these to the user and group ID under which php-fpm is running. These will be found in the user = and group = declarations in PHP-FPM's pool configuration in /etc/php-fpm.conf or files in the /etc/php-fpm.d/ directory.



linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...