LinuxQuestions.org
Help answer threads with 0 replies.
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 07-26-2007, 09:51 AM   #1
ve2rf
LQ Newbie
 
Registered: Nov 2005
Location: Montreal, Canada
Posts: 4

Rep: Reputation: 0
question concerning the "dd" command ?


Hi there..

Here goes...

I am creating a copy of a floppy 1.44 mb ti an image file using
*** dd if/dev/fd0 of=/test/image.gz

This works fine !!!

But what I am trying to do is restoring this image on to a 1.68mb Floppy disk... Even If I try to mount the floppy disk like this
*** mount /dev/fd0u1680 /mnt

and try to restore the image.gz to the floppy properly formated... it always comes back to 1.44mb ??
it might be inherent to the "dd command" !!!

Can anyone help ? Please...

BTW I am using a very small bistribution that fits on a floppy... Coyote linux...

Thanks

Patrick
VE2RF
 
Old 07-26-2007, 10:53 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,294

Rep: Reputation: 138Reputation: 138
It is inherent in the dd command. No matter what size floppy you restore to, if the dd image is 1.44MB that's all that will show up on the restored floppy.

You can try a more direct approach. Put your extended format 1.68MB floppy in the drive and run:

# syslinux -s /dev/fd0u1680

Then copy over the contents of the 1.44MB Coyote floppy to your 1.68MB floppy. All the linux bootable floppies I've seen use the syslinux boot loader. The above command will install syslinux on your 1.68MB floppy making it bootable. The necessary syslinux config files(namely, syslinux.config and probably some boot message display file(s)) for syslinux to boot Coyote will be on the 1.44MB version and a direct copy to your 1.68MB floppy is all that is needed.

Note, most distros have a package available for syslinux but may not have it installed by default. If you get a command not found error when trying to run syslinux, you probably have to install the syslinux package. Also, even when everything is done right, extended format floppies do not work with all bioses and they load very slowly when they do work.
 
Old 07-26-2007, 10:54 AM   #3
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Well dd simply creates an image file (why do you use .gz at the end? the image is not gzipped, so using .gz doesn't make sense) and if you later dd that image back to some other place, it'll create exactly as much data out of it as was written to it. That means, if you dd a 10GB harddisk to an image and then dd the image to a 20GB harddisk, there's still only 10GB on the 20GB disk, because the image is an exact copy of 10 gigabytes, not 20. dd wouldn't know what to do with the rest 10 gigabytes, fill with zeros or what.
 
Old 07-27-2007, 01:35 AM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Here is an extract from Awesome's dd thread:

If you dd a smaller partition to a larger one the larger one will now be formatted the same as the smaller one and there won't be any space left on the drive. The way around this is to build a partition image file.
Code:
dd if=smaller_partition of=/home/sam/smaller_partition.img
Mount the image like a drive using:
Code:
mount -o loop /home/sam/smaller_partition.img /mnt/directory
cd /mnt/directory
cp -r * /mnt/larger_partition_already_partitioned_and_formatted_to_the_size_you_want
I actually just tried mounting a 10GB hard drive image of an ntfs file system which is also stored in an ntfs file system and I'm using ntfs-3g, I could not mount the image using this example, kept getting un-known file system type errors or similar. So I came cruising these forums while waiting for a new image of that drive to complete using a different syntax in my dd command.
EDIT: It kept telling me I had to specify the file system type, so I did, and still got errors.

Last edited by Junior Hacker; 07-27-2007 at 01:40 AM.
 
  


Reply

Tags
command, dd, help


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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
Make "ls" command show colors without "--color=always" switch SharpyWarpy Linux - General 4 07-16-2007 11:00 PM
shell question: the "mv" command with multiply files basher400 Linux - Newbie 4 12-19-2005 07:42 AM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration