FreeBSD equivalent of Rufus

It's easy to download and compile this: https://github.com/pbatard/ms-sys
I compiled it, it's supposed to work. I tried it but didn't have time to figure it out. I wonder if anyone had luck using that.
I tried to get this to work but couldn't produce a bootable device. Maybe I didn't stumble on the correct options.

It compiles OK. I only need to install standard FreeBSD pkgs gmake and gettext-tools and run gmake.

Problem is I get so many options and don't know what to choose or what to expect.

I only want to create a bootable USB stick initially, I'm not bothered what boots up. Once I have it working I can experiment.

I tried ms-sys -7 /dev/da0

and got a response that a Windows 7 master boot record had been successfully written to /dev/da0 but it was not recognised as a bootable device when I tried to boot from it.
 
Does not seems like many, just take the good ones,
Code:
Usage:
    ms-sys [options] [device]
Options:
    -1, --fat12     Write a FAT12 floppy boot record to device
    -2, --fat32nt5  Write a FAT32 partition NT5.0 boot record to device
    -8, --fat32nt6  Write a FAT32 partition NT6.0 boot record to device
    -x, --exfatnt6  Write a EXFAT partition NT6.0 boot record to device
    -e, --fat32pe   Write a FAT32 partition PE boot record to device
    -3, --fat32     Write a FAT32 partition DOS boot record to device
    -4, --fat32free Write a FAT32 partition FreeDOS boot record to device
    -5, --fat16free Write a FAT16 partition FreeDOS boot record to device
    -6, --fat16     Write a FAT16 partition DOS boot record to device
    -n, --ntfs      Write a NTFS partition Windows 7 boot record to device
    -o, --fat16ros  Write a FAT16 partition ReactOS boot record to device
    -c, --fat32ros  Write a FAT32 partition ReactOS boot record to device
    -q, --fat32kos  Write a FAT32 partition KolibriOS boot record to device
    -l, --wipelabel Reset partition disk label in boot record
    -p, --partition Write partition info (hidden sectors, heads and drive id)
                    to boot record
    -H, --heads <n> Manually set number of heads if partition info is written
    -B, --bps <n>   Manually set number of bytes per sector (default 512)
    -O, --writeoem <s>   Write OEM ID string <s> to file system
    -S, --writewds <x>   Write Windows Disk Signature hexadecimal <x> to MBR
    -7, --mbr7      Write a Windows 7 MBR to device
    -i, --mbrvista  Write a Windows Vista MBR to device
    -m, --mbr       Write a Windows 2000/XP/2003 MBR to device
    -9, --mbr95b    Write a Windows 95B/98/98SE/ME MBR to device
    -d, --mbrdos    Write a DOS/Windows NT MBR to device
    -s, --mbrsyslinux    Write a Syslinux MBR to device
    -t, --mbrgptsyslinux Write a Syslinux GPT MBR to device
    -a, --mbrreactos     Write a ReactOS MBR to device
    -k, --mbrkolibrios   Write a KolibriOS MBR to device
    -r, --mbrrufus  Write a Rufus MBR to device
    -g, --mbrgrub4dos    Write a Grub4Dos MBR to device
    -b, --mbrgrub2  Write a Grub 2 MBR to device
    -z, --mbrzero   Write an empty (zeroed) MBR to device
    -f, --force     Force writing of boot record
    -h, --help      Display this help and exit
    -v, --version   Show program version
    -w, --write     Write automatically selected boot record to device

    Default         Inspect current boot record

Warning: Writing the wrong kind of boot record to a device might
destroy partition information or file system!
 
AI warning,
Important Considerations

  • Dangerous Tool: Use it with extreme caution. Running the wrong command can "obliterate" your entire MBR and partition table.
  • Modern Compatibility: While it supports newer versions like Windows 7, it is mostly effective for BIOS/MBR systems. Its usefulness for modern UEFI/GPT systems is limited.
  • No File Copying: Unlike the DOS sys command, ms-sys does not copy system files (like io.sys or msdos.sys); you must manually copy those if you are building a bootable disk from scratch
 
Does not seems like many, just take the good ones,
Code:
Usage:
    ms-sys [options] [device]
Options:
    -1, --fat12     Write a FAT12 floppy boot record to device
    -2, --fat32nt5  Write a FAT32 partition NT5.0 boot record to device
    -8, --fat32nt6  Write a FAT32 partition NT6.0 boot record to device
    -x, --exfatnt6  Write a EXFAT partition NT6.0 boot record to device
    -e, --fat32pe   Write a FAT32 partition PE boot record to device
    -3, --fat32     Write a FAT32 partition DOS boot record to device
    -4, --fat32free Write a FAT32 partition FreeDOS boot record to device
    -5, --fat16free Write a FAT16 partition FreeDOS boot record to device
    -6, --fat16     Write a FAT16 partition DOS boot record to device
    -n, --ntfs      Write a NTFS partition Windows 7 boot record to device
    -o, --fat16ros  Write a FAT16 partition ReactOS boot record to device
    -c, --fat32ros  Write a FAT32 partition ReactOS boot record to device
    -q, --fat32kos  Write a FAT32 partition KolibriOS boot record to device
    -l, --wipelabel Reset partition disk label in boot record
    -p, --partition Write partition info (hidden sectors, heads and drive id)
                    to boot record
    -H, --heads <n> Manually set number of heads if partition info is written
    -B, --bps <n>   Manually set number of bytes per sector (default 512)
    -O, --writeoem <s>   Write OEM ID string <s> to file system
    -S, --writewds <x>   Write Windows Disk Signature hexadecimal <x> to MBR
    -7, --mbr7      Write a Windows 7 MBR to device
    -i, --mbrvista  Write a Windows Vista MBR to device
    -m, --mbr       Write a Windows 2000/XP/2003 MBR to device
    -9, --mbr95b    Write a Windows 95B/98/98SE/ME MBR to device
    -d, --mbrdos    Write a DOS/Windows NT MBR to device
    -s, --mbrsyslinux    Write a Syslinux MBR to device
    -t, --mbrgptsyslinux Write a Syslinux GPT MBR to device
    -a, --mbrreactos     Write a ReactOS MBR to device
    -k, --mbrkolibrios   Write a KolibriOS MBR to device
    -r, --mbrrufus  Write a Rufus MBR to device
    -g, --mbrgrub4dos    Write a Grub4Dos MBR to device
    -b, --mbrgrub2  Write a Grub 2 MBR to device
    -z, --mbrzero   Write an empty (zeroed) MBR to device
    -f, --force     Force writing of boot record
    -h, --help      Display this help and exit
    -v, --version   Show program version
    -w, --write     Write automatically selected boot record to device

    Default         Inspect current boot record

Warning: Writing the wrong kind of boot record to a device might
destroy partition information or file system!
I'm basically trying find one option which does something discernable. I haven't found anything so far and would like to know that someone has got this working. Maybe is doesn't actually do anything on FreeBSD.
 
I did bootable USB flash from Windows ISO couple times with ntfs-3g, ms-sys and 7z. Its rather easy. Just keep few things in mind:

1. NTFS partition should be created with some offset from start of disk.
2. 2 bootblocks should be installed with ms-sys. One for disk and one for partition.
3. Partition geometry should be provided to mkntfs to write proper boot records.

Good luck
 
I did bootable USB flash from Windows ISO couple times with ntfs-3g, ms-sys and 7z. Its rather easy. Just keep few things in mind:

1. NTFS partition should be created with some offset from start of disk.
2. 2 bootblocks should be installed with ms-sys. One for disk and one for partition.
3. Partition geometry should be provided to mkntfs to write proper boot records.

Good luck
Just to confirm, you have created a USB stick which boots Windows and you did this using ms-sys?

I have been unable to get it to work.

Can you tell me what you did and what options you used with ms-sys as everything I've tried so far produced nothing.
 
> Just to confirm, you have created a USB stick which boots Windows and you did this using ms-sys?

Yes.

> Can you tell me what you did and what options you used with ms-sys as everything I've tried so far produced nothing.

about ms-sys. Apply
-7 for boot device
-n for boot partition

There are more prerequisities to boot successfully. See my previous post.
Give me a couple of days to submit ms-sys port and ntfs-3g patches to make things easier. I will post command sequence after that.
 
Just wait quitly until patches arrive. [& Any partition can be created with gpart, gpart knows "type" but not "format" ]
[ On linux they are shown as fat32 ; Microsoft reserved partition ; Basic data partition ; note i'm not a specialist]
 
Assume that da0 is clean USB stick and Windows10.iso is ISO image. Proper command sequence for patched ntfs-3g is:

sudo gpart create -s MBR da0
sudo gpart add -t ntfs -a 8064 da0
sudo gpart set -a active -i 1 da0
sudo mkntfs -v -f /dev/da0s1
sudo ms-sys -7 /dev/da0
sudo ms-sys -n /dev/da0s1
sudo ntfs-3g /dev/da0s1 /mnt
7z x -o/mnt Windows10.iso

For unpatched ntfs-3g you must supply NTFS partition geometry via command-line parameters. See man mkntfs.
 
Following your examples I created a USB stick but can't boot from it.

Does it require UEFI to boot because I'm trying it on a very old machine. There is no error msg when I'm trying to boot although nothing at all appears on screen.

If I try to mount the USB stick I get this message:-
Code:
Incomplete multi-sector transfer: magic: 0x454c4946  size: 1024  usa_ofs: 48  usa_count: 2  data: 0  usn: 1: Input/output error
Record 0 has no FILE magic (0x44414142)
Failed to load $MFT: Input/output error
Failed to mount '/dev/da0s1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
 
Back
Top