Category: Vino Blogs

How To: Replace a failed Hard Drive in a Software RAID 1 Array

Replacing A Failed Hard Drive In A Software RAID1 Array. This guide shows how to remove a failed hard drive from a Linux RAID1 array (software RAID), and how to add a new hard disk to the RAID1 array without losing data.

In this example I have two hard drives, /dev/sda and /dev/sdb, with the partitions /dev/sda1 and /dev/sda2 as well as /dev/sdb1 and /dev/sdb2.

/dev/sda1 and /dev/sdb1 make up the RAID1 array /dev/md0.

/dev/sda2 and /dev/sdb2 make up the RAID1 array /dev/md1.

/dev/sda1 + /dev/sdb1 = /dev/md0

/dev/sda2 + /dev/sdb2 = /dev/md1

/dev/sdb has failed, and we want to replace it.

How Do I Tell If A Hard Disk Has Failed?

If a disk has failed, you will probably find a lot of error messages in the log files, e.g. /var/log/messages or /var/log/syslog.

You can also run

cat /proc/mdstat

and instead of the string [UU] you will see [U_] if you have a degraded RAID1 array.

Removing The Failed Disk

To remove /dev/sdb, we will mark /dev/sdb1 and /dev/sdb2 as failed and remove them from their respective RAID arrays (/dev/md0 and /dev/md1).

First we mark /dev/sdb1 as failed:

mdadm –manage /dev/md0 –fail /dev/sdb1

The output of

cat /proc/mdstat

should look like this:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[2](F)
24418688 blocks [2/1] [U_]

md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/2] [UU]

unused devices: <none>

Then we remove /dev/sdb1 from /dev/md0:

mdadm –manage /dev/md0 –remove /dev/sdb1

The output should be like this:

server1:~# mdadm –manage /dev/md0 –remove /dev/sdb1
mdadm: hot removed /dev/sdb1

And

cat /proc/mdstat

should show this:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0]
24418688 blocks [2/1] [U_]

md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/2] [UU]

unused devices: <none>

Repeat  the same steps again for /dev/sdb2 (which is part of /dev/md1):

Adding The New Hard Disk

After you have changed the hard disk /dev/sdb, boot the system.

The first thing we must do now is to create the exact same partitioning as on /dev/sda. We can do this with one simple command:

sfdisk -d /dev/sda | sfdisk /dev/sdb

You can run

fdisk -l

to check if both hard drives have the same partitioning now.

Next we add /dev/sdb1 to /dev/md0 and /dev/sdb2 to /dev/md1:

server1:~# mdadm –manage /dev/md0 –add /dev/sdb1
mdadm: re-added /dev/sdb1

server1:~# mdadm –manage /dev/md1 –add /dev/sdb2
mdadm: re-added /dev/sdb2

Now both arays (/dev/md0 and /dev/md1) will be synchronized. Run

cat /proc/mdstat

to see when it’s finished.

During the synchronization the output will look like this:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
24418688 blocks [2/1] [U_]
[=>……………….]  recovery =  9.9% (2423168/24418688) finish=2.8min speed=127535K/sec

md1 : active raid1 sda2[0] sdb2[1]
24418688 blocks [2/1] [U_]
[=>……………….]  recovery =  6.4% (1572096/24418688) finish=1.9min speed=196512K/sec

unused devices: <none>

Categories: Linux

How to Install Fastboot, ADB and Google USB Drivers on Windows 10

Step 1 – Download and latest Java SDK from the following link: Java SE Development Kit 8 Downloads. Proceed to next step after finishing installation.

Step 2 – Download ADB and Fastboot Installer v1.4.3. The tool is a single “.EXE” application.

Step 3 – Run the “adb-setup-1.4.3.exe” which you downloaded in the preceding step, “Run as Administrator”.

Do you want to install ADB and Fastboot? <Y/N> – Type Y

Install ADB system-wide? <Y/N> – Type Y

4 Files copied.

SUCCESS: Specified value was saved.

Do you want to install device drivers? <Y/N> – Type Y

Once you press enter, the program will automatically detect whether you have a 64-Bit or 32-Bit installation of Windows and launch the driver setup respectively.

Device installation wizard will pop up, then click “Next” in the installation wizard

Click on “Install” when asked by Windows Security.

