|
我的编译步骤:
- #cd /usr/src/linux-2.6.10
- #mrproper
- #make menuconfig
- #make bzImage
- #cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.10
- #cp System.map /boot/System-2.6.10
- #cp .config /boot/config-2.6.10
- #ln -sf /boot/vmlinuz-2.6.10 vmlinuz
- #ln -sf /boot/System-2.6.10 System.map
- #ln sf /boot/config-2.6.10 config
- #mkinitrd initrd-2.6.10.img 2.6.10
复制代码
其中在EXT2,EXT3,reiserfs文件系统都编译进内核(我使用的文件系统是reiserfs)。
修改lilo.conf
- # LILO configuration file
- # generated by 'liloconfig'
- #
- # Start LILO global section
- boot = /dev/hdc
- message = /boot/boot_message.txt
- prompt
- timeout = 100
- # Override dangerous defaults that rewrite the partition table:
- change-rules
- reset
- # VESA framebuffer console @ 1024x768x256
- vga = 773
- # End LILO global section
- default = SLK_2.4.33
- # Windows bootable partition config begins
- other = /dev/hdc1
- label = WinServer2003
- table = /dev/hdc
- # Windows bootable partition config ends
- # Linux(kernel-2.6.10) bootable partition config begins
- image = /boot/vmlinuz
- root = /dev/hdc10
- label = SLK_2.6.10
- initrd = /boot/initrd.gz
- read-only
- # Linux bootable partition config ends
- # Linux(kernel-2.4.33) bootable partition config begins
- image = /boot/vmlinuz-ide-2.4.33.3
- root = /dev/hdc10
- label = SLK_2.4.33
- read-only
- # Linux bootable partition config ends
复制代码
执行lilo
我的硬盘分区情况是这样的:
- Device Boot Start End Blocks Id System
- /dev/hdc1 * 1 637 5116671 b W95 FAT32
- /dev/hdc2 638 4865 33961410 f W95 Ext'd (LBA)
- /dev/hdc5 638 1912 10241406 b W95 FAT32
- /dev/hdc6 1913 3187 10241406 b W95 FAT32
- /dev/hdc7 3188 3213 208813+ 83 Linux (/boot分区)
- /dev/hdc8 3214 3290 618471 83 Linux (/var分区)
- /dev/hdc9 3291 3356 530113+ 82 Linux swap
- /dev/hdc10 3357 4865 12121011 83 Linux (/分区)
复制代码
重启后进入linux-2.6.10出错:
- ...(前面的就略了)
- INIT: version 2.84 booting
- proc on /proc type proc (rw)
- sysfs on /sys type sysfs (rw)
- swapon: cannot stat /dev/hdc9:no such file or directory
- Testing root filesystem status :read-only filesystem
- checking root filesystem;
- fsch 1.38(30-jun-2005)
- Failed to open the device '/dev/hdc10': No such file or directory
- ********************************************************************
- *** An error occurred during the boot filesystem check***
- *** You will now be given a chance to log into the ***
- *** system in single-user mode to fix the problem ***
- *** ... ***
- ********************************************************************
复制代码
root登录:
- root@(none):/#cd /boot
- root@(none):/boot#ls
复制代码
/boot目录下为空
可以进入原来的2.4内核系统 |
|