Transcript File

INFT 13-312 / 73-312
COMPUTER ORGANIZATION &
OPERATING SYSTEMS
Presented by:
Erica Santosaputri-- 12606283
YiQian Wang--12621927
(Jackie) Qi Zhang --11090869
Why dual-systems
But Linux is faster, cheaper, more efficient, more
stable
Some application software are not available
– For Linux (eg. Quicken , TurboTax , Adobe Acrobat,
Atomica )
– For Windows
Window’s problems (next slide)
Problems with Windows OS
Most factory-installed Windows installations take up all
the space on your hard drive, leaving no room for
installing Linux. Therefore, we must clear some space
where Linux can be installed.
Linux needs to have partitions of its own, but Windows
does not have the ability to resize partitions. Ordinarily,
this would mean you would have to delete your existing
partition to make room on the drive and create partitions
of smaller sizes and reinstall.
How to install dual-OS systems
Install two hard disks, one for Windows, one for
Linux.
Partition one hard disk, so it has multi operating
system upon it, which can be DOS, Win95,
Win98, Win NT, or Win2K with Linux.
In Two Hard Disks
One hard disk install the dos/windows, another
one install Linux.
When turn on the computer, go to CMOS to
choose which hard disk (operating system)
should be used to boot.
Partition in One Hard Disk
Why partition---Different file system.
The Linux use native partition and swap
partition. But Linux can not use either FAT or
NTFS yet.
Linux and other operating system must be
installed in different partition.
How to Partition One Hard Disk
Use Fdisk to divide a hard disk, which does not have
any operating system.
A hard disk with windows system already, use FIPS to
‘RESIZE’ the hard disk.(defragment the hard disk before
use FIPS, back up system recommended)
A hard disk with Linux system already. Boot Linux by
Bootdisk, then re-run Lilo to overwrite the windows boot
program.
About FIPS
Linux distributions come with a special tool to
allow you to resize or divide hard drive partitions.
FIPS, the First (non-destructive) Interactive
Partition Splitter, normally found on your Linux
CD in a directory called /dosutils.
You will also need a blank, formatted floppy disk
to use as a boot disk.
Installation
Linux First
Windows First
Installing Linux First
A hard disk with Linux system already. Boot
Linux by Bootdisk, then re-run Lilo to overwrite
the windows boot program
Installing Windows first
Install the windows system in one partition
first(except the last partition).
Linux system should install in the last partition.
Boot with windows system, then the Linux
partition can not be seen.
Installing Windows first(Con’t)
Make a Bootdisk when installing Linux.
When installed the Linux, the system will ask
user choose the Lilo installation.
Installing Windows first(con’t)
Master Boot Record.
First Sector of Boot Partition.
Installing Windows first(con’t)
The ‘master boot record’ will go to Lilo.
The user can choose operating system by use
the tab.
Installing Windows first(con’t)
The ‘First Sector of Boot Partition’ will use the
Bootdisk to boot computer into Linux.
Normally the computer will boot with ‘c:’.
The WinNT/Win2K OS loader can be used to
choose different OS.(MS-DOS, Window9x).
How to Dual Boot?
Using LILO
Using OS loader
Using a third software as emulator or
communicator
Boot with Lilo
LInux LOader
Most Linux can detect the windows partition.
However, sometimes need to edit the
/ect/lilo.conf as root user
Edit /ect/lilo.conf
boot=/dev/hda root=/dev/hda2
install=/boot/boot.b
map=/boot/map
image=/boot/vmlinuz
label=
Linux
read-only
other=/dev/hda1
label=wind
ows
table=/dev/hda
Edit /ect/lilo.conf(con’t)
The section labeled "other" may need
to add by hand.
/dev/hda1 is the first partition on an
IDE disk (C:, in Windows). The second
partition (D:, in Linux) would be
/dev/hda2
Boot with Lilo(con’t)
LILO accomplishes start system by
reading a configuration file (/etc/lilo.conf)
After modifications to lilo.conf, must
run a program (/sbin/lilo) to
actually write those changes to the boot
sector of the hard drive.
Boot with Lilo(con’t)
If the windows system is win95 or win98 it
should work.
If the windows system is winNT or win2K, the
change should make in the windows side.
Boot with OS loader
The NT OS loader likes to have the boot sector
from the other operating systems available as a
file. It reads this file and starts the operating
system selected, i.e. either Windows NT in
different Modes or any other OS.
Boot with OS loader(con’t)
In the win NT side, edit the file c:\\boot.ini.
Remove the read-only-attribute before modify
with following:
C:\attrib -s -r c:\boot.ini
Add C:\BOOTSECT.LNX="Linux" in the file.
Boot with OS loader(con’t)
Restore the attributes after you have saved
boot.ini with:
C:\attrib +s +r c:\boot.ini
Restart
Boot with OS loader(con’t)
What you can see now:
OS Loader V4.00
Please select the operating system to
start:
Windows NT Workstation Version 4.0
Windows NT Workstation Version 4.0 [VGA
mode] Linux
Select Linux and see
LILO loading zImage ....
Third software
Wine
Win4Lin
VMware
Bochs
Third software (con’t)
Partition magic
Boot magic
GRUB
Boot Part
Disk Drake
Wine
Feature
–
–
–
–
It is not an emulator
one of the oldest examples of such software
Open source package
Implements the Windows 3.1 and Win32 APIs
directly under Linux and X
Wine
Advantages
– Cost effective
– Easy to install
– Can run either with or without partition
Wine
Disadvantages:
– Supporting not many application software
– Cannot be run on a kernel
– an unhandled exception and hung.
Wine
Hardware Requirements
– requires an Intel or compatible processor
Wine
When to use
– Just need to run Windows programs occasionally
Wine
Installation
– http://www.la-sorciere.de/wine/index.html
Win4Lin
Features
– Version 3.0
– running Windows applications on Linux
– Installation of it actually installs
Windows for you
Win4Lin
Advantages
– Relatively fast installation process
– Cost efficiency
Win4Lin
Disadvantages
– Complicate installation
Win4Lin
When to use
– Need to run a large range of Windows programs
– Need a more faithful Windows environment but can
live with Windows 9x
– Do not need to use Windows NT or Windows 2000
Win4Lin
Hardware & Software Requirements
– Intel® Pentium®-class or compatible processor
recommended
– 32MB of memory (64 MB recommended)
CD-ROM drive
– Floppy drive (if your Windows installation CD is
not bootable)
– 20 MB disk space for Win4Lin
– 40 MB - 135 MB additional disk space for
Windows system files Additional disk space
required for applications.
– Sound cards that are Open Sound System (OSS)
compatible
Win4Lin
Software Requirements:
– Linux kernel 2.2.X or 2.4.X
– Microsoft Windows 95/98 (one license per user)
– Microsoft Windows 95/98 full installation CD and
boot floppy disk if CD is not bootable
– X Window System (16-bit color recommended)
Root user access
Win4Lin
Supporting Linux
– Red Hat® Linux - 6.0, 6.1, 6.2, 7.0, 7.1
CalderaTM OpenLinux - 2.3
Caldera eDesktop - 2.4, 3.1
SuSETM Linux - 6.4, 7.0, 7.1
Linux-MandrakeTM - 7.1, 7.2, 8.0
Supporting Windows
– Microsoft® Windows 95/98
Win4Lin
Installation
– Install the custom kernel
– Install Win4Lin
• run “install-win4lin.sh”
• Install RPM (perform that step as root)
– Install Windows on your system
• using the “winsetup” command (perform that step
as root)
• Set up a personal copy of Windows 9x again,
using the winsetup command
VMware
Features
– Provides a very complete virtual
machine environment that emulates
an Intel x86-based computer,
– Runs under either Linux or Windows
NT as the host operating system
VMware
When to use
– Need to run Windows NT or Windows 2000
– Need Windows applications that require Microsoft
Windows Networking
VMware
Advantages
– VMware provides much extra functionality
VMware
Disadvantages
– Expensive
VMware
Hardware Requirements
– Standard x86-based host machine
– 266MHz or faster processor that supports the
Pentium instruction set, include
Intel: Pentium Pro, Celeron, Pentium II, Pentium III
AMD: K6-2, K6-III, Athlon (K7)
– Multiprocessor systems supported
– RAM memory Minimum: 96MB; recommended:
128MB
Video adapter supported by the XFree86
Server (to take advantage of the Workstation
full-screen option)
VMware
Special requirement when having Windows OS
first
– Greater than 256 color (8 bit depth) display
adapter required
– Optional Ethernet adapter (required for
bridged mode networking)
VMware (for Linux)
Installation (Con’t)
1. Install the Workstation software and license.
2. Configure a new virtual machine using the
Configuration Wizard.
3. Install a guest operating system in the new
virtual machine.
4. Install the VMware Tools package inside your
virtual machine for enhanced performance.
5. Start using your virtual machine.
VMware (for Windows NT and 2000)
Installation
1. Install the Workstation software and license.
2. Configure a new virtual machine using the
Configuration Wizard.
3. Install a guest operating system in the new
virtual machine.
4. Install the VMware Tools package inside your
virtual machine for enhanced performance.
5. Start using your virtual machine.
Bochs
Features
– Bochs 1.2.1 (released on June 12, 2001)
– dual hard drive support, multiple processor
emulation (SMP), and VNC remote viewer
mode.
– a highly portable open source x86 PC
emulator. It includes emulation of the Intel
x86 CPU, common IO devices, and a
custom BIOS
Bochs
When to use
– Need to run Windows on a platform such as Alpha,
Power PC, or Sparc
Bochs
Advantages
– High development potential
• MandrakeSoft has bought Bochs, and
committed it to open source (LGPL) in
order to help the development of the
Plex86 project (an open source PC
virtualization software program which will
allow users to run multiple operating
systems concurrently on the same
machine)
Bochs
Disadvantages
– Bug report
• http://bochs.sourceforge.net/cgibin/topper.pl?name=Report+a+Bug&url=http://sourceforg
e.net/tracker/qmrkgroup_ideq12580ampatideq112580
Bochs
Hardware Requirements
– 400MHz processor
– At least 64MB of RAM
Bochs
Installation
– Boot
• # cd /usr/ports/emulators/bochs && make install clean
– Change to VGA fonts, If you have a recent FreeBSD
4.X source tree (after June 30, 2000), the font is
included with the source, and you just have to do the
following before running Bochs:
• % xset fp+ /usr/libdata/doscmd/fonts
Bochs
Installation (Con’t)
– If you don't have a source tree from after June 30,
2000, you'll have to do the following:
1. Fetch this file.
2. Run the following commands as root:
# uudecode cp437-8x16.pcf.gz.uu > cp4378x16.pcf.gz # cp cp437-8x16.pcf.gz
/usr/X11R6/lib/X11/fonts/misc/ # mkfontdir
/usr/X11R6/lib/X11/fonts/misc/ # xset fp rehash
Bochs
Configuration
– create a "virtual hard drive" image file. The image
size depends on the CHS number (Cylinders,
Heads, Sectors) of the virtual hard drive.
– configure ~/.bochsrc file
– More details:
• http://www.freebsdzine.org/200104/bochs.php3
Partition Magic
Partition Magic is a hard-drive partitioning software for
desktop systems, allows you to safely and easily create,
resize and merge partitions on your hard drive without
destroying data. Partition Magic helps organize and
protect your data, run multiple operating systems,
convert file system types and fix partition table errors.
http://www.powerquest.com/partitionmagic/index.html
Why Partition Magic?
Safely manage multiple operating systems
Organize and protect the information on your hard drive
Includes easy step-by-step wizards to create
partitioning tasks
Ability to view pending operations before implementing
them
Flexibility to convert from one file system or partition
type to another
Includes support for FAT, FAT32, Linux ext 2, Linux
SWAP, NTFS, and HPFS partitions
Partition Magic
Advantages
–
–
–
–
–
–
Split Partitions
Undelete Partitions
Windows Tree and Multiple Disk View
Drag and Drop
Password Protected
Boot Disk Builder
System Requirements
Minimum Requirements
–
–
–
–
–
486DX Processor
16MB RAM
12MB Hard-Disk Free Space
Windows 3.1/95/98/NT 4.0 or DOS 5.0 or above OS
VGA Monitor
Recommended Requirements
– 586 or above Processor
– 32MB RAM (additional required for FAT32 support on hard drives
larger than 4 GB)
– 12MB Hard-Disk Free Space (8MB additional required for
BootMagic)
– Windows 3.1/95/98/ME/2000/NT 4.0 or DOS 5.0 or above OS
– Super-VGA Monitor
– Microsoft mouse (or compatible pointing device)
Boot Magic
Boot Magic is a software that enables you to
switch between multiple operating systems in
safe and easy way.
Boot Magic
Advantages
– Safely run multiple Operating Systems on the same
PC
– Graphical interface - Manage multiple operating
systems in a comfortable, easy-to-use environment
– Mouse and keyboard support - utilize either mouse
or keyboard operation for maximum flexibility
– Native DOS and Windows configuration - change
menu items and start up options for all your OSs
while in DOS, Windows 95/98 or NT
Boot Magic (con’t)
Advantages
– Integrated with partitioning software - combine
PartitionMagic for a complete hard-drive solution
– Hide/Unhide partitions - automatically hide partitions
not being used by the OS you select at boot time
– Enable/Disable boot mode - have the option of
automatically booting to default at start up
– Emergency bootable floppy - added security of an
emergency disk for hard-drive conflicts and crashes
Supported Operating Systems
Windows 95/98, NT3.51/4.0 (server and workstation)
Windows 3.x (must be installed with DOS 5 or later)
MS-DOS 5.0 or later
PC-DOS 6.1 or later
Open DOS
OS/2 3.0 or later
Linux
BeOS
Most other versions of DOS and PC-compatible OSs
PartitionMagic and BootMagic
Disadvantages
– It is not very well recommended to use
PartitionMagic and BootMagic for partition and boot
management in a Linux-Windows dual-boot system.
– Both softwares provide subsequent partition
management operation. However, after these
additional partition management operations, the
Linux boot no longer worked. That strongly suggests
that the partition management operations did
something that messed up the Linux boot.
GRUB
Enable you to boot all operating systems without
having to go through multiple menus.
GRUB can hide primary partitions so that the
other operating systems will not see it. You can
use 3 partitions to install Windows OS and Linux,
and the 4th partition is extended partition.
GRUB – How To
Preparing Boot Floppies
Installing Linux
Installing GRUB
Installing Windows 2000
Installing DOS
The final touch
Preparing Boot Floppies
You need 3 floppy disks. First one is DOS
bootable disk. Copy fdisk.exe and sys.exe onto
this disk. Use command:
– FORMAT /S A:
– COPY FDISK.EXE A:
– COPY SYS.EXE A:
Use your second floppy disk to make a Windows
98 emergency disk and third floppy for GRUB.
Installing Linux
Install Linux Mandrake 7.2 but you need to use
fdisk to partition your hard disk. Make sure you
know how much disk space will each of the OS
systems will take.
Sample of Partition Table
Device Boot Start
/dev/hda1
1
/dev/hda2
7
/dev/hda3
594
/dev/hda4
594
/dev/hda5
849
/dev/hda6 2124
/dev/hda7 2141
End Blocks
6
48163+
19
104422+
3737 25254180
848
2048256
2123 10241406
2140
136521
2523
3076416
Id
16
16
5
6
7
82
83
System
Hidden FAT16
Hidden FAT16
Extended
FAT16
HPFS/NTFS
Linux swap
Linux
What’s next?
First partition is for Windows 2000 (around 10MG) . This
partition contains the file necessary to boot NT such as
boot.ini, ntldr, ntdetect.com, etc... NT will reside in
partition 6 in my example. This partition is Hidden
FAT16.
The second partition is for DOS (around 100M). This is
FAT16 too.
Third partition is extended partition for the remaining of
your hard disk.
What’s next? (con’t)
Create a 2GB partition. This partitions is used to share
data between all operating systems. Make sure that all
the sum of all above partitions are less than 8GB. This
is a DOS limitation.
Next create your Windows 2000 partition, gave it 10G. If
you demand speed, make it HPFS/NTFS partition.
Next add your swap partition and Linux partition. Make
sure you do not have a separate partition for /boot.
Things look better in GRUB if you keep /boot in the root
partition.
What’s next? (con’t)
After you have installed linux go ahead and
format the fat16 partitions:
– mkdosfs /dev/hda1
– mkdosfs /dev/hda2
– mkdosfs /dev/hda5
Installing GRUB
Install GRUB on floppy not on hard disk because
Windows 2000 will overwrite it.
– grub-install '(fd0)‘
Create the menu.lst for GRUB. This file lives in
/boot/grub.
http://linux.com/howto/mini/Multiboot-with-GRUB-2.html#ss2.1
Installing Windows 2000
Initialize the first partition before installing Windows
2000. Insert the DOS startup disk and reboot your
computer. Once you get to the DOS prompt do the
followings:
– FDISK /MBR SYS C:
Install Windows 2000 as usual. At some point Windows
2000 will prompt you for the partition on which you want
to install. The partition you created with fdisk should
show up as damaged or unformatted partition.
Installing DOS
Insert the GRUB disk. When you see the menu
insert the DOS boot disk. Select partition 2
(floppy) from the menu. This will boot the floppy
disk and hide partition 1 and 3.
Run FDISK and check that the C: drive is
partition 2. Next install DOS:
– SYS C:
Final Touch
Test that everything is working from GRUB
You should be able to boot from all 3 operating
systems from the GRUB floppy disk.
If everything looks right you can go ahead and
install GRUB on your hard disk. From linux type:
– grub-install /dev/hda
Boot Part
Allow to add partitions in the Windows NT/2K/XP
Multi-boot menu.
Add partition on the menu. Can add OS/2 Multiboot, or Linux Partition (with LiLo) in the menu.
Have FAT16 primary partition as active partition
on first hard disk. This can be a small partition.
Boot Part Features (con’t)
BOOTPART creates a 512 bytes file which contains an
image of a boot sector that loads the boot sector of the
partition. This file is declared in C:\BOOT.INI (a text file
used by Windows NT boot menu). The boot sector
comes from FDFormat and WinImage.
Can easily add both MS-Dos 6.22 and Windows95 in
boot menu, support FAT32 and disk over 4GB.
Boot Part Installation
Windows2000 installs boot sector that launches
NTLDR and displays Windows NT boot menu.
BootPart can restore it.
Boot under MS-Dos then enter the command:
– BOOTPART WINNT BOOT:C:
If you want to remove Win2000 boot sector,
replace it with command:
– BOOTPART DOS622 BOOT:C:
Boot Part Installation (con’t)
For Linux, you must install Lilo at the beginning
of the Linux partition (as with OS/2 boot
manager) and then add the Linux partition with
BootPart:
When you install Linux or run liloconfig, select
"Superblock of the root linux partition" as
location of Lilo. In my sample, this adds the line
"boot=/dev/sdb4" on the file /etc/lilo.conf
Disk Drake
The purpose of the DiskDrake project is to make easier
the hard disk partitionning. It is graphical, simple and
powerful. Different skill levels will be available (newbie,
advanced user, expert).
It's written entirely in Perl and Perl/Gtk. It uses
resize_fat which is a perl rewrite of the work of Andrew
Clausen (libresize). DiskDrake is a project from
MandrakeSoft, the company behind the popular LinuxMandrake operating-system.
Disk Drake - Features
in expert you can precise if you want an primary
or an extended partition
for standalone use, the partition table can be
saved on a raw floppy
undo is on its way
moving partitions is on its way (still buggy!)
comestic changes
some bugs removed
Disk Drake – Usage
Create, delete and change type of partitions
Format partitions
Assign a mount point
Mount partitions
Resize fat partitions
Resize partitions (when not caring loosing its data)
Clear partition table
Auto allocation (usefull for install)
Write fstab
Disk Drake
Disk Drake
Reference
http://www.itworld.com/Net/4158/lw-10-legacy/
VMware
http://www.vmware.com
http://www.vmware.com/support/desktop/
http://www.twcny.rr.com/technofile/texts/tec1003
99.html
Win4Lin
http://www.netraverse.com
Reference
Wine
http://www.winehq.com
Wine HOWTO
http://www.la-sorciere.de/wine/index.html
Bochs
http://www.bochs.com
Reference
http://www.camlug.org.uk/members/richards/install_for_newcom
ers.html
http://yklinux.myrice.com/qita/zlk/1/01.htm
http://yklinux.myrice.com/qita/zlk/1/06.htm
http://member.netease.com/~con/minihowto/Linu
x+DOS+Win95.txt
Reference
http://linux.com/learn/newsitem.phtml?sid=60&ai
d=9166
http://www.linuxdoc.org/HOWTO/mini/Linux+NTLoader-2.html
http://www.linuxdoc.org/HOWTO/mini/Linux+NTLoader-3.html
Reference
http://www.linuxdoc.org/HOWTO/mini/Linux+NTLoader-5.html
http://www.linuxdoc.org/HOWTO/mini/Linux+NTLoader-6.html
http://www.linuxdoc.org/HOWTO/mini/Linux+NTLoader-7.html
References
http://www.icc3.com/ec/linux/linux8.html
http://www.mozillaquest.com/stories_01/DualBoot_PqM
agic-01/MQ-Mag_01_DualBoot_Story-01_01.html
http://www.linuxgazette.com/issue38/veselosky.html
http://classes.monterey.edu/CST/CST43401/world/DualBoot.html
http://www.google.com
http://www.askjeeves.com
http://linuxdoc.org/HOWTO/mini/Partition/intro.html