Re: Dual booting w/EMC -- More "Linux intro" schtuff
Posted by
Bryan-TheBS-Smith
on 2001-12-17 13:16:37 UTC
[ General "anal" and other Linux discussion/notes. Skip if you aren't
interested. Just provided for added info for those interested. ]
Ian Wright wrote:
"swap daemon" to remove the need for a separate swap partition, but it
seriously, and adversely, affects performance.
following types of "directories/volumes" should have their "own
filesystem" -- in addition to the "root" (/) volume:
1. Temporary, rapidly changing -- e.g., /tmp, /var
2. Static, binary programs -- e.g., /usr
3. Data, home directories -- e.g., /home
I highly recommend people separate out #1 because they are the most
fragmenting, *IF* you have the storage to do so. Don't worry if you
don't -- but if you're using Linux as a desktop and, especially, a
server, you'll want to do so -- because you don't want their
fragmentation to affect other filesystems. On some Linux filesystems
(e.g., ext2, ext3 -- but not ReiserFS, XFS), you also have to worry
about inodes v. free space. Long story on that one, but UNIX
filesystems are not like FAT filesystems where you have 1-to-1
allocation-to-blocks, you have 1-to-2/4/8, so you _could_ run out of
inodes (allocation blocks) before [data] blocks because of all the
small, temporary files and that would affect other data. You should
create them with 1-to-2 or 1-to-1, and also separate out additional /var
subdirectories for fileservers and their applications (e.g., /var/www
for web, /var/spool/mail for mailservers, /var/spool/lpd for print
servers, etc...).
#2 is common practice, as Ian mentioned. Most of the time, I get away
with a symlink from opt -> usr/opt. For those that don't know what a
symlink is, read below. It is the reason why you do *NOT* need to make
an "unified" root (/) to overcome storage problems with "inferior"
operating systems like MS-DOS (incl. Win95/98/ME) and NT (incl. 2000/XP)
with a single C: "drive." Sometimes /usr/local and/or /opt are mounted
from an NFS/AFS** fileserver -- which is another reason why I like UNIX
over Windows, _true_distributed_fileservers_ (i.e. /usr/local can be on
the local system, or a server, the programs can't tell the difference).
#3 is another common practice, although most networks will mount /home
from an NFS/AFS** fileserver.
[ ** NOTE: NFS = Network File Service, AFS = Andrew(?) File Service.
For those that have used SaMBa, which is the UNIX service for file/print
over the SMB protocol aka "Windows networking," Samba is very
Windows-centric, and simultaneous-user ignorant. NFS is the
20-year-old, simultaneous/multiuser UNIX-to-UNIX file service that you
should use for UNIX-to-UNIX systems (e.g., you mount /home with one
command/fstab line, and you're done! Sharing out is just as easy with
one line in /etc/exports in the case of Linux). NFS and Samba can
co-exist quite nicely, and if you have both Windows and UNIX clients
(and even an ATalk server for older Mac clients as well) -- and I
recommend you use a UNIX server with both (because all the NFS servers
for Windows suck, and SMB is a very Windows-centric protocol that is too
limited for UNIX clients, let alone only Linux can inheritly mount SMB
shares). AFS is another network file service from CMU that uses
"virtual volumes" that gives it many advantages, although can only use
AFS to share them out to both UNIX and Windows clients (because the
local system, nor NFS/Samba, can see the files in the "virtual volume."
]
version 1.0 (aka MS/PC-DOS 1.0 ;-) didn't support directories. When
they were introduced in version 2.0, along with other UNIX'isms like
redirection/piping, the reason for the backslash instead of the forward
slash was because QPS-DOS already used the forward slash for options
(e.g., dir /w).
"mount" other discs/devices/partitions/filesystems into a directory.
This might seem awkward at first, but it really removes a _lot_ of
common problems with Windows has because of its reliance on drive
letters.
BTW, there are some "m"tools for doing DOS prompt like commands. E.g.,
"mcopy file.txt A:". I haven't checked the BDI for them.
[ Side Note: A number of us original NT 3.1 beta testers tried,
unsuccessfully, to get Microsoft to "mount" all non-removable discs into
a subdirectory on C:, relocatable ala UNIX. Microsoft reps felt Disk
Administrator's volume manager with spanning, mirroring, etc... would be
sufficient. Not! ]
you, _everything_is_a_file_! We use "special files" called "device
files" as pseudo interfaces to devices. They are normally located under
/dev. E.g., if you want to make a CD image of a CD-ROM, you just do:
dd if=/dev/cdrom of=mycd.iso
When a program needs to use the digital synthesizer of your audio card,
it just "writes" to the /dev/dsp device, etc...
(executables/programs, libraries, etc...) will be under /usr. You'll
note a /usr/bin, /usr/sbin, /usr/lib, etc..., many which are also under
root (/) as well. The ones under root (/) are the "minimal" ones, ones
that are for a "maintenance" boot (non-GUI, non-multiuser, etc...). The
/usr directories will be for the great majority of programs.
/usr/local (as well as /opt), are usually where one should install
non-vendor software. I.e., software that doesn't come "packaged" from
the Linux vendor, or in the Linux vendor's package format (e.g.,
RedHat's RPM, Debian's .deb, etc...). E.g., /usr/local/games is where
Loki Entertainment installs its game titles by default.
For those of you that have tried Linux, you'll probably note 3rd party
programs don't come in a "binary/installer/executable" format, but
usually in a "package" or source (usually .tar.gz, GZip compressed Tar
archive, similar to PKZip archives). Major reason on that? It's a heck
of a lot harder to install a trojan horse if it doesn't run itself
(among other typical UNIX considerations that the Windows world still
hasn't bother learning from ;-)!
kernel source should be anymore. FYI, /lib/modules/(version)/build is
where your source is supposed to now be (or symlinked to). Linus did
this for a variety of reasons I won't go into here.
bitching out there for Linux to act more like Windows. Although many
things are starting too, some things never will. Two major reasons on
this:
1. UNIX predates MS-DOS, and UNIX terminology is eternal, whereas
Microsoft terminology changes every 5-10 years. So if you learned UNIX
in 1975, any UNIX is not much different than today. Not the same for
Windows, hence why there is no sense in trying to make UNIX terminology
a "moving target" like Windows.
2. Multiuser/security will _never_ take a "back seat" to
automation/features. E.g., even the latest "wiz-bang" E-mail clients
like Ximian's Evolution _force_ you to save a file out, and mark it
"executable" (UNIX doesn't trust just any file to be "self-executing" by
default ;-) before you can actually run a program. It also doesn't
allow you to launch many files in-place inside other program. UNIX
learned back in the late '80s that "automation kills" (UNIX experienced
its first worms back in the late'80s). Unfortunately, Microsoft still
hasn't with Windows/Outlook.
-- TheBS
--
Bryan "TheBS" Smith mailto:b.j.smith@... chat:thebs413
Engineer AbsoluteValue Systems, Inc. http://www.linux-wlan.org
President SmithConcepts, Inc. http://www.SmithConcepts.com
----------------------------------------------------------------
"Men tend to be better at dealing with visual concepts, while
women are better at complex lignuistic communication. Yes,
men are from Macs, women are from VMS." -- Erwin, User Friendly
interested. Just provided for added info for those interested. ]
Ian Wright wrote:
> Maybe I can shed a little more light on this. Linux NEEDSSmall "anal" note here: You _can_ make one big "/" partition and use a
> at least 2 partitions and is more controllable with 3.
> The minimum is a small SWAP partition (say 100Mb or 150MB)
> and another 'root' partition '/' which holds everything else.
"swap daemon" to remove the need for a separate swap partition, but it
seriously, and adversely, affects performance.
> I did say, however, that 3 were better. This is because allThis is part of the common UNIX approach to system configuration. The
> your applications are normally stored in a /usr sub directory.
> So, if you make another partition and call it /usr, you will
> be able tocontrol your applications better and stop them
> overflowing into the working directories.
following types of "directories/volumes" should have their "own
filesystem" -- in addition to the "root" (/) volume:
1. Temporary, rapidly changing -- e.g., /tmp, /var
2. Static, binary programs -- e.g., /usr
3. Data, home directories -- e.g., /home
I highly recommend people separate out #1 because they are the most
fragmenting, *IF* you have the storage to do so. Don't worry if you
don't -- but if you're using Linux as a desktop and, especially, a
server, you'll want to do so -- because you don't want their
fragmentation to affect other filesystems. On some Linux filesystems
(e.g., ext2, ext3 -- but not ReiserFS, XFS), you also have to worry
about inodes v. free space. Long story on that one, but UNIX
filesystems are not like FAT filesystems where you have 1-to-1
allocation-to-blocks, you have 1-to-2/4/8, so you _could_ run out of
inodes (allocation blocks) before [data] blocks because of all the
small, temporary files and that would affect other data. You should
create them with 1-to-2 or 1-to-1, and also separate out additional /var
subdirectories for fileservers and their applications (e.g., /var/www
for web, /var/spool/mail for mailservers, /var/spool/lpd for print
servers, etc...).
#2 is common practice, as Ian mentioned. Most of the time, I get away
with a symlink from opt -> usr/opt. For those that don't know what a
symlink is, read below. It is the reason why you do *NOT* need to make
an "unified" root (/) to overcome storage problems with "inferior"
operating systems like MS-DOS (incl. Win95/98/ME) and NT (incl. 2000/XP)
with a single C: "drive." Sometimes /usr/local and/or /opt are mounted
from an NFS/AFS** fileserver -- which is another reason why I like UNIX
over Windows, _true_distributed_fileservers_ (i.e. /usr/local can be on
the local system, or a server, the programs can't tell the difference).
#3 is another common practice, although most networks will mount /home
from an NFS/AFS** fileserver.
[ ** NOTE: NFS = Network File Service, AFS = Andrew(?) File Service.
For those that have used SaMBa, which is the UNIX service for file/print
over the SMB protocol aka "Windows networking," Samba is very
Windows-centric, and simultaneous-user ignorant. NFS is the
20-year-old, simultaneous/multiuser UNIX-to-UNIX file service that you
should use for UNIX-to-UNIX systems (e.g., you mount /home with one
command/fstab line, and you're done! Sharing out is just as easy with
one line in /etc/exports in the case of Linux). NFS and Samba can
co-exist quite nicely, and if you have both Windows and UNIX clients
(and even an ATalk server for older Mac clients as well) -- and I
recommend you use a UNIX server with both (because all the NFS servers
for Windows suck, and SMB is a very Windows-centric protocol that is too
limited for UNIX clients, let alone only Linux can inheritly mount SMB
shares). AFS is another network file service from CMU that uses
"virtual volumes" that gives it many advantages, although can only use
AFS to share them out to both UNIX and Windows clients (because the
local system, nor NFS/Samba, can see the files in the "virtual volume."
]
> If I were using a 2Gb drive, I would make a SWAP partition ofThe only reason drive letters are used in MS-DOS is because QPS-DOS
> 150Mb, a '/' partition of 450 or 500 Mb and the rest would be
> designated as a /usr partition. For those who are just coming
> into linux, it may be worthwhile listing the function of the
> main directories - within the '/' (which is equivalent to
> C:\ in windoze) directory
version 1.0 (aka MS/PC-DOS 1.0 ;-) didn't support directories. When
they were introduced in version 2.0, along with other UNIX'isms like
redirection/piping, the reason for the backslash instead of the forward
slash was because QPS-DOS already used the forward slash for options
(e.g., dir /w).
> are the following sub directories:- /boot - which holds theIf you haven't noticed, UNIX doesn't use drive letters. We _always_
> main kernel images (vmlinuz-** files),
> the System map and other main operating system files, /etc -
> which has most of the files you are likely to want to modify.
> These are similar to windoze .pif files and are the information
> and setup files for the various 'programs'. All the ones you
> can play with are plain text files and can be modified in one
> of the text processors but be sure you have word-wrap turned
> OFF when you edit these files or they won't work!
> /bin and /sbin - these contain the various system-type
> executables. /var - this has files such as the system logs
> which you can consult to see what the system is doing.
> /mnt - this contains the CDROM and FLOPPY drive files when they
> are mounted.
"mount" other discs/devices/partitions/filesystems into a directory.
This might seem awkward at first, but it really removes a _lot_ of
common problems with Windows has because of its reliance on drive
letters.
BTW, there are some "m"tools for doing DOS prompt like commands. E.g.,
"mcopy file.txt A:". I haven't checked the BDI for them.
[ Side Note: A number of us original NT 3.1 beta testers tried,
unsuccessfully, to get Microsoft to "mount" all non-removable discs into
a subdirectory on C:, relocatable ala UNIX. Microsoft reps felt Disk
Administrator's volume manager with spanning, mirroring, etc... would be
sufficient. Not! ]
> /dev - contains basic info about all the hardware.Small note here: As anyone who has used UNIX for some time will tell
you, _everything_is_a_file_! We use "special files" called "device
files" as pseudo interfaces to devices. They are normally located under
/dev. E.g., if you want to make a CD image of a CD-ROM, you just do:
dd if=/dev/cdrom of=mycd.iso
When a program needs to use the digital synthesizer of your audio card,
it just "writes" to the /dev/dsp device, etc...
> /usr - contains the application files (like the C:\ProgramThe great majority of programs, libraries and other "binaries"
> Files directory in windoze) Within the /usr directory is
> another directory called /local in which you would normally
> put applications you install after the initial installation.
(executables/programs, libraries, etc...) will be under /usr. You'll
note a /usr/bin, /usr/sbin, /usr/lib, etc..., many which are also under
root (/) as well. The ones under root (/) are the "minimal" ones, ones
that are for a "maintenance" boot (non-GUI, non-multiuser, etc...). The
/usr directories will be for the great majority of programs.
/usr/local (as well as /opt), are usually where one should install
non-vendor software. I.e., software that doesn't come "packaged" from
the Linux vendor, or in the Linux vendor's package format (e.g.,
RedHat's RPM, Debian's .deb, etc...). E.g., /usr/local/games is where
Loki Entertainment installs its game titles by default.
For those of you that have tried Linux, you'll probably note 3rd party
programs don't come in a "binary/installer/executable" format, but
usually in a "package" or source (usually .tar.gz, GZip compressed Tar
archive, similar to PKZip archives). Major reason on that? It's a heck
of a lot harder to install a trojan horse if it doesn't run itself
(among other typical UNIX considerations that the Windows world still
hasn't bother learning from ;-)!
> It also cantains a directory called /src which is a repositorySmall "anal" note: /usr/src/linux is not the "party line" on where the
> for system source code and into which you install the kernel
> source files when and if you wish to build a new kernel,
kernel source should be anymore. FYI, /lib/modules/(version)/build is
where your source is supposed to now be (or symlinked to). Linus did
this for a variety of reasons I won't go into here.
> either to update to a newer version or to add in functionsOn Linux. Some UNICIES just use root (/).
> which you didn't select during the initial installation.
> There is also a directory called /root which is the home
> directory of the system administrator.
> If you log in as root when you start up linux and thenJust remember that "familarity" is your enemy. I know everyone is
> look at the file manager, you will see that you are in
> this directory by default and you will need to go up a
> level to get to '/' and see all the others.
> I hope this makes it a bit clearer for the beginner - I
> know that when I started I found this a bit confusing but
> it all soon began to make sense.
bitching out there for Linux to act more like Windows. Although many
things are starting too, some things never will. Two major reasons on
this:
1. UNIX predates MS-DOS, and UNIX terminology is eternal, whereas
Microsoft terminology changes every 5-10 years. So if you learned UNIX
in 1975, any UNIX is not much different than today. Not the same for
Windows, hence why there is no sense in trying to make UNIX terminology
a "moving target" like Windows.
2. Multiuser/security will _never_ take a "back seat" to
automation/features. E.g., even the latest "wiz-bang" E-mail clients
like Ximian's Evolution _force_ you to save a file out, and mark it
"executable" (UNIX doesn't trust just any file to be "self-executing" by
default ;-) before you can actually run a program. It also doesn't
allow you to launch many files in-place inside other program. UNIX
learned back in the late '80s that "automation kills" (UNIX experienced
its first worms back in the late'80s). Unfortunately, Microsoft still
hasn't with Windows/Outlook.
-- TheBS
--
Bryan "TheBS" Smith mailto:b.j.smith@... chat:thebs413
Engineer AbsoluteValue Systems, Inc. http://www.linux-wlan.org
President SmithConcepts, Inc. http://www.SmithConcepts.com
----------------------------------------------------------------
"Men tend to be better at dealing with visual concepts, while
women are better at complex lignuistic communication. Yes,
men are from Macs, women are from VMS." -- Erwin, User Friendly