summaryrefslogtreecommitdiffstats
path: root/usr.sbin/boot0cfg
Commit message (Collapse)AuthorAgeFilesLines
* MFC 292410,292443,293977:jhb2016-01-191-1/+2
| | | | | | | | Exit cleanly if malloc() fails to allocate a buffer for a copy of the current MBR. PR: 205322 Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>
* MFC r287396:trasz2016-01-111-3/+2
| | | | | | | | | | | It's 2015, and some people are still trying to use fdisk and then go asking what debug flags to set for GEOM to make it work. Advice them to use gpart(8) instead. Something similar should probably done with disklabel, but I need to rewrite the disklabel examples first. Sponsored by: The FreeBSD Foundation
* Sweep man pages replacing ad -> ada.pluknet2013-10-011-4/+4
| | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only
* Remove superfluous paragraph macro.joel2012-03-251-1/+0
|
* Be as explicit as possible when describing relation between the -m maskkib2012-02-041-3/+6
| | | | | | | argument and slices. Adjust example for the same reason. Submitted by: Valentin Nechayev <netch netch kiev ua> MFC after: 3 days
* Allow boot0cfg to force a PXE boot via boot0 on the next boot.jhb2011-12-202-2/+10
| | | | | | | | | | - Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well. Submitted by: Andrew Boyer aboyer averesystems MFC after: 2 weeks
* Use NO_WCAST_ALIGN for usr.sbin/boot0cfg; because this is only built fordim2011-12-171-0/+2
| | | | | | x86, any alignment warnings can be safely ignored. MFC after: 1 week
* Plug fd leakskevlo2011-11-231-0/+2
|
* Remove a note about disabling of GEOM protection mechanism.ae2011-11-071-16/+1
| | | | | | boot0cfg should work without such hack. MFC after: 3 days
* Reorganize write_mbr() function to be able write bootcode with differentae2011-11-071-54/+83
| | | | | | | | | | ways. Improve error reporting and also fix indenting. Now we are trying to write bootcode: 1. Directly to provider (if we can open it for writing); 2. Via GEOM_PART (if it is available); 3. Via GEOM_MBR. MFC after: 2 weeks
* Add reference to gpart(8).ae2011-11-061-1/+2
| | | | MFC after: 3 days
* Mark global functions and/or variables in boot0cfg(8) static where possible.ed2011-11-061-4/+4
| | | | This allows compilers and static analyzers to do more thorough analysis.
* Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART'ae2011-10-251-1/+1
| | | | | | control interface. MFC after: 3 days
* Revert r209469: it causes the rest of the function to be bypassed.brucec2010-12-061-2/+0
| | | | Reported by: ae
* If a device can't be opened, don't keep going but display the errorbrucec2010-06-231-0/+2
| | | | | | | | returned from open() and quit. PR: bin/81035 Submitted by: Peter Schuller <peter.schuller at infidyne.com> Approved by: rrs (mentor)
* Fixed static linkage.ru2010-02-261-2/+2
|
* The last big commit: let usr.sbin/ use WARNS=6 by default.ed2010-01-021-2/+0
|
* Write the MBR by using the bootcode verb of the gpart class.marcel2009-03-021-27/+22
| | | | | The "write MBR" verb is kept for backward compatibility, but the DIOCSMBR ioctl has been removed.
* Extend the geom-related info and put in the NOTE section, notluigi2009-01-131-14/+19
| | | | | | | in BUGS, as this is a feature. Bump the date, as it was forgotten in previous commits and the page has had significant changes recently
* Another, hopefully final set of changes to boot0 and boot0cfg.luigi2008-12-032-26/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boot0.S changes: + import a patch from Christoph Mallon to rearrange the various print functions and save another couple of bytes; + implement the suggestion in PR 70531 to enable booting from any valid partition because even the extended partitions that were previously in our kill list may contain a valid boot loader. This simplifies the code and saves some bytes; + followwing up PR 127764, implement conditional code to preserve the 'Volume ID' which might be used by other OS (NT, XP, Vista) and is located at offset 0x1b8. This requires a relocation of the parameter block within the boot sector -- there is no other possible workaround. To address this, boot0cfg has been updated to handle both versions of the boot code; + slightly rearrange the strings printed in the menus to make the code buildable with all options. Given the tight memory budget, this means that with certain options we need to shrink or remove certain labels. and especially: make -DVOLUME_LABEL -DPXE the default options. This means that the newly built boot0 block will preserve the Volume ID, and has the (hidden) option F6 to boot from INT18/PXE. I think the extra functionality is well worth the change. The most visible difference here is that the 'Default: ' string now becomes 'Boot: ' (it can be reverted to the old value but then we need to nuke 1/2 partition name or entries to make up for the extra room). boot0cfg changes: + modify the code to recognise the new boot0 structure (with the relocated options block to make room for the Volume id). + add two options, '-i xxxx-xxxx' to set the volume ID, -e c to modify the character printed in case of bad input PR: 127764 70531 Submitted by: Christoph Mallon (portions) MFC after: 4 weeks
* - Improve error message given on g_providername call failure.lulf2008-09-301-2/+2
| | | | | | - While there, make error messages consistent with the rest. Approved by: kib (mentor)
* - Make use of the new and g_device_path utility function in libgeom to avoidlulf2008-09-071-33/+23
| | | | | | | | | duplication of code in fdisk and boot0cfg. Also make use of g_providername to fix an issue with fdisk and boot0cfg not using the correct provider when writing the MBR. Reviewed by: phk Approved by: pjd (mentor)
* "-b /boot/mbr" is redundant, /boot/mbr is the default boot code for fdisk(8).pav2007-06-071-2/+2
| | | | Pointed out by: ru
* - Revert previous revision, it was incorrectpav2007-06-061-8/+5
| | | | | | | | - Add an example using fdisk instead Pointed out by: ru Submitted by: Warren Block <wblock@wonkity.com> MFC after: 3 days
* Document /boot/mbr (non-interactive boot block)pav2007-05-121-0/+10
| | | | | | PR: doc/111840 Submitted by: Warren Block <wblock@wonkity.com> MFC after: 1 week
* Attempt gctl verb "write MBR" when updating.phk2005-07-152-1/+25
| | | | This should solve the problem of modifying the MBR while running.
* Document how to make boot0cfg work on mounted disks.scottl2005-04-071-0/+11
|
* Sort sections.ru2005-01-181-2/+2
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Open device R/W for ioctl modifications.phk2004-12-181-1/+1
|
* Correct polarity of packet mode bit.tegge2004-09-141-1/+1
| | | | | Problem discovered when 'boot0cfg -B -v -o packet -s 2 ad4' turned off packet mode while reporting it as being enabled.
* boot0 defaults to packet mode.tegge2004-09-141-1/+1
|
* Enable packet mode by default. Disk drives have gotten so large now,obrien2004-08-031-1/+1
| | | | it is often the case the partition one wants to boot is above cylinder 1023.
* mdoc(7) fixes.ru2004-07-071-1/+1
|
* Document boot0sio and note that it requires modem handshake to work.phk2004-06-171-2/+9
|
* Spelling nit.ru2004-06-041-1/+1
|
* Remove spurious semicolons. Outside of functions they are actually errors butstefanf2004-05-161-1/+1
| | | | | | | | GCC doesn't warn about them without -pedantic. Approved by: das (mentor) PR: 56649 Reviewed by: md5
* Get rid of duplicates.ru2003-09-141-1/+1
|
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+2
|
* Add an example of how to use the -m option that clarifies how the bits injhb2003-04-151-4/+5
| | | | | | | the mask correspond to slice numbers. Also, clarify the description of the existing example. Requested by: Larry Rosenman <ler@lerctr.org>
* style.Makefile(5)obrien2003-04-041-1/+2
|
* Use the new sector0 munging ioctls to make boot0cfg work under GEOM.phk2002-12-291-8/+31
|
* Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:phk2002-10-011-0/+1
| | | | | | | | | | | | | | | | Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h. These two new copies are still intact copies of disklabel.h and therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them in programs which already include <sys.disklabel.h> is currently a no-op. This commit adds a number of such #includes. Once I have verified that I have fixed all the places which need fixing, I will commit the updated versions of the three #include files. Sponsored by: DARPA & NAI Labs.
* The .Nm utilitycharnier2002-07-141-1/+1
|
* Remove references to the update/noupdate flag from the descriptioniedowse2002-05-281-4/+1
| | | | | | | and examples of the "-s" option, since these two features operate completely independently of each other. Reviewed by: obrien
* The man page is VERY WRONG about using "-o noupdate" with -s.obrien2002-05-251-5/+12
| | | | So fix it, and add an example using -s.
* Trivial language fixes.dannyboy2002-05-141-3/+3
| | | | | PR: 38015 Submitted by: Chris Pepper <pepper@mail.rockefeller.edu>
* WARNS=2 cleanup.mikeh2001-12-112-7/+12
| | | | | Submitted by: Maxime Henrion <mux@qualys.com> MFC after: 2 weeks
* mdoc(7) police: utilize the new .Ex macro.ru2001-08-151-1/+1
|
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-141-1/+3
|
OpenPOWER on IntegriCloud