用GRUB2来实现——坎特伯雷项目 The Canterbury Project

用GRUB2来实现——坎特伯雷项目 The Canterbury Project

01.坎特伯雷项目 The Canterbury Project

2011年04月01日愚人节快乐!

虽然所有 Linux 发行版从过去到未来的合作依然会继续,以下的通告自然是假的啦! ;)
我们很高兴的宣布坎特伯雷 Canterbury 发行版的诞生。坎特伯雷集合了社群里各个不同发行版的力量,其中包括 Debian、Gentoo、Grml、openSUSE 以及ArchLinux,以产生一股非常聚合的力量,这力量足以抵抗其他的私有操作系统。而且展示出自由软件社群实际上是能够为了共同目标而共同合作,而并非创造更多的差异。

坎特伯雷的技术性将有如 Arch 般简单,系统有如 Debian 般稳定,可塑性有如 Gentoo 般高,拥有一个像 Grml 的扎实 Live 架构,并有如 openSUSE 般开明。

02.GRUB简单介绍。

GNU GRUB 是一个 支持多个启动 的启动加载器, GRUB是 宏大的,统一的,启动加载器的缩写,最初的设计和应用者是ErichStefan Boleyn。

总而言之,一个 启动加载器 是计算机启动的第一个软件,负责加载和更换(转换)控制操作系统的 内核 软件,内核kernel,可以依次变换,初始化(启动),正在休息的操作系统。

GRUB 开发测试版

GRUB 2 已经开始更换正如我们了解的GRUB ( 比如 0.9x),可以说,成为GRUB 遗留问题。GRUB正在不断的增强,但是现在的的发行版本,对于正常的操作来说还是不那么稳定,GRUB遗留问题 在未来会完善。区别GRUB 遗留问题和GRUB,详见:Grub  Legacy 。

http://www.gnu.org/software/grub/

http://www.gnu.org/software/grub/manual/

03.我的体验

也许我的这个体验这算不了什么,但是引发了我一个深思,诸如N个不同的版本的LINUX安装在一台电脑上,且可以任意启动,我想GRUB2在这个上边已经做了很大的进步,自动捕捉其他的操作系统和启动内核,自动生成/boot/grub/grub.cfg文件,这个让我很吃惊,传统的GRUB是做不到这一点的。

我安装了 fedora 13, debian wheezy, fedora16, opensuse, centos, gentoo, lfs-7.2, (grml & arch linux为光盘启动,没有安装),又看了The Linux Bootdisk HOWTO,配置任意最小的盘区启动,感觉有了grub 2,这些都可以方便的实现了。

但是Canterbury坎特伯雷, 的意思是在一款LINUX上实现这些功能,而GRUB2 在一个计算机上实现了这些功能,甚者超越了Canterbury坎特伯雷计划的本身,未来,如果GRUB2可以延伸到GRUB3 或者 GRUB4, 可以在GNOME 的一个桌面,就像从一个桌面轻松的更换到下个桌面,而每一个桌面就是一个不同的LINUX操作系统,而不是需要从新启动,用boot loader来调换不同的操作系统而已,那样,boot loader 的意义也就是首先启动哪一个桌面的意义了!

在一个320GB的硬盘上,分区分了11个区,还有几个没有用到了,

fdisk /dev/sda

以下是fdisk 分区命令和选择,

第1个分区,基础分区

new

primary

1

0.7G

第2个分区,基础分区

new

primary

2

2G

第3个分区,基础分区

new

primary

3

27G

第4个分区,扩展分区(选择所有的空间,/dev/sda4 不可以挂载,表示所有的可以扩展的分区的大小)

new

extended

4

290G

第5个分区,扩展分区的一部分,可以直接挂载,(不再选择p 基础 或者 e 扩展分区)

new

5

20G

第6个分区,扩展分区的一部分,可以直接挂载,

new

6

20G

...

等等

然后安装不同的操作系统, fedora 16, opensuse 安装后是grub2, 自动识别其他系统,而debian wheezy的GRUB2 则需要动手配置了。

这样,就可以开发产品的时候,备用的安装多个操作系统,可以取长补短, 开发系统配置完成后,可以在GRUB2隐藏其他的操作系统,而在故障调试,或者备份其他数据等其他特殊应用的时候,可以多一个选择的空间。

GRUB 2, GRUB N 仍就任重而道远!!!

menuentry 'openSUSE' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-09612736-befa-4311-847f-2d77b640fb1c' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  09612736-befa-4311-847f-2d77b640fb1c
    else
      search --no-floppy --fs-uuid --set=root 09612736-befa-4311-847f-2d77b640fb1c
    fi
    echo    '载入 Linux 3.4.6-2.10-desktop ...'
    linux    /boot/vmlinuz-3.4.6-2.10-desktop root=UUID=09612736-befa-4311-847f-2d77b640fb1c   video=1680x1050 resume=/dev/disk/by-id/ata-ST3320613AS_9SZ0QFWB-part3 splash=silent quiet showopts
    echo    '载入初始化内存盘...'
    initrd    /boot/initrd-3.4.6-2.10-desktop
}
submenu 'Advanced options for openSUSE' $menuentry_id_option 'gnulinux-advanced-09612736-befa-4311-847f-2d77b640fb1c' {
    menuentry 'openSUSE,Linux 3.4.6-2.10-desktop' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.6-2.10-desktop-advanced-09612736-befa-4311-847f-2d77b640fb1c' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  09612736-befa-4311-847f-2d77b640fb1c
        else
          search --no-floppy --fs-uuid --set=root 09612736-befa-4311-847f-2d77b640fb1c
        fi
        echo    '载入 Linux 3.4.6-2.10-desktop ...'
        linux    /boot/vmlinuz-3.4.6-2.10-desktop root=UUID=09612736-befa-4311-847f-2d77b640fb1c   video=1680x1050 resume=/dev/disk/by-id/ata-ST3320613AS_9SZ0QFWB-part3 splash=silent quiet showopts
        echo    '载入初始化内存盘...'
        initrd    /boot/initrd-3.4.6-2.10-desktop
    }
    menuentry 'openSUSE,Linux 3.4.6-2.10-desktop (恢复模式)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.6-2.10-desktop-recovery-09612736-befa-4311-847f-2d77b640fb1c' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  09612736-befa-4311-847f-2d77b640fb1c
        else
          search --no-floppy --fs-uuid --set=root 09612736-befa-4311-847f-2d77b640fb1c
        fi
        echo    '载入 Linux 3.4.6-2.10-desktop ...'
        linux    /boot/vmlinuz-3.4.6-2.10-desktop root=UUID=09612736-befa-4311-847f-2d77b640fb1c  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
        echo    '载入初始化内存盘...'
        initrd    /boot/initrd-3.4.6-2.10-desktop
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Debian GNU/Linux (wheezy/sid)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c283cb81-6b7f-4a4b-997b-93322b08848e' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  c283cb81-6b7f-4a4b-997b-93322b08848e
    else
      search --no-floppy --fs-uuid --set=root c283cb81-6b7f-4a4b-997b-93322b08848e
    fi
    linux /boot/vmlinuz-3.2.0-3-686-pae root=UUID=c283cb81-6b7f-4a4b-997b-93322b08848e ro quiet
    initrd /boot/initrd.img-3.2.0-3-686-pae
}
submenu 'Advanced options for Debian GNU/Linux (wheezy/sid)' $menuentry_id_option 'osprober-gnulinux-advanced-c283cb81-6b7f-4a4b-997b-93322b08848e' {
    menuentry 'Debian GNU/Linux, with Linux 3.2.0-3-686-pae (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-3-686-pae--c283cb81-6b7f-4a4b-997b-93322b08848e' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  c283cb81-6b7f-4a4b-997b-93322b08848e
        else
          search --no-floppy --fs-uuid --set=root c283cb81-6b7f-4a4b-997b-93322b08848e
        fi
        linux /boot/vmlinuz-3.2.0-3-686-pae root=UUID=c283cb81-6b7f-4a4b-997b-93322b08848e ro quiet
        initrd /boot/initrd.img-3.2.0-3-686-pae
    }
    menuentry 'Debian GNU/Linux, with Linux 3.2.0-3-686-pae (recovery mode) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-3-686-pae-root=UUID=c283cb81-6b7f-4a4b-997b-93322b08848e ro single-c283cb81-6b7f-4a4b-997b-93322b08848e' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  c283cb81-6b7f-4a4b-997b-93322b08848e
        else
          search --no-floppy --fs-uuid --set=root c283cb81-6b7f-4a4b-997b-93322b08848e
        fi
        linux /boot/vmlinuz-3.2.0-3-686-pae root=UUID=c283cb81-6b7f-4a4b-997b-93322b08848e ro single
        initrd /boot/initrd.img-3.2.0-3-686-pae
    }
    menuentry 'fedora13 (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE--c283cb81-6b7f-4a4b-997b-93322b08848e' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  c283cb81-6b7f-4a4b-997b-93322b08848e
        else
          search --no-floppy --fs-uuid --set=root c283cb81-6b7f-4a4b-997b-93322b08848e
        fi
        linux /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE root=UUID=848f5e8b-119a-4b43-921d-348fb8ab16a2 ro quiet
        initrd /boot/initramfs-2.6.33.3-85.fc13.i686.PAE.img
    }
    menuentry 'fedora13 -2 (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE--c283cb81-6b7f-4a4b-997b-93322b08848e' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  c283cb81-6b7f-4a4b-997b-93322b08848e
        else
          search --no-floppy --fs-uuid --set=root c283cb81-6b7f-4a4b-997b-93322b08848e
        fi
        linux /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE root=UUID=848f5e8b-119a-4b43-921d-348fb8ab16a2
        initrd /boot/initramfs-2.6.33.3-85.fc13.i686.PAE.img
    }
    menuentry 'fedora13 -3 (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE--c283cb81-6b7f-4a4b-997b-93322b08848e' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  c283cb81-6b7f-4a4b-997b-93322b08848e
        else
          search --no-floppy --fs-uuid --set=root c283cb81-6b7f-4a4b-997b-93322b08848e
        fi
        linux /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE root=UUID=848f5e8b-119a-4b43-921d-348fb8ab16a2
        initrd /boot/initrd.img-3.2.0-3-686-pae
    }
}

menuentry 'Fedora release 16 (Verne)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-1cad4862-b546-4111-9597-ed626bf18b8d' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 --hint='hd0,msdos7'  1cad4862-b546-4111-9597-ed626bf18b8d
    else
      search --no-floppy --fs-uuid --set=root 1cad4862-b546-4111-9597-ed626bf18b8d
    fi
    linux /boot/vmlinuz-3.1.0-7.fc16.i686.PAE root=/dev/sda6
    initrd /boot/initramfs-3.1.0-7.fc16.i686.PAE.img
}
submenu 'Advanced options for Fedora release 16 (Verne)' $menuentry_id_option 'osprober-gnulinux-advanced-1cad4862-b546-4111-9597-ed626bf18b8d' {
    menuentry 'Fedora release 16 (Verne) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.1.0-7.fc16.i686.PAE--1cad4862-b546-4111-9597-ed626bf18b8d' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 --hint='hd0,msdos7'  1cad4862-b546-4111-9597-ed626bf18b8d
        else
          search --no-floppy --fs-uuid --set=root 1cad4862-b546-4111-9597-ed626bf18b8d
        fi
        linux /boot/vmlinuz-3.1.0-7.fc16.i686.PAE root=/dev/sda6
        initrd /boot/initramfs-3.1.0-7.fc16.i686.PAE.img
    }
}

用GRUB2来实现——坎特伯雷项目 The Canterbury Project相关推荐

  1. 《坎公骑冠剑》坎特伯雷大街21号船长活动怎么搬空活动商店?要多少体力?

    <坎公骑冠剑>即将在5月中下旬也就是下周开启第一期活动[坎特伯雷大街21号]的主题活动,在本期船长玛丽娜主题活动中玩家怎么快速烧体力搬空活动商店呢?把商店内的道具全部搬空一共需要多少体力? ...

  2. ubuntu下eclipse新建项目没有java project的解决办法

    装好了eclipse之后却发现新建项目没有java project的选项,大致搜索了一下,并没有发现很好的解决方案(大都是让你重新安装什么的),于是开始瞎鼓捣,并且找到了一个方案: 在终端切换到roo ...

  3. Windows8 Metro应用开发之C#(1)- 项目模板(Project Templates)

    Windows8 Metro应用开发之C#(1)- 项目模板(Project Templates) 新建模板 打开Visual Studio 11,新建项目 -> 展开Visual C# -&g ...

  4. Eclipse中导入maven项目 maven update project报“Cannot nest ‘xx/src/main/resources‘ inside ‘xx/src ……”

    导入maven项目 maven update project"Cannot nest 'xx/src/main/resources' inside 'xx/src --" Unab ...

  5. eclipse项目中的.project文件

    eclipse项目中的.project文件 .project文件 buildSpec natures 普通jar工程 maven的jar工程 普通Web工程 maven的Web工程 .project文 ...

  6. idea git同步项目(Update Project)时,不小心勾选了不再显示更新项目的提示弹窗(Do not show this dialog in the future)

    idea git同步项目(Update Project)时,不小心勾选了不再显示更新项目的提示弹窗(Do not show this dialog in the future) idea:当git同步 ...

  7. 如何开始一项可能帮助你走向人生巅峰的“业余项目”(Side Project)?

    5 Resources toInspire Your Next Data Science Project 在正文开始之前,我们先来了解一下,什么是Side Project?简书上有这么一篇文章:#85 ...

  8. 微信小程序打开项目提示读取project.config.json文件失败

    前几天一个月薪35k的兄弟,给我推了一个人工智能学习网站,看了一段时间挺有意思的.包括语音识别.机器翻译等从基础到实战都有,很详细,分享给大家.大家及时保存,说不定啥时候就没了. 微信小程序打开项目提 ...

  9. .NET Core项目从xproj+project.json向csproj迁移简介

    3月7日,微软发布了Visual Studio 2017 RTM,与之一起发布的还有.NET Core Runtime 1.1.0以及.NET Core SDK 1.0.0,尽管这些并不是最新版,但也 ...

最新文章

  1. 可以用for循环直接删除ArrayList的特定元素吗?可能会出现什么问题?怎样解决?
  2. php xml 格式化,php简单处理XML数据的方法示例
  3. asp按时间自动递增编号_约束力最强的手铐——美国ASP钢性手铐
  4. java防止重复启动bat_java调用exe,及调用bat不成功的解决办法
  5. CListCtrl 使用演示的例子
  6. golang 关闭gc 并手动gc_Golang 防内存泄漏编码原则
  7. Lua笔记2 变量、循环和流程控制
  8. safari only css hack,css hack同时针对Safari和Chrome进行攻击
  9. 线报天下 2021 (免费补丁) 原创工具
  10. android toast样式 最新,Android 五种不同样式Toast
  11. 双系统时间不一致问题
  12. 阿里云香港和大陆的服务器分析
  13. 义隆单片机学习笔记之(二) 指令系统
  14. concat,ucase/lcase,left/right,length,replace
  15. 神经系统图 基本结构图,大脑神经网络结构图片
  16. linux网桥--简介
  17. 【微信小程序-原生开发】实用教程20 - 生成海报(实战范例为生成活动海报,内含生成指定页面的小程序二维码,保存图片到手机,canvas 系列教程)
  18. 张俊林:ChatGPT 会成为下一代搜索引擎吗
  19. js犀牛书,学习心得笔记(一)
  20. 武汉全款买房,普通人不吃不喝需要10年,这位程序员只用了5年

热门文章

  1. 微软幽你一默,蓝屏死机屏保
  2. 达梦数据库-SQL优化之HINT-平坦化处理
  3. cmake 安装下载
  4. 字典树(Trie,前缀树)
  5. WGS-84引力模型和大地水准面模型
  6. Semantic Segmentation--SegNet:A Deep Convolutional Encoder-Decoder Architecture..论文解读
  7. 凯文凯利 《必然》 读书笔记
  8. 一开机checkingmedia_电脑开机出现checking media怎么办?
  9. Spring IOC(控制反转)的理解
  10. TA进阶实例34(Unreal制作水晶星光效果)