Difference between revisions of "Dual Booting/9.2"

From PC-BSD Wiki
Jump to: navigation, search
(Marked this version for translation)
(15 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
<!--T:1-->
 
<!--T:1-->
{{NavHeader|back=Using a Rolling Release |forward=Multiple Boot Environments}}</noinclude>
+
{{NavHeader|back=Using a Rolling Release |forward=Creating an Automated Installation with pc-sysinstall}}</noinclude>
  
 
<!--T:2-->
 
<!--T:2-->
Line 11: Line 11:
  
 
<!--T:4-->
 
<!--T:4-->
* a partition for each operating system. Many operating systems, including PC-BSD®, can only be installed into a primary partition. This means that you will need to use partitioning software as described in [[Partitioning the Hard Drive]].
+
* a partition for each operating system. Many operating systems, including PC-BSD®, can only be installed into a primary partition. This means that you will need to use partitioning software as described in {{local|link=Partitioning the Hard Drive}}.
  
 
<!--T:5-->
 
<!--T:5-->
Line 22: Line 22:
  
 
<!--T:8-->
 
<!--T:8-->
When installing PC-BSD® onto a computer that is to contain multiple operating systems, care must be taken to ''' ''select the correct partition'' ''' in the [[Disk Selection Screen | Disk Selection screen]] of the installation. On a system containing multiple partitions, each partition will be listed. Highlight the partition that you wish to install into and ''' ''make sure that you do not select a partition that already contains an operating system or data that you wish to keep.'' '''
+
When installing PC-BSD® onto a computer that is to contain multiple operating systems, care must be taken to ''' ''select the correct partition'' ''' in the {{local|link=Disk Selection Screen|Disk Selection screen}} of the installation. On a system containing multiple partitions, each partition will be listed. Highlight the partition that you wish to install into and ''' ''make sure that you do not select a partition that already contains an operating system or data that you wish to keep.'' '''
  
 
<!--T:9-->
 
<!--T:9-->
{{danger|icon64=''' ''make sure that you click the "Customize" button while in the "Disk Selection" screen.'' ''' If you just click Next without customizing the disk layout, the installer will overwrite the contents of the primary disk.}}
+
{{danger|width=48.5%|icon64=''' ''make sure that you click the "Customize" button while in the "Disk Selection" screen.'' ''' If you just click Next without customizing the disk layout, the installer will overwrite the contents of the primary disk.}}
  
<!--T:10-->
+
===GRUB Boot Loader=== <!--T:92-->
If you install PC-BSD® on a computer that already contains an operating system, the first time you reboot, your computer will automatically boot into the previous operating system. You will need to configure a boot loader utility to recognize all of the operating systems that are installed and to provide you with a boot menu where you can select which operating system to boot into.
+
  
<!--T:50-->
+
<!--T:93-->
GRUB version 2 supports both the MBR and GPT formats.  
+
If you install PC-BSD® on a computer that already contains an operating system, an entry for PC-BSD® will automatically be added to the [[Booting_Into_PC-BSD®#Interrupting_the_Boot_to_Access_the_Boot_Menu|PC-BSD® boot menu]]. Depending upon which other operating systems are installed, the installer may or may not automatically detect and add entries for the other operating systems.
  
<!--T:51-->
+
<!--T:94-->
In this example, PC-BSD® is installed on the third primary partition of the first hard drive using the MBR format:
+
If your other operating system is not found, use the [[PC-BSD® Bug Reporting]] tool to create a bug report. Include the version of the missing operating system and on which disk and partition that operating system is installed. If you are already familiar with how to create GRUB entries and are successful in manually adding an entry, include that entry in your bug report. This way, other PC-BSD® users with similar layouts can benefit when the required GRUB entry is added to the installer's logic.
  
<!--T:52-->
+
<!--T:88-->
{{txtbox|box=menuentry "PCBSD 9.1" {
+
insmod ufs2
+
set root=(hd0,2,a)
+
kfreebsd /boot/loader
+
<nowiki>}</nowiki>}}
+
 
+
<!--T:53-->
+
Where:
+
 
+
<!--T:54-->
+
* '''menuentry''': the text between the quotes will be displayed in the boot menu and can be anything that makes sense to you.
+
   
+
* '''insmod''': some distros require this instruction to load the UFS2 kernel module.
+
 
+
<!--T:55-->
+
* '''set root:''' the root of the partition containing PC-BSD®, as determined by the '''ls''' command described in the previous section.  Always add the ''a'' at the end to refer to the  BSD boot partition on the specified disk and partition.
+
   
+
* '''kfreebsd''': used to load the primary boot image. For FreeBSD and PC-BSD®, always use ''/boot/loader''.
+
 
+
<!--T:56-->
+
The entry for the same installation (third partition on first drive), but with the GPT box checked, will differ slightly in the ''set root'' line.
+
 
+
<!--T:57-->
+
{{txtbox|box=menuentry "PCBSD 9.1" {
+
insmod ufs2
+
set root=(hd0,msdos2,bsd1)
+
kfreebsd /boot/loader
+
<nowiki>}</nowiki>}}
+
 
+
<!--T:58-->
+
If you installed PC-BSD® onto the second hard drive, you need to invoke the ''map'' and ''chainloader'' commands in order to boot from the second disk. In this example, PC-BSD® is installed in the first partition of the second drive and the  box to partition disk with GPT was ''' ''not'' ''' checked.
+
 
+
<!--T:59-->
+
{{txtbox|box=menuentry "PC-BSD 9.1" {
+
map (hd0) (hd1)
+
map (hd1) (hd0)
+
map --hook
+
chainloader (hd0,0)/boot0
+
boot
+
<nowiki>}</nowiki>}}
+
 
+
<!--T:60-->
+
The entry if the GPT box was checked looks like this:
+
 
+
<!--T:61-->
+
{{txtbox|box=menuentry "PC-BSD GPT" {
+
map (hd0) (hd1)
+
map (hd1) (hd0)
+
map --hook
+
chainloader (hd0,0)/pmbr
+
boot
+
<nowiki>}</nowiki>}}
+
 
+
<!--T:62-->
+
If you installed ZFS, several modules need to be loaded. Here is a sample entry with the GPT box checked:
+
 
+
<!--T:63-->
+
{{txtbox|box=menuentry "PC-BSD 9.1" {
+
&nbsp;        insmod zfs
+
&nbsp;        search -s -l tank0
+
&nbsp;        kfreebsd /freebsd@/boot/kernel/kernel
+
&nbsp;        kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
+
&nbsp;        kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
+
&nbsp;        kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
+
&nbsp;        set kFreeBSD.vfs.root.mountfrom=zfs:tank0/freebsd
+
<nowiki>}</nowiki>}}
+
 
+
 
+
<!--T:64-->
+
After a GRUB2 configuration change you need to run a command to update the configuration. This command varies by distro:
+
 
+
<!--T:65-->
+
* '''sudo update-grub''' on a Debian-based system
+
 
+
<!--T:66-->
+
* '''grub2-mkconfig -o /boot/grub2/grub.cfg''' as the superuser under Fedora 16 or Gentoo
+
 
+
<!--T:67-->
+
* '''grub-mkconfig -o /boot/grub/grub.cfg''' when using Sabayon
+
 
+
<!--T:68-->
+
For more information please refer to the {{citelink|url=http://www.gnu.org/software/grub/manual/grub.html|txt=GNU GRUB Manual}}.
+
 
+
=== Recovering Windows Boot loader After Installing PC-BSD® === <!--T:80-->
+
 
+
<!--T:81-->
+
If you accidentally overwrite your Windows boot loader, you will be unable to boot into Windows after installing PC-BSD®.  Depending upon the version of Windows, the PC-BSD® boot loader may or may not automatically provide an entry to boot into Windows. However, assuming you have not accidentally installed PC-BSD® into the Windows partition, your Windows installation is still there and it is possible to restore the Windows boot loader. How to do so varies by the version of Windows:
+
 
+
<!--T:82-->
+
* {{citelink|url=http://www.ehow.com/how_4891476_reinstall-xp-bootloader.html|txt=How to Reinstall XP Bootloader}}
+
 
+
<!--T:83-->
+
* {{citelink|url=http://www.ehow.com/how_5127739_restore-vista-boot-manager.html|txt=How to Restore Vista Boot Manager}}
+
 
+
<!--T:84-->
+
* {{citelink|url=http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/|txt=How to Manually Repair Windows 7 Boot Loader Problems}}
+
 
+
<!--T:85-->
+
Once the Windows boot loader is recovered, you can use [[#Dual Boot with Windows Using EasyBCD|EasyBCD]] to add an entry for PC-BSD® to the Windows boot loader.
+
 
+
<!--T:86-->
+
 
<noinclude>
 
<noinclude>
 
{{refheading}}
 
{{refheading}}

Revision as of 10:43, 25 September 2013

(Sorry for the inconvenience)

Contents

A PC-BSD® installation assumes that you have an existing primary partition to install into. If your computer has only one disk and PC-BSD® will be the only operating system, it is fine to accept the default partitioning scheme. However, if you will be sharing PC-BSD® with other operating systems, care has to be taken that PC-BSD® is installed into the correct partition; otherwise, you may inadvertently overwrite an existing operating system.

If you wish to install multiple operating systems on your computer, you will need the following:

  • a partition for each operating system. Many operating systems, including PC-BSD®, can only be installed into a primary partition. This means that you will need to use partitioning software as described in Partitioning the Hard Drive.
  • a boot loader that allows you to select which operating system you wish to boot into. Depending upon the choice of boot loader and the operating systems that you install, you may or may not have to configure the boot loader to list all of the installed operating systems. Also, depending upon the order that you install the operating systems, the existing MBR data may be overwritten. This section will describe the configuration of several different boot loaders and how to restore an overwritten MBR.
  • a backup of any existing data. This backup should not be stored on your computer's hard drive but on another computer; on removable media, such as a USB drive; or burnt onto a DVD media. If you are careful in your installation, everything should go fine. However, you will be glad that you made a backup should something go wrong.

Choosing the Installation Partition

When installing PC-BSD® onto a computer that is to contain multiple operating systems, care must be taken to select the correct partition in the Disk Selection screen of the installation. On a system containing multiple partitions, each partition will be listed. Highlight the partition that you wish to install into and make sure that you do not select a partition that already contains an operating system or data that you wish to keep.

DANGER! make sure that you click the "Customize" button while in the "Disk Selection" screen. If you just click Next without customizing the disk layout, the installer will overwrite the contents of the primary disk.

GRUB Boot Loader

If you install PC-BSD® on a computer that already contains an operating system, an entry for PC-BSD® will automatically be added to the PC-BSD® boot menu. Depending upon which other operating systems are installed, the installer may or may not automatically detect and add entries for the other operating systems.

If your other operating system is not found, use the PC-BSD® Bug Reporting tool to create a bug report. Include the version of the missing operating system and on which disk and partition that operating system is installed. If you are already familiar with how to create GRUB entries and are successful in manually adding an entry, include that entry in your bug report. This way, other PC-BSD® users with similar layouts can benefit when the required GRUB entry is added to the installer's logic.


References


Other languages:German 100% • ‎English 100% • ‎French 36%
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox