rockagen
2014-07-16 15:29:36 +08:00
wait.i tell you how to use linux kernel build a linux system
First,you must have a installed linux system computer and compiled linux kernel.
let's go.
#dd if=/dev/zero of=sd.img bs=1M count=512
#losetup /dev/loop0 sd.img
#fdisk /dev/loop0 (create "/dev/loop0p1", "/dev/loop0p2" primary partitions,"loop0p1 is for boot partition,"loop0p2" is for root partition )
#mkfs -t ext2 /dev/loop0p1
#mkfs -t ext4 /dev/loop0p2
#mount /dev/loop0p1 /mnt/boot
#mount /dev/loop0p2 /mnt/root
now,
copy your compiled linux kernel (vmlinuz,system.map,initrd) files to boot partition
create some linux files and command(busybox?) on root partition(you can copy those files from you host system)
grub is come
#grub
##device (hd0) sd.img
##root (hd0,0)
##find /vmlinuz-xxx
##setup (hd0)
then create your menu.lst on /boot/grub folder
finally,you can modify this sd.img anytime anywhere if you want fuck her.
good luck!