Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Writing to hard disk, Disk recovery< Next Oldest | Next Newest >
charliep Offline





Group: Members
Posts: 2
Joined: April 2005
Posted: April 27 2005,22:16 QUOTE

I have been dabbling with DSL for a few months now so I am really a novice.  I am trying to make a CD that includes DSL with a script that will copy disk images and files to restore a hard disk.  Things are mostly working, but I want to restore the partition tables and this disk is 40GB with more than 12 partitions.  I tried sfdisk from the script, after using it to save the partitions, but unfortunately, the partitions are not nice - the last partition is in the middle (and --force does not work)  I decided to use dd to just duplicate the partitions exactly.

Example: dd if=/cdrom/part15 of=/dev/hda bs=512 count=1 seek=75012345

After quite a day trying to understand why I could not see the upper partitions, I realised that dd was not working because of the 4 byte limit.  I did some internet searches and think I see that dd has a 2 GB limit !

I know that I can use dd to copy the full 40GB disk, but I need to write specific sectors near the end.

Is there a dd that "works" or another way to write sectors to the disk that bypasses this apparent limit ?
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: April 28 2005,03:44 QUOTE

I have used GNU "dd" to restore partitions that are larger than 2GB.

You may need to install the gnu-utils.dsl extension in order to replace the "Busybox" dd that comes with the DSL livecd with "GNU" dd.

FYI, the 2GB limit may not be due to the dd command.  It may be due to the filesystem that you are using to store your image files.

If so, you can use the split command to span your image file over several different files.  Here is an example:
Code Sample

dd if=/dev/hda2 bs=4096 | gzip -2c | split -b 650m - /mnt/winshare/hda2_backup_


and restore:

Code Sample

cat /mnt/winshare/hda2_backup_* | gzip -dc | dd of=/dev/hda2 bs=4096


This will backup to/restore from the hda2 partition to a series of 650MB sized files that are stored at mountpoint /mnt/winshare

I have no problems with either a 2GB "dd" limit or a 2GB filesystem limit when I use this approach.

And it lets me save my image files to CD-R media.

Hope this helps.
Back to top
Profile PM 
1 replies since April 27 2005,22:16 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Writing to hard disk

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code