tinyapps.org / blog


Cloning 1TB MBR system HDD to 4TB GPT SSD #

  1. Install 4TB SSD
  2. Change boot mode to UEFI and SATA operation to AHCI.* For example, on a typical Dell system:
  3. Boot from Acronis True Image 2016 disc (be sure to select entry under UEFI BOOT, not LEGACY BOOT)
  4. Clone 1TB MBR HDD to 4TB GPT SSD. MBR will be converted to GPT automatically on destination disk

Received "Failed to write data to disk" error at end of cloning process followed shortly by "Cloning succeeded".

On reboot, the following message appeared:

 

Windows Boot Manager

Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:

1. Insert your Windows installation disc and restart your computer.
2. Choose your language settings, and then click "Next."
3. Click "Repair your computer."

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

File: \EFI\Microsoft\Boot\BCD

Status: OxcOOOOOOf

Info: An error occurred while attempting to read the boot configuration data.

ENTER=Continue ESC=Exit

 

  1. Booted from Windows 7 install disc (again, be sure to select device under UEFI BOOT, not LEGACY BOOT)
  2. Next > Repair your computer
  3. "Windows found problems with your computer's startup options. Do you want to apply repairs and restart your computer?"
  4. Before clicking "Repair and restart", clicked "View details", which revealed:
        The following startup options will be added:
        Name: Windows 7 Professional (recovered)
        Path: Windows
        Windows Device: Partition=D: (3815116 MB)

Windows booted normally from 4TB SSD.

* IDE/ATA was required in this account, which uses a method similar to Xcopy Windows to a new hard drive, but with ntfsclone (careful with syntax - the target is specified before the source, as explained in the man page:
Clone NTFS on /dev/hda1 to /dev/hdc1:
ntfsclone --overwrite /dev/hdc1 /dev/hda1
)
Destination disk is larger than 2 TB: If "My source disk is MBR and my OS supports UEFI" and "My system is UEFI-booted (Windows or Acronis Bootable Media)" then "partition style on your destination disk will be converted to GPT automatically. This disk may be used for booting in UEFI. Also, the entire disk space will be available."

/windows | Dec 03, 2016

Add fade to black transition to MP4 video #

3 methods, from least to most efficient. Original MP4 video clip ≈ 2.4MB.

Thanks to LordNeckbeard's tip and link to FFmpeg's fade filter documentation.

/mac | Nov 24, 2016

Mail.app: Cannot remove attachments from sent emails #

If Message > Remove Attachments is grayed out for sent messages:
  1. Select the affected mailbox (e.g., Sent)
  2. Mail > Preferences... > Rules > Add Rule
  3. Create a rule in which From is equal to your email address and Any attachment name contains "." (without quotes).
  4. Set the action to "Set Color"
  5. OK > "Do you want to apply your rules to messages in selected mailboxes" > Apply

Attachments can now be removed normally from affected messages. Tested in Mail 9.3 under OS X 10.11.6. Lion/Mountain Lion's Mail: Workaround for removing attachments from sent messages should have been in the top 10 Google results but wasn't, hence this recapitulation.

/mac | Nov 24, 2016

Compare / diff disk images and other large binary files #

with lfhex (Large File Hex Editor). Installation in Debian-based distros is as easy as # apt install lfhex, but that version is sadly plagued with a long-standing bug which hides the (very handy) "Cursor Offset" selection box:
lfhex missing Cursor Offsetlfhex with Cursor Offset
lfhex missing cursor offsetlfhex with cursor offset

As Kalle Olavi Niemitalo explains in the aforementioned bug report, removing statusBar()->showMessage("Ready",2000); from hexGui.cpp before compiling works, but only if you have older versions of Qt, gcc, g++, etc. to compile with (or manage to resolve compatibility problems like this one).

After several false starts, I got a x64 binary compiled under Ubuntu 12.04, gcc 4.6.3, and Qt 4.8.1. Works fine under newer Debian-based distros as well.

See also wxHexEditor, a cross-platform (Linux, Windows, OS X), open source hex editor with support for very large files (up to 2EB) and raw disk access (under POSIX systems). The current version, 0.23 beta, is available via # apt install wxhexeditor.

UPDATE: Just noticed this on the lfhex homepage under "Limitations": "Search/compare can be slow (compared to cmp or any other non-paged IO app)". Note that cmp -s is faster than just cmp and roughly equal to diff -q. More info. Tip: If you just need to know whether two large files differ, first check the file sizes. Only then if necessary run: diff --speed-large-files --brief --report-identical-files file1 file2.

