LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-08-2008, 06:49 PM   #1
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Rep: Reputation: 30
Can I mount a file created by `dd if=/dev/sda of=/mnt/sdb1/40gig.bin` ?


If not, what if if=/dev/sda1 ?

Last edited by lumix; 12-08-2008 at 06:51 PM.
 
Old 12-08-2008, 06:52 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,375

Rep: Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564
You cannot mount a partition using the dd command. Use the mount command. See:

man mount

If you want to copy a file system then you want to copy /dev/sda1, not dev/sda.

If you create a file system within an ordinary file such as 40gig.bin then you can mount that file system on a loopback device.

-----------------------
Steve Stites

Last edited by jailbait; 12-08-2008 at 06:57 PM.
 
Old 12-08-2008, 07:05 PM   #3
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
I don't want to mount a file with the 'dd' command, I want to mount a file that was created by the 'dd' command.
 
Old 12-08-2008, 08:16 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
'losetup /dev/loop0 /mnt/sdb1/40gig.bin' loads the disk image. Then run 'sfdisk -uS -l /dev/loop0' to get partition info. You'll need the offsets to mount individual partitions. Say the first one starts at 32, then if a sector is 512 bytes, you would use 'losetup -o $[32*512] /dev/loop1 /dev/loop0' to mount it.
 
Old 12-08-2008, 08:16 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,375

Rep: Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564
You can mount a file on a loop device. See the section called "THE LOOP DEVICE" in the mount man pages.

-----------------------
Steve Stites
 
Old 12-08-2008, 10:58 PM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by lumix View Post
I don't want to mount a file with the 'dd' command, I want to mount a file that was created by the 'dd' command.
Yes, you can do that.
 
Old 12-09-2008, 09:51 AM   #7
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Thanks, Jailbait.
 
  


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
USB Detection; when /dev/sda1 or /dev/sdb1 ravime Linux - Hardware 6 09-12-2007 07:15 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 08:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 05:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 03:15 AM
mount: /dev/sdb1 is not a valid block device zaltar Linux - General 8 07-13-2005 03:07 AM

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

All times are GMT -5. The time now is 09:47 PM.

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