[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
  Show Posts
Pages: [1]
1  Linux in General / Linux Kernel / Kernel Compilation: Time saving on: June 18, 2008, 02:27:23 AM
Hi,

I have added some new code to linux kernel. But one thing is that it affects some file only. like added or changed a few .h and .c files. But do i have to always compile the whole kernel? I am following the following steps:

Code:
$make mrproper
$make oldconfig
$make xconfig
$make
$make modules_install
$make install

Is it required to compile the whole kernel every time we make any change to it or there is some other time saving method?

Please Reply As early as possible. Thanks in advance.
2  Linux in General / Linux Development & Programming / Re: Ext3 Journal on: May 07, 2008, 05:15:35 AM
I m not sure wheather  u can able to see journilising file................., Anyways ext3 is a filesysytem and u cn see the partotions from /etc/fstab file

/etc/fstab contains all the partitions with the file system type information...........

you can see the size of any ext3 type partions, from df -h commad

I was not asking about the ext3 filesystems information. I was asking about the .journal file and how to view its contents..

Anyways, What i have done is

Code:
$tune2fs -l /dev/hda2            (This is where i have my ext3 partition)

and through that i found out the inode number of the journal file i.e 8. The following is the output of tune2fs

Code:
tune2fs 1.39 (29-May-2006)
Filesystem volume name:   /ext3fs1
Last mounted on:          <not available>
Filesystem UUID:          18f47a23-d12e-4206-8a0c-e15e1abf5936
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              6469056
Block count:              6468170
Reserved block count:     323408
Free blocks:              6221533
Free inodes:              6469045
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1022
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         32672
Inode blocks per group:   1021
Filesystem created:       Wed May  7 10:02:02 2008
Last mount time:          Wed May  7 10:43:34 2008
Last write time:          Wed May  7 10:43:34 2008
Mount count:              5
Maximum mount count:      -1
Last checked:             Wed May  7 10:02:02 2008
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      79e25347-d41b-4f7b-9de4-7966af814566
Journal backup:           inode blocks


as can be seen from the output the inode of the journal is given as 8. So then i used debug and stat command

Code:
$debugfs /dev/hda2
debugfs 1.39 (29-May-2006)
debugfs:  stat <8>
Inode: 8   Type: regular    Mode:  0600   Flags: 0x0   Generation: 0
User:     0   Group:     0   Size: 134217728
File ACL: 0    Directory ACL: 0
Links: 1   Blockcount: 262416
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x482139b0 -- Wed May  7 10:40:08 2008
atime: 0x00000000 -- Thu Jan  1 05:30:00 1970
mtime: 0x482139b0 -- Wed May  7 10:40:08 2008
BLOCKS:
(0-11):2054-2065, (IND):2066, (12-1035):2067-3090, (DIND):3091, (IND):3092, (1036-2059):3093-4116, (IND):4117, (2060-3083):4118-5141, (IND):5142, (3084-4107)
:5143-6166, (IND):6167, (4108-5131):6168-7191, (IND):7192, (5132-6155):7193-8216, (IND):8217, (6156-7179):8218-9241, (IND):9242, (7180-8203):9243-10266, (IND
):10267, (8204-9227):10268-11291, (IND):11292, (9228-10251):11293-12316, (IND):12317, (10252-11275):12318-13341, (IND):13342, (11276-12299):13343-14366, (IND
):14367, (12300-13323):14368-15391, (IND):15392, (13324-14347):15393-16416, (IND):16417, (14348-15371):16418-17441, (IND):17442, (15372-16395):17443-18466, (
IND):18467, (16396-17419):18468-19491, (IND):19492, (17420-18443):19493-20516, (IND):20517, (18444-19467):20518-21541, (IND):21542, (19468-20491):21543-22566
, (IND):22567, (20492-21515):22568-23591, (IND):23592, (21516-22539):23593-24616, (IND):24617, (22540-23563):24618-25641, (IND):25642, (23564-24587):25643-26
666, (IND):26667, (24588-25611):26668-27691, (IND):27692, (25612-26635):27693-28716, (IND):28717, (26636-27659):28718-29741, (IND):29742, (27660-28683):29743
-30766, (IND):30767, (28684-29707):30768-31791, (IND):31792, (29708-30682):31793-32767, (30683-30731):34816-34864, (IND):34865, (30732-31755):34866-35889, (I
ND):35890, (31756-32768):35891-36903
TOTAL: 32802

from here i get the size in bytes i.e. 134217728 which comes out to be 128MB...

1st Question: Is there any way to see the contents of the blocks directly?

Now comes the dumping of journal... I dumped it using logdump inside debugfs and following is the output..

Code:
debugfs 1.39 (29-May-2006)
debugfs:  logdump
Journal starts at block 1, transaction 2
Found expected sequence 2, type 1 (descriptor block) at block 1
Found expected sequence 2, type 2 (commit block) at block 3
Found expected sequence 3, type 1 (descriptor block) at block 4
Found expected sequence 3, type 2 (commit block) at block 6
Found expected sequence 4, type 1 (descriptor block) at block 7
Found expected sequence 4, type 2 (commit block) at block 9
Found expected sequence 5, type 1 (descriptor block) at block 10
Found expected sequence 5, type 2 (commit block) at block 12
Found expected sequence 6, type 1 (descriptor block) at block 13
Found expected sequence 6, type 2 (commit block) at block 15
Found expected sequence 7, type 1 (descriptor block) at block 16
Found expected sequence 7, type 2 (commit block) at block 18
Found expected sequence 8, type 1 (descriptor block) at block 19
Found expected sequence 8, type 2 (commit block) at block 21
Found expected sequence 9, type 1 (descriptor block) at block 22
Found expected sequence 9, type 2 (commit block) at block 24
Found expected sequence 10, type 1 (descriptor block) at block 25
Found expected sequence 10, type 2 (commit block) at block 35
Found expected sequence 11, type 1 (descriptor block) at block 36
Found expected sequence 11, type 2 (commit block) at block 44
Found expected sequence 12, type 1 (descriptor block) at block 45
Found expected sequence 12, type 2 (commit block) at block 47
Found expected sequence 13, type 2 (commit block) at block 48
Found expected sequence 14, type 1 (descriptor block) at block 49
Found expected sequence 14, type 2 (commit block) at block 51
Found expected sequence 15, type 1 (descriptor block) at block 52
Found expected sequence 15, type 2 (commit block) at block 54
Found expected sequence 16, type 1 (descriptor block) at block 55
Found expected sequence 16, type 2 (commit block) at block 57
Found expected sequence 17, type 1 (descriptor block) at block 58
Found expected sequence 17, type 2 (commit block) at block 61
Found expected sequence 18, type 1 (descriptor block) at block 62
Found expected sequence 18, type 2 (commit block) at block 65
No magic number at block 66: end of journal.

Now the 2nd question: How to interpret the journal dump? SmileySmileySmileySmiley
3  Linux in General / Linux Development & Programming / Ext3 Journal on: May 07, 2008, 01:35:30 AM
Hi Everybody,

Can anyone tell me how to view the journal file in an ext3 file system?
Or how to see its size?

Thank you in advance..Smiley
4  Linux in General / Linux Development & Programming / Re: Cannot Load Kernel Loadable MOdule... on: April 18, 2008, 10:02:17 AM
I inserted the code:

Code:
/* 
 *  hello-1.c - The simplest kernel module.
 */
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */

int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");

/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}

