由 sigmaccc » 週五 3月 31, 2006 3:53 pm
#mke2fs /dev/fd0
#mount /dev/fd0 /mnt/floppy
#mkdir /mnt/floppy/boot
#mkdir /mnt/floppy/boot/grub
#cp /boot/grub/stage1 /mnt/floppy/boot/grub
#cp /boot/grub/stage2 /mnt/floppy/boot/grub
建立menu.lst
default 0
timeout 5
color cyan/blue white/blue
title Embedded Linux from Floppy
root (fd0)
kernel /boot/vmlinuz root=/dev/fd0
#cp menu.lst /mnt/floppy/boot/grub
#umount /mnt/floppy
啟動GRUB
#grub
grub>device (fd0) /dev/fd0
grub>root (fd0)
grub>setup (fd0)
grub>quit
加入kernel
#mount /dev/fd0 /mnt/floppy
#cp /boot/vmlinuz-2.4.27-2-386 /mnt/floppy/boot/vmlinuz
建立設備檔
#mkdir /mnt/floppy/dev
#cd /mnt/floppy/dev
#mknod fd0 b 2 0
#chmod 600 fd0
#umount /mnt/floppy
我後來發現應用以上方式想建立一個開機磁片,但開機時出現 :
VFS: Cannot open root device "fd0" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00
我知道開機程序還有init等動作要做,但目前卡在這裡,我不該如何繼續。可否麻煩網友再幫忙看看。謝謝。