打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Dual-boot Linux/WindowsNT installation
--------------------------------------------------------------------------------ITS InfoSheet 147:Dual-boot Linux/WindowsNT installation--------------------------------------------------------------------------------This document is intended to assist Local IT Experts (LITEs) and Lan Administrators (LANADs) with setting up a dual-boot PC which can run both the WindowsNT and Linux operating systems. This document outlines procedures for installing and configuring both Windows NT and Linux, and for setting up for a dual-boot. (parts paraphrased from NT OS Loader + Linux mini-HOWTO)--------------------------------------------------------------------------------Contents Introduction Installing/configuring Windows NT Installing Linux Setting up for dual-boot from a single disc Setting up for dual-boot from multiple discs Gotchas --------------------------------------------------------------------------------IntroductionMany people in the University today have requirements to access both Desktop applications such as Word or Excel and also to be able to run Unix applications as part of their research work. Traditionally this meant that people had both a PC and a workstation. With the increase in performance of PCs it is now possible to obtain PCs with performance equal to that of a workstation for a much lower cost. Public domain versions of Unix are available for PCs (Linux, FreeBSD) and many people have considered buying a single PC to serve all their computing needs. Since many desktop applications will not work under Linux (some applications such as WordPerfect are available) this requires that we install both Windows and Unix on the same machine and have some method of switching between them. In this note we discuss installing both Windows NT and RedHat Linux on a single computer and allowing the user to choose at boot time which system to run. If you are using a single disc then it is recommended that Windows NT should be installed first.If you are using multile discs then you should install Linux on the first disc. --------------------------------------------------------------------------------Installing/configuring Windows NTDisc SpaceDepending on your supplier or environment you may already have Windows NT installed. If so it probably has all the space on your disc allocated leaving no room for Linux. If you have a second disc you could install Linux there otherwise you will have to make space. (You probably want to allocate at least 1 GByte to each system so if you have an older PC you may decide you need an extra disc anyway). If you have sufficient space then we can proceed. If you have only a single disc then there are two main options. The traditional way - backup your current discs, use DOS (Win95) fdisk to delete the current partitions and make new ones, and then restore your data onto the now smaller partitions (logical discs). Provided your backup mechanism is secure this way is guaranteed to work. Buy a copy of Partition Magic and use it to resize the partitions in situ. This is by far the easiest method. Before going ahead you may wish to consider your options if you have more than the minimum space available. Linux doesn't currently support NTFS (it should do so real soon now) so if you anticipate exchanging a lot of files or large files between WinNT and Linux then a FAT partition may be desirable. (This can be used as a simple file store by either system providing that in Linux you remember to use DOS style filenames (8.3)). You may at this time choose to also create partitions for your subsequent Linux installation. Remember that you can only have a maximum of 7 partitions per disc (3 primary plus one extended primary partition comprising up to 4 logical partitions) If you need to install WindowsFirst read the above. You will need to use fdisk to set up your disc(s) appropriately. Then do the install - you probably have boot floppies and a CD. The CD should be bootable and if you enter the BIOS (by hitting at powerup) you should be able to set the boot-device to the CD which is a lot faster than the floppies.Answer the install questions.(We will be using the NT Loader as the main loader so it can just be allowed to install itself in the Master Boot Record (MBR))Load any drivers you have discs for.Apply Service Pack 3!!!Many new cards (such as AGP video cards) will not work until you do.Note: Service Pack 3 needs to be re-applied after any driver changes!Make a repair disc! --------------------------------------------------------------------------------Installing LinuxBoot Linux from the floppies. If you have used the DOS fdisk already to create the partitions you should just be able to allocate them using the default /disc manager/. If you have to create them at this point it is probably better to use Linux's fdisk. Note: both of Linuxes disc managers think that an NTFS partition is a HPFS partition - this is normal. If the installation procedure suggests that you can mount the HPFS partition: Ignore it.When you come to the Linux Loader (lilo) section of the installation on single disc systems you must specify your Linux root partition as your boot-device as the NT Loader already owns the Master Boot Record (MBR).On systems where Windows NT and Linux are on seperate discs you can allow lilo to install itself in the MBR.When the installation has built a new kernel run lilo to create the boot sector. You can check the kernel by booting from floppy (you can't boot from the hard-disc yet if you're using a single disc).Your machine should still boot into Windows at this stage - if not you have a problem. You may be able to restore your boot sector from your repair disc, if not you will have to re-install Windows NT. --------------------------------------------------------------------------------Setting up for dual-boot from a single discNote: there is a program bootpart which can do the following but is restricted to discs less than 4 GByte. What has to be done is to copy the boot-sector, written by lilo from the Linux root partition to a file on the NTFS partition that the NT Loader can then transfer to. On Linux First get the boot-sector using dd. If your Linux root partition is hda2 then do the following: # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1Now copy this to a DOS formatted disc (floppy or hard). e.g. to copy to a floppy: # mount -t msdos /dev/fd0 /mnt # cp /bootsect.lnx /mnt # umount /mntOn Windows Copy the file from the floppy (or hard disc) to C:\bootsect.lnx C:\boot.ini is the configuration file for the NT Loader. To edit it we need to remove the read-only and system attributes: C:\ attrib -s -r c:\boot.iniNow edit the file by adding an extra line at the end. e.g.: [boot loader] timeout=30 default=multi(0)disc(0)rdisc(0)partition(1)\WINNT [operating systems] multi(0)disc(0)rdisc(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disc(0)rdisc(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA Mode] /b" C:\BOOTSECT.LNX="Linux"Finally restore the boot.ini attributes: C:\ attrib +s +r c:\boot.iniAfter a shutdown and restart you should see the following OS Loader V4.00 Please select the operating system to start: Windows NT Workstation Version 4.00 Windows NT Workstation Version 4.00 [VGA Mode] LinuxIf you select Linux you should see LILO Loading zImageand now it's going. --------------------------------------------------------------------------------Setting up for dual-boot from multiple discsWhen setting up dual-boot on a multiple disc system things are a lot easier as you can allow both systems to install their loaders in the MBR of their respective discs. Assuming that Linux is on the first disc then in the lilo configuration file (/boot/lilo.conf) add other=/dev/hdb label=NT table=/dev/hdb loader=/boot/any_d.bThis assumes that you have IDE drives, if you have SCSI drives then the second drive will probably be /dev/sdb. Note: lilo doesn't display its options by default - you must press the key to see the options and then type in your choice if you don't want the default (Linux usually). There is a comprehensive technote on this available from CERN pc_install --------------------------------------------------------------------------------GotchasService Pack 3: this must be re-installed any-time you change or install drivers on NT. Copying the boot-sector. Note that on single disc systems running lilo doesn't have any effect until you re-copy the boot-sector to NT - the copy in the Linux root partition isn't used. If you accidently allow lilo to write into the MBR on single disc systems you will probably need to start again from the beginning - the NT Installer will not understand the disc partition table. The NT Installer doesn't appear to be able to start with a corrupt disc - you have to use either DOS or Linux fdisk to partition the disc. Some cards (e.g. 3c905b) are initialized in such a way by NT that they can't be used by Linux after a warm reboot. (i.e. non power-off.) Fixes may become available on a per-card basis as people re-write the Linux drivers to clean-up after NT. If you have such a card you will have to power-cycle the PC when booting Linux after NT has been running. If you try this with Windows 95 (possible) you must install it first! The Windows 95 Installer always rewrites the partition table thus making anything else inaccessable. IP registration. It is usual in the University for Windows NT systems to be configured to obtain their IP address from a server (DHCP) while Unix (incl. Linux) systems are manually configured. If you choose the same name for your system in NT and Linux then they can share the same IP address and it is probably best to manually configure both (to prevent any possible problems with the DHCP server not noticing a re-boot). The Linux Xconfigurator sets the wrong server if you have a Virge/DX2 card. If you have problems with X-server installation on Linux then e-mail the Research Support Officer at ITS. --------------------------------------------------------------------------------(c) Information Technology Services, The University of Melbourne, 1998This work is copyright. Other than for the purposes of and subject to the conditions prescribed under the Copyright Act, no part of it may in any form or by any means (electronic, mechanical, microcopying, photocopying, recording or otherwise) be reproduced, stored in a retrieval system or transmitted without prior written permission.--------------------------------------------------------------------------------Created: 26 June 1998Last modified: November 16, 1998 09:54 AMAuthorised by: Director, ITSAccess: University OnlyCopyright ?1998 The University of Melbourne.--------------------------------------------------------------------------------Maintainer: Dirk van der Knijff, Supercomputing and Research Support, Information Technology Services.Email: dirk@its.unimelb.edu.au
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
如何配置linux与win2000/NT 双重引导
在一台计算机上 让Windows和Linux完美共存
系统引导过程及硬盘结构和分区出现错误后解决办法--写我情真
Linux操作系统下如何删除Windows分区
GRUB入门
充分利用主分区安装多系统
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服