红联Linux门户
Linux帮助

Linux District

发布时间:2007-10-28 10:10:10来源:红联作者:tJbwhy
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.
文章评论

共有 0 条评论