我用moblin-image-creator结合netbook-beta-refresh.ks和netbook-core-developer.ks做了个usbimg格式的image,然后编译内核,想让其支持nfs。但是编译完内核后,image启动后不识别新内核。因此nfs无法用。什么方式可以识别新内核?usbimg中的grub内没有menu.lst。
------解决方案--------------------------------------------------------
Compile moblin2 kernel sources with Intel Compiler
1. Prepare for build
a. su into root
b. Create a ~/.rpmmacros file containing:
%_topdir %(echo $HOME)/rpmbuild
%_smp_mflags -j3
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
%_default_patch_fuzz 2
#end of file
fuzz=2 is critical to allow the 915 patches to merge correctly.
_smp_mflags -jN, N should be set to the number of processor cores on your build system
2. Setup and do initial build. Download the kernel source from a source repository
(Used http://repo.moblin.org/moblin/development/core/source/kernel-2.6.29.4-6.1.moblin2.src.rpm)
a. Extract the rpm:
$ rpm -ivh kernel-2.6.29.4-6.1.moblin2.src.rpm
b. Prepare and do initial build to rpm:
$ cd rpmbuild/SPECS
c. Remove line 774, 'BuildKernel %make_target %kernel_image ivi'
$ rpmbuild -bc --target=i586 kernel.spec
The previous step ensures you have the components to build successfully.
3. Rebuild with gcc:
$ cd rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29
$ make clean
$ make bzImage
$ make modules
$ make modules_install
$ make install
4. Create a usbimg using moblin-image-creator2:
$ moblin-image-creator -c netbook-core-developer.ks -f liveusb --cache=/tmp/mycache
--cache=mycache --overlay-size-mb=1024)
b. Mount the usb image on your development system and copy:
$ kpartx -l moblin-netbook-core-developer.usbimg
$ kpartx -a moblin-netbook-core-developer.usbimg
$ mount /dev/mapper/loop0p1 /mnt/ -o loop,rw
$ cd /mnt/syslinux
$ cp /boot/vmlinuz-2.6.29.4-6.1.moblin2-netbook vmlinuz0
$ cp /boot/initrd-2.6.29.4-6.1.moblin2-netbook.img initrd0.img
$ cd <to location of .usbimg>