LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 1
gunzip & dd command


Hi

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, 05:35 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,195

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
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, 01:06 AM   #3
rramesh1
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
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration