`
darknight512
  • 浏览: 142709 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Google到的一篇关于Linux分区的讨论

阅读更多
http://justlinux.com/forum/archive/index.php/t-147373.html

网上Google到的一篇关于Linux分区的讨论,里面的一些讨论实在精彩,在看的同时自己也长进了不少,现摘录其中自认为一段非常精彩的分析:


The idea of having to size different subdirectories for a Linux can put off some users.

I believe in earlier days when the Linux boot loaders were struggling with coping hard disks with more than 1024 cylinders it was a good idea to place the /boot, typically 100Mb from what I have read, in the beginning of the hard disk so that it is below the 1024 cylinder barrier. When I entered into Linux two years ago I never ran into a problem concerning 1024 cylinders and have proof that even the earliest boot loader Grub 0.91 can boot all the way to the end of a 300Gb disk. Thus the problem has been solved many years ago but users are still following like sheep.

There are attractions by having a common /boot partition if a user is interested in 2 to 4 Linux in a PC. He/she can then round up all the kernel and initrd files, place them together in this partition and edit the boot loader configuration files to boot each system "directly". This appears to me the "traditional" method. There is nothing wrong with it except it make chainloading nearly impossible.

To place a Linux in a single partition, say for 10 distros, a user will have a /boot subdirectory repeated in every partition. The arrangement does not waste space because all the subdirectories inside a partition are stacked together to expand or contract within that partition space. The kernel of each Linux is always available in /boot and so it can be accessed by naming its partition reference. Thus the single-partition installation has none of the disadvantages but more advantages than a multiple-partition installation for a distro, as far as booting is concerned. This is because the boot loader and its configuration file as created by the installer can be kept "intact" in its virgin state for reference and comparison. I think I must have accelerated my learning in Linux simply because I have 100+ boot loader configurations files to look at and compare with. In "chainloading" I just select from any one of the boot loader, place it in the MBR and edit its configuration files to boot the remaining systems.

The important aspect of booting with chainloading is that the commands are generic with only the partition number different. Therefore the same configuration file (or 99%of it) of one Grub or Lilo can be cut and paste into any other Linux (with the same boot loader) and will work exactly the same. It is a remarkably simple, neat and maintenance free. The remaining 1% is that the host Linux, which is the distro providing the configuration file for multi-booting the others, must be boot "directly" by naming its kernel and initrd file.

Thus creating one common /boot for many Linux is counterproductive if a user is intending for multi systems. Many Linux use the same kernel name without ending tail like “vmlinuz” and it can be problematic to put all the kernels together in a same partition. Leave them where they were originally created in their native partitions does make good sense if not for simple house keeping.

The other major argument of having multi partitions is that it allows a huge /home for storing personal data which can be as big as one would wish to have. I solve this problem by placing my personal data in a separate FAT32 partition so that it is common to all MS systems, all Linux, all BSDs etc. I can see a user sticking with one particular system and isn't interested in communicating its personal data with another OS can choose a simpler way of having a large /home partition. Having said that it is no different than having one huge partition for Linux where /home simply freely expands whenever needed.

I did not respond to the question on the choice of logical and primary partition for Debian because that is irrelevant in Linux. A Linux can be booted from anywhere in a hard disk but the majority of MS systems, BSDs and Solaris cannot survive without being in a primary partition. I myself also boot these primary partition dependent systems and so I invariable place all my Linux in logical partitions.

It is my belief that the primary partition dependent systems are adhering to the PC standard pioneered by MS. As every PC Bios reads the MBR and the 447th to 510th bytes is the partition table holding the 4 primary partitions' addresses and so an OS in 100% compliance with the PC standard relies on this information to boot itself. In fact MS has a common MBR for all its systems. When loaded all it booting instruction does is to examine which of the 4 primary partitions has the active flag switched on and proceed to load that partition starting from its beginning which is the boot sector.

Linux implementation is compatible with the PC standard but goes much further. Its boot loaders discard MS method by naming the "root" of the system to be booted up front. Therefore if the partition is already declared (by "root" statement in Grub or "other=" and "image=" in Lilo) then Linux can be installed in either a primary or a logical partition and its boot loader can still know where to find it and load it. Linux therefore has no use of the active flag and never uses the damn thing. As a Linux user I take pride in booting it from the high partition like No. 60 where no other PC system can be installed and reached by its boot loader.

VMware is another manger embedded into an operating system which can be a Linux or a Windows. I have it installed in the Windows version. Basically it is like a program for selecting other operating systems within Windows. In operation Windows is still held in memory at the background when say a Linux is loaded to operate in the foreground. Its main advantage is up to 4 systems can be run on one machine and the data and resourced are shared.

Its main problem is each system has to be held in memory and so it is any good unless you have plenty of ram.

VMware allows an OS installed into a host system but not a full implementation. The boot loader for example cannot be installed otherwise itself and the host system booting priority will be destroyed. This feature together with other bits and pieces make VMware only working with a limited versions of Linux.

The benefit brought about by VMware can be more economically achieved by running several PC with a KVM switch ( a KVM switch is a box using one set of mouse, keyboard and monitor for several PC), especially if there are older computer boxes around. I run 3 PC simultaneously this way and one of them has VMware installed. Personally I find more satisfaction in running systems in different boxes, at least I got the maximum performance in each one.

For learning Linux I would prefer to be able to access the full system. Many features in Linux are mind boggling powerful and one of them is its boot loaders. VMware denies my access to them for that I would never be a good supporter of VMware.


 

分享到:
评论

相关推荐

    8148 8168制作SD分区的教程

    ### 8148 8168 制作 SD 分区教程详解 #### 标题及描述概览 文章标题“8148 8168制作SD分区的教程”与描述“DM8168心得之SD卡快速分区制作”共同...希望这篇教程能帮助到正在尝试为 DM8168 设备准备 SD 卡的读者们。

    红旗Linux系统安装步骤(版本一)

    ### 红旗Linux系统安装步骤(版本一) 红旗Linux是一款基于Linux内核的操作系统,主要面向中国市场。本文将详细介绍红旗Linux系统的安装步骤,并提供一些关键配置信息。 #### 安装前准备 在进行红旗Linux的安装...

    Linux下使用ext3grep恢复文件

    通过本篇文章的介绍,我们可以了解到在Linux环境中如何使用`ext3grep`这一工具进行文件恢复的基本流程。无论是因为误操作还是其他原因导致的数据丢失,`ext3grep`都为我们提供了一种有效的解决方案。值得注意的是,...

    fastboot.zip

    Fastboot是一种由Google开发的基于USB的Bootloader模式,主要用于对Android设备进行低级别的系统更新,如刷写内核、分区映像等。在嵌入式开发领域,尤其是Linux设备中,Fastboot扮演着至关重要的角色。本篇文章将...

    十二款操作系统安装全程图解

    OpenSUSE是一款开源Linux发行版,安装步骤包括选择安装介质、设置语言和地区、选择安装类型、分区和格式化硬盘、安装软件包和设置用户信息。 7. CentOS CentOS是基于RHEL的稳定版服务器操作系统,安装涉及下载ISO,...

    SAMSUNG,三星,N8000升级到Android 7.1.2

    这篇描述中提到的“升级到Android 7.1.2”是一个重要的更新过程,意味着用户或开发者正在尝试将N8000的操作系统从原有的版本升级到Android 7.1.2 Nougat,这是一个较新的Android分支,提供了许多性能优化和新功能。...

    MySQL从入门到进阶运维篇学习笔记.zip

    MySQL是世界上最受欢迎的关系型数据库管理系统之一,尤其在Web应用程序中被广泛应用。本学习笔记将带你从零基础开始,逐步深入到MySQL的高级运维层面。以下是你将会学到的关键知识点: 1. **MySQL安装与配置**:...

    旧电脑再利用:完整版 Chrome OS 安装指南 - 少数派1

    你可以使用Rufus这样的工具,选择镜像类型为Linux,分区类型为GPT,目标系统类型为UEFI(非CSM),然后开始烧录。 烧录完成后,你需要在USB驱动器的根目录下创建一个名为"Chrome OS"的文件夹,然后下载Brunch构建...

    Ubuntu操作系统安装使用教程.docx

    在 Windows 下可以不用重新分区,直接像安装一个应用程序那样安装 Ubuntu,安装方法是,先使用一个虚拟光驱装载 ubuntu-9.04-desktop-i386.iso 文件,然后运行根目录下的 wubi.exe,运行前要将本地磁盘的名字都修改...

    CentOS7下部署paddlepaddle深度学习框架

    文章目录安装 Centos7二、恢复分区二、安装Google Chrome浏览器Google Chrome浏览器安装教程:三、安装anaconda四、安装NVIDIA驱动重点是安装驱动时必须退出图形界面...详细操作请看我另外一篇博客:CentOS7 Linux引导

    Ubuntu桌面版安装步骤.docx

    ### Ubuntu桌面版安装步骤 #### 一、前言 本文档旨在详细介绍Ubuntu桌面版的安装流程及注意事项。Ubuntu是一款基于Linux的操作系统,以...希望这篇文章能够帮助到您,也希望您能在Ubuntu的世界里探索更多有趣的可能!

    android开发杂谈

    这篇"Android开发杂谈"涵盖了从系统组成、启动过程到关键组件的解析,旨在为初学者提供一个全面的理解框架。 Android系统是由多个层次构成的,包括Application、Framework、Native Libraries、Userspace Drivers...

    Android核心分析.doc

    2. 方法论探讨:在概念空间篇中,讨论了Android系统的模块化设计和组件间的通信方式,强调了Intent和BroadcastReceiver等核心机制在系统中的重要作用。 3. 硬件形态:这部分分析了Android如何适应不同硬件配置,如...

    java技术分享

    - 《Compact Off-Heap Structures & Tuples in Java》是Martin Thompson撰写的一篇关于如何在非堆内存中进行数据结构压缩的文章。 ##### 1.2 OpenHFT -- 老宋分享 OpenHFT是一个专注于高性能Java框架的开源项目,...

    软件世界电脑应用知识精华

    介绍了云存储服务如Google Drive、OneDrive的使用,以及如何利用硬盘分区管理和文件整理保持电脑整洁。此外,还涉及基础的数据库概念,如如何使用Access创建简单的数据库,进行数据查询和报表生成。 五、其他实用...

Global site tag (gtag.js) - Google Analytics