LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 655|回复: 0

谁能讲讲光盘安装引导的流程

[复制链接]
发表于 2006-6-11 21:53:20 | 显示全部楼层 |阅读模式
在光盘安装引导中,首先读取vmlinuz,然后读取initrd.gz,接着出现选择语言界面,请问,他的每一步是怎么实现的呢?
我自己试着改写vmlinuz和initrd.gz始终没有成功,在读取vmlinuz之后,接着读入的是initrd.gz中的哪个文件呢?我把initrd.gz解开,挂载到了/mnt/old目录下,我列一下initrd的结构,请高人帮我分析一下
debian:/boot# ls -la /mnt/old
total 180
drwxrwxrwx  16 root root   1024 1970-01-01 08:00 .
drwxr-xr-x   5 root root   1024 2006-06-11 15:32 ..
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 bin
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 dev
drwxrwxrwx   6 root root   1024 1970-01-01 08:00 etc
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 floppy
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 initrd
drwxrwxrwx   7 root root   1024 1970-01-01 08:00 lib
drwx------   2 root root   1024 2005-03-06 02:57 lost+found
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 mnt
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 proc
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 sbin
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 sys
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 tmp
-rw-rw-rw-   1 root root 165916 1970-01-01 08:00 unifont.bgf
drwxrwxrwx   6 root root   1024 1970-01-01 08:00 usr
drwxrwxrwx   6 root root   1024 1970-01-01 08:00 var
debian:/boot# ls -la /mnt/old/*
-rw-rw-rw-  1 root root 165916 1970-01-01 08:00 /mnt/old/unifont.bgf

/mnt/old/bin:
total 300
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root   1024 1970-01-01 08:00 ..
-rwxrwxrwx   1 root root    215 1970-01-01 08:00 anna-install
-rwxrwxrwx   1 root root   3257 1970-01-01 08:00 apt-install
-rwxrwxrwx   1 root root   3284 1970-01-01 08:00 archdetect
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 ash -> busybox
-rwxrwxrwx   1 root root 242860 1970-01-01 08:00 busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 cat -> busybox
-rwxrwxrwx   1 root root   6564 1970-01-01 08:00 cdrom-checker
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 chmod -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 chown -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 cp -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 dd -> busybox
-rwxrwxrwx   1 root root    202 1970-01-01 08:00 debconf-get
-rwxrwxrwx   1 root root     62 1970-01-01 08:00 debconf-set
-rwxrwxrwx   1 root root    469 1970-01-01 08:00 debconf-set-selections
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 df -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 dmesg -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 echo -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 false -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 grep -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 gunzip -> busybox
-rwxrwxrwx   1 root root   2060 1970-01-01 08:00 hotplug-pcmcia
-rwxrwxrwx   1 root root  20225 1970-01-01 08:00 hw-detect
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 ip -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 kill -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 ln -> busybox
-rwxrwxrwx   1 root root    840 1970-01-01 08:00 lowmem_debconf
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 ls -> busybox
-rwxrwxrwx   1 root root   3888 1970-01-01 08:00 lsmod
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 mkdir -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 mknod -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 more -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 mount -> busybox
-rwxrwxrwx   1 root root   1198 1970-01-01 08:00 mountfloppy
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 mv -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 pidof -> busybox
-rwxrwxrwx   1 root root    479 1970-01-01 08:00 preseed_command
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 ps -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 pwd -> busybox
-rwxrwxrwx   1 root root    324 1970-01-01 08:00 register-module
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 rm -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 rmdir -> busybox
-rwxrwxrwx   1 root root    313 1970-01-01 08:00 search-path
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 sed -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 sh -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 sleep -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 sync -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 tar -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 touch -> busybox
-rwxrwxrwx   1 root root   4356 1970-01-01 08:00 trimtemplates
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 true -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 umount -> busybox
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 uname -> busybox
-rwxrwxrwx   1 root root    496 1970-01-01 08:00 user-params
lrwxrwxrwx   1 root root      7 1970-01-01 08:00 zcat -> busybox

/mnt/old/dev:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..
crw-rw-rw-   1 root root 5, 1 1970-01-01 08:00 console
crw-rw-rw-   1 root root 1, 3 1970-01-01 08:00 null

