LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2014, 10:19 AM   #16
zaldoor
LQ Newbie
 
Registered: Mar 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by rtmistler View Post
Try dd without gzip, just create an image file matching your disk size.

Then try dd of the .img file to the 64M and 128M disks and indicate if you still see problems.
I did try without compression using gzip, i still get the same results. Also I did try without the conv= and no difference.

Any other ideas?
 
Old 03-26-2014, 10:32 AM   #17
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,953
Blog Entries: 13

Rep: Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984
The only other idea I have is to try different 64M and 128M disks; if possible to grab some new ones which have never been used, perhaps try to get them from the same manufacturer. All I can see from the perspective of linux commands is that you're doing it all correctly. Mine's pretty old, 2009 version 7.4, but then again hard to believe they're developing much on dd these days.

Code:
dd --version
dd (coreutils) 7.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, and Stuart Kemp.
 
Old 03-26-2014, 11:05 AM   #18
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,843

Rep: Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682Reputation: 1682
I don't think it should make a difference but did you try adding bs=64K since that is what you did when creating the image. I had posted what I did earlier because not to long ago I was playing around with dd and restoring to different size partitions and notice that the data tend to take up more space when restoring to a partition that was larger than then the original. I don't remember if I was using dd to copying from one partition to another or creating an image with dd and restoring the image to larger partition. It was something I notice and thought that was kind odd at the time.
 
Old 03-26-2014, 02:57 PM   #19
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Since you have noted CE, you might have to use MS tools. It could create some file and reference to some thing that is now different.
 
Old 03-26-2014, 03:09 PM   #20
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
maybe gparted-live usb can clue us into what is going on here ?
 
Old 03-28-2014, 03:07 PM   #21
zaldoor
LQ Newbie
 
Registered: Mar 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
The only other idea I have is to try different 64M and 128M disks; if possible to grab some new ones which have never been used, perhaps try to get them from the same manufacturer. All I can see from the perspective of linux commands is that you're doing it all correctly. Mine's pretty old, 2009 version 7.4, but then again hard to believe they're developing much on dd these days.

Code:
dd --version
dd (coreutils) 7.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, and Stuart Kemp.

Unfortunately I do not have the flexibility of getting new drives for this particular hardware. The hardware is pretty old -> Micros DT 166, using a 64MB or 128MB u-dock drive (flash). But if there were an issue with the drives, I wouldn't be able to image a 64 to a 64 or a 128 to 128, which I can do without an issue. Only issue is imaging 64 to a 128.

The version of dd I'm using is 8.4
 
Old 03-28-2014, 03:08 PM   #22
zaldoor
LQ Newbie
 
Registered: Mar 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
I don't think it should make a difference but did you try adding bs=64K since that is what you did when creating the image. I had posted what I did earlier because not to long ago I was playing around with dd and restoring to different size partitions and notice that the data tend to take up more space when restoring to a partition that was larger than then the original. I don't remember if I was using dd to copying from one partition to another or creating an image with dd and restoring the image to larger partition. It was something I notice and thought that was kind odd at the time.
Yes I did already try adding bs=64k, no luck!
 
Old 03-28-2014, 03:19 PM   #23
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,953
Blog Entries: 13

Rep: Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984Reputation: 4984
Quote:
Originally Posted by zaldoor View Post
Yes I did already try adding bs=64k, no luck!
I'd actually do the opposite, which I think you've done, "no argument" therefore dd assumes bs=1 and it takes longer.

You may want to consider little_wolf's suggestion. Which is to use fdisk to determine the partition types and sizes, also file system types and then manually create a mimic of the drive onto your 128 sized target, and then manually copy contents of each partition. I do that for a raspberry pi based product we have, the boot partition is like FAT32 with the boot flag set and there are like 4 or 5 files which are just copied over, and the second partition is Linux where there's a ext2 file system and so I copy the RFS over to that and that's how I reproduce boot disks for those systems. Actually I do this for several system types and I like it better than dd because over the year's I've found that not all 8G disks are the same and if I copy my image from an 8G disk which has slightly higher than normal usable blocks, then I'm in trouble when I try to dd it over to other blank disks, you run out of space. I didn't want to take a chance at picking some count= value slightly less than 8G and end up missing one tiny piece of data, so the strategy was to create a script which makes the boot partition, the RFS partition, creates the file systems, and then copies files into each of those partitions.
 
Old 03-28-2014, 06:32 PM   #24
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
this is what i do:
Code:
dd bs=8192 if=/dev/sdd | bzip2 > xbmc-03.25.2013.iso.bz2 # to create the image
bunzip2 -c ./xbmc-03.25.2013.iso.bz2 | dd bs=8192 of=/dev/sdd # to restore the image
i imaged my 4 gb sd card like so and when it flaked out i replaced it with a 32 gb card and all i had to do after re-imaging was use gparted to extend the boundery of the partition (xbmc boots up just fine... until this sd card bytes the dust <@).
 
Old 03-28-2014, 07:21 PM   #25
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,815

Rep: Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238Reputation: 2238
A couple of fairly unlikely things come to mind.

On an old Lenovo laptop I had, the "Factory Recovery" partition (may it rest in pieces) wouldn't work unless it was physically at the end of the disk. You might make a wild stab and copy the last partition to the end of the 128M disk and adjust (or not) the partition table accordingly. It probably won't work, but neither has anything else so far.

You could try using "hdparm -N" to set the max visible sectors to match the smaller drive. (The liklihood of a 128M drive supporting that is probably quite small.)
 
  


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] dd'ing a usb drive image to a larger usb drive? Abscissa256 Linux - General 3 01-03-2012 02:44 AM
Unable to restore a backup image to drive using Clonezilla justmehere Linux - Software 8 04-25-2011 01:05 AM
Using DD: Image file becomes larger than original SFS drive from SC101 rodyz Linux - Software 2 08-13-2009 03:41 PM
Copy Image of System to larger drive villumanati Fedora 3 03-16-2009 09:57 PM
Drive Failure - Restore from drive/partition image? dkuntz Linux - General 3 12-02-2006 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:48 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
Open Source Consulting | Domain Registration