flat assembler
Message board for the users of flat assembler.
Index
> Linux > what is linux |
Author |
|
sleepsleep 19 May 2007, 02:51
could anyone insight me on what is linux and linux kernel?
i explain what i understood currently, if wrong, please correct me. linux kernel could be downloaded from http://www.kernel.org/ linux kernel is like windows API kde, gnome is like explorer.exe in windows. what those distro did are, combine a boot loader (or linux kernel can self-boot?), linux kernel, window manager, etc software linux kernel can be used to detect hardwares (on boot) and provide access to it through kernel api (am i correct?) or device drivers are separated from kernel? or kernel only contained basic driver? if i put linux kernel and put a prompt (bash or ect shell), i can expect it to function like DOS expect the program calls to linux kernel. (am i right?) thank you. |
|||
19 May 2007, 02:51 |
|
TmX 19 May 2007, 04:53
Simply put :
Linux itself is just a kernel. http://en.wikipedia.org/wiki/Kernel_%28computer_science%29 "In computer science, the kernel is the central component of most computer operating systems (OS). Its responsibilities include managing the system's resources and the communication between hardware and software components. As a basic component of an operating system, a kernel provides the lowest-level abstraction layer for the resources (especially memory, processors and I/O devices) that applications must control to perform their function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls." The kernel itself is not a standalone tool, so it needs another tools to work (bootloader, compiler, window manager, etc). and that forms the OS (the GNU/Linux system). CMIIW |
|||
19 May 2007, 04:53 |
|
rob.rice 07 Dec 2007, 02:55
|
|||
07 Dec 2007, 02:55 |
|
sleepsleep 14 Feb 2008, 18:00
wanna ask,
is that possible to use the following way to have a linux with a prompt only. 1. download the kernel, http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.2.tar.bz2 2. put a lilo/grub 3. get a prompt (nothign will function, eg. ls cat etc...) just a prompt to reprint what i type. 4. then i put fasm inside then i can start programming in linux using fasm? any idea. (call me weird, but i think the above ways will make me understand how linux works) |
|||
14 Feb 2008, 18:00 |
|
nocona 17 Feb 2008, 06:25
if you want to start from scratch, you need existing linux installation or linux livecd. you can visit www.linuxfromscratch.org to see how they do it. you can use existing installation of linux distro - recompile kernel and don't compile any drivers you need as modules, integrate it into kernel. delete everything except your kernel and grub files plus any userspace program/libraries you need. in order to get a prompt you need a shell (e.g bash), but you can actually start anything in place of init as the first userspace program executed by kernel. Just make sure you append "init=<your binary path>" to the kernel command line, e.g init=/bin/bash. put fasm and your favorite editor and you're done.
|
|||
17 Feb 2008, 06:25 |
|
sleepsleep 17 Feb 2008, 17:40
thanks for the info nocona, so i need a chicken to produce the first egg ;P
|
|||
17 Feb 2008, 17:40 |
|
sleepsleep 02 May 2008, 12:35
still without any progress on my site... damn, why am i so stupid and smart.... damn it.
|
|||
02 May 2008, 12:35 |
|
sleepsleep 18 Jul 2008, 22:55
since i am on holiday (sort of),
yeah, with a laptop, hardly holiday... http://forums.debian.net/viewtopic.php?t=28875 still trying to figure out... but a little bit progress already |
|||
18 Jul 2008, 22:55 |
|
sleepsleep 19 Jul 2008, 11:03
yeah, finally i got what i want
it took me several hours to google here and there, damn, this is simple after i figure it out. below are the steps that i use. assumptions: ------------ 1. you already got a linux OS running (i use debian) 2. i run it inside vmware, using xp as host. 3. sda is first hard disk with debian installed. 4. sdb is second hard disk to be experiment with mini debian + bash only. 5. after you remove the sda, the sdb would become sda. *(remember) steps: ------ 1. fdisk the new drive sdb (i use 1 GB) 2. create bootable partition (to be use as /boot) /dev/sdb1 3. create swap (i haven't figure out how to use it yet) /dev/sdb2 4. create root partition /dev/sdb3 5. i set them all as primary partition. 6. mkfs -t ext3 /dev/sdb1 and /sdb3 then mkswap /dev/sdb2 7. mkdir /mnt/root 7. mkdir /mnt/boot 8. mount /dev/sdb1 /mnt/boot 8. mount /dev/sdb3 /mnt/root 7. mkdir /mnt/boot/grub 7. mkdir /mnt/root/bin 7. mkdir /mnt/root/dev 9. cp /boot/vmlinuz-2.6.18-6-686 /mnt/boot 9. cp /boot/initrd.img-2.6.18-6-686 /mnt/boot/ 11. cp /usr/lib/grub/i386-pc/stage1 /mnt/boot/grub/ 12. cp /usr/lib/grub/i386-pc/stage2 /mnt/boot/grub/ 13. cp /usr/lib/grub/i386-pc/e2fs_stage1_5 /mnt/boot/grub 14. download the bash source that you want to compile, if you use debian, make sure you run the aptitude install build-essential if you haven't 'make' before. 15. put the source gz in /usr/src extract it and you got /usr/src/bash-3.2, cd into it. 16. export CC="gcc -march=i686" 17. ./configure \ --enable-minimal-config \ --enable-static-link \ --host=i686-pc-linux-gnu \ --exec-prefix=/ \ --without-bash-malloc 18. make 19. ./bash --version (so that you could see the baby bash that just born) 20. cp bash /mnt/root/bin 20. mknod /mnt/root/dev/console c 5 1 21. umount /dev/sdb1 and /dev/sdb3 22. sudo grub > root (hd1,0) > setup (hd1) > quit 23. shutdown and remove the 1 hard disk (the one that installed with debian) 24. you will come to GRUB > > root (hd0,0) > kernel /vmlinuz-2.6.18-6-686 root=/dev/sda3 init=/bin/bash > initrd /initrd.img-2.6.18-6-686 > boot 25. eventually, you will come to a bash prompt. no ls, no mount and etc. just a bash prompt. yeah, i got it, a bash prompt i am quite interested with the initrd now maybe to learn making my own one soon. the lesson ---------- i could have save some minutes if i first build the bash static, then try it from the installed Debian GRUB to boot it, instead of shutdown, remove the hd to proceed with auto boot, a menu.lst is required to be located in /boot/grub/menu.lst |
|||
19 Jul 2008, 11:03 |
|
Rahsennor 30 Jul 2008, 11:20
|
|||
30 Jul 2008, 11:20 |
|
sleepsleep 31 Jul 2008, 18:14
hi there,
Quote:
yeah, waiting for holiday to figure that out. |
|||
31 Jul 2008, 18:14 |
|
sleepsleep 06 Aug 2008, 17:03
Quote:
k, wanna do this tonite hopefully i would come up with something and way of doing things. |
|||
06 Aug 2008, 17:03 |
|
Lightning Stalker 21 Aug 2008, 07:04
It's pretty easy. You just download the source, read the README and that tells you how to compile it. You'll need the Debian again to compile it. Then you run busybox with the switch that tells it to make the links (I can't remember the switch offhand). It makes ls, chmod, etc which just link back to busybox. So when you run say wc, the link runs busybox as wc so it acts like wc.
|
|||
21 Aug 2008, 07:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.