/mnt/old/etc:
total 23
drwxrwxrwx   6 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..
-rw-rw-rw-   1 root root  647 1970-01-01 08:00 cdebconf.conf
-rw-rw-rw-   1 root root  188 1970-01-01 08:00 fstab
-rw-rw-rw-   1 root root   10 1970-01-01 08:00 group
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 init.d
-rw-rw-rw-   1 root root  408 1970-01-01 08:00 inittab
-rw-rw-rw-   1 root root 4400 1970-01-01 08:00 modprobe.conf
-rw-rw-rw-   1 root root  135 1970-01-01 08:00 modules.conf
lrwxrwxrwx   1 root root   12 1970-01-01 08:00 mtab -> /proc/mounts
-rw-rw-rw-   1 root root   41 1970-01-01 08:00 nsswitch.conf
-rw-rw-rw-   1 root root   75 1970-01-01 08:00 passwd
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 pcmcia
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 rcS.d
-rw-rw-rw-   1 root root   51 1970-01-01 08:00 shortlists
-rw-rw-rw-   1 root root 3304 1970-01-01 08:00 SUPPORTED-short
drwxrwxrwx   5 root root 1024 1970-01-01 08:00 terminfo

/mnt/old/floppy:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/initrd:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/lib:
total 1110
drwxrwxrwx   7 root root   1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root   1024 1970-01-01 08:00 ..
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 debian-installer
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 debian-installer.d
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 debian-installer-startup.d
-rwxrwxrwx   1 root root  90088 1970-01-01 08:00 ld-linux.so.2
-rw-rw-rw-   1 root root 649476 1970-01-01 08:00 libc.so.6
-rw-rw-rw-   1 root root  32360 1970-01-01 08:00 libdebian-installer.so.4
-rw-rw-rw-   1 root root  67420 1970-01-01 08:00 libdiscover.so.1
-rw-rw-rw-   1 root root   9872 1970-01-01 08:00 libdl.so.2
-rw-rw-rw-   1 root root  52244 1970-01-01 08:00 libfribidi.so.0
-rw-rw-rw-   1 root root   1232 1970-01-01 08:00 libm.so.6
-rw-rw-rw-   1 root root  47712 1970-01-01 08:00 libnewt.so.0.51
-rw-rw-rw-   1 root root  13896 1970-01-01 08:00 libnss_dns.so.2
-rw-rw-rw-   1 root root  52016 1970-01-01 08:00 libresolv.so.2
-rw-rw-rw-   1 root root  88760 1970-01-01 08:00 libslang.so.1-UTF8
-rw-rw-rw-   1 root root   6880 1970-01-01 08:00 libtextwrap.so.1
drwxrwxrwx   3 root root   1024 1970-01-01 08:00 modules
drwxrwxrwx   2 root root   1024 1970-01-01 08:00 preseed

/mnt/old/lost+found:
total 2
drwx------   2 root root 1024 2005-03-06 02:57 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/mnt:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/proc:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/sbin:
total 120
drwxrwxrwx   2 root root  1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root  1024 1970-01-01 08:00 ..
-rwxrwxrwx   1 root root 46840 1970-01-01 08:00 cardmgr
-rwxrwxrwx   1 root root   189 1970-01-01 08:00 debian-installer
-rwxrwxrwx   1 root root   223 1970-01-01 08:00 debian-installer-startup
-rwxrwxrwx   1 root root 26552 1970-01-01 08:00 depmod
-rwxrwxrwx   1 root root 12768 1970-01-01 08:00 discover
-rwxrwxrwx   1 root root   819 1970-01-01 08:00 env2debconf
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 freeramdisk -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 halt -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 ifconfig -> ../bin/busybox
-rwxrwxrwx   1 root root   940 1970-01-01 08:00 init
-rwxrwxrwx   1 root root  4444 1970-01-01 08:00 insmod
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 klogd -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 lsmod -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 mkswap -> ../bin/busybox
-rwxrwxrwx   1 root root 18512 1970-01-01 08:00 modprobe
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 pivot_root -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 reboot -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 route -> ../bin/busybox
-rwxrwxrwx   1 root root   103 1970-01-01 08:00 shutdown
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 swapoff -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 swapon -> ../bin/busybox
lrwxrwxrwx   1 root root    14 1970-01-01 08:00 syslogd -> ../bin/busybox

/mnt/old/sys:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/tmp:
total 2
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..

/mnt/old/usr:
total 6
drwxrwxrwx   6 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 bin
drwxrwxrwx   7 root root 1024 1970-01-01 08:00 lib
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 sbin
drwxrwxrwx   8 root root 1024 1970-01-01 08:00 share

/mnt/old/var:
total 6
drwxrwxrwx   6 root root 1024 1970-01-01 08:00 .
drwxrwxrwx  16 root root 1024 1970-01-01 08:00 ..
drwxrwxrwx   3 root root 1024 1970-01-01 08:00 cache
drwxrwxrwx   6 root root 1024 1970-01-01 08:00 lib
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 log
drwxrwxrwx   2 root root 1024 1970-01-01 08:00 run
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表