void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}


module_init(init_module);
module_exit(cleanup_module);

but it is still giving some error...

Code:
[mohit@dhcp-ptp2-10-177-142-249 LKM]$ make
make -C /lib/modules/2.6.22.5/build M=/home/mohit/Desktop/LKM modules
make[1]: Entering directory `/usr/src/linux-2.6.22.5'
  CC [M]  /home/mohit/Desktop/LKM/hello-1.o
/home/mohit/Desktop/LKM/hello-1.c:23: error: redefinition of ‘init_module’
/home/mohit/Desktop/LKM/hello-1.c:8: error: previous definition of ‘init_module’ was here
/home/mohit/Desktop/LKM/hello-1.c:24: error: redefinition of ‘cleanup_module’
/home/mohit/Desktop/LKM/hello-1.c:18: error: previous definition of ‘cleanup_module’ was here
make[2]: *** [/home/mohit/Desktop/LKM/hello-1.o] Error 1
make[1]: *** [_module_/home/mohit/Desktop/LKM] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22.5'
make: *** [all] Error 2

Now tell me what is the problem....
5  Linux in General / Linux Development & Programming / Cannot Load Kernel Loadable MOdule... on: April 18, 2008, 07:39:36 AM
hi everybody,

I tried to create a new module as given in http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html, hello-1.c.

Code:
/* 
 *  hello-1.c - The simplest kernel module.
 */
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */

int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");

/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}

void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}

and then created the Makefile as

Code:
obj-m += hello-1.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

and then make that... but the following errors are coming:

Code:
[root@dhcp-ptp2-10-177-142-249 LKM]# make
make -C /lib/modules/2.6.22.5/build M=/root/Desktop/LKM modules
make[1]: Entering directory `/usr/src/linux-2.6.22.5'
  Building modules, stage 2.
  MODPOST 0 modules
