深入理解 GNU GRUB - 01

双系统安装出现 grub(GNU GRUB Version 2.02或者2.04等) 如何退出、修复等常见问题解答 优快云部分回答针对此问题提供了大量修改命令,让人看着就难搞! 比如: *方案:   1.编辑grub文件 sudo vim /etc/default/grub   2.注释:GRUB_HIDDEN_TIMEOUT=0   3.修改:GRUB_TIMEOUT=0.01   4.修改后:sudo update-grub   5.重启电脑 sudo shutdown -r now直接进入登录界面 * ... 阅读详情

转载注明出处(cppgp: http://blog.youkuaiyun.com/cppgp )

 

1. 概述

1.1 GRUB是什么
GNU GRUB是一款多重引导程序。简单来讲,引导程序是计算机开机运行的第一个软件,它的使命是装载操作系统并运行。实际上,由于平台、存储介质、操作系统、文件系统等的多样性,引导程序都很复杂,同时,引导程序要求有更高安全性、健壮性。
GNU GRUB支持多平台(例如X86、PowerPC等)、多存储介质(例如硬盘、软盘、光盘、U盘)、多操作系统(例如Linux、Gnu Hurd等)、多重引导(例如Windows等)、多文件系统(例如Ext2、Ext3、Ext4、FAT32、NTFS)。支持模块化扩展,可按照配置文件及命令行方式加载操作系统。以下是一些设计引导程序基本概念及标准的文档:
•    Multiboot: http://www.gnu.org/software/grub/manual/multiboot/
•    Multiboot-with-GRUB : http://tldp.org/HOWTO/Multiboot-with-GRUB.html
本文对GRUB (grub-1.98) 实现进行跟踪和分析。为简化流程,我们做如下假定:
•    Intel i386兼容系列CPU;
•    硬盘引导, GRUB安装在硬盘中,并且使用主引导记录MBSR(Master Boot Record)。

GNU GRUB(简称“GRUB”)是一个来自GNU项目的启动引导程序。 (简称“GRUB”)是一个来自的。GRUB是多启动规范的实现,它允许用户可以在计算机内同时拥有多个操作系统,并在计算机启动时选择希望运行的操作系统。GRUB可用于选择操作系统分区上的不同,也可用于向这些内核传递启动参数。通过GRUB在文本模式下启动GNU GRUB在分区表的硬盘上GNU GRUB在分区表的硬盘上boot.img严格占有446字节的大小,并被写入(0扇区)。如果可行(出于向后兼容的原因第一个分区起始于63扇区而非1扇区,但这不是强制的),core.img。 阅读详情

相关推荐

win10+ubuntu20.04双系统引导修复(出现GNU GRUB界面解决方法)

前言:(菜鸡日记)之前装的Ubuntu被自己搞崩了,重装后引导出现了问题。 出现的情况:开机之后没有选择系统的引导界面,出现了GNU GRUB界面(没有拍照,就是那个黑框框,然后最上面写GNU GRUB....),这时候还是有办法进入系统的,输入exit后就可以退出那个界面进入选择系统的界面,但是本人尝试在UEFI模式下选择Ubuntu是进不去的,可以尝试选择除了windows和Ubuntu的另外选项即可进入新的选择界面再选择Ubuntu就能进了,但是这样实在太麻烦了,还是得修复引导。 引导修复:(这里

m0_45880309的博客 1万+

双系统/移动硬盘安装Ubuntu后Grub引导丢失?一个update-grub命令的完整修复流程

本文详细解析了双系统或移动硬盘安装Ubuntu后Grub引导丢失的问题,提供了从应急手动引导到永久修复的完整流程。重点介绍了`update-grub`命令的使用方法,以及针对UEFI/BIOS不同模式的修复策略,帮助用户快速恢复系统启动功能。

weixin_30435261的博客 352

NXP Layerscape平台UEFI与安全启动实践指南

在嵌入式系统开发中,引导加载程序是系统启动的基石,负责硬件初始化与操作系统加载。其核心原理在于建立从硬件上电到应用运行的完整执行链。随着系统安全需求日益严苛,安全启动技术应运而生,它通过密码学验证构建了一条不可篡改的信任链,确保每一级固件和代码的完整性与真实性,这对于网络通信、工业控制和边缘计算等关键领域具有极高的技术价值。本文聚焦于NXP Layerscape系列高性能处理器平台,深入解析如何将标准化的UEFI固件接口与硬件级安全启动机制深度融合,提供了从开发环境搭建、镜像链构建、Flash烧写到安全策略

chiyingliao3565的博客 398

Isaac Sim安装本质:Ubuntu 20.04、omni.isaac.kit与SimulationApp深度解析

Isaac Sim并非普通Python包,而是一个基于NVIDIA Omniverse构建的集成化仿真操作系统,其核心包含物理引擎、RTX渲染、USD场景图与嵌入式Python环境。理解其安装逻辑,需回归仿真系统本质——它依赖严格对齐的底层栈:Ubuntu 20.04提供稳定内核与驱动兼容基线,omni.isaac.kit作为Kit SDK绑定与插件容器,封装了C++运行时与沙箱化Python 3.7;SimulationApp则是启动入口,负责初始化全栈并暴露API。这种架构保障了物理模拟的确定性与硬件加

weixin_30340819的博客 289

Ubuntu零基础入门到精通【1.2讲】:Ubuntu 与 Linux 的关系 —— 你用的到底是什么?

🏆 本文收录于 《滚雪球学 Ubuntu》 专栏。 本专栏面向有一定计算机基础,但尚未系统学习 Linux / Ubuntu 的读者,采用“滚雪球式学习法”:先装好、再会用、再理解、再优化、再实战,带你从第一次进入 Ubuntu 桌面 / 终端开始,逐步掌握 Ubuntu 的日常使用、命令操作、软件安装、系统配置、开发环境搭建与服务器部署能力。

**My Coding Family** 3105

grub 用户手册 中文

grub 用户手册 中文 grub语法 引导,grub系统引导中文文档。

grub_2_基础_教程(修正版).pdf

一、grub2新特性 二、grub2安装与启动 三、grub2配置文件详解 四、脚本修改 五、使用grub2常见错误及修复方法

grub2中文手册

grub2入门资料,很全的。很实用

Claude Code 实战指南:用 AI 玩转终端编程,效率狂飙!

本文介绍了终端 AI 代理工具 Claude Code,涵盖常用命令、使用方法(如 init 初始化、权限配置、工作流程、上下文管理)、MCP 扩展工具及实战案例,展示其通过自然语言辅助开发的高效性与实用性。

个人技术 1万+

从零开始用飞牛fnas搭建集成DeepSeek-R1的远程AI工作台

从零开始用飞牛fnas搭建集成DeepSeek-R1的远程AI工作台

AI+全栈,AI+应用,实操落地,前沿技术 3805

Yakit实战:利用验证码识别插件突破Webfuzzer自动化测试瓶颈

本文详细介绍了如何利用Yakit的Webfuzzer模块结合验证码识别插件,突破自动化安全测试中的验证码瓶颈。通过实战演示,讲解了如何部署本地OCR服务、编写热加载脚本,实现从获取验证码到自动识别并替换的全流程自动化,从而让Webfuzzer能够高效、无人值守地进行大规模密码喷洒等测试。

weixin_29323493的博客 282

ADS仿真功率放大器实例学习笔记

ADS仿真功率放大器实例学习笔记

qq_36521926的博客 1万+

ABAP代码使用OAuth2.0 Client Credential调用外部API

ABAP-OAuth2.0-调用外部API

m0_74015269的博客 1954

【数据集7】全球人类住区层GHSL数据详解

全球人类住区层GHSL数据详解

WW、forever的博客 2253

OpenClaw与大语言模型(Claude/GPT/MiniMax)的集成架构与最优配置策略

摘要 本文探讨了OpenClaw框架与大语言模型(Claude/GPT/MiniMax)的集成架构与优化策略。大语言模型具有强大的自然语言处理能力,但集成面临API成本、响应延迟、上下文管理等挑战。OpenClaw采用分层架构设计,包括用户界面层、对话管理层、提示工程层、模型适配层和API调用层,支持多模型切换、智能对话管理和成本控制。系统通过模型适配层实现不同API的统一调用,并提供缓存、监控等优化机制。该集成方案能够充分发挥大语言模型的优势,为本地AI助理提供更智能的服务。

一键难忘的博客 1692

影像技术实战02:FFmpeg 镜头切分误检、漏检问题排查与基于场景变化的稳定分镜方案

本文介绍了基于FFmpeg的镜头切分技术在实际应用中的常见问题及解决方案。文章首先指出单纯使用select='gt(scene,0.4)'命令进行镜头检测存在误检、漏检等问题,包括黑场、字幕变化被误判为镜头切换,以及相似场景切换被漏检等情况。随后提出了一套四层架构的稳定解决方案:1)用FFmpeg提取候选镜头变化点;2)解析变化点时间和分数;3)通过后处理过滤异常点;4)按时间点切割视频片段并生成报告。文中详细展示了Python实现代码,包括场景点检测、时间间隔过滤等功能模块,为视频剪辑、影视解说等场景提供

ai技术增长的博客 399

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: Linux总线驱动-02: struct bus_type 结构体
下一篇: 深入理解 GNU GRUB - 02 boot.S 2.1 相关BIOS例程
cppgp
博客等级 码龄20年 47粉丝 46原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值