I'm working towards understanding the ext3 file system. i have added printk statements into the files inside kernel source files of ext3, to see how things get executed by watching the kernel buffer messages (dmesg). I have followed the steps given in this link: https://askubuntu.com/questions/168279/how-do-i-build-a-single-in-tree-kernel-module . i am using following commands to build ext3 as a module to experiment on it by loading and unloading it using modprobe.
The commands are:
cd $HOME/linux-3.12.36/
make oldconfig # copy old .config to ./
vi .config # i have made CONFIG_EXT3_FS=m
make prepare
make modules_prepare
make SUBDIRS=scripts/mod
make SUBDIRS=fs/ext3 modules
# Then I created 'ext3' directory in /lib/modules/3.12.36/kernel/fs, which was not there earlier.
cp fs/ext3/ext3.ko /lib/modules/3.12.36/kernel/fs/ext3/
depmod
modprobe ext3
all executes ok... except the last statement which gives the error:
modprobe: ERROR: could not insert 'ext3': Device or resource busy.
my lsmod result in case helpfull:
Module Size Used by
ums_realtek 18045 0
usb_storage 62230 1 ums_realtek
auth_rpcgss 59261 0
rfcomm 69078 0
bnep 19704 2
bluetooth 372312 10 bnep,rfcomm
sunrpc 284347 2 auth_rpcgss
arc4 12608 2
iwldvm 236564 0
snd_hda_codec_hdmi 41149 1
snd_hda_codec_realtek 56979 1
mac80211 607387 1 iwldvm
snd_hda_intel 56546 3
snd_hda_codec 192906 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
i915 711131 8
snd_hwdep 13602 1 snd_hda_codec
snd_pcm 102042 3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
iwlwifi 165575 1 iwldvm
snd_page_alloc 18710 2 snd_pcm,snd_hda_intel
snd_seq_midi 13324 0
snd_seq_midi_event 14899 1 snd_seq_midi
parport_pc 32741 0
snd_rawmidi 30144 1 snd_seq_midi
uvcvideo 80843 0
snd_seq 61560 2 snd_seq_midi_event,snd_seq_midi
snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi
videobuf2_vmalloc 13216 1 uvcvideo
snd_timer 29427 2 snd_pcm,snd_seq
videobuf2_memops 13362 1 videobuf2_vmalloc
cfg80211 483503 3 iwlwifi,mac80211,iwldvm
videobuf2_core 40625 1 uvcvideo
ppdev 17635 0
snd 69274 17 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi
intel_powerclamp 14727 0
drm_kms_helper 52758 1 i915
videodev 134093 2 uvcvideo,videobuf2_core
drm 297924 4 i915,drm_kms_helper
lp 17759 0
dell_laptop 17369 0
dcdbas 14888 1 dell_laptop
dell_wmi 12681 0
joydev 17393 0
sparse_keymap 13948 1 dell_wmi
coretemp 13435 0
i2c_algo_bit 13413 1 i915
shpchp 37047 0
mei_me 18437 0
kvm_intel 143006 0
mei 78023 1 mei_me
lpc_ich 21093 0
parport 42313 3 lp,ppdev,parport_pc
serio_raw 13483 0
kvm 445551 1 kvm_intel
intel_ips 18484 0
soundcore 12680 1 snd
wmi 19193 1 dell_wmi
video 19058 1 i915
psmouse 106319 0
ahci 29929 5
atl1c 46050 0
libahci 32009 1 ahci
after observing lsmod you can see that there is no ext3 or jbd module. What am i missing here or why else there is no ext3 module. yet i have installed my operating system on a drive partitioned with ext3.
i have unloaded the ext3 module for inserting my own, by typing:
modprobe -r ext3
and then,
modeprobe ext3
But still the error persists. Please help me to solve the modprobe problem.
PS: I'm using Ubuntu.