linux 系统制作

2019-03-30  本文已影响0人  千千雪人

制作initrd

挂载文件系统
123 234 345
test bcd cde

制作grub

grub-install --root-directory=/mnt /dev/hda 会自动生成grub文件

制作cpio压缩文件

find . | cpio -H newc --quiet -o | gzip -9 > /boot/initrd.gz

grub conf配置文件

default 0
timeout 3
title MyLinux
    root (hd0,0)
    kernel /vmlinuz ro root=/dev/hda2
    initrd /initrd.gz

安装字符设备

mknod /dev/console c 5 1
mknod /dev/null c 1 3

编写rc.sysinit文件

vim /etc/rc.d/rc.sysinit

mount -t proc proc /proc
mont -t sysfs sysfs /sys
mont -o remount,rw / 挂载根文件系统
mdev -s
mount -a
swapon -a
上一篇 下一篇

猜你喜欢

热点阅读