FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-22-2011, 12:46 PM
Verde Denim
 
Default mounting local file

I have a local file on my Ubu box that I made using dd from an SD Card.
For whatever reason,
mount -o loop <file-name> /mnt asks for the filesystem type, and regardless of the type I supply, mount tells me that it doesn't recognize the type.

file <filename> tells me that this is an x86 boot sector with an extended partition table, but does not reveal the filesystem type.
am I hosed for being able to mount this file?

any input, as always, is greatly appreciated.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-22-2011, 02:51 PM
Nils Kassube
 
Default mounting local file

Verde Denim wrote:
> I have a local file on my Ubu box that I made using dd from an SD
> Card. For whatever reason,
> mount -o loop <file-name> /mnt asks for the filesystem type, and
> regardless of the type I supply, mount tells me that it doesn't
> recognize the type. file <filename> tells me that this is an x86
> boot sector with an extended partition table, but does not reveal
> the filesystem type.
> am I hosed for being able to mount this file?

I suppose you made an image of the entire SD card. Then the problem is
the partition table at the start of the image. Your mount command tries
to mount that partition table which doesn't make sense (because it is
not a file system). Instead try this command:

sudo mount -oloop,offset=32256 filename /mnt

Here I used the standard offset for a harddisk with 63 heads (also works
for one of my CF cards) but your SD card might use a different
configuration. Then you would need a different offset which depends on
your SD card.

You could try the following loop to mount the first partition. It tries
every offset in steps of 512 until a working partition is found. It will
spit out lots of error messages for the bad offsets and finally print
the working offset. Don't forget to replace the filename in the first
line.

OFS=512; until sudo mount -oloop,offset=$OFS filename /mnt; do
OFS=$(($OFS + 512)); done; echo $OFS

If there is no partition (or you used a wrong filename) it will not stop
and you would have to use Ctrl-C to abort the loop.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org