Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4161688
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: LINUX

2017-04-11 17:02:45

自己手工编译了一下 linux 内核和ramfilesystem,
首先安装了一下centos 7,
发现centos 添加内核真是麻烦
首先copy内核到/boot目录下,必须是bzImage的
scp arch/x86/boot/bzImage  root@172.18.10.79:/boot/vmlinuz-foo





scp initramfs-busybox-x86.cpio.gz  root@172.18.10.78:/boot/initramfs-foo.img

centos要求名称必须这样命名
生成配置 这个不需要编辑/etc/grub.d的40_custom 文件
grub2-mkconfig -o /boot/grub2/grub.cfg
输出
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-foo
Found initrd image: /boot/initramfs-foo.img
Found linux image: /boot/vmlinuz-0-rescue-e4354532a81d415aa5391c9db2341ae8
Found initrd image: /boot/initramfs-0-rescue-e4354532a81d415aa5391c9db2341ae8.img
done


grep "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)
CentOS Linux (foo) 7 (Core)
CentOS Linux (0-rescue-e4354532a81d415aa5391c9db2341ae8) 7 (Core)


下一步要做的就是加载xfs分区,因为centos7 默认的分区是xfs

阅读(2401) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~