Linux+FreeBSD(1).pdf
(
41 KB
)
Pobierz
The Linux+FreeBSD mini-HOWTO
The Linux+FreeBSD mini−HOWTO
The Linux+FreeBSD mini−HOWTO
Table of Contents
The Linux+FreeBSD mini−HOWTO.
...............................................................................................................1
Niels Kristian Bech Jensen nkbj@image.dk.
...........................................................................................1
1. What is FreeBSD?..
..............................................................................................................................1
2. The FreeBSD way of labelling hard drives.
.........................................................................................1
3. Sharing swap space between Linux and FreeBSD.
.............................................................................1
4. Booting FreeBSD using LILO.
............................................................................................................1
5. Mounting filesystems.
..........................................................................................................................1
6. Running foreign binaries.
.....................................................................................................................1
7. Information resources.
.........................................................................................................................1
8. Credits and legal stuff.
.........................................................................................................................2
1. What is FreeBSD?..
..............................................................................................................................2
2. The FreeBSD way of labelling hard drives.
.........................................................................................2
2.1 FreeBSD ``slices'' and ``partitions'.
...................................................................................................2
2.2 Drive and partition labelling in Linux and FreeBSD.
........................................................................3
3. Sharing swap space between Linux and FreeBSD.
.............................................................................4
3.1 Installing and preparing Linux.
.........................................................................................................4
3.2 Installing FreeBSD.
...........................................................................................................................5
3.3 Setting up the FreeBSD swap partition in Linux.
..............................................................................5
4. Booting FreeBSD using LILO.
............................................................................................................6
5. Mounting filesystems.
..........................................................................................................................6
5.1 Mounting UFS filesystems under Linux.
...........................................................................................6
5.2 Mounting ext2fs filesystems under FreeBSD.
..................................................................................7
6. Running foreign binaries.
.....................................................................................................................7
6.1 Running FreeBSD binaries under Linux..
..........................................................................................7
6.2 Running Linux binaries under FreeBSD..
..........................................................................................7
7. Information resources.
.........................................................................................................................8
8. Credits and legal stuff.
.........................................................................................................................8
8.1 Legal stuff.
.........................................................................................................................................9
i
The Linux+FreeBSD mini−HOWTO
Niels Kristian Bech Jensen
nkbj@image.dk
v1.11, 30 March 2000
This document describes how to use Linux and FreeBSD on the same system. It introduces FreeBSD and
discusses how the two operating systems can cooperate, e.g. by sharing swap space. You should probably
have some experience with Linux or FreeBSD and hard drive partitioning (
fdisk
) before you read this
document. The tips herein are tested using FreeBSD 2.2.2, but they should be valid for newer versions as
well. Do not hesitate to mail me if you have comments, questions or suggestions about this document. I would
also like to hear from people who have experience using Linux together with NetBSD or OpenBSD.
1.
What is FreeBSD?
2.
The FreeBSD way of labelling hard drives
·
2.2 Drive and partition labelling in Linux and FreeBSD
2.1 FreeBSD ``slices'' and ``partitions''
·
3.
Sharing swap space between Linux and FreeBSD
·
3.2 Installing FreeBSD
3.1 Installing and preparing Linux
·
3.3 Setting up the FreeBSD swap partition in Linux
·
4.
Booting FreeBSD using LILO
5.
Mounting filesystems
·
5.2 Mounting ext2fs filesystems under FreeBSD
5.1 Mounting UFS filesystems under Linux
·
6.
Running foreign binaries
·
6.2 Running Linux binaries under FreeBSD
6.1 Running FreeBSD binaries under Linux
·
7.
Information resources
The Linux+FreeBSD mini−HOWTO
1
The Linux+FreeBSD mini−HOWTO
8.
Credits and legal stuff
·
8.1 Legal stuff
1.
What is FreeBSD?
FreeBSD
is a free Unix−like operating system much like Linux. The main difference is that, while the Linux
kernel has been written from scratch, FreeBSD is based on the freely redistributable parts of 4.4BSD
(Berkeley Software Distribution) known as 4.4BSD−lite. This fact might lead some people to suggest that
FreeBSD is closer to being ``real'' UNIX® than Linux. FreeBSD runs only on the Intel PC platform (i386 and
higher); ports to the DEC Alpha and Sun Sparc platforms are being worked on at the moment.
NetBSD
and
OpenBSD
are similar to FreeBSD, and both run on several platforms. Hardware requirements for all these
*BSD systems are similar to those for Linux.
The development of FreeBSD is managed in a different way than the Linux development. A core team of
developers serve as arbitrators and provide leadership for the project. Big changes are discussed in advance
on the mailing lists. The FreeBSD project has two development trees (just like Linux):
``−CURRENT''
and
``−STABLE''
. The ``−CURRENT'' development tree is where the development of new features happens.
Development to the ``−STABLE'' tree are restricted to bug fixes and some thoroughly tested new features.
FreeBSD can be used and (re−)distributed freely just as Linux. Most parts of the system are released under
the BSD copyright; the rest is under the GNU GPL or other
open−source
licences.
2.
The FreeBSD way of labelling hard drives
Linux and FreeBSD label hard drives and partitions after two differents schemes. This section explains the
main differences between the two schemes. In fact the FreeBSD labelling scheme is an adaption of the
traditional BSD labelling style ported to live within the PC's fdisk partitions. Thus it is very similar to other
BSD−based Unix systems such as NetBSD, OpenBSD, Ultrix, Digital Unix, SunOS, and Solaris.
2.1 FreeBSD ``slices'' and ``partitions''
FreeBSD needs one of the four entries in the partition table on your PC's hard drive. This primary partition is
called a
``slice''
in FreeBSD terminology. It then uses the
disklabel
program to make up to eight
partitions in this primary partition. These logical partitions are called
``partitions''
in FreeBSD terminology.
This concept is similar to the way Linux (and DOS) handles logical partitions in an extended partition. You
cannot install FreeBSD in an extended partition made by Linux (or DOS). Note that the Linux
fdisk
program doesn't display the BSD partitions in a FreeBSD slice from the main menu, but it can
display BSD disklabel information if you give the command `b'. The output is something like this
(
/dev/hda4
is the FreeBSD slice):
bash# fdisk /dev/hda
Command (m for help): p
Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
8. Credits and legal stuff
2
The Linux+FreeBSD mini−HOWTO
Device Boot Begin Start End Blocks Id System
/dev/hda1 * 1 1 27 54400+ 83 Linux native
/dev/hda2 28 28 55 56448 83 Linux native
/dev/hda3 56 56 403 701568 83 Linux native
/dev/hda4 404 404 621 439488 a5 BSD/386
Command (m for help): b
Reading disklabel of /dev/hda4 at sector 1624897.
BSD disklabel command (m for help): p
8 partitions:
# size offset fstype [fsize bsize cpg]
a: 64512 1624896 4.2BSD 0 0 0 # (Cyl. 404 − 419)
b: 104832 1689408 swap # (Cyl. 420 − 445)
c: 878976 1624896 unused 0 0 # (Cyl. 404 − 621)
e: 64512 1794240 4.2BSD 0 0 0 # (Cyl. 446 − 461)
f: 645120 1858752 4.2BSD 0 0 0 # (Cyl. 462 − 621)
BSD disklabel command (m for help): q
bash#
The letters `a'...`f' in the first column are the same labels as shown below in the example for a FreeBSD slice.
There are three special partitions in BSD parlace. The letter `a' designates the root partition, `b' designates the
swap partition, while `c' designates the whole slice. See the FreeBSD documentation for more information on
the ``standard'' way of assigning these letters to different partition types.
2.2 Drive and partition labelling in Linux and FreeBSD
The hard drives are labelled in the following way in Linux and FreeBSD:
Linux FreeBSD
First IDE drive /dev/hda /dev/wd0
Second IDE drive /dev/hdb /dev/wd1
First SCSI drive /dev/sda /dev/sd0
Second SCSI drive /dev/sdb /dev/sd1
The partitions (FreeBSD slices) on an IDE drive are labelled in the following way (
/dev/hda
is used as an
example):
Linux FreeBSD
First primary partition /dev/hda1 /dev/wd0s1
Second primary partition /dev/hda2 /dev/wd0s2
Third primary partition /dev/hda3 /dev/wd0s3
Fourth primary partition /dev/hda4 /dev/wd0s4
The partitions in my FreeBSD slice is labelled in the following way. It is the labelling you get by default. It is
possible to change the labelling if you do a custom installation of FreeBSD (
/dev/hda4
is the FreeBSD
slice in the example):
Linux label FreeBSD label FreeBSD mount point
/dev/hda5 /dev/wd0s4a /
/dev/hda6 /dev/wd0s4b swap
/dev/hda7 /dev/wd0s4e /var
/dev/hda8 /dev/wd0s4f /usr
2.2 Drive and partition labelling in Linux and FreeBSD
3
Plik z chomika:
megaskrypty
Inne pliki z tego folderu:
3-Button-Mouse(1).pdf
(58 KB)
XWindow-Overview-HOWTO(1).pdf
(30 KB)
Xterm-Title(1).pdf
(39 KB)
Xterminals(1).pdf
(30 KB)
Xinerama-HOWTO(1).pdf
(33 KB)
Inne foldery tego chomika:
Programowanie
Zgłoś jeśli
naruszono regulamin