/nix | Nov 05, 2016

Photos.app: "Nothing to import - None of these files can be imported into your Photos library." #

While clicking and dragging multiple folders containing JPGs into Photos.app, the following error appeared:

Nothing to import - None of these files can be imported into your Photos library.

Quitting and restarting Photos.app only worked for a few more files, then back to the same error message. File > Import... did not work either.

Happily, PowerPhotos was able to import everything (over 100GB worth), automatically skipping duplicates and providing a detailed report of the process via Library > Import Photos...

/mac | Oct 26, 2016

Interrupt PhotoRec recovery, change the destination, and resume #

During a PhotoRec session, if disk space on the destination starts running precariously low, you can interrupt the session, change the destination, and resume like so:
  1. Halt the session and exit PhotoRec: Stop > Y > Quit > Quit > Quit
  2. If desired, move recup_dir.* to new destination (while not required, you may wish to keep all of the recovered files together). In any case, do not move or edit photorec.ses, which is located in the current working directory)
  3. Launch PhotoRec again
  4. When "Continue previous session ? (Y/N)" prompt appears, press Y
  5. Browse to new destination directory then press C
  6. Recovery will resume where it left off

/nix | Oct 24, 2016

Combine an animated GIF with a static image while retaining the animation #

in Adobe ImageReady CS2:
  1. Open both images in ImageReady
  2. Rotate the animated GIF if desired (Image > Rotate Canvas > Arbitrary...)
  3. Make the animated GIF's canvas size larger than the static image's canvas size (Image > Canvas Size...)
  4. Copy and paste the static image as a layer into the animated GIF (Select > All > Edit > Copy > Edit > Paste)
  5. Using the Move Tool (V), drag the static image to the desired position, then use the Crop Tool (C) to crop it
  6. Set the static image as the background (Layer > New > Background From Layer)
  7. Check the delay timers and looping options in the Animation pane (Window > Animation)
  8. Save the new combined GIF (File > Save Optimized As...)

/misc | Oct 19, 2016

Building a triple-boot Mac: OS X 10.9, Linux Mint 18, Windows 7 #

This process was tested on a MacBook Pro (13-inch, Mid 2012)* and Samsung 830-Series MZ-7PC128B/WW 128GB Solid State Drive with OS X 10.9.5, Linux Mint Cinnamon 18 64-bit, and Windows 7 64-bit.
  1. Install SSD. Any existing data will be deleted.

  2. Boot from Mavericks installer

    1. Disk Utility > Partition (GUID), format (Mac OS Extended (Journaled)), and name (OSX) volume

    2. Install Mavericks to OSX normally

  3. Boot from SSD

    1. Boot Camp Assistant > allocate partition space as desired (keeping in mind that the Linux Mint partition will be carved out of the Windows partition)

    2. Install Windows normally

  4. Boot from Linux Mint 18 installer

    1. Install Mint normally, selecting "Install Linux Mint alongside them" and specifying the desired sizes of the Windows and Mint partitions

  5. When installation completes, boot to Startup Manager by holding the Option key. There are 3 options:

    1. OSX = Mavericks

    2. Recovery-10.9.5 = OS X Recovery

    3. Windows = GNU GRUB, from which Linux Mint 18 or Windows 7 can be booted (ignore the OS X 32-bit and 64-bit entries)

Notes:

/mac | Oct 18, 2016

Showing all programs in Windows 8.1 #

In lieu of a third-party Start menu replacement like Classic Shell (along with its attendant risks), you can create a taskbar toolbar to display all programs in Windows 8.1:
  1. Add %ProgramData%\Microsoft\Windows\Start Menu\Programs and %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs to a new Library called "Programs"
  2. Right click the taskbar then click Toolbars > New toolbar...
  3. Enter %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Programs.library-ms into the Folder: path and click "Select Folder"

That's it; now you've got a list of all programs easily accessible from the taskbar.

References:

/windows | Oct 11, 2016

Mounting partitions from full disk images with guestfish #

Just added a long-overdue update to Mounting partitions from full disk images with guestfish, part of the inimitable libguestfs:
"libguestfs can access almost any disk image imaginable. It can do it securely — without needing root and with multiple layers of defence against rogue disk images. It can access disk images on remote machines or on CDs/USB sticks. It can access proprietary systems like VMware and Hyper-V."

/nix | Oct 02, 2016


Subscribe or visit the archives