From: "Hareesh Nagarajan" <hnagar2@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: losetup behavior
Date: Wed, 28 Jun 2006 12:54:01 -0700 [thread overview]
Message-ID: <38b19aa60606281254v43a7639dl4c74a57503c65dec@mail.gmail.com> (raw)
In my example below I have an image of an entire disk /dev/sda created
using the dd command. The name of the file is foo.img. There are
(internally) 3 partitions. ext2 (root), swap, ext2 (data). I will
extract the third partition, first with dd and show that it works and
then with losetup and show that it doesn't work.
With dd:
root: / # dd if=foo.img of=part3 bs=512 skip=12402180 count=21141540
(Partition 3 begins at: 12402180 * 512 = 6349916160 bytes from start)
root: / # mount -o loop=/dev/loop0 part3 mypart3/
root: microv3/ # cd mypart3/; ls
blah/ blah-blah/
*works*
With losetup:
root: # losetup -o6349916160 /dev/loop0 foo.img
root: # mount /dev/loop0 mypart3/
mount: you must specify the filesystem type
root: / # mount -t ext2 /dev/loop0 mypart3
mount: wrong fs type, bad option, bad superblock on /dev/loop5,
or too many mounted file systems
*doesn't work*
At this point I must mention that losetup had no issues in mounting
the first partition.
root: # losetup -o32256 /dev/loop0 foo.img
(Partition 1 begins at: 63 * 512 = 32256 bytes from start)
root: # mount /dev/loop0 myroot/
root: # cd myroot/; ls
bin/ dev/
*works*
Anyone know, if this is the correct behaviour of losetup? Perhaps, I
am doing something incorrectly.
Thanks,
--
./hareesh
PS: uname -r ---> 2.6.16.11
next reply other threads:[~2006-06-28 19:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-28 19:54 Hareesh Nagarajan [this message]
[not found] ` <bda6d13a0606281313y733d6b63i80f672e233f9aeea@mail.gmail.com>
2006-06-28 20:50 ` Hareesh Nagarajan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38b19aa60606281254v43a7639dl4c74a57503c65dec@mail.gmail.com \
--to=hnagar2@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®