1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Chapter-4-Shared OS Installation docx

7 232 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Shared os installation
Trường học FreeBSD Documentation Project
Chuyên ngành Operating Systems
Thể loại Tài liệu
Năm xuất bản 2003
Thành phố Unknown
Định dạng
Số trang 7
Dung lượng 74,81 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Shared OS Installation In this chapter: • Separate disks • Shar ing a disk • Shar ing with Linux or another BSD • Repar titioning with FIPS In this chapter: • Separate disks • Shar ing a

Trang 1

Shared OS Installation

In this chapter:

• Separate disks

• Shar ing a disk

• Shar ing with Linux or

another BSD

• Repar titioning with

FIPS

In this chapter:

• Separate disks

• Shar ing a disk

• Shar ing with Linux or

another BSD

• Repar titioning with

FIPS

In many cases, you won’t want to install FreeBSD on the system by itself: you may need

to use other operating systems as well In this chapter, we’ll look at what you need to do

to prepare for such an installation If you’re only running FreeBSD on the machine, you

don’t need to read this chapter, and you can move on to Chapter 5, Installing FreeBSD.

Before you start the installation, read this chapter carefully It’s easy to make a mistake, and one of the most frequent results

of mistakes is the total loss of all data on the hard disk.

Currently, only the ia32 (Intel) port of FreeBSD is capable of sharing with other operating systems We’ll concentrate on how to share your system with Microsoft, because that’s both the most difficult and the most common, but most of this chapter applies to other operating systems as well You may want to refer to the discussion of Microsoft and FreeBSD disk layouts on page 34

Separate disks

The first question is: do you need to share a disk between FreeBSD and the other

operating system? It’s much easier if you don’t hav e to In this section, we’ll look at

what you need to do

Many operating systems will only boot from the first disk identified by the BIOS, usually

Trang 2

easiest thing is to install FreeBSD on the entire second disk BIOS restrictions usually make it difficult to boot from any but the first two disks

In this case, you don’t really need to do anything special, although it’s always a good idea

to back up your data first Install FreeBSD on the second disk, and choose the Boot

Manager option in the partition editor (page 64) This will then give you the choice of

booting from the first or second disk Note that you should not change the order of disks after such an installation; if you do, the system will not be able to find its file systems after boot

Sharing a disk

If you intend to share a disk between FreeBSD and another operating system, the first question is: is there enough space on the disk for FreeBSD? How much you need depends on what you want to do with FreeBSD, of course, but for the sake of example we’ll take 120 MB as an absolute minimum In the following section, we’ll consider what to do if you need to change your partitions If you already have enough space for a FreeBSD partition (for example, if you have just installed Microsoft specifically for sharing with FreeBSD, and thus have not filled up the disk), continue reading on page 66

Sharing with Linux or another BSD

Sharing with other free operating systems is relatively simple You still need to have space for FreeBSD, of course, and unlike Microsoft, there are no tools for shrinking Linux or BSD file systems: you’ll have to remove them or recreate them You can find some information about sharing with Linux in the mini-Howto at

http://www.linux.org/docs/ldp/howto/mini/Linux+FreeBSD.html.

NetBSD and OpenBSD file systems and slices are very similar to their FreeBSD counterparts They’re not identical, however, and you may find that one of the systems recognizes the partition of another system and complains about it because it’s not quite

right For example, NetBSD has a d partition that can go outside the boundary of the

slice FreeBSD does not allow this, so you get a harmless error message

Repar titioning with FIPS

Typically, if you’ve been running Microsoft on your machine, it will occupy the entire disk If you need all this space, of course, there’s no way to install another operating system as well Frequently, though, you’ll find that you have enough free space in the partition Unfortunately, that’s not where you want it: you want the space in a new partition There are a number of ways to do so:

Trang 3

53 Chapter 4: Shared OS Installation

FreeBSD users try to avoid it

is a public domain utility, and it is included on the FreeBSD CD-ROM

included on the CD-ROMs, and we won’t discuss it further

In the rest of the section, we’ll look at how to shrink a partition with FIPS If you do it

with PartitionMagic, the details are different, but the principles are the same In particular:

Before repartitioning your disk, make a backup You can shoot yourself in the foot with this method, and the result will almost invariably be loss of data.

If you’ve been running Microsoft on your system for any length of time, the data in the partition will be spread all around the partition If you just truncate the partition, you’ll lose a lot of data, so you first need to move all the data to the beginning of the partition

Do this with the Microsoft defragmentation utility Before proceeding, consider a few gotchas:

but also anything you will want to put in it in the future If you make it exactly the current size of the data, it will effectively be full, and you won’t be able to write anything to it

to convert it into a FreeBSD partition

FIPS may result in configuration problems with your Microsoft machine Since it

adds a partition, any automatically assigned partitions that follow will have a different drive letter In particular, this could mean that your CD-ROM drive will ‘‘move.’’ After you delete the second Microsoft partition and change it into a FreeBSD partition, it will ‘‘move’’ back again

For further information, read the FIPS documentation in /cdrom/tools/fips.doc In

particular, note these limitations:

FIPS works only with Hard Disk BIOSes that use interrupt0x13for low-level hard disk access This is generally not a problem

FIPS does not split partitions with 12 bit FATs, which were used by older versions of

Microsoft These are less than 10 MB in size and thus too small to be worth splitting

FIPS splits only Microsoft partitions The partition table and boot sector must

conform to the MS-DOS 3.0+ or Windows 95 conventions This is marked by the system indicator byte in the partition table, which must have the value 4 (16 bit sector

number) or 6 (32 bit sector number) In particular, it will not split Linux or Windows

Trang 4

