Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-12-2012, 08:52 AM   #1
LQ Newbie
Registered: May 2011
Posts: 14

Rep: Reputation: 1
gunzip & dd command


I have a partition snapshot stored as a image file (bootable linux binary) created using dd command. I compressed this using gzip & the file is (say) xyz.gz.

I do a 'gunzip -c xyz.gz | dd of=/dev/<dev-partition> bs=1M'
This works for me very well on two compact flashes sized 2G & 4G.
However, I tried this on a 4G Disk on Memory (DOM) & somehow
few files do not get copied, I loop mounted the image file & I do see those files, but after dd the files dont show up when I mount the partition & check the directories. 'dd' doesnt throw errors & says successful.

Any ideas as to why the files dont get copied. am I using dd without the right parameters? or any alternate approach to solve this issue?

Your inputs highly appreciated.
Old 06-12-2012, 04:35 PM   #2
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
I doubt it is an issue with the unzip and dd.

To test I guess you could unzip it with test option.

Then just simple dd to the DOM. dd is a bit by bit copy so there might be some formatting or other things in your image that a doing this.

Might try a tar from the loop mount or other file based clone and may have to fix loader.

(or is it a disk on chip product?) Either case they might be funky with speeds and writes. Some odd ones might need bios settings or dma or other driver type access.
Old 06-13-2012, 12:06 AM   #3
LQ Newbie
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 1
Thanks Jefro,

I did do some debugging with hdparm by slowing down the write speed, but that also gave the same result.

It turned out to be a result of a different partition util. We tried doing this layout using parted while the other ones were fdisk based (though it was of same size & layout), Somehow, the cylinders / offset were not compatible & we reverted back to fdisk based layout, its working fine now

Life is good


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] Gunzip command limitation mahi_nix Linux - Newbie 3 08-31-2011 02:03 AM
How to Gunzip a File and then execute tar it in one command networkingnub Programming 2 01-15-2010 03:56 PM
command tar: - ? gunzip or no ? eeried Linux - Newbie 4 04-06-2005 12:59 PM
gunzip command ronss Linux - Newbie 3 03-21-2002 12:04 PM
HELP! everything is corrupted to both gunzip & bunzip ahmadhash Linux - General 3 01-26-2002 05:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:54 PM.

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