Author Topic: Anyone knows how to clone a HDD without any partitions? [DONE!]  (Read 7193 times)

0 Members and 1 Guest are viewing this topic.

Online fzabkar

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: au
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #25 on: August 18, 2022, 06:15:50 pm »
ddrescue might be of some value if you wanted to analyze the data.
Ddrescue is purely a cloning tool. It doesn't analyse anything. There is a companion utility (ddrutility) which can use ddrescue's log file to determine which, if any, files are affected by bad sectors. This utility was written by the author of HDDSuperClone.
 
The following users thanked this post: edavid

Offline Zenith

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: england
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #26 on: August 18, 2022, 06:55:36 pm »
Why do you want to do this - apart that from having a backup of an HDD is generally a good idea?

Do you have an suspicion that the HDD is acting up? There are numerous utilities for checking the health of HDDs. If it's playing up with bad sectors, you may about to begin a voyage of discovery.

You should be able to use dd to clone another disc or write a file to disc which can then be used with dd to produce a clone on another hdd.

As I said earlier, it's worth practicing on a throwaway system before you try to use dd in earnest.



 

Offline Zenith

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: england
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #27 on: August 18, 2022, 06:57:51 pm »
ddrescue might be of some value if you wanted to analyze the data.
Ddrescue is purely a cloning tool. It doesn't analyse anything. There is a companion utility (ddrutility) which can use ddrescue's log file to determine which, if any, files are affected by bad sectors. This utility was written by the author of HDDSuperClone.
This HDD doesn't seem to have a file system which is recognised by anything.
 

Online fzabkar

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: au
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #28 on: August 18, 2022, 07:16:07 pm »
ddrescue might be of some value if you wanted to analyze the data.
Ddrescue is purely a cloning tool. It doesn't analyse anything. There is a companion utility (ddrutility) which can use ddrescue's log file to determine which, if any, files are affected by bad sectors. This utility was written by the author of HDDSuperClone.
This HDD doesn't seem to have a file system which is recognised by anything.

Yes, I get that. I was addressing the claim that "ddrescue might be of some value if you wanted to analyze the data".

In fact, if the HDD stores the user's data, then by definition it must have some kind of file system, albeit proprietary. It would be interesting to examine it ...
 

Offline Zenith

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: england
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #29 on: August 18, 2022, 08:21:51 pm »
Don't forget that modern HDDs offer a logical addressing space, but not necessarily one that may be used in an obviously rational way.

Were it my problem I'd have cloned it using dd to a cheap SSD, and also some naff HDD which came from a laptop or a chucked out set top box using converters.

But it's not my problem, so I help as best I can.
 

Offline Gerhard_dk4xp

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: de
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #30 on: August 18, 2022, 10:17:40 pm »
That's exactly what I did today when my vector network analyzer
did not boot and made funny noises that could have come from
the hard disk. In fact, they did not.

dd does not care about the contents of a disk, it just copies sector
by sector. I mounted the disk in the place of the disk that normally
houses the virtual machines on my Linux workstation and saved
all of the VNA disk (/dev/sdf)  to a 160G file, and then the first
and only partition (/dev/sdf1) to a different file.

I still had a 256G Samsung SSD, emptied it, made a new partition
table and copied the contents of the VNA partition file back to the SSD.
You can just as well copy the entire disk without looking at partitions.

The VNA is now somewhat snappier, the original disk and the files
are archived. I'll sleep better now.
The hardware bug was sth. with the power supply, preliminarilly fixed.

When you use dd, make 3 times sure that the partition you write to
is really the one you want. It will overwrite your boot partition if you
say so.  gparted tells you which partition is which in a nice graphical
way, but everything that can sweep a partition is dangerous.

Gerhard



« Last Edit: August 18, 2022, 10:25:22 pm by Gerhard_dk4xp »
 

Offline abdulbadii

  • Frequent Contributor
  • **
  • !
  • Posts: 350
  • Country: us
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #31 on: August 19, 2022, 01:27:30 am »
Imho many on Linux

gdisk
dd
hdparm
GSmartControl

Imho the proper place is on S/W forum site eg. stackexchange ones, not here
 

Offline HugoneusTopic starter

  • Frequent Contributor
  • **
  • Posts: 956
  • Country: us
    • The Signal Path Video Blog
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #32 on: August 19, 2022, 01:18:50 pm »
Sector by sector copy worked just fine.

Agilent has removed all software/firmware updates for this unit from the site. So if the HDD fails, that is it, the unit becomes unusable. I copied into an IDE SSD and the instrument is now safe!
 
The following users thanked this post: Ed.Kloonk

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #33 on: August 19, 2022, 01:27:38 pm »
Sector by sector copy worked just fine.

Agilent has removed all software/firmware updates for this unit from the site. So if the HDD fails, that is it, the unit becomes unusable. I copied into an IDE SSD and the instrument is now safe!

I recommend making images onto higher density storage - it's more convenient and reliable in the long term.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 5854
  • Country: ca
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #34 on: August 19, 2022, 02:27:45 pm »
or at least, do  2  hhd backup(s)   

I did had one problem with one copy, the second one was okay,  the receiving disk or system had some problem  ...   lolll


I had one equipment who used an hdd in what we call "raw" mode i think,  it could not be read by windows or linux in a standard way, appeared as a "phantom" drive of some sort

It was accessible  by Winhex and somekind of a script was used  ...    hdd raw copy did the trick,  sure it was a long process,  but ended fine
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11851
  • Country: us
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #35 on: August 19, 2022, 02:59:41 pm »
Sector by sector copy worked just fine.

Agilent has removed all software/firmware updates for this unit from the site. So if the HDD fails, that is it, the unit becomes unusable. I copied into an IDE SSD and the instrument is now safe!

For archival purposes it might be safer to copy to a magnetic disk?
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #36 on: August 19, 2022, 03:11:37 pm »
on the risk of hacking this topic : since all the file system securities are basically handled by the file system driver , is there a driver that ignores the security ?
The file system says file xyz belongs to user yadda, or has certain bits turned on (like it he dos days , archive, read only , system , hidden etc )
This is all by convention and handled in the file system driver. swap out the driver for a version that ignores all this hoopla and you can read write anything you want.

i ran into a situation on an old computer of mine where i had two logins. i was admin on both. i wanted to delete one of them and no matter what it tried i could not delete one directory. you need admin permission. i am admin. access denied ... it was a google drive shadow folder. i finally found some obscure command line operation that could reset the flags so i could access the files.

having a file system driver that goes "screw all these security locks, i'm not respecting them" would solve such issues.

Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2858
  • Country: 00
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #37 on: August 19, 2022, 03:58:46 pm »
on the risk of hacking this topic : since all the file system securities are basically handled by the file system driver , is there a driver that ignores the security ?
The file system says file xyz belongs to user yadda, or has certain bits turned on (like it he dos days , archive, read only , system , hidden etc )
This is all by convention and handled in the file system driver. swap out the driver for a version that ignores all this hoopla and you can read write anything you want.

i ran into a situation on an old computer of mine where i had two logins. i was admin on both. i wanted to delete one of them and no matter what it tried i could not delete one directory. you need admin permission. i am admin. access denied ... it was a google drive shadow folder. i finally found some obscure command line operation that could reset the flags so i could access the files.

having a file system driver that goes "screw all these security locks, i'm not respecting them" would solve such issues.
What file system, and what host OS are you talking about? With a Linux host, as long as you have root, it will let you do anything to mounted file system. Also, when mounting an NTFS filesystem on Linux, it allows you to specify which Linux user should be the owner and what the Linux permissions will be: see the documentation for the mount command.

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #38 on: August 19, 2022, 05:20:16 pm »
Quote
What file system, and what host OS are you talking about? With a Linux host, as long as you have root, it will let you do anything to mounted file system. Also, when mounting an NTFS filesystem on Linux, it allows you to specify which Linux user should be the owner and what the Linux permissions will be: see the documentation for the mount command.
any file system any os.

Boot the computer from a customised minimal shell that ignores all the security and just lets you read/write anything. No password, No logins. As long as a file system is not encrypted this should exist.
Boot from a usb or cd into a tool that can read write ntfs , zfs, ext2 3 , or whatever file system and does not respect file security or user security. All that stuff is "locked" by the operating system normally running on that computer. The files themselves have no lock, in the sense that a harddisk will not prohibit you from reading writing anything. The locking mechanism is at operating system level. The OS verifies user identity and checks the file permissions before it allows read/write of a file. So if i have a customized OS that answers "YES" to any permission question i can go anywhere.

There should be a superuser OS that requires no login and does not check nor respect any lock bits or systems. Boot from such a disk , or attach a drive to such a system and it's all open. ideally the system should have a "read only" mode as well.

There used to be a tool called NTFS4DOS. You boot the computer from a floppy disk into a DOS installation and launch that driver. Go to the harddisk and you can read/write/copy anything and everything. The tool simply ignored the security mechanisms of NTFS.

i don't need it to be able to reset or alter security settings. It's not a password cracker or permission changer, you need physical access to the drive and the normal OS is not running on the computer. This shell just does not implement the security mechanisms and doesn't verify identity or permissions. File structures are known so we can traverse the drive and read. we skip the whole security verification and just read the file and copy it to external media. doesn't even need to be the same file system. the bootmedia can be something simple as FAT or FAT32. a system that has no security.  or we delete the file. i don't even need to be able to write to the drive under inspection (no overwriting of existing files or adding files). just be able to copy things from it elsewhere ( different media ) or delete things off it.

i frequently run into situations where i need to get something off an old machine or recover from a problem (infiniium or tek oscilloscopes) and have an arsenal of tools like windows password crack boot cd's and whatnot. but it would be easier to just have a boot image of a customised tool that just lets me read and copy files from a drive and ignores the user/file permissions. no need to crack anything. boot from the tool , grab the files needed (license key files, drivers etc) , format the disk and do a clean install , place the required files back. and you have a factory fresh machine with all the accumulated cruft gone.
« Last Edit: August 19, 2022, 05:24:38 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2858
  • Country: 00
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #39 on: August 19, 2022, 05:37:36 pm »
Indeed, file system permissions provide no security outside the original operating system.

Any Linux distribution that can boot from a USB stick should be able to do what you ask. For example SystemRescue.

Online IanB

  • Super Contributor
  • ***
  • Posts: 11851
  • Country: us
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #40 on: August 19, 2022, 06:00:41 pm »
any file system any os.

