wok-next view ms-sys/description.txt @ rev 20747

system-tools-backends: provide dev package; liboobs: use that package
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed May 30 16:54:11 2018 +0300 (2018-05-30)
parents
children
line source
1 This program is used to create Microsoft compatible boot records. It is able to
2 do the same as Microsoft "`fdisk /mbr`" to a hard disk. It is also able to do
3 the same as Microsoft "`sys d:`" to a floppy or FAT partition except that it
4 does not copy any system files, only the boot record is written.
6 Specifications of boot records is taken from
7 http://www.geocities.com/thestarman3/asm/mbr/MBR_in_detail.htm
9 The program is useful when using Linux to restore a backup of a reference
10 Microsoft Windows installation.
12 Author of this program is Henrik Carlqvist <henca@users.SourceForge.net>, it
13 is available for download from http://ms-sys.sourceforge.net/
15 ## Examples
17 Please note that Windows ME is not useful for making standalone bootable
18 floppies. However, Win9x and DOS works fine with example 1 and example 3.
20 ### Example 1, creating a 1.68 MB bootable floppy:
22 This example assumes that you have your windows installation mounted at /dosc
23 and also have mtools and fdformat installed.
25 ```
26 fdformat /dev/fd0u1680
27 mformat a:
28 ms-sys -w /dev/fd0
29 mcopy /dosc/io.sys a:
30 mcopy /dosc/msdos.sys a:
31 mcopy /dosc/command.com a:
32 ```
34 ### Example 2, restoring a backup to a fresh hard disk:
36 * Step 1, use GNU parted to create your FAT32 partition and file system:
38 ```
39 parted
40 ```
42 (then create partition and file system)
44 * Step 2, write the MBR:
46 ```
47 ms-sys -w /dev/hda
48 ```
50 * Step 3, write the FAT32 partition boot record:
52 ```
53 ms-sys -w /dev/hda1
54 ```
56 * Step 3b, write partition info and drive id to partition:
58 ```
59 ms-sys -p /dev/hda1
60 ```
62 This step might be needed depending on which program was used to format the
63 partition. If the program was formatted with gnu parted this step could be
64 skipped. It is also possible to combine this flag with the previous step
65 like this:
67 ```
68 ms-sys -wp /dev/hda1
69 ```
71 * Step 4, mount your new filesystem:
73 ```
74 mount /dev/hda1 /mnt
75 ```
77 * Step 5, read your backup
79 ```
80 cd /mnt; tar -xzvf /path/to/my_windows_backup_file.tgz
81 ```
84 ### Example 3, creating a bootable 2.8 MB floppy image for use with an el-torito bootable CD:
86 ```
87 dd if=/dev/zero of=floppy288.img bs=1024 count=2880
88 /sbin/mkdosfs floppy288.img
89 ms-sys -1 -f floppy288.img
90 su
91 mount -o loop floppy288.img /mnt
92 cp msdos.sys /mnt/
93 cp io.sys /mnt/
94 cp command.com /mnt/
95 ```
97 (it might also be a good idea to add a config.sys and autoexec.bat with CDROM
98 support)
100 ```
101 umount /mnt
102 exit
103 cp floppy288.img cd-files/eltorito.img
104 mkisofs -b eltorito.img -c eltorito.cat -o cdimage.iso cd-files
105 ```
107 (burn the file cdimage.iso to a CD with cdrecord or another program)