xref: /netbsd-src/share/man/man8/man8.x86/boot.8 (revision e6c7e151de239c49d2e38720a061ed9d1fa99309)
1.\"	$NetBSD: boot.8,v 1.20 2019/09/16 01:57:58 manu Exp $
2.\"
3.\" Copyright (c) 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software written and contributed
7.\" to Berkeley by William Jolitz.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. Neither the name of the University nor the names of its contributors
18.\"    may be used to endorse or promote products derived from this software
19.\"    without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\"     @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
34.\"
35.Dd September 13, 2019
36.Dt BOOT 8 x86
37.Os
38.Sh NAME
39.Nm boot
40.Nd
41system bootstrapping procedures
42.Sh DESCRIPTION
43Intel Architecture, 32-bit (IA-32) computers (the
44.Tn IBM PC
45and its clones)
46that can run
47.Nx Ns /i386
48or
49.Nx Ns /amd64
50can use any of the following boot procedures, depending on what the hardware and
51.Tn BIOS
52support:
53.Bl -tag -width "x86/pxeboot(8)"
54.It boot
55bootstrap
56.Nx
57from the system
58.Tn BIOS
59.It efiboot
60bootstrap
61.Nx
62from the system
63.Tn UEFI
64.It Xr x86/dosboot 8
65bootstrap
66.Nx
67from
68.Tn MS-DOS
69.It Xr x86/pxeboot 8
70network bootstrap
71.Nx
72from a
73.Tn TCP/IP
74.Tn LAN
75with
76.Tn DHCP ,
77.Tn TFTP ,
78and
79.Tn NFS .
80.El
81.Ss Power fail and crash recovery
82Normally, the system will reboot itself at power-up or after crashes.
83An automatic consistency check of the file systems will be performed,
84and unless this fails, the system will resume multi-user operations.
85.Ss Cold starts
86The 386
87.Tn "PC AT"
88clones attempt to boot the floppy disk drive A (otherwise known as drive
890) first, and failing that, attempt to boot the hard disk C (otherwise
90known as hard disk controller 1, drive 0).
91The
92.Nx
93bootblocks are loaded and started either by the
94.Tn BIOS ,
95or by a boot selector program (such as OS-BS, BOOTEASY, the OS/2 Boot Menu or
96.Nx Ns 's
97.No boot-selecting
98master boot record - see
99.Xr x86/mbr 8 ) .
100.Ss Normal Operation
101Once running, a banner similar to the following will appear:
102.Bd -unfilled -offset indent
103>> NetBSD BIOS Boot, revision 3.0
104>> (user@buildhost, builddate)
105>> Memory: 637/15360 k
106Press return to boot now, any other key for boot menu
107booting hd0a:netbsd - starting in 5
108.Ed
109.Pp
110After a countdown, the system image listed will be loaded.
111In the example above, it will be
112.Dq Li hd0a:netbsd
113which is the file
114.Pa /netbsd
115on partition
116.Dq a
117of the
118.Nx
119.Tn MBR
120partition of the first hard disk known to the
121.Tn BIOS
122.Po
123which is an
124.Tn IDE
125or similar device - see the
126.Sx BUGS
127section
128.Pc .
129.Pp
130Pressing a key within the time limit, or before the boot program starts, will
131enter interactive mode.
132When using a short or 0 timeout, it is often useful to interrupt the boot
133by holding down a shift key, as some BIOSes and BIOS extensions will drain the
134keystroke buffer at various points during POST.
135.Pp
136If present, the file
137.Pa /boot.cfg
138will be used to configure the behaviour of the boot loader including
139setting the timeout, choosing a console device, altering the banner
140text and displaying a menu allowing boot commands to be easily chosen.
141See
142.Xr boot.cfg 5 .
143.Ss Boot Protocol
144The
145.Nx Ns /x86
146boot loader can boot a kernel using either the native
147.Nx
148boot protocol, or the
149.Dq multiboot
150protocol (which is compatible with some other operating systems).
151In the native
152.Nx
153boot protocol, options are passed from the boot loader
154to the kernel via flag bits in the
155.Va boothowto
156variable (see
157.Xr boothowto 9 ) .
158In the multiboot protocol, options are passed from the boot loader
159to the kernel as strings.
160.Ss Diagnostic Output
161If the first stage boot fails to load the boot, it will print a terse
162message indicating the reason for the failure.
163The possible error messages and their cause are listed in
164.Xr x86/mbr 8 .
165.Pp
166If the first stage boot succeeds, the banner will be shown and the
167error messages should be self-explanatory.
168.Ss Interactive mode
169In interactive mode, the boot loader will present a prompt, allowing
170input of these commands:
171.\" NOTE: much of this text is duplicated in the MI boot.8.
172.\" Some of it is
173.\" also duplicated in the x86-specific x86/dosboot.8 and x86/pxeboot.8;
174.\" please try to keep all relevant files synchronized.
175.Bl -tag -width 04n -offset 04n
176.It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
177The default
178.Va device
179will be set to the disk from which the boot loader was loaded.
180The partition is set to the first match in this list:
181.Bl -enum -compact
182.It
183The first
184.Xr gpt 8
185partition with the
186.Va bootme
187attribute set.
188.It
189The partition from which the boot loader was loaded from, if that
190can be detected.
191.It
192The first partition with a file system that could be bootable.
193.It
194The first partition.
195.El
196To boot from an alternate disk, the full name of the device should
197be given at the prompt.
198.Va device
199is of the form
200.Va NAME=partition_label
201when booting from a
202.Xr gpt 8
203partitioned disk.
204Otherwise, the syntax is
205.Xo Va xd
206.Op Va N Ns Op Va x
207.Xc
208where
209.Va xd
210is the device from which to boot,
211.Va N
212is the unit number, and
213.Va x
214is the partition letter.
215.Pp
216In the later case, the following list of supported devices may
217vary from installation to installation:
218.Pp
219.Bl -hang -compact
220.It hd
221Hard disks as numbered by the BIOS.
222This includes ST506, IDE, ESDI, RLL disks on a WD100[2367] or
223lookalike controller(s), and SCSI disks
224on SCSI controllers recognized by the BIOS.
225.It fd
226Floppy drives as numbered by the BIOS.
227.It cd
228CD-ROM drives as numbered by the BIOS.
229.It raid
230RAIDframe configured from hard disks recognized by the BIOS.
231Only RAID level 1 sets are supported by bootstrap code.
232If the RAID is partitioned, the first partition is used, or the
233first
234.Xr gpt 8
235partition that has the
236.Va bootme
237attribute set.
238Inner RAIDframe partitions can also be given to the
239.Ic dev
240command using he
241.Va NAME=partition_label
242syntax.
243.El
244.Pp
245The default
246.Va filename
247is
248.Pa netbsd ;
249if the boot loader fails to successfully
250open that image, it then tries
251.Pa netbsd.gz
252(expected to be a kernel image compressed by gzip), followed by
253.Pa onetbsd ,
254.Pa onetbsd.gz ,
255.Pa netbsd.old ,
256and finally
257.Pa netbsd.old.gz .
258Alternate system images can be loaded by just specifying the name of the image.
259.Pp
260Options are:
261.Bl -tag -width xxx
262.It Fl 1
263Sets the machine-dependent flag
264.Sy RB_MD1
265in
266.Va boothowto .
267In
268.Nx Ns /x86 ,
269this disables multiprocessor boot;
270the kernel will boot in uniprocessor mode.
271.It Fl 2
272Sets the machine-dependent flag
273.Sy RB_MD2
274in
275.Va boothowto .
276In
277.Nx Ns /x86 ,
278this disables ACPI.
279.It Fl 3
280Sets the machine-dependent flag
281.Sy RB_MD3
282in
283.Va boothowto .
284In
285.Nx Ns /amd64 ,
286this disables SVS.
287.It Fl 4
288Sets the machine-dependent flag
289.Sy RB_MD4
290in
291.Va boothowto .
292In
293.Nx Ns /x86 ,
294this has no effect.
295.It Fl a
296Sets the
297.Sy RB_ASKNAME
298flag in
299.Va boothowto .
300This causes the kernel to prompt for the root file system device,
301the system crash dump device, and the path to
302.Xr init 8 .
303.It Fl b
304Sets the
305.Sy RB_HALT
306flag in
307.Va boothowto .
308This causes subsequent reboot attempts to halt instead of rebooting.
309.It Fl c
310Sets the
311.Sy RB_USERCONF
312flag in
313.Va boothowto .
314This causes the kernel to enter the
315.Xr userconf 4
316device configuration manager as soon as possible during the boot.
317.Xr userconf 4
318allows devices to be enabled or disabled, and allows device locators
319(such as hardware addresses or bus numbers)
320to be modified before the kernel attempts to attach the devices.
321.It Fl d
322Sets the
323.Sy RB_KDB
324flag in
325.Va boothowto .
326Requests the kernel to enter debug mode, in which it
327waits for a connection from a kernel debugger; see
328.Xr ddb 4 .
329.It Fl m
330Sets the
331.Sy RB_MINIROOT
332flag in
333.Va boothowto .
334Informs the kernel that a mini-root file system is present in memory.
335.It Fl q
336Sets the
337.Sy AB_QUIET
338flag in
339.Va boothowto .
340Boot the system in quiet mode.
341.It Fl s
342Sets the
343.Sy RB_SINGLE
344flag in
345.Va boothowto .
346Boot the system in single-user mode.
347.It Fl v
348Sets the
349.Sy AB_VERBOSE
350flag in
351.Va boothowto .
352Boot the system in verbose mode.
353.It Fl x
354Sets the
355.Sy AB_DEBUG
356flag in
357.Va boothowto .
358Boot the system with debug messages enabled.
359.It Fl z
360Sets the
361.Sy AB_SILENT
362flag in
363.Va boothowto .
364Boot the system in silent mode.
365.El
366.It Ic consdev Va dev
367Immediately switch the console to the specified device
368.Va dev
369and reprint the banner.
370.Va dev
371must be one of
372.\" .Bl -item -width com[0123]kbd -offset indent -compact
373.Ar pc , com0 , com1 , com2 ,
374.Ar com3 , com0kbd , com1kbd , com2kbd ,
375.Ar com3kbd ,
376or
377.Ar auto .
378See
379.Sx Console Selection Policy
380in
381.Xr x86/boot_console 8 .
382.It Ic dev Op Va device
383Set the default drive and partition for subsequent file system
384operations.
385Without an argument, print the current setting.
386.Va device
387is of the form specified in
388.Cm boot .
389.It Ic fs Va file
390Load a file system image from the specified
391.Ar file ,
392and request the kernel to use it as the root file system.
393The
394.Xr makefs 8
395utility may be used to create suitable file system images.
396.It Ic help
397Print an overview about commands and arguments.
398.It Ic load Va module Op Ar arguments
399Load the specified kernel
400.Va module ,
401and pass it the specified
402.Ar arguments .
403If the module name is not an absolute path,
404.Pa /stand/ Xo Ns
405.Aq Sy arch Ns
406.Pa / Ns
407.Aq Sy osversion Ns
408.Pa /modules/ Ns
409.Aq Sy module Ns
410.Pa / Ns
411.Aq Sy module Ns
412.Pa .kmod
413.Xc
414is used.
415Possible uses of the
416.Ic load
417command include loading a memory disk image before booting a kernel,
418or loading a
419.Tn Xen
420DOM0 kernel before booting the
421.Tn Xen
422hypervisor.
423See
424.Xr boot.cfg 5
425for examples.
426.Pp
427In addition to the
428.Cm boot
429options specified above, the
430.Tn Xen
431DOM0 kernel accepts
432.Po Ar arguments
433being separated with spaces
434.Pc :
435.Bl -tag -width xxx
436.It Ic bootdev Ns = Ns Ar dev Po or Ic root Ns = Ns Ar dev Pc
437Override the default boot device.
438.Ar dev
439is of the form
440.Va NAME=partition_label
441for
442.Xr gpt 8
443partitioned disks.
444It can also be a unit name
445.Po Dq wd0
446.Pc ,
447or an interface name
448.Po Dq bge0 ,
449.Dq wm0 ,
450\&...
451.Pc
452for cases where the root file system has to be loaded
453from network (see the
454.Sx BUGS
455section in
456.Xr x86/pxeboot 8 ) .
457.It Ic console Ns = Ns Ar dev
458Console used by DOM0 kernel during boot.
459.Ar dev
460accepts the same values as the ones given for the
461.Cm consdev
462command.
463See
464.Sx Console Selection Policy
465in
466.Xr x86/boot_console 8 .
467.It Xo Ic ip Ns = Ns
468.Ar my_ip : Ns Ar serv_ip : Ns Ar gw_ip : Ns
469.Ar mask : Ns Ar host : Ns Ar iface
470.Xc
471Specify various parameters for a network boot (IPs are in
472dot notation),
473each one separated by a colon:
474.Bl -tag -width xxxxxxx
475.It Va my_ip
476address of the host
477.It Va serv_ip
478address of the NFS server
479.It Va gw_ip
480address of the gateway
481.It Va mask
482network mask
483.It Va host
484address of the host
485.It Va iface
486interface
487.Po e.g., Dq xennet0
488or
489.Dq eth0
490.Pc
491.El
492.It Ic nfsroot Ns = Ns Ar address : Ns Ar rootpath
493Boot the system with root on NFS.
494.Ar address
495is the address of the NFS server, and
496.Ar rootpath
497is the remote mount point for the root file system.
498.It Ic pciback.hide Ns = Ns Ar pcidevs
499Pass a list of PCI IDs for use with the PCI backend driver,
500.Xr pciback 4 .
501.Ar pcidevs
502is formed of multiple IDs (in bus:device.function notation),
503each ID being surrounded with brackets.
504PCI domain IDs are currently ignored.
505See
506.Xr pciback 4 .
507.El
508.It Ic ls Op Pa path
509Print a directory listing of
510.Pa path ,
511containing inode number, filename, and file type.
512.Pa path
513can contain a device specification.
514.It Ic menu
515Display the boot menu and initiate a countdown,
516similarly to what would have happened if interactive mode
517had not been entered.
518.It Ic modules Bro Ar on | off | enabled | disabled Brc
519The values
520.Ar enabled , on
521will enable module loading for
522.Cm boot
523and
524.Cm multiboot ,
525whereas
526.Ar disabled , off
527will turn off the feature.
528.It Ic multiboot Va kernel Op Ar arguments
529Boot the specified
530.Va kernel ,
531using the
532.Dq multiboot
533protocol instead of the native
534.Nx
535boot protocol.
536The
537.Va kernel
538is specified in the same way as with the
539.Ic boot
540command.
541.Pp
542The multiboot protocol may be used in the following cases:
543.Bl -tag -width indent
544.It Nx Ns / Ns  Xen No kernels
545The
546.Tn Xen
547DOM0 kernel must be loaded as a module using the
548.Ic load
549command, and the
550.Tn Xen
551hypervisor must be booted using the
552.Ic multiboot
553command.
554Options for the DOM0 kernel (such as
555.Dq -s
556for single user mode) must be passed as options to the
557.Ic load
558command.
559Options for the hypervisor (such as
560.Dq dom0_mem=256M
561to reserve 256 MB of memory for DOM0)
562must be passed as options to the
563.Ic multiboot
564command.
565See
566.Xr boot.cfg 5
567for examples on how to boot
568.Nx Ns / Ns  Xen.
569.It Nx No multiboot kernels
570A
571.Nx
572kernel that was built with
573.Cd options MULTIBOOT
574(see
575.Xr x86/multiboot 8 )
576may be booted with either the
577.Ic boot
578or
579.Ic multiboot
580command, passing the same
581.Ar arguments
582in either case.
583.It Non- Ns Nx No kernels
584A kernel for a
585.No non- Ns Nx
586operating system that expects to be booted using the
587multiboot protocol (such as by the GNU
588.Dq GRUB
589boot loader)
590may be booted using the
591.Ic multiboot
592command.
593See the foreign operating system's documentation for the available
594.Ar arguments .
595.El
596.It Ic quit
597Reboot the system.
598.It Ic rndseed Ar file
599Load the specified
600.Ar file
601and request the kernel to use it as a seed for the
602.Xr rnd 4
603random number generator.
604The
605.Ar file
606should be in the private format used by
607.Xr rndctl 8 ,
608and should have been saved by
609.Ql "rndctl -S"
610shortly before the previous shutdown.
611See the
612.Va random_seed
613and
614.Va random_file
615variables in
616.Xr rc.conf 5 ,
617and the
618.Pa /etc/rc.d/random_seed
619script, for a way to manage the seed file.
620Using the same seed file on more then one host,
621or for more than one boot on the same host,
622will reduce the quality of random numbers
623and may impact system security.
624.It Ic userconf Va command
625Pass command
626.Va command
627to
628.Xr userconf 4
629at boot time.
630These commands are processed before the interactive
631.Xr userconf 4
632shell is executed, if requested.
633.It Ic splash Ar file
634Load a graphical image from the specified
635.Ar file
636and request the kernel to use it as a splash screen.
637The
638.Ar file
639should contain an image in one of these formats:
640JPEG (baseline only, not progressive),
641PNG (8-bit only),
642TGA,
643BMP (non-1bpp, non-RLE),
644GIF,
645PSD (composited view only),
646or
647PIC.
648.It Ic vesa Bro Va modenum | Ar on | off | enabled | disabled | list Brc
649Initialise the video card to the specified resolution and bit depth.
650The
651.Va modenum
652should be in the form of
653.Ar 0x100 , 800x600 , 800x600x32 .
654The values
655.Ar enabled , on
656put the display into the default mode, and
657.Ar disabled , off
658returns the display into standard vga mode.
659The value
660.Ar list
661lists all supported modes.
662.El
663.Pp
664In an emergency, the bootstrap methods described in the
665.Nx
666installation notes for the x86 architectures
667can be used to boot from floppy or other media,
668or over the network.
669.Ss Locating the root file system
670The kernel uses information from the bootloader to locate the
671file system to mount as root.
672There are three methods:
673.Bl -tag -width 04n -offset 04n
674.It Ic BTINFO_ROOTDEVICE Va from
675.Xr boot.cfg 5
676or multiboot.
677The bootloader passes the root device name as driver, unit, and
678partition (like sd0a).
679This will be automatically substituted by a
680.Xr dk 4
681wedge if one is discovered.
682.Pp
683The bootloader passes a wedge name as "wedge:" followed by the name.
684The kernel will search for a
685.Xr dk 4
686device with that name.
687.It Ic BTINFO_BOOTWEDGE Va determined by bootblock
688The bootloader passes start offset and length of a hard disk partition
689and a offset, size and hash of a "boot area".
690Then kernel searches
691all disks and wedges for a block sequence at that offset with a
692matching hash.
693If one is found, the kernel will look for a wedge
694on that device at the same offset.
695.Pp
696An additional partition number is provided if the bootloader also
697passed a BTINFO_BOOTDISK record.
698This (or partition 'a') will be used
699by the kernel as a fallback if there is no matching wedge.
700.It Ic BTINFO_BOOTDISK Va determined by bootblock
701This uses the device number passed by the BIOS that
702distinguishes between floppy, hard drive and CD-ROM boot.
703.Bl -tag -width xxx
704.It Ic Floppy
705The kernel searches for the
706.Xr fd 4
707device with the correct unit, the partition number is used
708to select a specific disk format.
709See
710.Xr fd 4
711for details.
712.It Ic Hard drive
713The bootloader passed a partition number and disklabel
714data (offset, type, checksum, packname).
715The kernel searches
716all disks for a matching disklabel.
717If one is found, the
718kernel will use that device and partition number.
719.It Ic CDROM
720The BIOS does not distinguish between multiple CD devices.
721The kernel searches for the first
722.Xr cd 4
723device.
724So you can only boot from unit 0.
725.El
726.El
727.Sh FILES
728.Bl -tag -width /usr/mdec/bootxx_fstype -compact
729.It Pa /boot
730boot program code loaded by the primary bootstrap
731.It Pa /boot.cfg
732optional configuration file
733.It Pa /netbsd
734system code
735.It Pa /netbsd.gz
736gzip-compressed system code
737.It Pa /usr/mdec/boot
738master copy of the boot program (copy to /boot)
739.It Pa /usr/mdec/bootxx_fstype
740primary bootstrap for file system type fstype, copied to the start of
741the
742.Nx
743partition by
744.Xr installboot 8 .
745.It Pa /usr/mdec/bootia32.efi
746.It Pa /usr/mdec/bootx64.efi
747.Tn UEFI
748bootstraps for
749.Nx Ns /i386
750and
751.Nx Ns /amd64 ,
752which should be copied to the
753.Pa /efi/boot
754directory in a
755.Tn FAT
756formatted partition of type
757.Tn EFI
758(Either
759.Xr mbr 8
760and
761.Xr gpt 8 ,
762see the
763.Sx BUGS
764section).
765.Nx
766.Tn UEFI
767bootstrap reads its configuration from the
768.Pa /efi/netBSD/boot.cfg
769file in the
770.Tn EFI
771partition.
772.El
773.Sh SEE ALSO
774.Xr ddb 4 ,
775.Xr fd 4 ,
776.Xr pciback 4 ,
777.Xr userconf 4 ,
778.Xr boot.cfg 5 ,
779.Xr halt 8 ,
780.Xr installboot 8 ,
781.Xr reboot 8 ,
782.Xr rescue 8 ,
783.Xr shutdown 8 ,
784.Xr x86/boot_console 8 ,
785.Xr x86/dosboot 8 ,
786.Xr x86/mbr 8 ,
787.Xr x86/multiboot 8 ,
788.Xr x86/pxeboot 8 ,
789.Xr boothowto 9
790.Sh BUGS
791The kernel file name must be specified before, not after, the boot options.
792Any
793.Ar filename
794specified after the boot options, e.g.:
795.Pp
796.Bd -unfilled -offset indent -compact
797.Cm boot -d netbsd.test
798.Ed
799.Pp
800is ignored, and the default kernel is booted.
801.Pp
802Hard disks are always accessed by
803.Tn BIOS
804functions.
805Unit numbers are
806.Tn BIOS
807device numbers which might differ from numbering in the
808.Nx
809kernel or physical parameters
810.Po
811e.g.,
812.Tn SCSI
813slave numbers
814.Pc .
815There isn't any distinction between
816.Dq sd
817and
818.Dq wd
819devices at the bootloader level.
820This is less a bug of the bootloader code than
821a shortcoming of the PC architecture.
822The default disk device's name printed in the starting message
823is derived from the
824.Dq type
825field of the
826.Nx
827disklabel (if it is a hard disk).
828.Pp
829.Tn UEFI
830implementation are supposed to support either
831.Xr mbr 8
832or
833.Xr gpt 8
834partitionning, but some do not handle the later.
835.Tn UEFI
836Booting
837from a
838.Xr gpt 8
839partitioned disk is still possible in this case, by adding
840an overlapping
841.Tn EFI
842partition in the protective
843.Xr mbr 8
844block.
845This can be achieved using the following commands
846(you must adapt the hard disk and
847.Tn EFI
848partition start end size to fit your setup):
849.Dl Ic dd if=/dev/rwd0d bs=512 count=1 of=mbr
850.Dl Ic fdisk -FIfaui1s 4/34/32768 -c /usr/mdec/mbr mbr
851.Dl Ic dd if=mbr bs=512 count=1 of=/dev/rwd0d conv=notrunc
852The resulting
853.Xr mbr 8
854partition table will look like this:
855.Bd -unfilled -offset indent
8560: GPT Protective MBR (sysid 238)
857    start 1, size 2097151 (1024 MB, Cyls 0-130/138/8)
858        PBR is not bootable: Bad magic number (0x0000)
8591: Primary DOS with 16 bit FAT <32M (sysid 4)
860    start 34, size 32768 (16 MB, Cyls 0/0/35-2/10/42), Active
8612: <UNUSED>
8623: <UNUSED>
863.Ed
864