English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés
Σ: 1 post

saxus  (statz) Agyfasz
#9, Agyfasz (419)
3316 | #27cd | ^ | Idézet | Thu, 12 Sep 2013 02:44:51 +02
84.3.*.* Apple Mac OS X x86 Apple Safari Hungary *.catv.pool.telekom.hu
@Linux Kernel:

Utananeztem picit, mert erdekelt a tema. Alapvetoen a LILO doksijabol indultam ki (mert joval fapadabb szerkezet, mint a grub), valamint van egy nagyon jo osszefoglalo a Linux bootrol a lenti linken.

Nekem ugy tunik, hogy maga a Linux kernel is 3 reszbol all: all egy bootsectbol (512 byte, annyit csinal, hogy a bios betolti, az meg betolti a bsetup kodjat. A bsetup mond meg egy halom infot, hogy mi merre hany meter meg persze van maga a kernel. Manapsag ez ugy nez ki, hogy a bootloaderek (akar GRUB, akar LILO) tartalmaznak ket reszt, egy ugyanolyan 512 bytes mini loadert, amit a BIOS betolt betolt a masodik reszt az meg maga a boot loader. Itt mar vannak elteresek, mert pl. mig a GRUB-ban mar fajlrendszer-drivertol kezdve az LVM es mindenfele RAID supporton at minden van, addig a LILO meg a telepiteskor/frissiteskor beirta, hogy mit honnan kell majd kiolvasni. De alapvetoen a DOS-MBR is igy mukodott a LILO dok szerint: berantotta a ramba a command.com-ot a megfelelo helyrol, aztan atadta a vezerlest.

Linuxnal annyival erdekesebb, hogy meg van a bsetub (LILO doksijaban amugy benne van, hogy mit hova tolt be, fix cimekre kerulnek ezek) es a kernel betoltese, ami meg bonyolodhat annyival, hogy tomoritett is. Slusszpoen: van ramdisk is (initrd). (Olyankor eleve mas helyre tolti be a kernelt.)

http://www.tldp.org/HOWTO/Linux-i386-Boot-Code-HOWTO/intro.html

http://www.tldp.org/HOWTO/Linux-i386-Boot-Code-HOWTO/bootsect.html

http://www.tldp.org/HOWTO/Linux-i386-Boot-Code-HOWTO/setup.html


Viszont a mi szervereinken nemigazan MZ van az elejen:

david:/boot# hexdump vmlinuz-2.6.23.9-v1.0 -C | head -n 1
00000000 ea 05 00 c0 07 8c c8 8e d8 8e c0 8e d0 31 e4 fb |.............1..|

david:/boot# hexdump vmlinuz-2.6.24.7-v1.0 -C | head -n 1
00000000 ea 05 00 c0 07 8c c8 8e d8 8e c0 8e d0 31 e4 fb |.............1..|

saxus@mars:/boot$ hexdump /boot/vmlinuz-2.6.32-5-amd64 -C | head -n 1
00000000 ea 05 00 c0 07 8c c8 8e d8 8e c0 8e d0 31 e4 fb |.............1..|

Masreszt ezek tomoritett kernelek, maga a tenyleges kernelkod az nem az elejetol kezdodik, de adott cimre fog kerulni (kitomorites utan), ahol majd megkapja a vezerlest:

http://www.tldp.org/HOWTO/Linux-i386-Boot-Code-HOWTO/compressed_head.html
http://www.tldp.org/HOWTO/Linux-i386-Boot-Code-HOWTO/kernel_head.html

Ott meg az a fuggveny lesz, ami vedett modba kapcsol, nekiall MMU-zni esatobbi. Aztan johet a start_kernel().

Egyebkent maganak a linkernek elvileg ELF-et kellene csinalnia...


saxus@mars:~$ hexdump -C vmlinux | grep '1f 8b 08 00'
00003a60 48 8d 83 d0 76 24 00 ff e0 1f 8b 08 00 20 2d f7 |H...v$....... -.|
saxus@mars:~$ printf '%d\n' 0x3a69
14953
saxus@mars:~$ ls -la vmlinux
-rw-r--r-- 1 saxus saxus 2420000 Sep 12 02:05 vmlinux
saxus@mars:~$ expr 2420000 - 14953
2405047
saxus@mars:~$ dd if=vmlinux of=test.gz skip=14953 count=2405047 bs=1
2405047+0 records in
2405047+0 records out
2405047 bytes (2.4 MB) copied, 4.30492 s, 559 kB/s
saxus@mars:~$ gunzip test.gz

gzip: test.gz: decompression OK, trailing garbage ignored
saxus@mars:~$ hexdump -C test | head -n 1
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
saxus@mars:~$ file test
test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped



English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés

Név: (max 255 byte)

Email: (max 255 byte) Nem kötelező!

Üzenet: (max 65536 kar.) 65536-0=65536




crap_vkn v4.34.0 by TCH
Thx to saxus for the escaped string decoder function (PHP), the realIP function (PHP) & the SQL handle layer (PHP), to thookerov for the int_divide function (PHP), to Jeff Anderson for the getSelText function (JS), to Alex King for the insertAtCursor function (JS), Flood3r for the new CSS styles, Pety for the spamprotection idea and some design and comfort ideas, MaxMind for the IP2Country database, famfamfam for the flags of countries and an unknown PHP programmer for the removeAccents function.



Kecskebaszók ide!