Ubuntu 10.10 修改开机启动顺序 | 9.10 grub2的启动配置文件grub.cfg

【CTFSHOW】web入门 黑盒测试 文章目录写在前面web380web381web382web383web384web385web386web387web388web389web390web391web392web393web394web395参考资料 写在前面 一直没搞过渗透,先学学黑盒测试吧 web380 进入题目发现是一个关于灯泡的悲伤故事,点进去,看到跳转到page_1.php页面。 我们访问page.php试试: 发现报错:$id.php,可以猜想需要传名称为id的参数,来访问id.php。我们访问page.php?id=1试试 阅读详情

【2012.2.21】

刚安装了双系统,分别是windows7(先)和Ubuntu10.04(后)(非wubi安装), 默认是Linux启动,通过下面的操作可把windows7改为默认启动系统
  启动Ubuntu后,在终端中输入:
  先备份 sudo cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
  修改启动列表:sudo gedit /boot/grub/grub.cfg (注意不是sudo gedit /boot/grub/menu.lst,貌似9.10就改为了grub.cfg)
  然后找到
  default 0
  然后往下看,找你想默认启动的操作系统!修改default 后面的数字,0对应第一个,1对应第二个,依次往下!以下是我的grub.cfg
  默认是Ubuntu!把0改为4就可以了!
  (升级内核之后数字酌情修改)

上面的自己修改default后面的数字。
  如果你觉得这样不方便到话,我建议你把win7的那一项剪切到Ubuntu前面 ,这样既美观又方便(不用修改default后面的数字)。  

类似如下:

......

 ### END /etc/grub.d/05_debian_theme ###
  ### BEGIN /etc/grub.d/30_os-prober ###
  menuentry "Windows 7 (loader) (on /dev/sda1)" {
  insmod ntfs
  set root='(hd0,1)'
  search --no-floppy --fs-uuid --set 6e40b6ff40b6ccd9
  chainloader +1
  }
  ### END /etc/grub.d/30_os-prober ###
  ### BEGIN /etc/grub.d/10_linux ###
  menuentry 'Ubuntu,Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os  ......

每次更新内核,你都要重新修改这个启动项.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

http://www.linuxidc.com/Linux/2009-12/23181.htm    important!!!

 

升级到Ubuntu 9.10后,就要接触grub2了,它和以前的版本有了很多的不同。这里是一个基础教程。

一、grub2的启动配置文件grub.cfg

grub2的启动配置文件grub.cfg是/boot/grub/grub.cfg,而不是以前的memu.lst。

如果你是多系统,有ubuntu和windows,那么用下面的命令,可以使grub2得到所以可以启动的系统。

sudo update-grub

实际就是让系统自己生成合适的grub.cfg文件。

这个grub.cfg文件是只读属性,so如果你要修改它,需要权限。

sudo chmod +w /boot/grub/grub.cfg

然后可以编辑grub.cfg了。

sudo gedit /boot/grub/grub.cfg

二、默认系统和等待时间

1、set default=0

这是说从第一项启动。每个启动项都是以menuentry开始,menuentry后面“xxx”是启动项名称,然后{xxx}是启动代码。

### BEGIN /etc/grub.d/10_linux ###
menuentry “Ubuntu, Linux 2.6.31-14-generic” {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,6)
search –no-floppy –fs-uuid –set 040508ff-fec7-4c66-ba64-a09f8abe8059
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=040508ff-fec7-4c66-ba64-a09f8abe8059 ro   quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry “Ubuntu, Linux 2.6.31-14-generic (recovery mode)” {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,6)
search –no-floppy –fs-uuid –set 040508ff-fec7-4c66-ba64-a09f8abe8059
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=040508ff-fec7-4c66-ba64-a09f8abe8059 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry “Memory test (memtest86+)” {
linux16 /boot/memtest86+.bin
}
menuentry “Memory test (memtest86+, serial console 115200)” {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry “Microsoft Windows XP Home Edition (on /dev/sda1)” {
insmod ntfs
set root=(hd0,1)
search –no-floppy –fs-uuid –set 5c108a1c1089fd70
drivemap -s (hd0) ${root}
chainloader +1
}
if keystatus; then
if keystatus –shift; then
set timeout=-1
else
set timeout=10
fi
else
if sleep$verbose –interruptible 3 ; then
set timeout=10
fi
<
Angular项目内存优化策略 最近,我购买了一台新的设备,期望能够显著提升工作效率,特别是在运行Angular项目时。然而,尽管设备配置先进,我仍然遇到了内存不足的错误。今天,我将分享如何解决这一问题,以及一些在Angular项目中优化内存使用的方法。 阅读详情

相关推荐

EPLAN二次开发入门:Visual Studio 2019环境配置与插件调试实战

本文详细介绍了EPLAN二次开发入门的关键步骤,重点讲解如何在Visual Studio 2019中配置开发环境并进行插件调试。通过创建符合命名规范的项目、引用核心API库、实现插件接口以及使用附加进程调试等实战技巧,帮助电气工程师快速掌握EPLAN插件开发,提升自动化设计效率。

h6i7j8的博客 771

《供应链金融风控模型设计:多维度数据整合与动态风险预警机制》

注:方案突出供应链金融「三流合一」(资金流、物流、信息流)的风控逻辑,通过多维度数据整合与动态预警,解决传统风控中中小企业信用评估难、链条风险传导监测滞后的问题。◦ 构建供应链拓扑图,计算「核心企业违约对上下游企业的影响系数」(如某电子厂商违约时,其前五大供应商的风险权重自动提升40%)• 区块链应用:将核心企业应付账款上链存证,防止「一票多融」欺诈(如某供应商用同一应收账款在多家银行融资)◦ 财务数据:核心企业审计报告、上下游企业纳税数据(增值税发票频次/金额)

2501_91651383的博客 1560

Zemax操作16--激光谐振腔(含晶体)

谐振腔(含晶体)

lzy750750的博客 8342

WorkBuddy驱动SolidWorks实测:AI建模流程、参数化与许可排查指南

AI辅助三维建模正在改变工程师的重复劳动方式。其核心理念不是替代人的设计决策,而是通过AI智能体接管CAD软件中的草图绘制、特征创建、尺寸修改等高频操作,让工程师从繁琐的GUI交互中解放出来。在SolidWorks这类主流CAD平台上,这类AI助手的落地依赖环境稳定、需求描述清晰和参数化建模规范。通过将外径、孔距等关键尺寸定义为全局变量并用方程式驱动,可实现改一个数、模型自动更新的高效流程;同时,遇到“无法获得许可”等环境故障时,需要按服务状态、安全软件隔离、干净卸载的顺序排查。以WorkBuddy驱动So

weixin_28559803的博客 435

基于Scrapy+Playwright的学术会议信息智能爬取系统实战

本文详细介绍如何使用Python构建一个高效的学术会议信息爬取系统,结合Scrapy框架和Playwright无头浏览器技术,实现对全球学术会议数据的自动化采集、清洗和存储。文章包含完整的技术方案设计、代码实现细节以及性能优化策略,可帮助读者快速掌握现代网络爬虫开发的核心技术。关键词:Python爬虫、Scrapy、Playwright、学术会议、数据采集、反爬对抗python复制下载。

2201_76125261的博客 719

英伟达 Jetson AGX Thor 官方入门教程(一)系统U盘安装

NVIDIA Jetson AGX Thor开发套件快速安装指南 本指南详细介绍了NVIDIA Jetson AGX Thor开发套件的安装流程。该套件搭载T5000 SoM,为物理AI和机器人应用提供强大支持。安装过程采用全新的JetPack 7.0方案,通过USB闪存盘即可完成BSP(Jetson Linux)安装,无需依赖Ubuntu主机。指南包含硬件开箱说明、两种配置模式(带显示器/无显示器)、详细的ISO镜像下载和USB制作步骤(推荐使用Balena Etcher工具),以及首次启动后的初始设置流

机器人控制与仿真应用 2901

Open3D 可视化(1)——简单可视化【2026最新版】

简单可视化,博客长期更新,本文最新更新时间为:2026年5月10日。

点云侠的博客 5692

ABAP Bits and Bytes 完全参考,理解内存、字节、位运算与类型解释

ABAP开发中业务代码与底层字节处理的差异:业务层关注采购订单、会计凭证等语义信息,而接口开发需处理十六进制、位运算等底层操作。文章通过整数变量示例说明同一段字节在不同类型解释下会呈现不同值,并介绍x类型、位运算及类型转换的实际应用。这些知识在文件接口、加密传输等场景中尤为重要,开发者需注意字节序、编码等问题。建议将底层协议处理与业务逻辑分离,以保持代码清晰和可维护性。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 152

深度学习工具包 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&#39;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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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, &#39;Too big error&#39;);```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(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

上一篇: Ubuntu 10.10安装配置指南&Ubuntu 11.10 图形安装教程
下一篇: Ubuntu下MyEclipse 8.5 8.6下载与 安装 || 【svn插件】【ADT插件】安装!
三少GG
博客等级 码龄18年 808粉丝 451原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值