I'm not sure I understand the problem? Remove the drive from the original system, put in a drive caddy and plug it into another system, and you can read the data. The only way to protect drive data from this scenario is to encrypt the drive. Thieves and cybercriminals exploit this weakness all the time.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #41 on: August 19, 2022, 06:48:10 pm »
that doesn't work on a windows machine : can't ready foreign file systems and if the drive is ntfs it wants to enforce the permissions.
i'm looking for something simple to use . it can be linux based provided that i don't need to muck with command line tools.
it can run in 640x480 if it needs to, as long as i can use a mouse and have a file explorer with multiple windows and can do drag and drop copy operations . preferably has a read-only mode for the drive being worked on. starts in read-only mode and can be switched to editing mode. i don't want to mess up the drive i am working on. the goal is to take data off the drive, not edit the drive (apart from volume resizing.. one of the issues i run into is cloning a drive to a slightly smaller harddisk. This is becoming more and more a problem when cloning to SSD's. a 32Gig SSD is smaller than a 30Gig HDD ... i was trying to migrate an infiniium scope from a 30Gb IBM travelstar to 32Gbyte SSD. cloning fails. the SSD is just a hair too small.. had to switch to a 64Gbyte SSD ... i did not want to resize the master drive as it is pristine ( never booted so it is not locked to the hardware id's yet ). cloning those things is problematic as it has a system recovery partition that includes a norton ghost installation. most cloning programs don't know what to do with it. macrium can handle it. there is also the tektronix scopes with a vxworks partition next to windows 2000 which are problematic to clone.

- clone drive (including all partitions , boot managers etc)
- resize volume ( shave off a few gig of empty space)
- read random files and copy to different target drive
- source drive in read-only mode by default. needs deliberate mode switch to make drive writeable
- graphical user interface ( can be "text mode" like norton commander) that allows me to do things without needing to resort to cryptical command lines with option flags.

nice to have
- backup volume as is , warts and all. (skip read errors)
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11851
  • Country: us
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #42 on: August 19, 2022, 06:54:51 pm »
that doesn't work on a windows machine : can't ready foreign file systems and if the drive is ntfs it wants to enforce the permissions.

I guess I've never encountered that problem  :-//
 

Offline J-R

  • Frequent Contributor
  • **
  • Posts: 973
  • Country: us
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #43 on: August 19, 2022, 07:52:32 pm »
When Windows mounts another system's NTFS file system, it does 'respect' the existing permissions, just like Linux, etc.  However, if you're logged in as an administrator on the OS, then you can simply seize ownership of the affected files/folders at which point you can change the permissions as necessary so you can access them.  The equivalent process in Linux might be 'sudo chown' and 'sudo chmod' for example.

In many cases, when simply trying to access the folder via an admin account, Windows Explorer will helpfully offer to do this automatically in one step.

Macrium is a good product if your world is Windows-centric.  You can mount backup images easily and it has a PE boot environment for easy recovery.  I've loaded the free version on dozens of machines over the years and it's been a good experience.  One favorite feature is that it can capture any necessary storage drivers from the Windows OS and place that on the USB recovery stick.  Makes offline cloning a lot easier during OS drive swaps, etc.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6227
  • Country: fi
    • My home page and email address
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #44 on: August 19, 2022, 08:17:50 pm »
When Windows mounts another system's NTFS file system, it does 'respect' the existing permissions, just like Linux, etc.  However, if you're logged in as an administrator on the OS, then you can simply seize ownership of the affected files/folders at which point you can change the permissions as necessary so you can access them.  The equivalent process in Linux might be 'sudo chown' and 'sudo chmod' for example.
Linux also allows one to mount the filesystem with an arbitrary mapping between NTFS users and groups and their Linux counterparts, with uid= and gid= as shorthand for mapping them all to one user and one group.  By default, the silent option is used on NTFS mounts, which causes the 'sudo chown' and 'sudo chmod' to silently do nothing on such mounts, unless an arbitrary mapping has been set.  Also, the actual default is to map all users and groups to the current user.  (If you do do 'sudo mount', the current user will be root, so then specifying that explicitly via '-o uid=$(id -un),gid=$(id -gn)' is needed.)

This means that if you just open an NTFS drive in Linux, 'sudo chown' and 'sudo chmod' are supposed to have no effect by default.

When you plug in a drive, and it gets mounted automatically, a default set of mount options is used.
Unfortunately, I do not know of any graphical tool that allows one to set the mount options.  There likely is one; I just don't know one. :(

I can only tell how to do it on the command line:
    sudo mount -o uid=$(id -un),gid=$(id -gn),umask=0,fmask=0,dmask=0,silent,ro volume directory
where volume is the device or partition containing the filesystem (under /dev/), and directory is where to mount to.
This mounts the NTFS volume in read-only mode, so that no changes are made to it at all.
 

Offline JohanH

  • Frequent Contributor
  • **
  • Posts: 623
  • Country: fi
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #45 on: August 19, 2022, 09:08:45 pm »
i ran into a situation on an old computer of mine where i had two logins. i was admin on both. i wanted to delete one of them and no matter what it tried i could not delete one directory. you need admin permission. i am admin. access denied ... it was a google drive shadow folder. i finally found some obscure command line operation that could reset the flags so i could access the files.

If a file is set to immutable, you can't erase or modify it as superuser. But you can of course change the file attributes with chattr and make it non-immutable. Don't know if that was the case here, but it's something that could be overlooked sometimes. There are also ACL (Access Control Lists), where you can specify attributes and ownership for multiple groups and users (getfacl and setfacl commands). ACL are commonly used in multi-user environments, such as file servers.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 1994
  • Country: fi
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #46 on: August 19, 2022, 09:09:25 pm »
Sector by sector copy worked just fine.

Agilent has removed all software/firmware updates for this unit from the site. So if the HDD fails, that is it, the unit becomes unusable. I copied into an IDE SSD and the instrument is now safe!

Back in the day when floppies and tapes were regular stuff I had some world's only backups.
Final set was in a bank vault in multiple copies, in hand backup was also in multiple copies.
Idea was that even if all copies were bad there were still a possible good one if all bad ones were combined.
Data format was also easy since it was source codes and so practically text.

Things have changed from those days but do not take "safe" too lightly.
Maybe one day your SD card is gone and only thing left is a peanut.
Advance-Aneng-Appa-AVO-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Offline JohanH

  • Frequent Contributor
  • **
  • Posts: 623
  • Country: fi
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #47 on: August 19, 2022, 09:11:32 pm »
Sector by sector copy worked just fine.

Agilent has removed all software/firmware updates for this unit from the site. So if the HDD fails, that is it, the unit becomes unusable. I copied into an IDE SSD and the instrument is now safe!

I would definitely also have copied it into a (gzipped) file and uploaded to a backup PC or the cloud. Hey, why not to archive.org and do the community a favor.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Anyone knows how to clone a HDD without any partitions? [DONE!]
« Reply #48 on: August 19, 2022, 09:40:18 pm »
then you can simply seize ownership of the affected files/folders at which point you can change the permissions as necessary so you can access them.
And in that lies the problem. i do NOT want to modify the file system or permissions ! Just read the file without altering anything on the drive. it should leave no traces. the drive needs to be treated as read-only.

there are forensic tools that do exactly that. unfortunately very expensive and out of reach for my tinkering restoring test equipment
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online edpalmer42

  • Super Contributor
  • ***
  • Posts: 2268
  • Country: ca
Re: Anyone knows how to clone a HDD without any partitions?
« Reply #49 on: August 19, 2022, 09:42:33 pm »
Agilent has removed all software/firmware updates for this unit from the site. So if the HDD fails, that is it, the unit becomes unusable. I copied into an IDE SSD and the instrument is now safe!

Does the Wayback Machine have the downloads?  It's definitely hit-and-miss, but I've often used it to get drivers, documentation, etc. when the site or file has vanished.

Ed
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf