General :: Process Control From Boot Loader To User Space
Jun 29, 2010
For the past few days I was putting effort on understanding the software control flow starting from "Boot loader" to "Linux User space".
I am consolidating the entire process and putting forth in this forum...It would be great if someone can validate this..It might be useful to other new bees too.
Step 1 : Power up the board
Step 2 : The CPU control goes to EEPROM/storage memory where BIOS resides
Step 3: BIOS gets loaded in RAM and gets executed
Step 4: During execution, the selection of Boot device has to be done with the help of BIOS Menu [Blue screen appearance during start up in normal PC's]
Step 5: BIOS shall access the Bootloader stored in boot device [for eg.,Hard disk]. Boot loader is stored in MBR area.
for explanation purpose I take the following configurations
Bootloader = GRUB
Boot Device = Hard Disk
Step 6: GRUB shall be loaded in RAM and gets executed
Step 7: GRUB shall load the KERNEL image to RAM. Kernel image is stored in Hard Disk.
The question of "How the GRUB knows where the Kernel image is stored".
The answer is
1. In the "Grub.config" file, the location of "Kernel Image" and " Ramdisk Image" [which will be discussed later in the section] is being given.
Step 8: Kernel Image followed by Ramdisk Image is loaded in RAM by GRUB bootloader
Step 9: Kernel Image gets executed...During execution, top portion of the code shall make initial hardware initialization and latter part
of the code shall just decompress the Kernel Image
Step 10 : After decompressing the Kernel Image, it shall decompress
the already loaded Ramdisk Image
Ram disk is just creating a temporary hard disk in RAM. The main responsibility includes it consists of minimal driver files, executables, directory structures to created a TEMPORARY ROOT FILE SYSTEM.
This Temporary Root File system shall be used by Kernel Image
1. Execute the executables to access the Hard disk
2. For creating Permanent Root File System in HARD DISK
Step 11 : Kernel Shall look for the file /Linuxrc in Ramdisk. Linuxrc
is a USER script file [not sure]
Step 12: At the end of script file Linuxrc, the Ramdisk shall give the
control to "USER SPACE" [path for writing the script not known]in Linux kernel
Step 13: USER SPACE is the normal shell
View 2 Replies
ADVERTISEMENT
Jun 21, 2010
In a 32-bit system, max memory addressable is 4GB. Now Linux kernel does memory mapping division of 1GB for kernel address space and 3GB for user address space. That means 4GB of virtual address space is divided between kernel (1GB) and user (3GB).
Q1. All virtual mapping utilizes the available physical RAM without any division? I mean to say that if RAM is 512MB then a page in kernel space can lie any where RAM (leave aside old PCI dma accesses)? (How this fits to fact that kernel memory is non-pageble)
Q2. If a process is created in user space, it has visibility 4GB address space or 3GB address space?
View 2 Replies
View Related
Jun 14, 2010
I installed ubuntu using wubi and then I tried installing grub 2 but it failed. I need a way to reinstall the mbr sp it will load the windows 7 loader from the first partition.
View 1 Replies
View Related
Jan 4, 2010
Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?
1. How can we change it? (just changing value of PAGE_OFFSET is okay?)
2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?
View 2 Replies
View Related
Dec 10, 2008
I am writing a program which i dont want the kernel scheduler to preempt before certain time duration. I am using the system call sched_get_priority_max to set the maximum priority. However it is not producing results.
View 3 Replies
View Related
Apr 10, 2010
I need to recover the root password or reset it. For this, I am trying to follow the following steps to get into the single-user mode & where exactly I am getting stuck: 1. Reboot the machine2. Press <esc>3. At the boot loader screen, i have 'Red Hat Enterprise Linux Server ($version info)' highlighted. 4. Simply pressing 'e' (for editing) does not work (does nothing). 5. I have the option to press 'p' to enter boot-loader password and then go into the single user mode.What if I don't know the boot loader password as well & I want to get into the single-user mode WITHOUT using a boot CD? Is this possible? If so, please share the procedure to do so.
View 7 Replies
View Related
Sep 22, 2009
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.
View 1 Replies
View Related
Feb 11, 2010
What would be the best way to kill or start a process from a web site? Additionally, how could I get the output from the process and display it on the site?
View 7 Replies
View Related
Feb 17, 2011
Suppose a process creates multiple shared mem segments as part of it job.Now is it always possible that on restart, that process can reattach to those previously created shared mem segments to the same virtual address spaces (returned on first time creation) ? My intention is use pointers over shared memory.So on restart I want those pointers absolute value to remain valid.
View 1 Replies
View Related
Nov 1, 2010
I'm trying out puppy linux, as I have an old system, and the new Ubuntus do not work on it.
Anyway,I cannot boot from my hard drive but only from the floppy.I'm just not too keen on always booting from the floppy.
Here is the Menu.ls file:
View 8 Replies
View Related
Nov 28, 2010
measure kernel space time and user space time?
View 1 Replies
View Related
Jul 26, 2010
I have fedora 13 64bit installed on the box I want to connect with vnc, I have tigervnc & tigervnc-server installed.
As my user I run:
vncserver
then I can connect to that box using: 192.168.1.2:1 but it is a different desktop?
How can I use vnc to control my user's desktop?
View 1 Replies
View Related
Apr 29, 2011
I am installing Ubuntu 11.04 alongside Windows 7 and am being asked to select which device for boot loader installation. I have 7, called '/dev/sda *blank* through 7' (don't have a sda4) Should I just take the default (first one?)
View 1 Replies
View Related
Dec 13, 2010
I am developing a I2C CDROM client driver. The CDROM firmware supports TOC information read through a I2C command. It sends the TOC information in burst ( Interrupts a GPIO pin when it is ready ) and my CPU does a I2C read to read the TOC. When the CDROM firmware finishes sending the last data burst , it informs my CPU that it is done with the TOC, by a flag in the last data burst. I would like to know, which is the most efficinet way I can send these TOC information to userspace?
View 4 Replies
View Related
Jul 7, 2009
I wanna write a file in kernel space but from my searching I can to know that instead of writeing file in kernel space ,I can write data to user space by copy_to_user space.
But link is missing ...I dont know how will my user space will access kernel space means my function in kernel space which will do copy_to_user /....How my user space function will call my kernel level function ..
Can any one of you provide me with some example file which are doing this .I know every char driver is using it ...but i could not trace back how user level function is accessing it ...i m confused between user space and kernel space.
View 2 Replies
View Related
Jul 14, 2009
How to use execv from kernel space to call a user space program writtenfor socket prog.
I tried to write code for socket in kernel but its not working.
Socket code in kernel is also needed.
View 2 Replies
View Related
Apr 15, 2009
In the past I have used Slackware, but I changed to Gentoo because Slackware don't have a nice package manager. I like Gentoo very much, because you have control over your installation from the very beginning. You can tweak your installation, before it's a running installation.
The main problem is that you need to compile everything from source (this has some benefits), but i haven a 3.0ghz pentium 4, so compiling a full system takes days. That's not I want.
Because of that I tried Debian, it's nice because of the large collection of precompiled packages. However, it's seems like it is less Stable then Gentoo (i run debian sid, because i need the newer applications). It's also harder to configure to my needs.
Is there a (Gentoo-based) distribution that gives the user a lot of control on the installation proces (like gentoo) and afterwards gentoo-like configuration (it was so much better then Debian, for example: Where is the xorgconfig utility in debian? I know there is something called dpkg-reconfigure to configure X, but that didn't asked me about videocard and monitor settings, only keyboard related options)
But the distribution must have binaries for all (or at least a lot of) programs.
Is there such a distribution? What does come closest to my needs?
View 11 Replies
View Related
Jan 12, 2010
I list the process with
Code:
ps -ef | grep java
and I got:
Code:
user1 24041 ....
Here the user1 should the process name.
My question: Is this name the same as the user name?
View 2 Replies
View Related
Aug 28, 2010
Can I separately install a third party boot loader which can boot both Windows and Linux (Ubuntu) . I want to use a boot loader other than the boot loaders which come with these operating systems. I am trying this out of curiosity.
View 4 Replies
View Related
Nov 27, 2009
I have 2 os redhatlinux 5.1 and windows xp. is it possible to remove grubboot loader.
View 3 Replies
View Related
Jul 21, 2011
I have the following requirement in my module. The driver gets some data from the external device. After getting 1MB of data it has to send it to the user space application. What is the best thing to implement for this in driver.? Is it ok to implement like, after getting data, the driver will send a signal to the user space application. Then the user space application sends an ioctl to read the data. Is there any alternate, that the driver directly sends the data without the user space application asks for it.?
View 4 Replies
View Related
Mar 2, 2010
I've got the latest version of Ubuntu on my machine.My Linux partition is ext4, so I need to use a Linux boot loader capable of booting from ext4.Also, I want to be able to use the UUID of my partition instead of specifying "/dev/sda3".Right now I'm using the Grub2 (or whatever the f*** it's called) that comes with Ubuntu. It's the ugliest boot loader you'll ever see, the configuration file is disgusting.So with that in mind, I'd like to change boot loader.Lilo would be OK but I can't seem to get it to boot from ext4.The older version of Grub was fine too but again I don't think it can boot from ext4.
View 2 Replies
View Related
Jul 22, 2010
I need to install linux (with Grub) un a disk with windows 7 loader (i have 2x choice on that loader and i need to use it).
I tried to dig to find out some methods but nothing.
It's safe? It's better to install Grub on another partition - same physical disk?
View 5 Replies
View Related
Oct 23, 2010
I have triple booted Windows XP (195 GB)partition 0? the second partition is Windows 7 (195 GB)And the rest of a 1TB hard drive went to Open Suse 11.3. if it makes any difference I used g parted to create the three partitions and made them all primary. My problem is I want to change the way they all get along. When I boot up, I get the options;
Desktop -- openSUSE 11.3-2.6.34-12
Failsafe -- openSUSE 11.3-2.6.34-12
windows 1
windows 2
which is fine, but clicking on windows 1 takes me to the windows boot loader with the options of windows 7, or previous version of windows. clicking on windows 2 brings up a screen telling me " rootnoverify (hd0,1) chainloader +1 BOOTMGR is missing press ctrl+alt+del to restart" I would like the end result to be windows 1=XP,windows 2=7, then I can rename them accordingly. one more thing, when I installed openSUSE, I let it automatically configure the hard drive and create the necessary partitions(it deleted partition 3 first). i remember it saying somewhere that the boot manager was past the 125 GB limit, and might not boot.
View 8 Replies
View Related
Sep 11, 2010
I currently have 2 operating systems on my main hdd: Ubuntu and WinXP My current setup - [storage NTFS partition, solely data][17GB WinXP partition][{extended partion}Ubuntu + swap]: [URL] I have a second SATA hdd that I would like to install Arch Linux on to. It uses GRUB Legacy, and Ubuntu uses GRUB 2. I would like to know how I would go about booting this, and figure out where my current bootloader is installed to. i.e. /dev/sda or /dev/sda5 (the / ubuntu partiton)
View 3 Replies
View Related
Oct 25, 2010
I'm pretty new to this whole (micro)kernel architecture story.
Im wondering if a kernel module is running in kernel or in user space?
Is a driver running as kernel module slower than a driver build into kernel?
If so, are there some current articles, benchmarks?
View 4 Replies
View Related
Jun 27, 2010
I hope this is the right place to post to because I haven't found any other related forums.I'm working on an AMD opteron running Linux 2.6.28.6 I want to preload a hardware performance counter (register) with a value to have it overflow after a number of a specific event counts. As I understand, when the counter in the register overflows, an interrupt will be generated and handled by the appropriate interrupt handler. How can my user-level application get notified whenever the interrupt occurs? I want to obtain information on the instruction that caused the overflow. Is this possible? I think this is different than responding to signals with sigaction().
View 1 Replies
View Related
Jul 12, 2010
what difference between user and kernel space.
View 2 Replies
View Related
May 5, 2011
I have a program that I run from the terminal that requires manual input (it's matlab in mex debugging mode, matlab -Dgdb, which starts the GNU C debugger with its own custom settings).
Every time I run this program I always type in the same few commands in the program's interactive shell before I actually start working (for example: run -nojvm; stop at mexFunction; continue). I want to avoid typing these commands and I thought I could do this with shell scripting, saving the commands in the mycommands file, then running: myprogram < mycommands
The problem is that this runs all the commands and then exits the program. I want it to run the commands and return control to me so I can run my commands. Is there a way to tell the shell to use a file or a string as the input to a program then immediately return control to the user without the exiting the program?
View 3 Replies
View Related
Feb 24, 2010
I've three user in my machine ,and i want to make sure that the process created by the user1 can be killed by other user and vice-versa ,is there any way i can do that without using root password or sudo
View 4 Replies
View Related