Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Direct Disk Editing

News Recommended Links Recommended articles FAT32 recovery Resizing Windows partitions Working with Disk Images Linux Loopback filesystem
Filesystems Internals Dual Boot Disk Backup Norton Ghost Humor  Random Findings Etc

Before you start - it is recommended to do a disk clean up, get rid of unnecessary files and defragment your hard drive to create as much continuous free space as possible. If your drive is very fragmented, you may want to defragment twice.

Still others may be able to help you recover partitions that you have already deleted, that is unerase or undelete partitions.

There are free tools and commercial tools. Among free tools linux bootable CD is the most reliable.  Among the commercial tools Norton Disk Editor was an amazing tool, but Symantec discontinued it.

Disk editor - Wikipedia, the free encyclopedia

A disk editor is a computer program that allows its user to read, edit, and write raw data (at character or hexadecimal, byte-levels) on disk drives (e.g., hard disks, USB flash disks or removable media such as a floppy disks); as such, they are sometimes called sector editors, since the read/write routines built into the electronics of most disk drives require to read/write data in chunks of sectors (usually 512 bytes). Many disk editors can also be used to edit the contents of a running computer's memory or a disk image.

Unlike hex editors, which are used to edit files, a disk editor allows access to the underlying disk structures, such as the MBR, volume boot records, file system, and directories. Programmers can use disk editors to understand these structures and test whether their implementation (e.g. of a file system) works correctly. Sometimes these structures are edited in order to provide examples for teaching data recovery and forensics, or in an attempt to hide data to achieve privacy or hide data from casual examiners. However, modifying such data structures gives only a weak level of protection and data encryption is the preferred method to achieve privacy.

Some disk editors include special functions which enable more comfortable ways to edit and fix file systems or other disk specific data structures. Furthermore some include simple file browsers that can present the disk contents for partially corrupted file systems or file systems unknown to the operating system. These features can be used for example for file recovery.

Windows

[edit] Free Software

[edit] Proprietary Software

[edit] Linux

As you can create and then restore dd-image hex-editors that edit files are also suitable substitute. I highly recommend Hiew 

Hiew (short for Hacker's view) is a popular console hex editor for Windows written by Eugene Suslikov (sen). Amongst its feature set is its ability to view files in text, hex and disassembly mode. The program is particularly useful for editing executable files such as COFF, PE or ELF executable files.

See also

Comparison of hex editors - Wikipedia, the free encyclopedia


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

[Oct 23, 2011] Weekend Project Rescue Failing Drives With SystemRescue Linux.com

When a hard drive, CD/DVD, USB stick, or any digital storage media is on its way to the Great Bitbucket in the Sky, GNU ddrescue is my favorite data recovery tool. GNU ddrescue is included in the default SystemRescue image. Before we dive into the fun stuff, there is some vexing naming confusion to clear up. There are two ddrescue programs in SystemRescue. GNU ddrescue, by Antonio Diaz, is the one I prefer. The version on the current SystemRescue release is ddrescue 1.14. There is also a dd_rescue, version 1.23, by Kurt Garloff. dd_rescue is nice, but it's slower than ddrescue and doesn't include as many features.

Just to keep it interesting, Debian Linux adds its own bizarre naming conventions. The Debian package name for GNU ddrescue is gddrescue, and the package name for dd_rescue is ddrescue. But the binary for gddrescue is /sbin/ddrescue, and the binary for dd_rescue is /bin/dd_rescue. Fortunately, SystemRescue doesn't mess with the original binary names, and calls them /usr/bin/ddrescue and /bin/dd_rescue.

Enough of that; let's talk about what makes GNU ddrescue my favorite. It performs block-level copies of the failing media, and so it doesn't matter what filesystem is on the media. You're probably thinking it sounds like the venerable dd command, and it is similar, with some significant improvements. dd works fine on healthy disks, but when it encounters a read error it stops, and you have to manually restart it. It reads the media sequentially, which is very slow, and if there are a lot of bad blocks it may never complete a full pass.

GNU ddrescue is fully automatic and fast for a block-level copy program, and you want speed when a drive full of important data is dying. It seeks out good blocks to copy and skips over the bad blocks. It optionally records all activity in a logfile, so you can resume where you left off if the copying is interrupted for any reason. It is best to always generate a logfile, because every time you power up the failing drive the more likely it is to die completely. Using a logfile ensures that ddrescue will not repeat operations, but will move on and look for new good blocks to copy.

When you are rescuing a failing drive, the first step is to copy it with ddrescue. Then take the original offline, and perform any additional recovery operations on the copy. Don't touch the original any more than you have to. You can copy the copy as many times as you need for insurance.

You need a healthy drive to copy your rescued data to. I prefer USB-attached media such as a USB hard drive, USB thumb drive, Compact Flash, or SD cards. Of course a second internal hard drive is a good option, or this might be your chance to finally use that eSATA port that always looked like it should be cool and useful, but you never found a reason to use it. Your second drive should be at least 50% larger than the drive you're recovering. The troubled drive must not be mounted. The simplest invocation looks like this:

# ddrescue /dev/sda1 /dev/sdb1 logfile

Here, /dev/sda1 is a partition on the failing drive. Everything on /dev/sdb1 will be overwritten, and the logfile will be written to /dev/sdb1. You can name the logfile anything you want. You can rescue an entire drive if you prefer, like this:

# ddrescue /dev/sda /dev/sdb logfile

Note that if there is more than one partition on the failing drive and the partition table is damaged, you will have to re-create it on the rescue drive. I copy one partition at a time to avoid this sort of drama.

You can have ddrescue make multiple passes with the -r option; sometimes you can make a more complete recovery this way. You can go as high as you want; I use 3-5:

# ddrescue -r5 /dev/sda2 /dev/sdb1 logfile

Sometimes ddrescue is nearly magical for rescuing scratched CDs and DVDs. The first command copies the disk, and the second command copies it to a blank disk:

# ddrescue -n -b2048 /media/cdrom image logfile
# ddrescue -d -b2048 /media/cdrom image logfile

You can give the image file whatever name you like. While I've never needed to go beyond the basics in this article, ddrescue has a whole lot of other capabilities that you can learn about in the GNU ddrescue manual.

[Sep 12, 2009] HxD - Freeware Hex Editor and Disk Editor mh-nexus

HxD is a carefully designed and fast hex editor which, additionally to raw disk editing and modifying of main memory (RAM), handles files of any size.

The easy to use interface offers features such as searching and replacing, exporting, checksums/digests, insertion of byte patterns, a file shredder, concatenation or splitting of files, statistics and much more.

Editing works like in a text editor with a focus on a simple and task-oriented operation, as such functions were streamlined to hide differences that are purely technical.
For example, drives and memory are presented similar to a file and are shown as a whole, in contrast to a sector/region-limited view that cuts off data which potentially belongs together. Drives and memory can be edited the same way as a regular file including support for undo. In addition memory-sections define a foldable region and inaccessible sections are hidden by default.

Furthermore a lot of effort was put into making operations fast and efficient, instead of forcing you to use specialized functions for technical reasons or arbitrarily limiting file sizes. This includes a responsive interface and progress indicators for lengthy operations.

LDE - The Linux Disk Editor

lde is a disk editor for linux, originally written to help recover deleted files. It has a simple ncurses interface that resembles an old version of Norton Disk Edit for DOS. lde is 100 percent free under the Gnu public license.

I've put a little bit documentation on this site. There is a very basic walkthrough of the editor which includes something like screenshots. Also, you can read the man page online and a file with some tips on restoring deleted files using lde.

There's more information and the latest binaries over at the lde sourceforge project page.

SystemRescueCd View topic - Linux disk editor

Hello.
Firstly, thank you for your efforts in creating such a useful collection in a package that works so well. I love it and think it's a great system rescue tool.
Will you please consider including the Linux Disk Editor (http://lde.sourceforge.net/) in the next release of SystemRescue CD. I use it for recovering 'lost' partitions that parted won't even look at (yes I use 1.6.6 from your 0.2.8 CD). I use the statically linked lde-i386, as downloaded directly from SourceForge, and run it from a floppy after booting from your SystemRescue CD.

Incidentally, to really mess up a disk's partitions, just create them with parted, then load Partition Magic and let it 'fix' the 'misalignment' errors it finds, then watch as neither Partition Magic, nor parted will look at the disk again. It doesn't always happen, but sometimes yes. One way to avoid this is if only one person with one set of tools works on a system. Not always possible unfortunately.
To fix this, I use gpart to give me a list of 'possible' partition locations, use linux disk editor to view the contents of the partition tables, and a calculator to determine the 'actual' table locations, then linux disk editor again to edit the tables so they work. Tedious, but such a relief (especially for the owner) when it all works again.
I used to boot a DOS floppy and use Norton Disk Editor, but I much prefer to stay within Linux and use Linux tools :-)
Thank you for your consideration.
Andrew

[Aug 27, 2007] How to partition and format a hard disk in Windows XP

For additional information about the differences between the FAT and NTFS file systems, click the following article numbers to view the articles in the Microsoft Knowledge Base:

Recommended Links

Google matched content

Softpanorama Recommended

Top articles

Sites

Help2Go - How to Repartition Hard Drive without Reformatting

How to partition and format a hard disk in Windows XP

Ranish Partition Manager
Ranish Partition Manager is a hard disk partitioning tool that allows you to create, copy, resize primary and extended partitions. The later versions of the Partition Manager (2.43 and above) apparently allow you to work with up to 30 primary partitions. Also available from that same site is the XOSL (Extended Operating System Loader) Boot Manager that gives you the ability to choose which operating system (OS) you wish to boot from when you start your system. I think it works under DOS, so you can simply put it on a DOS startup disk, reboot to the disk, and work on your partitions from there.

Free Partition and Hard Disk Backup and Imaging Software

Free DVD and CD Burners and Copying Software

Free Defragmentation Programs / Free Defrag

Random Findings

Partition Logic
Partition Logic allows you to create, delete, format and move partitions and modify their attributes. It can also clone hard disks, that is, make a copy of an entire hard disk onto another (possibly new) hard disk. It boots from a CD or a floppy disk and runs as a standalone system. At the time this was written, it has some limitations, including the ability to only format FAT partitions, the inability to partition SCSI hard disks, the lack of support for USB mice and keyboards, etc.
SwissKnife
SwissKnife is a Windows program that allows you to create and format partitions on fixed or removable disks as well as change cluster size during formats.
SystemRescueCD
SystemRescueCD is a bootable system rescue CD-ROM for PCs containing utilities that allow you to manage and edit your hard disk partitions (GNU Parted and QTParted), image your hard disk partitions (Partimage), a partition table backup and restore utility (Sfdisk), various file system tools that allow you to format, resize and edit existing partitions on your hard disk. It does not depend on the operating system you have installed on your hard disk - the CDROM is self-contained and is designed to serve as a rescue disk. There is also a version for the blind (it incorporates a speech reader).
Ultimate Boot CD
Ultimate Boot CD is a bootable CDROM for PCs that contain a variety of software for diagnosing and fixing problems on your computer, managing your hard disk partitions (including creating, resizing, copying, moving, etc), imaging or cloning your hard disk partitions (it includes Partition Saving, see elsewhere on the Free Hard Disk Backup and Image Software page, resetting your (forgotten) password on NT, Win2k, or XP, scanning your hard disks for viruses (it includes some free antivirus utilities), etc. The software included on this boot CD include a number of those already listed on this page.
The Partition Resizer
The Partition Resizer resizes and moves your existing partitions for hard disks up to 2 TB (that is, 2 terabytes). It can handle both primary and extended partitions. It is able to move your data (where necessary) so as to make space for (say) an expanded FAT which may be needed if you are increasing the partition table. You can resize (expand or shrink) or move FAT partitions (including FAT32 partitions) and move NTFS partitions (though not resize). The program is a DOS program, and you can put it on a startup disk, reboot to it, and work on your system from there.
Diskman
The author calls Diskman a "hard disk manipulation program". It essentially allows you to create, format and manipulate partitions, backup and restore long filenames, as well as search and edit data on a hard disk. It has a scripting language that you can use to automate the things you want to do. It supports FAT partitions. The current version (at the time I write this) is a DOS program.
NTFS Resize
NTFS Resize is a Linux program that non-destructively resizes NTFS partitions (enlarges and shrinks). It supports all NTFS versions, including those created and used by Windows NT, 2000, XP (both 32-bit and 64-bit versions), 2003 and Longhorn.
TestDisk
TestDisk is a tool to check and undelete partitions. It essentially searches for lost partitions, and allows you to repair errors in the partition table, create a partition table, create a new MBR, etc. It works with FAT32, FAT16, FAT12, NTFS (Windows NT, If you have accidentally lost (or deleted) a partition, you might want to try TestDisk to see if it can find the partition and recover it. 2000, XP), ext2, ext3, BeFS (used by BeOS), BSD disklabel, CramFS, IBM Multiboot, JFS, Linux swap (versions 1 and 2), NSS (Netware), ReiserFS 3.5 and 3.6, and XFS. The program runs under DOS, Windows 9x/NT/2000/XP/2003, Linux, FreeBSD, and Sun Solaris. It is licensed under the GNU GPL.
Extended FDISK
Extended FDISK allows you to create and delete partitions and logical disks on your hard disk. It appears to come with a boot manager (that allows you to choose between multiple operating systems when you boot).
FreeDOS' FDISK
The FreeDOS FDISK supports hard disks of up to 128GB. You can use it to create and delete primary and extended partitions. It works under DOS (FreeDOS, MSDOS and PCDOS).
FIPS
FIPS supports the non-destructive splitting of hard disk partitions. The program is distributed under the GNU GPL.



Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: March 12, 2019