aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/boot0cfg
Commit message (Collapse)AuthorAgeFilesLines
* Revert r362466Baptiste Daroussin2020-06-222-2/+2
| | | | | | | | | Such change should not have happen without prior discussion and review. With hat: transitioning core Notes: svn path=/head/; revision=362488
* Improve wording to be more precise and clear.Hans Petter Selasky2020-06-212-2/+2
| | | | | | | | | | | | No functional change intended. s/Master Boot/Main Boot/ (also called MBR) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=362466
* Remove deprecated GEOM classesConrad Meyer2019-08-131-10/+0
| | | | | | | | | | | | | | Follow-up on r322318 and r322319 and remove the deprecated modules. Shift some now-unused kernel files into userspace utilities that incorporate them. Remove references to removed GEOM classes in userspace utilities. Reviewed by: imp (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21249 Notes: svn path=/head/; revision=351001
* Add a “skip_dsn” option to g_part's bootcode verb to prevent g_part_mbrDag-Erling Smørgrav2018-11-271-4/+8
| | | | | | | | | | | | | from setting the volume serial number. This unbreaks older boot blocks that don't support serial numbers, and allows boot0cfg to set the serial number itself if requested by the user. Submitted by: lev@, yuripv@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D17386 Notes: svn path=/head/; revision=341067
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Use nitems() from sys/param.hMarcelo Araujo2017-03-111-1/+1
| | | | | | | | | Reviewed by: jhb MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9941 Notes: svn path=/head/; revision=315046
* Adjust previous fix to conform to the existing style in this file.John Baldwin2016-01-141-2/+1
| | | | Notes: svn path=/head/; revision=293977
* Fix the precious change to check the pointer returned by malloc().John Baldwin2015-12-181-1/+1
| | | | | | | | Submitted by: luke <luke.tw@gmail.com> Pointy hat to: jhb Notes: svn path=/head/; revision=292443
* Exit cleanly if malloc() fails to allocate a buffer for a copy of theJohn Baldwin2015-12-171-0/+2
| | | | | | | | | | | current MBR. PR: 205322 Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=292410
* It's 2015, and some people are still trying to use fdisk and thenEdward Tomasz Napierala2015-09-021-3/+2
| | | | | | | | | | | | | | | | 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. Reviewed by: wblock@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3315 Notes: svn path=/head/; revision=287396
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-191-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge head@256284Simon J. Gerraty2013-10-131-4/+4
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | Convert usr.sbin to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275054
* | | use .Mt to mark up email addresses consistently (part2)Baptiste Daroussin2014-06-201-1/+1
| |/ |/| | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267668
* | Sweep man pages replacing ad -> ada.Sergey Kandaurov2013-10-011-4/+4
|/ | | | | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only Notes: svn path=/head/; revision=255977
* Remove superfluous paragraph macro.Joel Dahl2012-03-251-1/+0
| | | | Notes: svn path=/head/; revision=233455
* Be as explicit as possible when describing relation between the -m maskKonstantin Belousov2012-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 Notes: svn path=/head/; revision=230978
* Allow boot0cfg to force a PXE boot via boot0 on the next boot.John Baldwin2011-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 Notes: svn path=/head/; revision=228738
* Use NO_WCAST_ALIGN for usr.sbin/boot0cfg; because this is only built forDimitry Andric2011-12-171-0/+2
| | | | | | | | | x86, any alignment warnings can be safely ignored. MFC after: 1 week Notes: svn path=/head/; revision=228656
* Plug fd leaksKevin Lo2011-11-231-0/+2
| | | | Notes: svn path=/head/; revision=227876
* Remove a note about disabling of GEOM protection mechanism.Andrey V. Elsukov2011-11-071-16/+1
| | | | | | | | | boot0cfg should work without such hack. MFC after: 3 days Notes: svn path=/head/; revision=227298
* Reorganize write_mbr() function to be able write bootcode with differentAndrey V. Elsukov2011-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 Notes: svn path=/head/; revision=227297
* Add reference to gpart(8).Andrey V. Elsukov2011-11-061-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=227274
* Mark global functions and/or variables in boot0cfg(8) static where possible.Ed Schouten2011-11-061-4/+4
| | | | | | | This allows compilers and static analyzers to do more thorough analysis. Notes: svn path=/head/; revision=227250
* Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART'Andrey V. Elsukov2011-10-251-1/+1
| | | | | | | | | control interface. MFC after: 3 days Notes: svn path=/head/; revision=226714
* Revert r209469: it causes the rest of the function to be bypassed.Rebecca Cran2010-12-061-2/+0
| | | | | | | Reported by: ae Notes: svn path=/head/; revision=216229
* If a device can't be opened, don't keep going but display the errorRebecca Cran2010-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) Notes: svn path=/head/; revision=209469
* Fixed static linkage.Ruslan Ermilov2010-02-261-2/+2
| | | | Notes: svn path=/head/; revision=204352
* The last big commit: let usr.sbin/ use WARNS=6 by default.Ed Schouten2010-01-021-2/+0
| | | | Notes: svn path=/head/; revision=201390
* Write the MBR by using the bootcode verb of the gpart class.Marcel Moolenaar2009-03-021-27/+22
| | | | | | | | The "write MBR" verb is kept for backward compatibility, but the DIOCSMBR ioctl has been removed. Notes: svn path=/head/; revision=189273
* Extend the geom-related info and put in the NOTE section, notLuigi Rizzo2009-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 Notes: svn path=/head/; revision=187195
* Another, hopefully final set of changes to boot0 and boot0cfg.Luigi Rizzo2008-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 Notes: svn path=/head/; revision=185579
* - Improve error message given on g_providername call failure.Ulf Lilleengen2008-09-301-2/+2
| | | | | | | | | - While there, make error messages consistent with the rest. Approved by: kib (mentor) Notes: svn path=/head/; revision=183487
* - Make use of the new and g_device_path utility function in libgeom to avoidUlf Lilleengen2008-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) Notes: svn path=/head/; revision=182844
* "-b /boot/mbr" is redundant, /boot/mbr is the default boot code for fdisk(8).Pav Lucistnik2007-06-071-2/+2
| | | | | | | Pointed out by: ru Notes: svn path=/head/; revision=170396
* - Revert previous revision, it was incorrectPav Lucistnik2007-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 Notes: svn path=/head/; revision=170381
* Document /boot/mbr (non-interactive boot block)Pav Lucistnik2007-05-121-0/+10
| | | | | | | | | PR: doc/111840 Submitted by: Warren Block <wblock@wonkity.com> MFC after: 1 week Notes: svn path=/head/; revision=169498
* Attempt gctl verb "write MBR" when updating.Poul-Henning Kamp2005-07-152-1/+25
| | | | | | | This should solve the problem of modifying the MBR while running. Notes: svn path=/head/; revision=148036
* Document how to make boot0cfg work on mounted disks.Scott Long2005-04-071-0/+11
| | | | Notes: svn path=/head/; revision=144756
* Sort sections.Ruslan Ermilov2005-01-181-2/+2
| | | | Notes: svn path=/head/; revision=140442
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368