DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th May 2008
Nobber's Avatar
Nobber Nobber is offline
Port Guard
 
Join Date: May 2008
Location: Nova Scotia
Posts: 11
Thanked 0 Times in 0 Posts
Default FreeBSD equivalent of DOS's fdisk /mbr

Just wondering if FreeBSD has an equivalent to the 'fdisk /mbr' command in DOS (which installs a standard, simple bootloader in the MBR that chainloads from the active partition).

The boot0cfg man page suggests using:

Code:
# fdisk -B ad0
but all that seems to do is replace the current bootloader with the one that was present before you installed FreeBSD. And since the bootloader that was present before I installed FreeBSD was in fact the FreeBSD bootloader, this fdisk command effectively does nothing.

By the way, the reason I want to revert to the simple bootloader is that FreeBSD is the only OS on this computer, so I have no need for an interactive bootloader.
Reply With Quote
  #2   (View Single Post)  
Old 28th May 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

There's probably a nice command-oriented equivalent, but what I'd do is:
  1. # sysinstall
  2. Select -> Configure -> Fdisk
  3. Press 'q' to exit Fdisk
  4. Select your choice from the bootloader menu... (Probably 'Standard' in your case.)

This is untested. Use at your own risk.
__________________
Kill your t.v.
Reply With Quote
  #3   (View Single Post)  
Old 28th May 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Thanked 49 Times in 43 Posts
Default

AFAIR i could never get the sysinstall thing to work.

this is untested too but i have analysed the hex dump of the mbr boot code, checking fdisk source and double-checked everything.

Disclaimer: try it at your own risk.

run:

# fdisk -B -b mbr ad0

(the required mbr file and its checksum have been attached (zip file).)

- you will be asked if you want to install the boot code - answer yes.
- then you will be asked to install the partition table (actually you will be updating only the boot code and not touching the partition table) - answer yes.
- reboot.

the mbr file and its checksum have been attached (zip file).
Attached Files
File Type: zip mbr.zip (524 Bytes, 49 views)
Reply With Quote
  #4   (View Single Post)  
Old 29th May 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

You could always boot from a DOS floppy and run fdisk. Or use the Ultimate Boot CD to boot to DOS via CD.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #5   (View Single Post)  
Old 30th May 2008
ibutho ibutho is offline
New User
 
Join Date: May 2008
Posts: 4
Thanked 0 Times in 0 Posts
Default

You can use the FreeDOS disc.
Reply With Quote
  #6   (View Single Post)  
Old 3rd June 2008
osman osman is offline
Real Name: osman
New User
 
Join Date: May 2008
Location: Lahore, Pakistan
Posts: 9
Thanked 0 Times in 0 Posts
Default

In Linux ive used for SCSIs

dd if=/dev/zero of=/dev/sdX bs=512 count=1 to remove mbr+partition table.


and dd if=/dev/zero of=/dev/sdX bs=446 count=1 to just remove boot loader.

Replacing sdx with da0 or your device name should also work in BSD. Cause this is standard area to place boot loaders and partition table.

Last edited by osman; 3rd June 2008 at 07:23 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fdisk Question Crotalus FreeBSD Installation and Upgrading 2 10th February 2010 08:10 AM
equivalent to freebsd fetch pbd OpenBSD General 9 7th August 2009 11:45 AM
OpenSolaris equivalent of systrace? DraconianTimes Solaris 9 31st January 2009 05:36 AM
fdisk -B does not rewrite the mbr kasse NetBSD General 0 25th November 2008 11:07 PM
Remastersys FreeBSD equivalent? businessgeeks FreeBSD General 2 4th August 2008 01:44 PM


All times are GMT. The time now is 07:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick