LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 09-16-2008, 04:25 AM   #1
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112
Blog Entries: 2

Rep: Reputation: 15
Cool Mounting custom fs ?


Good evening, guys

i've followed this tutorial , its to create a simple fs

http://www.geocities.com/ravikiran_u...cles/rkfs.html

well, the source is quite outdate for my kernel 2.6.25.11 API

After correcting the code ,My fs module intialized and register filesystem successfully .

and cat /proc/filesystems have my fs name inside , with "nodev"

My problem is....

When i am trying to mount the fs (named "rkfs"), with following command,

mount -t rkfs none /mnt/rkfs_mount

(The command wrote in above tutorial, at final step)

the error was

mount: special device none does not exist

since it was a custom fs , so i have no idea how can i take some "device"

to making a mount

even i try create loopback device and mounted , it return "Segment fault"



Any ideas ?
 
Old 09-16-2008, 07:07 PM   #2
Ma Peche
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Rep: Reputation: 0
Can you use mkfs to make the filesystem?
if so, a loopback device setup could work something like

Code:
dd if=/dev/zero of=/myfs bs=1k count=100 #makes a file with all zeroes
losetup -a # this will show you which loopback devices are in use
# if it doesn't print anything you can use loop0, otherwise use the first free one
losetup /dev/loop0 /myfs  #make the loopback device
mkfs -t rkfs /dev/loop0 100 #format it to your fs
mount -t rkfs /dev/loop0 /mnt #mount it

hope this helps
 
Old 09-16-2008, 08:57 PM   #3
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Unluckily , its return as following.


mkfs -t rkfs /dev/loop0 100
mkfs.rkfs: No such file or directory


mount -t rkfs /dev/loop0 /mnt #mount it
Segmentation fault
 
Old 09-17-2008, 02:31 AM   #4
Ma Peche
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Rep: Reputation: 0
Was there any messages printed when you compiled the module or when you installed it (the `make` and `insmod` commands respectively)?
 
Old 09-17-2008, 02:50 AM   #5
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Neither Error and Warning issue.



Cedalion:/home/raynus/my_dev/module/blk# make
make -C /lib/modules/2.6.25.11/build M=/home/raynus/my_dev/module/blk modules
make[1]: Entering directory `/usr/src/linux-2.6.25.11'
Building modules, stage 2.
MODPOST 1 modules
LD [M] /home/raynus/my_dev/module/blk/rkfs2.ko
make[1]: Leaving directory `/usr/src/linux-2.6.25.11'
Cedalion:/home/raynus/my_dev/module/blk#


Cedalion:/home/raynus/my_dev/module/blk# insmod rkfs2.ko
Cedalion:/home/raynus/my_dev/module/blk#


And register_filesystem return 0.

Last edited by Raynus; 09-17-2008 at 02:52 AM.
 
  


Reply

Tags
filesystem, loopback


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
Creating custom headers to match a custom kernel utanja Debian 2 06-08-2007 03:15 PM
Custom kernel image on custom slack build using CUSS nykey Slackware 2 07-15-2006 03:05 AM
mounting creative muvo2 FM (custom 2.6.16 kernel) lordp Slackware 2 04-30-2006 04:26 PM
custom install cd base-config custom mithereal Debian 6 09-11-2005 03:48 PM
custom geforce video card--custom module? bandofmercy Linux - Hardware 3 10-14-2004 06:52 PM


All times are GMT -5. The time now is 09:54 AM.

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