Making a disk bootable

balanga

Son of Beastie

Reaction score: 158
Messages: 3,377

Can I make a non-FreeBSD disk/USB stick bootable using something like gpart bootcode -b /boot/bootxyz da0 for making a DOS or Linux bootable? If FreeBSD doesn't have the appropriate code what could I use instead?
 

Paul Floyd

Member

Reaction score: 22
Messages: 96

Wikipedia has a fairly lengthy article on the MBR. I would expect gpart to work. It would be a good idea to practice on a USB stick that has nothing important on it though.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,918
Messages: 33,312

FreeBSD's MBR bootcode only boots FreeBSD, it specifically searches for the other FreeBSD bootstages. You might be able to use boot0cfg(8) though, but it will only work on MBR.
 

Ordoban

Active Member

Reaction score: 27
Messages: 103

FreeBSD contains a additional MBR bootloader /boot/boot0 who provides a small boot-menu. This can chain-load the boot-sectors of other operating systems as well. I know this working with FreeBSD and Windows.
I don't know if Linux would boot like this, because Linux comes allways with GRUB. Does the Linux loader "LILO" still exist?
 
OP
B

balanga

Son of Beastie

Reaction score: 158
Messages: 3,377

I think I need to run syslinux() which I have successfully done in the past but this time I'm getting an error:-

When running syslinux --install /dev/da0s1 I get
operation not permitted
Not sure why...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,918
Messages: 33,312

Probably because you're trying to write an MBR to a slice instead of a disk.
 

mindware

New Member


Messages: 4

I have read round there, that GPT it's more efficient. Anyway, search in the handbook. I don't remember it well. I think that it was in the handbook.
 
Top