Showing posts with label remove. Show all posts
Showing posts with label remove. Show all posts

Sunday, August 2, 2015

How to delete the recovery partition in Windows 8 / 10

I purchased a (cheap) Asus X205TA laptop that has an integrated "32 gigabyte" SSD. Unfortunately, this computer came with a 10 gigabyte recovery partition which lopped off one third of the computer's storage capacity. One third of the device's drive capacity for a function that I will probably use once during the laptop's life? There must be a solution.

UPDATE 8/3: Apparently in Windows 8/8.1, Acer and other vendors use a tool called "WIMBOOT" which uses files stored in the recovery partition to boot your main system (although, surely your machine doesn't require 10gb of data to start up every time). The solution? Upgrade to Windows 10, and "Back up system files" as described below.

DISCLAIMER: BACK UP YOUR DATA FIRST. The following directions may result in irreversible filesystem corruption, particularly if you make a typo. I recommend using any commercial or free drive imaging software prior to following these instructions, and offer no support or warranty if disaster strikes.

Microsoft's documentation seems to indicate that it is possible to delete the recovery partition from your PC as an option when creating a USB recovery disk. However, this did not work on my machine. Fortunately, there is a solution; however, it involves a few "advanced" steps that include using a command-line tool called diskpart:
  1. Obtain a > 4GB USB drive
    Windows needs just under 4 GB to create a recovery drive for your machine. Technically, this step isn't required if you allowed your PC to automatically upgrade from Windows 7 / 8 to Windows 10 as you can use Microsoft's Media Creation Tool.

  2. Create a recovery drive
    Use the media creation tool above, or (even easier) type "Create a recovery drive" in the Start menu's search box. Make sure you choose "Back up system files" in Windows 10 when creating your recovery media.
  3. Boot from the recovery drive:
    1. Type "Change advanced startup options" in the Start menu search area
    2. Under "Advanced startup," press the "Restart Now" button.
    3. Click the "Use a device" icon
    4. Select the option that corresponds to the removable device that you made into a recovery drive to boot
  4. Obtain a command line and launch diskpart:
    1. Choose your keyboard layout
    2. Under "Choose an option," select "Troubleshoot"
    3. Under "Troubleshoot," choose "Advanced options"
    4. Under "Advanced options," choose "Command Prompt." A big black box appears.
    5. Type diskpart and hit enter.

    NOTE: The following directions assume that the "Rescue" and "Primary" partitions are next to each other; i.e. Rescue is Partition 4, and Primary is Partition 3. If this is not the case, you should STOP HERE and use something like Partition Magic or gparted to do the job.
  5. Delete the recovery partition
    1. type: list disk
    2. The resulting list will probably have your system's disk as "Disk 0." Look at the Size column to figure out if it corresponds to the size of your internal drive.
    3.  type: select disk x, where X is the disk # of your system's internal drive.
    4. type: list partition. Look at the "Type" column for a "Rescue" partition (the size should be ~ 10 GB).
    5. type: select partition x, where X is the partition # of your system's rescue partition.
    6. WARNING: the following step will delete the partition. Double-check your work.
      type: delete partition
  6. Resize the "primary" (system) partition and filesystem
    1. Consult the results from list partition and type: select partition y, where Y is the partition # that corresponds to the "Primary" system partition (it should be the biggest partition, by size).
    2. type: extend
    3. type: extend filesystem
    4. type: exit and hit enter, then type exit again. The command prompt window should close.
    5. type: list partition. You should see that your "Primary" partition is now much bigger. Hooray!
  7. Reboot into Windows
    1. Under "Choose an Option," click Continue (boot into Windows)

Tuesday, March 17, 2015

Rid thyself of that pesky PulseAudio daemon in Arch / Manjaro Linux

I have a very lightweight system -- a laptop from 2008 -- that usually works quite well until PulseAudio gets in the way of things.

Here are some tricks to disable PulseAudio:

  1. Edit /etc/pulse/client.conf and add the line:
    autospawn = no
  2. If you want to go "the whole nine yards" and uninstall PulseAudio entirely, you can build a Gnome package that does not depend on PulseAudio:
    yaourt -S gnome-settings-daemon-nopulse
  3. Next, you can entirely remove packages that depend on PulseAudio:
    pacman -R pulseaudio pulseaudio-alsa lib32-libcanberra-pulse lib32-libpulse manjaro-pulse xfce4-volumed-pulse skype
    Note that Skype 4.3 requires PulseAudio. Therefore, you have little choice but to remove it.

Thursday, July 23, 2009

Git commands I love to forget

Here are the most useful GIT commands that I *always* forget.

To push a local branch to your remote repository:

git push remote_repository_name branch_name

Eg: git push origin my_new_branch

Also:

Remove branch from repo.

git push {repo} :heads/{branch}

Ex: git push origin :somebranch
removes somebranch

This works for removing a tag as well git push origin :sometag

You might also want to check out git-publish-branch‘s ’-d’ option.

Thank you, GitHub, for these handy pages. But for me, these are the handiest of the handy.

Fixing an accidental merge (discarding local commits)

Let's say that you merged branch my_branch into master, when, in fact, you wanted to merge master into my_branch. Check git log:

commit 2a4b206e42360b812d6110c5ae9eeced96d99f0e
Merge: 4147391... dd525b5...
Author: baitisj
Date: Thu Jul 23 13:13:11 2009 -0700
Merge branch 'my_branch' of git@blablobbbla:somewhere/repository


commit 4147391a181a05f9754ddf8eecc6c4398dbb1d17
Author: baitisj
Date: Thu Jul 23 13:12:28 2009 -0700

latest

...
When you type git status, even though you did a single merge, git will say:

# On branch master
# Your branch is ahead of 'origin/master' by 20 commits.

Not to worry. Simply do:

git reset --hard 4147391a181a05f9754ddf8eecc6c4398dbb1d17

Poof! Your local repository has reverted to that version, and your merge has disappeared.