That’s All Folks! You can now utilize ADB and Fastboot utilities by simply opening up a command window and then executing the desired commands.

Now to test it,

  1. make your phone reboot to bootloader
  2. when your phone is on fastboot mode (screen display “fastboot”)
  3. connect your phone to your computer using USB
  4. Open a command window
  5. Type fastboot devices
  6. If all works then #5 will output the device ID

fastboot
usage: fastboot [ <option> ] <command>

commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing partitions
flashing unlock unlocks the device. Allows user to flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related partitions
flashing unlock_critical Enables flashing bootloader related partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message

options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with “devices”, lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable

Categories: OnePlus Tags: Tags: , , ,

Oneplus: Steps to rollback to CM11

Steps to rollback to the stable CM11 in Oneplus one

 

/** PLEASE MANUALLY BACK UP YOUR DATA TO YOUR PC AND SYNC YOUR CONTACTS TO GMAIL CONTACTS (http://androidfact.com/how-to-backup-android-contacts/) **/

** ALL DATA WILL BE LOST **

Files to be downloaded :

1. Google usb driver : http://developer.android.com/sdk/win-usb.html

2. Android SDk : http://developer.android.com/sdk/index.html#download
Scroll down to SDK TOOLS ONLY and download installer_r24.2-windows.exe

3. Twrp custom recovery tool : https://dl.twrp.me/bacon/
download version 2.8.6.1 (latest version)

4. CM11 firmware : https://drive.google.com/folderview?id=0B98G0KTJwnBFRGhZeUNpMEI4ajg&usp=drive_web
download cm 11 firmware

5. CM11 official rom : https://www.androidfilehost.com/?fid=95916177934527555

PROCEDURE:

Step 1 : Installing adb and fastboot drivers

Installing this drivers allows you to access your phone from your PC command prompt terminal.

Use the google usb driver that you have downloaded.

Step 2 : Unlocking bootloader and installing custom recovery

Install the Android SDK and Install the following packages (there are a total of 4 packages):
– Tools > Android SDK Tools, Android SDK Platform-tools
– Extras > Android Support Library, Google USB Driver

After installing the SDK go to C:\Program Files\Android\android-sdk\platform-tools
And in this window press shift + right click mouse button, you should see a option OPEN COMMAND WINDOW HERE select it.

To confirm that the above steps are indeed working, open a command prompt window and enter the following command in the terminal:

adb version

If it displays “Android Debug Bridge version x.x.xx” it is working. If it is gives an error saying that adb is not a recognized command, it has not been successful. Carefully repeat the steps above if this is the case. Close the command prompt window when you are done.

Now lets unlock bootloader

Unlocking Bootloader: Opens the door to the internal memory of the device to be written on to.This allows you to flash images onto the main partitions of the phone

->Turn the phone off. Then boot it into fastboot mode by holding volume up + power. The phone will display “fastboot” text indicating that it has successfully entered fastboot mode.

->Plug the phone into your PC.go to C:\Program Files\Android\android-sdk\platform-tools And in this window press shift + right click mouse button, you should see a option OPEN COMMAND WINDOW HERE select it and type

fastboot devices

This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.

If the phone has been recognized by the command above, proceed to unlocking the bootloader with the following command:
Remember that this step will wipe EVERYTHING off the phone

fastboot oem unlock

After the above command has finished excuting, run the following

fastboot reboot

The phone will reboot. Wait until the phone has fully booted up into android, then adjust the following settings on the phone:

USB Debugging – On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging
Disable CM Recovery Protection – On your phone go to Settings > Developer options. Then disable the ‘Update recovery with system updates’ option.
Close the command prompt window and proceed onto the next section of the guide.
Installing a Custom Recovery
Turn the phone off. Then boot it into fastboot mode by holding volume up + power.
Rename the recovery file that you downloaded above to twrp-recovery.img .U need to name the twrp file as twrp-recovery.img and not as recovery.img and then run this two things in terminal

fastboot flash recovery twrp-recovery.img

the above command flashes and then

fastboot boot twrp-recovery.img

it boots into recovery from fastboot directly, please note after flashing do not reboot and run this commands back to back.
Now that u are in custom recovery, reboot your phone.

Step 3 : Installing firmware and the OS itself

Here there are two steps :

1. Installing firmware by flashing it using TWRP tool
2.Installing the rom in the FASTBOOT mode using ur PC

Copy the cyanogen firmware file ( 28 MB ) to your phone please remember the location, it is better to copy it directly into root folder.

Now copy the CM11 Rom ( 520 MB ) to C:\Program Files\Android\android-sdk\platform-tools and extract it there using winzip or 7-zip any such tool.

Shutdown your phone.Reboot into twrp recovery by pressing volume down + power.

In twrp recovery

1)Select WIPE->swipe to factory reset and then home
2)Select INSTALL->browse to firmware file ,select it ->swipe to confirm flash

thus the firmware is flashed, for newbies here is video of how to use twrp tool to flash though this video has no relevance w.r.t our scenario it shows how to use twrp.Please see the entire video in particular

After flashing the firmware,turn off your phone and boot into fast boot mode

Now go to C:\Program Files\Android\android-sdk\platform-tools where you have extracted the CM11 rom , hold down shift + right click in the folder with the files and click “open command line here”

Type in all these commands in order one at a time , back to back(some of them may take some time so be patient), your phone must be in fastboot mode (Power button + Volume up) and must be plugged in to your computer:

fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash dbi sdi.mbn
fastboot flash oppostanvbk static_nvbk.bin
fastboot flash aboot emmc_appsboot.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash LOGO logo.bin
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash userdata userdata.img (or userdata_64G.img)
fastboot reboot

AND VOLA you’ve successfully rolled back to CM11

If you follow this process/steps then you will not BRICK your Oneplus one because you’re doing the right order

1)FLASHING THE FIRMWARE FIRST AND

2) Flashing WITH ROM

you may have those single click bat files but they did not work for me but I am 100% sure that the above procedure should do the trick.

References :

https://forums.oneplus.net/threads/the-ultimate-guide-to-revert-back-from-cm12-lollipop-to-cm11-kitkat.311492/

https://forums.oneplus.net/threads/…oader-install-custom-recovery-and-root.64487/

https://forums.oneplus.net/threads/tutorial-flashing-a-factory-image-from-scratch.142870/
http://forum.xda-developers.com/oneplus-one/help/faq-oneplus-one-frequently-questions-t2895136

Android smart phones (LG Optimus 4X HD & others) battery drain

I have bought LG Optimus 4X HD LG Optimus 4X HDalso nick named “P880” after reading great reviews of it everywhere on the net.

To be honest with you, the phone is great and it is one of the best “quad-core” phone available in the android phone market as of this date of this article. You can read the entire spec of this phone at gsm arena website but there are problems with this phone ….

The first problem I noticed was poor signal in the house when compared to my other Samsung phones which can pickup good signal in my home. This could be also because of my service provider AT&T poor signal in my neighborhood.

But the show stopping problem is that it’s unforgiving battery drain, from full charge at 100% – 0% in 4 hours without even using the phone during bed time or moderate use of the phone during the day which about in ~3hours or less.  Tried to return the phone but found out that I would need to pay 15-20% restocking fee, then I started researching on the web on possible solution to this problem. Came across many article but no trick worked. As this is a relatively a new phone in the market, there is not that many forum or articles which talks about this problem when compared to other comparable phones that are in the market relatively longer.

Anyway, I stumbled upon a forum where a user described that “all LG Optimus model phones suffers from the same GSM/CDMA auto prl cell standby bug which affects its battery life! But there is no word about this on LG official website. So skeptically, I followed the instructions which is as follows:

  1. Dial *#*#4636#*#* which will take you to the phone’s “Testing Menu”
  2. Click “Phone Information” Section, scroll down till you see “Set preferred network type: and a drop down box which is originally selected to “GSM/CDMA auto (PRL)”. Click on that drop down to select “GSM Only”
  3. Go back two times to exit out.
  4. (Optional) Restart the phone to check to see that value you selected in #2 sticks after reboot. It is set for good in my case after the reboot.

After doing the above, there is drastic increase in battery life!! Now the battery comes the whole day with moderate use. BUT at what cost? In the above step #2, what you are doing is to ask your phone to do only 2G connections not 3G connection. Which means a) slower data download/upload b) you may be even paying already for 3G/HSDPA but instead of using it you are downgrading yourself voluntarily to 2G – that’s a shame.

Unless battery technology improves in the near future you will be buying phone after phone and run into the same old problem “poor battery life!”

[notice]

Note: If you have AT&T branded smart phones like Samsung Infuse 4g, you are going to have tough luck downgrading to 2G data speed (to improve battery life -oh really!) as mentioned above steps as I found that the value “GSM Only” that you select in the dropdown does not stick and it would revert back to  “GSM/CDMA auto (PRL)” ! You may want to do the following for that type of phones:

  1. Dial *#2263#
  2. You will get band selection menu
  3. Press Menu Softkey>Select>Enter “3” (for GSM Band)

[/notice]

Categories: Tools & Tips Tags: Tags:

HP Webcam problem – solution

HP Webcam problem – solution

January 1, 2009, 1:01 am

WEBCAM PROBLEM SOLVED!! (fingers crossed, here’s to hoping…)

I think I solved the webcam problem! I’m still being very, very wary because of how maddening this problem has been. I’ve now tried my webcam in six different programs, even including YouTube’s “quick capture” mode where you can capture video right through the Flash plugin in your browser. I’m very interested to hear what success others have with this (if any). Man, it’s so nice to actually be able to USE my webcam now.

Want to know what worked for me? Acer drivers.  Acer Extensa 5210 Chicony Webcam Driver 5.7

Here are the exact steps I took.

1. Downloaded the file.

2. Unzipped it to a folder on my desktop.

3. Ran the “Setup.exe” file in the folder that got unzipped.

4. Went through the installer until it got to the end and then let it restart my computer.

5. Waited for my computer to restart.

6. It popped up something saying it was installing the drivers for my webcam. Waited until it was done.

7. Opened the Control Panel.

8. Opened the Device Manager.

9. Find my webcam under “Imaging Devices”. I noticed it was listed as “HP Pavilion Webcam” despite having just installed the Acer drivers.

10. Right-clicked on my webcam and chose “Update Driver Software…”

11. Chose “Browse my computer for driver software”

12. Chose “Let me pick from a list of device drivers on my computer”

13. Unchecked the “Show compatible hardware” checkbox.

14. Scrolled down to the Chicony manufacturer.

15. Chose the “Acer Crystal Eye webcam.

16. Told it to install anyway when it asked me a question about installing that driver.

17. Waited for the driver to be installed.

18. Noted that my webcam was now listed as an Acer Crystal Eye webcam in Device Manager.

And that was it. It appears to work totally fine now! Again, I have my fingers crossed that it won’t suddenly break again, but so far so good.

Forgot to note: This is on a DV6000T running Windows Vista 32-Bit Home Premium.

URL:: http://forum.notebookreview.com/showthread.php?t=149463

Categories: Tools & Tips Tags: Tags:

Fckeditor issues in Firefox – Solved!

Fckeditor issues in Firefox – Solved!

Setting Prefs for the Mozilla Rich Text Editing Demo

To protect users’ private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions for purposes of the demo, you must modify your browser preferences.

For Firefox:

1. Quit Firefox. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.

2. Find your Firefox profile directory. On Windows, this is often located in

C:\Documents and Settings\<Windows login>\Application Data\Mozilla\Firefox\Profiles\<one folder>.

(See also editing configuration files for more info on locating your profile folder.)

3. Open the user.js file from that directory in a text editor. If there’s no user.js file, create one.

4. Add these lines to user.js:

[important]NOTE: IF YOU ARE SEEING SMILIES BELOW THOSE ARE MISREPRESENTED FOR A SINGLE CLOSING PARANTHESIS![/important]

user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");

*Change the url “http://www.mozilla.org” to where you want to enable this function.

5. Save the file, and restart Firefox. The Clipboard buttons should now function.

Note: The preference is site as well as protocol specific. For example

user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org")

is not the same as

user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org")

(the first is http and the second is https)

If you want to allow multiple urls to access the Paste operation, separate the urls with a space. For example:

user_pref( "capability.policy.allowclipboard.sites","http://www.mozilla.org https://www.mozilla.org" )

For more information about security policies, see http://www.mozilla.org/projects/security/components/ConfigPolicy.html.

Categories: Tools & Tips Tags: Tags: