Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
hi I am new to linux. I have downloaded the DSL kernel code(linux-2.4.31). I just want to know at which point the kernel image and User interface(ie GUI) linked?. Because ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Location
    India
    Posts
    78

    Kernel and GUI

    hi
    I am new to linux.
    I have downloaded the DSL kernel code(linux-2.4.31). I just want to know at which point the kernel image and User interface(ie GUI) linked?. Because the i want to load my GUI.
    Can anyone help me?

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    The kernel is not really linked to a gui in Linux/Unix and thats why you can operate them from just a text interface. If your system is booting into the command line by default, enter your userid and password to login. After you have successfully logged in, enter the command "startx" to start a GUI.

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Location
    India
    Posts
    78

    Question

    When DSL (or any Linux distro) gets booting, the display mode can be GUI or Text based on the input from the kernel parameters. my doubt is, anyway the linux code having the link or something to point out the GUI if the display mode is GUI.
    What parameter should i give for Text mode?

    Thanks.

  4. #4
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    Whether you boot into a GUI or CLI by default is determined by the runlevel you choose. Different runlevels are configured to start or stop certain scripts, services, guis etc. For example runlevel 3 is text mode on most distros whilst 5 is for a GUI. The kernel itself does not start the gui/text mode, thats the job of the init scripts in the various runlevels. You can append the runlevel you wish to boot in the kernel parmeters and the kernel just passes on the info to the startup process (I think its init to be more precise).

    According to the Damn Small Linux site, text mode is runlevel 2, so thats the parameter you need to append to the kerenl line if you wish to boot into the command line.

  5. #5
    Just Joined!
    Join Date
    Jan 2008
    Location
    India
    Posts
    78

    Question

    Thanks for your reply. For Redhat and DSL i can work with Text mode successfully.
    When kernel boots up, it showing messages as
    Mounting file system..
    Creating root file system
    INIT: Entering run level 5
    ......
    .....
    .....
    etc.

    whether these messages are available in kernel code base?
    Actually i have downloaded the DSL kernel 2.4.31 and trying to find out the messages which coming in linux boots up. When i was searching for that messages i couldnt find them out.

  6. #6
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,047
    Ah you mean the init scripts? That's not really kernel code, but needed nontheless. I believe, but I'm not sure, that they are in /etc/init.d/ in RH.

    The default runlevel to boot is defined, amongst other things, in /etc/inittab
    And in lilo this is easily overwritten by appending the number of the runlevel you want as bootparameter. I'm very sure grub has something similar.
    Can't tell an OS by it's GUI

  7. #7
    Just Joined!
    Join Date
    Jan 2008
    Location
    India
    Posts
    78

    Question

    Thanks Freston!. I can view the message when linux boots up in /etc/rc.d folder.
    In linux we have two things.
    1. Kernel image
    2. RAM disk image.(has the modules for booting)

    a)can anyone explain what are all the things the kernel image, and RAM disk image will have?
    b)can i view the modules added up in RAM disk image?
    I have seen in kernel upgradation, when we type #make menuconfig, a window will be opened. Some options may selected as[*] and some options selected as [M]. SO all[*] are together as Kernel image and all [M] are together as RAM disk image. am i right?
    c)can anyone clarify the above?
    d)Can i put the two things as a whole kernel image?

  8. #8
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by East View Post
    Thanks Freston!. I can view the message when linux boots up in /etc/rc.d folder.
    In linux we have two things.
    1. Kernel image
    2. RAM disk image.(has the modules for booting)
    A ram disk is not needed by any means. I just compile statically the stuff I need at boot time, and I can rip out of the kernel initrd stuff as a whole, that I don't need for anything.

    a)can anyone explain what are all the things the kernel image, and RAM disk image will have?
    I have no clue what do you mean. The things that fit into a ram image depends only on who made that image. You can put anything in there, from kernel modules to splash images... It is completely up to you or whomever did it (if not you, probably your distro's packagers).

    b)can i view the modules added up in RAM disk image?
    I have seen in kernel upgradation, when we type #make menuconfig, a window will be opened. Some options may selected as[*] and some options selected as [M]. SO all[*] are together as Kernel image and all [M] are together as RAM disk image. am i right?
    No. Stuff with * is compiled statically into the kernel, that is true. Stuff as M is compiled as modules. That doesn't mean that it will automagically go into a ramdisk or something like that. The ramdisk generation tools are the ones that let you take those external modules and put them into a ramdisk along with any other stuff that you might need/want at bootup.

    Different distros might have differet ways to do this. A popular tool to make ramdisk images is mkinitrd, it might be installed as part of your base system or not. I don't know.

    d)Can i put the two things as a whole kernel image?
    If by "two things" you mean the initrd image + the proper kernel, then no. You kernel is a binary file (sometimes compressed) which is directly loaded by the bootloader (grub, lilo, or whatever). Then it loads your initrd image. Note that the kernel needs to be with initrd support to be able to do this.

  9. #9
    Just Joined!
    Join Date
    Jan 2008
    Location
    India
    Posts
    78
    Thanks for the replies.
    Can edit the /etc/rc.d shell scripts? If so i have to recomplie my kernel?
    How to remove the modules already loaded using rmmod command.
    Can anyone explain about mkinitrd command , how its taking inputs and at which point our kernel calling the mkinitrd command.

  10. #10
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    Yes you can edit start up scripts. There is no need to recompile the kernel because the startup scripts have nothing to do with the kernel or recompiling the kernel. They are just shell scripts that are used to help the kernel initialise the system as well as to run/stop services. This is what we've been trying to explain to you right from the start.

    As for rmmod, I suggest you look at the manual (man rmmod). "modprobe -r" is actually recommended in the rmmod manual, so maybe its best for you to look at modprobe as well.

    For the initrd/mkinird stuff, download the Linux kernel source and in the Documentation subdirectory, take a look at the file called initrd.txt.

    I think you need to get yourself a book on the Linux kernel if you want to understand its internals. You can download Linux Kernel in a Nutshell from the authors site.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...