WARNING: vmlinux(.text+0xc040116f): Section mismatch: reference to .init.text:start_kernel (between 'is386' and 'check_x87')
WARNING: vmlinux(.text+0xc061fc70): Section mismatch: reference to .init.text: (between 'rest_init' and 'alloc_node_mem_map')
WARNING: vmlinux(.text+0xc062460a): Section mismatch: reference to .init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc0624616): Section mismatch: reference to .init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc0624622): Section mismatch: reference to .init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc062462e): Section mismatch: reference to .init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc061fcf0): Section mismatch: reference to .init.text:__alloc_bootmem_node (between 'alloc_node_mem_map' and 'zone_wait_table_init')
WARNING: vmlinux(.text+0xc061fd96): Section mismatch: reference to .init.text:__alloc_bootmem_node (between 'zone_wait_table_init' and 'setup_cpu_cache')
WARNING: vmlinux(.text+0xc061fe11): Section mismatch: reference to .init.text: (between 'setup_cpu_cache' and 'schedule')
WARNING: vmlinux(.text+0xc061fe4b): Section mismatch: reference to .init.text: (between 'setup_cpu_cache' and 'schedule')
WARNING: vmlinux(.text+0xc05066f2): Section mismatch: reference to .init.text:__alloc_bootmem (between 'vgacon_startup' and 'vgacon_scrolldelta')
WARNING: vmlinux(.text+0xc0624dc2): Section mismatch: reference to .init.text: (between 'iret_exc' and '_etext')
make[1]: Leaving directory `/usr/src/linux-2.6.22.5'

can u suggest what is the problem?
Also if anyone can suggest me gd book on Kernel Module Programming for LInux 2.6..

Thanks in advance...Smiley
6  Linux in General / Linux Kernel / Linux File System Structure Questions on: March 28, 2008, 06:44:07 AM
Can any one answer me upon the following questions:

1)   Can a file be on more than one block group?
2)   Does every block group have unique Inode table?
3)   Where the file names are stored, if not in the inode?
4)   Other than data block what all e2compr changes with respect to the physical structure of ext2 file system?
5)   How the physical structure of ext2 and ext3 file system differs?
6)   What changes the journalling bring about in the physical structure of ext3 file system?

Thanking all in anticipation....  Huh
7  Linux in General / Linux Kernel / Kernel Compilation: Solve The Error on: March 06, 2008, 02:00:07 AM
I compiled my kernel... RHEL5 and kernel version 2.6.18-8.el5. I compiled the new kernel 2.6.24.3. The steps i followed are:
First i unpatched the kernel into a directory /home/src and it came in a folder linux-2.6.24.3. Then i cd'd into the folder

$cd /home/src/linux-2.6.24.3

After that i ran the following command:

$make mproper
$make xconfig (where i removed the ext3 file system, only change i made)
$make dep
$make clean
$make bzImage
$make modules
$make modules_install

Then i created initial ramdisk
$mkinitrd /boot/initrd-2.6.24.3.img 2.6.24.3

Then i copied the kenel and the system map
$cp arch/x86/boot/bzImage /boot/bzImage-2.6.24.3
$cp System.map /boot/System.map-2.6.24.3
$ln -s /boot/System.map-2.6.24.3 /boot/System.map

Then i changed the grub file in /etc/grub.conf and added the following lines:

title Test Kernel (2.6.24.3)
         root(hd0,5)          //this was given as in the earlier entry
         kernel /bzImage-2.6.24.3 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
         initrd /initrd-2.6.24.3.img

Then i rebooted the system... and from the grub menu chose the Test Kernel..
but it gives the error...

mount: error mounting /dev/root on /sysroot as ext3: No such device
setuproot: moving /dev failed: No such file or directory
setuproot: error mouting /proc: No such file or directory
setuproot: error mouting /sys: No such file or directory
swutchroot: mount failed: No such file or directory
kernel panic - not sysncing : attempted to kill init!

Could anyone please help me in removing this error and properly compile the kernel? Huh
8  Others / Miscellaneous / E2compr control flags values.... on: February 26, 2008, 02:12:48 AM
Can anyone tell me the value of these control flags?

EXT2_DEFAULT_COMPR_METHOD

EXT2_DEFAULT_CLUSTER_SIZE

EXT2_LZV1_ID

EXT2_LZV1_ID

EXT2_NONE_ID

EXT2_LZRW3A_ID

EXT2_GZIP6_ID

EXT2_GZIP1_ID

EXT2_GZIP2_ID

EXT2_GZIP3_ID

EXT2_GZIP4_ID

EXT2_GZIP5_ID

EXT2_GZIP6_ID

EXT2_GZIP7_ID

EXT2_GZIP8_ID

EXT2_GZIP9_ID

EXT2_IOC_CLRCLUSTERBIT

All these are used in e2compress.c...the original e2compr code written by Antonie? Huh
9  Others / Miscellaneous / ext3 doubts, why it checks for file system during boot ? on: February 25, 2008, 01:36:27 AM
If journaling can be used to recover file system after crashes, why does ext3 still ask for file system check during system boot up? Huh
10  Others / Miscellaneous / Where to find e2compr :Compression patch over ext2 file system on: February 22, 2008, 03:49:02 AM
can anyone tell me where could i find any kind of documentation on e2compr... the compression patch over ext2 file system... or maybe any idea about the control flow about how it works internally.... m doing an analysis on e2compr? Huh
Pages: [1]
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 10, 2008, 03:00:20 PM

Login with username, password and session length
Navigation
Recent Discussions
[October 09, 2008, 05:17:47 PM]

[October 08, 2008, 04:32:08 AM]

[October 07, 2008, 05:16:33 AM]

[October 06, 2008, 03:09:51 AM]

[October 04, 2008, 03:33:03 AM]

[October 03, 2008, 06:21:18 AM]

[October 03, 2008, 05:31:19 AM]

[October 03, 2008, 05:28:14 AM]

[October 03, 2008, 05:27:13 AM]

[September 27, 2008, 12:09:47 PM]
Members
Total Members: 6098
Latest: kholik
Stats
Total Posts: 8202
Total Topics: 2223
Online Today: 12
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 8
Total: 8
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc