grub

Simplest chainloading a boot manager

笑着哭i 提交于 2019-12-22 10:49:12
问题 In order to boot from flash memory drive we load disks using the BIOS interrupt 13h in real mode with specifying the disk 0x80. Another disks should be accessed by 0x81, 0x82... as mentioned over this link I am trying to make my simple GRUB . My very first step is to boot from flash memory drive (Load MBR into 0x7C00 and print a message as a proof of correct boot) and read the my main HDD (which I assume it is numbered 0x81 and that the first 15 sectors are needed for booting) again into

Linux启动过程

南楼画角 提交于 2019-12-22 03:23:38
转自: http://roclinux.cn/?p=1301 博客地址为 http://roclinux.cn 。文章作者为rocrocket。 启动 第一步 --加载BIOS 当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的重要,以至于计算机必须在最开始就找到它。这是因为BIOS中包含了CPU的相关信息、设备启动顺序信息、硬盘信息、内存信息、时钟信息、PnP特性等等。在此之后,计算机心里就有谱了,知道应该去读取哪个硬件设备了。 启动 第二步 --读取MBR 众所周知,硬盘上第0磁道第一个扇区被称为MBR,也就是Master Boot Record,即主引导记录,它的大小是512字节,别看地方不大,可里面却存放了预启动信息、分区表信息。 系统找到BIOS所指定的硬盘的MBR后,就会将其复制到0×7c00地址所在的物理内存中。其实被复制到物理内存的内容就是Boot Loader,而具体到你的电脑,那就是lilo或者grub了。 启动 第三步 --Boot Loader Boot Loader 就是在操作系统内核运行之前运行的一段小程序。通过这段小程序,我们可以初始化硬件设备、建立内存空间的映射图,从而将系统的软硬件环境带到一个合适的状态,以便为最终调用操作系统内核做好一切准备。 Boot Loader有若干种,其中Grub

Grub and getting into Real Mode (low-level assembly language programming)

本秂侑毒 提交于 2019-12-21 12:38:50
问题 I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub. Does anybody know how to get back into real mode without having to get rid of grub? 回答1: If you are using GRUB as your boot loader you could use the intcall (as specified in the COMBOOT API) to call BIOS function int 0x10 in your case to access the VESA VBE. But this

how to build grub2 bootloader from it's source and test it with qemu emulator

你。 提交于 2019-12-21 05:46:11
问题 I want to know how to build grub 2 bootloader from it's source in ubuntu and test it with qemu emulator. I would also like to change the default background image of grub2 bootloader in the new build? Is this possible? If yes, how ? 回答1: Of course you can. As shown on the GRUB website, the grub source code is available via git from git.savannah.gnu.org. Then it is theoretically just a question of $ ./autogen.sh $ ./configure $ make $ sudo make install However, depending on your platform, grub

Simple kernel won't boot in GRUB

跟風遠走 提交于 2019-12-20 08:36:20
问题 I'm learning a bit of OS development from OSDev.org. I have a kernel and I'm trying to boot in GRUB Legacy (0.97) using qemu. However, when I type kernel 200+9 , I get the message [Multiboot-elf, <0x100000:0x80:0x4008>(bad), entry=0x10000c] This is what I expect except for the (bad) part. If I type boot now GRUB just hangs. I think the numbers 0x100000, 0x44, 0x4008 stand for the .text segment start address, the .bss start address, and the .bss section size, respectively. I think this because

Grub bootloader with shared library support

邮差的信 提交于 2019-12-19 13:47:19
问题 I'd like to load a shared library (closed-source binary user-space library) at boot stage with grub boot-loader. Are there any chances for this or I must write a custom-elf-loader (grub module) to do it? 29/08/2014: For more detail, this is a programming problem in which I want to customize or add some new features to Grub boot-loader project. Thank you for your all supporting! 回答1: So, you don't make it crystal clear what you are trying to do, but: Loading a userspace (assuming Linux SysV

编译Linux内核

[亡魂溺海] 提交于 2019-12-19 12:24:08
1、在 http://www.kernel.org/ 上下载内核源代码linux-2.6.32.60.tar.xz,放在/usr/src目录下。 2、进入Linux内核源码所在的目录(cd /usr/src),解压该内核代码到/usr/src/linux-2.6.32.60下: xz -d linux-2.6.32.60.tar.xz tar -xvf linux-2.6.32.60.tar 执行第一条命令式可能会提示找不到xz命令,这时可以输入apt-get install xz-***(后面的不记得了,呵呵)安装xz文件解析程序 3、进入Linux内核源码解压后的目录/usr/src/linux-2.6.32.60(cd /usr/src/linux-2.6.32.60) 4、sudo make mrproper 净化解压后的源代码 5、sudo make menuconfig 对内核选项进行配置 在配置过程中会发生如下错误: *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try

centos基本信息和ssh框架

二次信任 提交于 2019-12-19 09:41:22
centos基本信息和ssh 是一个基于Red Hat Linux 提供的可自由使用源代码的企业级Linux发行版本。它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。由于出自同样的源代码,因此有些要求高度稳定性的服务器以CentOS替代商业版的Red Hat Enterprise Linux使用。两者的不同,在于CentOS完全开源。 SSH是 struts+spring+hibernate的一个集成框架,是16年之前较为流行的一种Web应用程序开源框架。区别于 Secure Shell 。 集成SSH框架的系统从职责上分为四层:表示层、业务逻辑层、数据持久层和域模块层,以帮助开发人员在短期内搭建结构清晰、可复用性好、维护方便的Web应用程序。其中使用Struts作为系统的整体基础架构,负责MVC的分离,在Struts框架的模型部分,控制业务跳转,利用Hibernate框架对持久层提供支持,Spring做管理,管理struts和hibernate。 centos特点 1 完全免费(不存在需要序列号的问题) 2 独有的yum命令支持在线升级,可以即时更新系统(不像红帽子那样需要花钱购买支持服务) 3 它修正了许多RHEL的bug 4 可以把CentOS理解为Red Hat AS系列!它完全就是对Red Hat AS进行改进后发布的

centos6安装最新docker

混江龙づ霸主 提交于 2019-12-18 12:54:43
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1.升级系统内核 查看内核版本: uname -r 2.6.32-573.8.1.el6.x86_64 导入elrepo的key: rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org curl 报ssl错误,解决办法: yum update -y nss curl libcurl openssh 安装elrepo.repo: rpm -Uvh https://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm 安装内核: (安装最新版内核)yum --enablerepo=elrepo-kernel -y install kernel-ml (安装长期稳定版内核)yum --enablerepo=elrepo-kernel -y install kernel-lt 修改grub.conf文件: vim /etc/grub.conf --> default=0 重启服务器查看内核: reboot uname -r 4.4.162-1.el6.elrepo.x86_64 2.安装docker 对于centos6好像是没有yum最新版,只能通过升级方式了。 方法一

烂泥:centos6 yum方式升级内核

喜欢而已 提交于 2019-12-18 12:49:00
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 本文由 ilanniweb 提供友情赞助,首发于 烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 最近没有时间好久没有写文章了,今天由于需要安装docker学习虚拟容器的知识,需要升级OS的内核。目前我这边使用的OS是centos6.5,内核是2.6版本的,如下: cat /etc/issue uname -r 因为docker的使用需要3.0以上内核的支持,当然也是可以使用2.6的内核,当时可能会出现不可控制的问题,所以需要我们升级内核版本。 要升级内核OS到3.1以上,需要以下几个步骤。 一、安装elrepo的yum源 升级内核需要使用elrepo的yum源,在安装yum源之前还需要我们导入elrepo的key,如下: rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm elrepo的key安装完毕后,我们下面开始正式升级内核。 二、升级内核 在yum的elrepo源中有ml和lt两种内核,其中ml(mainline)为最新版本的内核,lt为长期支持的内核。 如果要安装ml内核