FIPS does not yet work on extended Microsoft partitions.

FIPS needs a free partition entry It will not work if you already have four partitions.

FIPS will not reduce the original partition to a size of less than 4085 clusters,

because this would involve rewriting the 16 bit FAT to a 12 bit FAT

Repar titioning—an example

In this section, we’ll go through the mechanics of repartitioning a disk We’ll start with a disk containing a single, complete Microsoft system

First, run the Microsoft error check utility on the partition you want to split Make sure

no ‘‘dead’’ clusters remain on the disk

Next, prepare a bootable floppy When you start FIPS, you will be given the opportunity

while using FIPS, you can restore the original configuration by booting from the floppy and running RESTORRB.

If you use FIPS more than once (this is normally not necessary, but it might happen), your floppy will contain more than one ROOTBOOT file RESTORRB lets you choose which configuration file to restore The file RESTORRB.000 contains your original configuration Try not to confuse

the versions.

Before starting FIPS you must defragment your disk to ensure that the space to be used for the new partition is free If you’re using programs like IMAGE or MIRROR, note that

they store a hidden system file with a pointer to your mirror files in the last sector of the

hard disk You must delete this file before using FIPS It will be recreated the next time you run MIRROR To delete it, in the root directory enter:

Then delete the file

If FIPS does not offer as much disk space for creation of the new partition as you expect,

this may mean that:

partition smaller or deleting some of the data If you delete data, you must

defragment and run FIPS again.

the defragmentation program Make sure which program they belong to If a file is a swap file of some program (for example NDOS) it is possible that it can be safely deleted (and will be recreated automatically later when the need arises) See your manual for details

Trang 5

55 Chapter 4: Shared OS Installation

If the file belongs to some sort of copy protection, you must uninstall the program to which it belongs and reinstall it after repartitioning

If you are running early versions of MS-DOS (before 5.0), or another operating system, such OS/2, or you are using pro-grams like Stacker, SuperStor, or Doublespace, read the FIPS documentation for other possible problems.

Running FIPS

After defragmenting your Microsoft partition, you can run FIPS:

a lot of copyright information omitted

Which Drive (1=0x80/2=0x81)?

The message Which Drive may seem confusing It refers to BIOS internal numbering.

Don’t worry about it: if you want to partition the first physical drive in the system, (C:),

If you start FIPS under Windows, it will complain and tell you to boot from a floppy

disk It won’t stop you from continuing, but it is a Bad Idea to do so

Next, FIPS reads the root sector of the hard disk and displays the partition table:

Part.|bootable|Head Cyl Sector|System|Head Cyl Sector| Sector |Sectors | MB

This shows that only the first partition is occupied, that it is bootable, and that it occupies the whole disk (19571 MB, from Cylinder 0, Head 1, Sector 1 to Cylinder 2047, Head

238, Sector 63) It also claims that this makes 40083057 sectors It doesn’t: the cylinder

number has been truncated, and FIPS complains about a partition table inconsistency,

which it fixes After this, we have:

Part.|bootable|Head Cyl Sector|System|Head Cyl Sector| Sector |Sectors | MB

Don’t worry about the ‘‘bootable’’ flag here—we’ll deal with that in the FreeBSD

installation First, FIPS does some error checking and then reads and displays the boot

Trang 6

Checking boot sector OK

Bytes per sector: 512

Sectors per cluster: 32

Reserved sectors: 32

Number of FATs: 2

Number of rootdirectory entries: 0

Number of sectors (short): 0

Media descriptor byte: f8h

Sectors per FAT: 9784

Sectors per track: 63

Drive heads: 240

Hidden sectors: 63

Number of sectors (long): 40083057

Physical drive number: 80h

Signature: 29h

After further checking, FIPS asks you if you want to make a backup floppy Enter your

Enter start cylinder for new partition (35 - 2650):

Use the cursor keys to choose the cylinder, <enter> to continue

Use the Cursor Left and Cursor Right keys to adjust the cylinder number at which the new partition starts You can also use the keys Cursor Up and Cursor Down to change

in steps of ten cylinders FIPS updates the bottom line of the display to show the new values selected Initially, FIPS chooses the smallest possible Microsoft partition, so

initially you can only increase the size of the old partition (with the Cursor Right key) When you’re happy with the sizes, press Enter to move on to the next step.

Be very sure you’re happy before you continue If you make the first partition too small, there is no way to make it larger again.

On the other hand, if you make it too large, you can split it again and then use fdisk or MS-DOS FDISK to remove the superfluous partitions.

In this example, we choose equal-sized partitions:

(pressed Enter)

Part.|bootable|Head Cyl Sector|System|Head Cyl Sector| Sector |Sectors | MB

Do you want to continue or reedit the partition table (c/r)? c

To ensure that the partition is recognized, reboot immediately Make sure to disable all

programs that write to your disk in CONFIG.SYS and AUTOEXEC.BAT before

rebooting It might be easier to to rename the files or to boot from floppy Be particularly

careful to disable programs like MIRROR and IMAGE, which might get confused if the

Trang 7

57 Chapter 4: Shared OS Installation

partitioning is not to their liking After rebooting, use CHKDSK or Norton Disk Doctor

to make sure the first partition is OK If you don’t find any errors, you may now reboot

with your normal CONFIG.SYS and AUTOEXEC.BAT Start some programs and make

sure you can still read your data

After that, you have two valid Microsoft partitions on your disk We’ll look at what to do with them in the next chapter The specific differences from a dedicated install are on page 66, but you’ll need to start from the beginning of the chapter to do the install

Ngày đăng: 24/01/2014, 14:20

TỪ KHÓA LIÊN QUAN