Hello Mahesh,
On Wed, Oct 21, 2009 at 1:24 PM, mahesh sobale <[email protected]> wrote:
> HI,
>
> I am new to kernelnewbies. I am trying to print meta data in kernel
> space for superblock.
> for that i have to fire ioctl and write char device driver(This part i
> know),
>
> But i don't know how create loop device and mount ext2 file system on
> that and then print
> superblock info.
>
>
You can create loop devices
first create a file either using dd which would act like a loop device
second find the available loop device by
losetup -f
then following this command you can create a loop device
losetup <loop_device> <file_name>
create a file system on the loop device
mke2fs <loop_device>
mount -t ext2 <loop_device> <mountpoint>
using tune2fs or even debugfs u can get superblock info
tune2fs -l <loop_device>
or
debugfs <loop_device>
followed by stats
Can anybody help on this.
>
> Thanx.....
> Mahesh.
>
>
--
Regards:
Vineet Agarwal