LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-26-2024, 09:20 AM   #16
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,899

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318

Quote:
Originally Posted by mw.decavia View Post
The sample command I just offered you ...
Code:
dd if=/dev/sda1 bs=1M skip=0 count=100 | gzip -c > test.bin.gz
Would backup all of a windows "boot" partition with free/empty space compressed to almost nothing. (if it did not fail with an error)

For example, the 100 mb "boot" partition which was standard on windows7, results in a backup file "test.bin.gz" of less than 10 mb.

Of course, you would substitute the partition you want to backup in "if=/dev/", and put it's size (in mb) in "count="

This has worked for me for backing up fairly large windows partitions. But it can backup any partition that you can read from (even "hidden" partitions), no matter what filesystem/files it contains.
this only works if the empty space is filled with zero, it doesn't contain some random values, which probably can't be compressed at all.
 
Old 04-26-2024, 11:45 AM   #17
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,660

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
There are tools to zero fill deleted files and empty space on disk. The Windows ones are best used form Windows, the Linux ones are best used from Linux. I know of no tools for doing this on NTFS volumes from Linux that are perfectly safe, but that may be because it has been a decade since I had to deal with NTFS volumes!

Point being, if you used such a tool, compressed the unused space (now all zeros) then used dd with gzip (or xz) compression it would compress down that empty space by well over 98.7% making it effectively zero length in the image.

On slow iron, this may take a while no matter what OS you are using. For safety, I would allocate adequate time, start in Windows, and once the zero fill and space consolidation done do the backup image from Linux and see how that works. That will be using each OS for what it is good at, and avoiding using them for things for which they are less than optimal.
 
Old 04-26-2024, 06:38 PM   #18
friendlysalmon8827
Member
 
Registered: Dec 2023
Distribution: Anfroid,Debian
Posts: 99

Rep: Reputation: 5
I can remember the days when I first installed Linux on a off lease Compac desk pro that my father had managed to procure for me as an off lease from his employer. I also learned the fips methods to dual-boot windows XP Home and pre IBM Red Hat Linux on my daily driver gaming pc.

From there I dove straight into setting up a local area network file and print server using the same Red Hat CD that I got when I( purchased a phone-book sized manual for Red Hat. I can also remember having to go through the pain of using the b43-firmwarecutter utility to get a broadcom chipset based WiFi or Ethernet card functional.

It's always a good idea to take a backup of your important personal and customized configuration files in the /etc directory. I'd also strongly that the OP consider investing a whole separate. hard disk drive(HDD or spinning rust) as spinning rust drives are dropping like a stone price wise.
 
  


Reply

Tags
archives, backup, dd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash case-esac alternatives and optimization for empty and set variable combinations rwyarbrough Programming 9 10-31-2018 03:12 PM
[SOLVED] update-alternatives: error: unable to read link `/etc/alternatives/editor': Invalid a ccc Debian 1 12-16-2013 01:51 AM
[SOLVED] Technique - alternatives to tell if directory empty or not grail Programming 15 07-27-2011 07:37 PM
Gentoo VNC, empty dialog box !! "Question" window is empty ! TheHushedCaskeT Linux - Software 0 02-01-2005 10:14 PM
FC2 test 3 mouse skipping a beat, movie skipping also jang Fedora 1 10-28-2004 07:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration