MS-SYS(1)
β¨ MS-SYS π
(that's the ms-sys man page, bestie)
π NAME π
ms-sys β she writes Microsoft boot blocks, no cap π
π¦ SYNOPSIS π¦
ms-sys [options] [device]
πΈ DESCRIPTION πΈ
okay so, ms-sys is the girl who writes Microsoft-compatible boot records. that's the whole vibe. she's iconic, she's purpose-built, she does exactly what she says on the tin π«Ά
β OPTIONS β
here's the full rundown, every single one, i'm not skipping anybody π
-1,--fat12β writes a FAT12 floppy boot record to device. tiny floppy energy.-2,--fat32nt5β writes a FAT32 partition NT5.0 (NTLDR) boot record to device.-8,--fat32nt6β writes a FAT32 partition NT6.0 (BOOTMGR) boot record to device.-x,--exfatnt6β writes an EXFAT partition NT6.0 (BOOTMGR) boot record to device.-e,--fat32peβ writes a FAT32 partition PE boot record to device, for USB install and recovery. honestly highkey useful β¨-3,--fat32β writes a FAT32 partition DOS (Win9x) boot record to device.-4,--fat32freeβ writes a FAT32 partition FreeDOS boot record to device.-5,--fat16freeβ writes a FAT16 partition FreeDOS boot record to device.-6,--fat16β writes a FAT16 partition DOS (Win9x) boot record to device.-n,--ntfsβ writes an NTFS partition Windows 7 boot record to device. > heads up: this one should be considered experimental and probably is of no practical use π like it's giving "why would you" energy.-o,--fat16rosβ writes a FAT16 partition ReactOS boot record to device.-c,--fat32rosβ writes a FAT32 partition ReactOS boot record to device.-q,--fat32kosβ writes a FAT32 partition KolibriOS boot record to device.-l,--wipelabelβ resets the partition disk label in the boot record. bye label π-p,--partitionβ writes partition info (hidden sectors, heads and drive id) to the boot record. you might need this on some partitions depending on which program was used to create the file system. iykyk π§-H <n>,--heads <n>β sets the number of heads written with the-pswitch.-O <s>,--writeoem <s>β writes OEM ID string<s>to the file system.-S <x>,--writewds <x>β writes Windows Disk Signature hexadecimal<x>to the MBR.-7,--mbr7β writes a Windows 7 master boot record to device. does not change Windows Disk Signature (bytes01b8-01bd). this MBR will boot certain partition types beyond cylinder 1024 using LBA addressing. main character MBR π₯-i,--mbrvistaβ writes a Windows Vista master boot record to device. does not change Windows Disk Signature (bytes01b8-01bd). this MBR will boot certain partition types beyond cylinder 1024 using LBA addressing.-m,--mbrβ writes a Windows 2000/XP/2003 master boot record to device. does not change Windows Disk Signature (bytes01b8-01bd). this MBR will boot certain partition types beyond cylinder 1024 using LBA addressing.-9,--mbr95bβ writes a Windows 95B/98/98SE/ME master boot record to device. does not change Windows Disk Signature (bytes01b8-01bd) or boot drive and time (bytes00da-00df). this MBR will boot FAT-LBA partition types0cand0ebeyond cylinder 1024 using LBA addressing.-d,--mbrdosβ writes a DOS/Windows NT master boot record to device. does not change Windows Disk Signature (bytes01b8-01bd). this MBR will not boot beyond cylinder 1024 because it does not support LBA addressing. sad but true π-s,--mbrsyslinuxβ writes a syslinux master boot record to device. does not change Windows Disk Signature (bytes01b8-01bd). this MBR will boot any partition types beyond cylinder 1024 using LBA addressing. she does it all π-t,--mbrgptsyslinuxβ writes a GPL syslinux GPT MBR to device. this MBR will boot from a GPT partition table.-a,--mbrreactosβ writes a ReactOS MBR to device.-k,--mbrkolibriosβ writes a KolibriOS MBR to device.-r,--mbrrufusβ writes a Rufus MBR to device.-g,--mbrgrub4dosβ writes a Grub4Dos MBR to device.-b,--mbrgrub2β writes a Grub 2 MBR to device.-z,--mbrzeroβ writes an empty (zeroed, non-bootable) master boot record to device. zeroes all bytes except the partition map and signature id (bytes01be-01ff). similar to the empty DOS partition table thatfdiskcreates. empty girlboss era π-f,--forceβ forces writing of the boot record. she's not asking twice.-h,--helpβ shows summary of options.-v,--versionβ shows program version.-w,--writeβ writes the automatically selected boot record to device. the "just handle it for me" option fr fr β¨
if ms-sys is started without any options, a simple diagnosis will be done on the given device. she'll just look at it and tell you what's up π©Ί
π NOTES π
- when writing EXFAT partition info, the number of heads value is not used, and the wipelabel feature is not supported either β because these are not stored in the BIOS Parameter Block or anywhere in the boot sector. their associated switches will be ignored if you specify them. wasted keystrokes, bestie π
- when writing NTFS partition info, the physical drive id is not used, and the wipelabel feature is not supported for the reasons stated above. the switches will be ignored.
- the Write OEM ID feature is only supported on FAT12/16/32 filesystems. changing this value on NTFS or EXFAT volumes will result in an unmountable partition. π do not do this. like genuinely do not.
π EXAMPLES π
please note: Windows ME is not useful for making standalone bootable floppies. however, Win9x and DOS work fine with the first two examples. noted. π
πΎ creating a 1.68 MB bootable floppy
this example assumes you have your windows installation mounted at /dosc and also have mtools and fdformat installed.
fdformat /dev/fd0u1680
mformat a:
ms-sys -w /dev/fd0
mcopy /dosc/io.sys a:
mcopy /dosc/msdos.sys a:
mcopy /dosc/command.com a:
π¦ creating a bootable 2.8 MB floppy image to use with an el-torito bootable CD
dd if=/dev/zero of=floppy288.img bs=1024 count=2880
/sbin/mkdosfs floppy288.img
ms-sys -1 -f floppy288.img
su
mount -o loop floppy288.img /mnt
cp msdos.sys /mnt/
cp io.sys /mnt/
cp command.com /mnt/
(it might also be a good idea to add a config.sys and autoexec.bat with CDROM support)
umount /mnt
exit
cp floppy288.img cd-files/boot.img
mkisofs -b boot.img -c boot.cat -o cdimage.iso cd-files
(burn the file cdimage.iso to a CD with cdrecord or another program)
π restoring a backup of Win9x or Win ME to a fresh hard disk
Step 1, use GNU parted to create your FAT32 partition and file system:
parted (then create partition and file system)
Step 2, write the MBR:
ms-sys -w /dev/hda
Step 3, write the FAT32 partition boot record:
ms-sys -w /dev/hda1
Step 4, mount your new filesystem:
mount /dev/hda1 /mnt
Step 5, read your backup
cd /mnt; tar -xzvf /path/to/my_windows_backup_file.tgz
π ENVIRONMENT π
the variables LANG and LC_ALL have the usual meaning β however there are not many translations available. like, the usual meaning, but not the usual variety, if you catch my drift π§
π BUGS π
okay so there have been reports about unbootable FAT32 partitions created with "mformat -F c:". the problem has also been reported on partitions formatted with mkdosfs and mkfs.vfat. one workaround is to use gnu parted to create the partition instead. since version 1.1.3 ms-sys has the switch -p which is supposed to fix this problem. unfortunately, when using ms-sys with Linux kernel 2.6, neither the -p switch nor gnu parted might work. a simple workaround is to use ms-sys with Linux kernel 2.4. another possible workaround is to manually set the number of heads with the switch -H. if the system has been booted by LILO, the correct number of heads can be given by "lilo -T geom". it's giving troubleshooting arc π
the writing of NTFS partition boot records in ms-sys probably has no practical use. for Windows 7 it has been reported that doing "sysprep" before making an image of an NTFS partition will make the partition restored from the image bootable. so there's that π«Ά
π AUTHOR π
this manual page was originally written by GΓΌrkan SengΓΌn and since edited by Henrik Carlqvist. the program ms-sys is mostly written by Henrik Carlqvist, and the file CONTRIBUTORS in the source archive contains a complete list of contributors. legends, all of them π
π₯ SEE ALSO π₯
mformat(1) fdformat(8) mkdosfs(8) mkisofs(8) parted(8)
and that's the whole page, bestie π this one's dated April 17, 2020 and it comes from ms-sys (section 1 of the General Commands Manual) β so go forth, write your boot blocks, and remember: back up first, slay always πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: ms-sys 2.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms