rpms/makebootfat/devel makebootfat-README.usbboot, 1.1, 1.2 makebootfat.spec, 1.5, 1.6

Dmitry Butskoy (buc) fedora-extras-commits at redhat.com
Mon Oct 1 12:38:39 UTC 2007


Author: buc

Update of /cvs/extras/rpms/makebootfat/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5167

Modified Files:
	makebootfat-README.usbboot makebootfat.spec 
Log Message:



Index: makebootfat-README.usbboot
===================================================================
RCS file: /cvs/extras/rpms/makebootfat/devel/makebootfat-README.usbboot,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- makebootfat-README.usbboot	26 Dec 2005 11:55:55 -0000	1.1
+++ makebootfat-README.usbboot	1 Oct 2007 12:38:06 -0000	1.2
@@ -1,35 +1,48 @@
 1. Extract contents of the image */images/diskboot.img (from an appropriate
-distribution) to a directory, for example /tmp/imagedir
+distribution) to a directory, for example /tmp/imagedir/ .
 
-2. Copy file ldlinux.bss (from /usr/share/makebootfat directory or,
-originally, from syslinux-*.src.rpm sources) to the same directory 
+2. Note, that ldlinux.sys file from diskboot.img is unusable for makebootfat
+(because it is already prepared some way). You have to use
+either ldlinux.bss and ldlinux.sys from /usr/share/makebootfat directory,
+or obtain newer ones from the correspond "syslinux" tarball
+(at ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux[/Old] ). The last way
+is strongly recommended, as makebootfat's ones could be old enough
+for some modern diskboot.img requirements...
 
-4. Put file mbrfat.bin (from /usr/share/makebootfat, or makebootfat sources)
-to the same directory
+3. Create a work directory, say /tmp/work, and copy to it "mbrfat.bin"
+(from /usr/share/makebootfat) and "ldlinux.bss" with "ldlinux.sys"
+(either from /usr/share/makebootfat or newer ones derived from
+the downloaded syslinux tarball).
 
-   Note: generally, it is not required to put both the files into the same dir,
-but for simpler usage it is better.
-
-5. Generate an image of appropriate size, at least the size of diskboot.img
-(see above), but better some more (8 or 16 Mb may be useful)
-   dd bs=1M count=16 </dev/zero >/tmp/image.img
-
-6. Make the boot image in this temporary file image:
-   losetup /dev/loop0 /tmp/image.img
-   cd /tmp/imagedir
-   /usr/bin/makebootfat -o /dev/loop0 -X -b ldlinux.bss \
-	-m mbrfat.bin -F /tmp/imagedir
-   losetup -d /dev/loop0
+4. Remove old "ldlinux.sys" from /tmp/imagedir
 
-   Note: for syslinux >= 3, option `-Y' may be used instead of `-X'
-   Note: if you specify real disk (i.e., /dev/sda instead of /dev/loop0),
+5. Generate an image file of appropriate size, at least the size of diskboot.img
+(see above), but better some more (16 Mb could be useful)
+   dd bs=1M count=16 </dev/zero >/tmp/work/image.img
+
+6. Go to your /tmp/work and run the makebootfat, for example:
+
+   /usr/bin/makebootfat -o image.img -b ldlinux.bss -m mbrfat.bin \
+	-F -c ldlinux.sys -Y /tmp/imagedir/
+
+   You can use also '-Z' to handle USB-ZIP format, but this way it seems that
+   your image will be suitable for "flash for boot only", not for general
+   purpose flash with some boot stuff at the first partition...
+
+   See makebootfat(1) for additional options etc.
+
+   Note: if you specify real disk (i.e., /dev/sdX instead of the image file),
    the whole disk area will be filled by a single fat filesystem...
 
 7. Copy the created image to a target media:
-   dd bs=512 </tmp/image.img >/dev/sda
+   dd bs=512 </tmp/image.img >/dev/sdX
+
+8. Add another partitions (if needed) onto the free space left on the media
+   fdisk /dev/sdX
 
-8. Add another partitions (if needed) onto free space left on the media
-   fdisk /dev/sda
+   If the result flash cannot boot for some reason, try to re-set
+   the first partition as bootable (type 'a' twice to off and on back
+   the boot flag on it). You can also re-type 'c' (DOS compatibility) as well.
 
 Thats all.
 


Index: makebootfat.spec
===================================================================
RCS file: /cvs/extras/rpms/makebootfat/devel/makebootfat.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- makebootfat.spec	17 Aug 2007 12:05:10 -0000	1.5
+++ makebootfat.spec	1 Oct 2007 12:38:06 -0000	1.6
@@ -1,13 +1,30 @@
+%define new_ldlinux	0
+
 Summary: Utility for creation bootable FAT disk
 Name: makebootfat
 Version: 1.4
-Release: 5%{?dist}
+Release: 6%{?dist}
 Group: 	Applications/System
 License: GPLv2+
 URL: http://advancemame.sourceforge.net/doc-makebootfat.html
 Source0: http://dl.sourceforge.net/sourceforge/advancemame/%{name}-%{version}.tar.gz
 Source1: makebootfat-README.usbboot
 
+%if %{new_ldlinux}
+#  Get syslinux-VERSION.tar.bz2 from
+#	ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/
+#  or
+#	ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/Old/
+#  Then
+#	bunzip2 -cd syslinux-VERSION.tar.bz2 | tar -xvf -
+#	cp syslinux-VERSION/ldlinux.bss ldlinux.bss-VERSION
+#	cp syslinux-VERSION/ldlinux.sys ldlinux.sys-VERSION
+#	rm -rf syslinux-VERSION
+#
+Source2: ldlinux.bss-3.36
+Source3: ldlinux.sys-3.36
+%endif
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 
@@ -38,7 +55,13 @@
 
 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/x86
 install -p -m644 mbrfat.bin $RPM_BUILD_ROOT%{_datadir}/%{name}/x86
+%if %{new_ldlinux}
+install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{name}/x86/ldlinux.bss
+install -p -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{name}/x86/ldlinux.sys
+%else
 install -p -m644 test/ldlinux.bss $RPM_BUILD_ROOT%{_datadir}/%{name}/x86
+install -p -m644 test/ldlinux.sys $RPM_BUILD_ROOT%{_datadir}/%{name}/x86
+%endif
 
 
 %clean
@@ -54,6 +77,12 @@
 
 
 %changelog
+* Thu Sep 27 2007 Dmitry Butskoy <Dmitry at Butskoy.name> - 1.4-6
+- always distribute own ldlinux.sys as well as ldlinux.bss
+- add conditional macro %%{new_ldlinux} (default off) to build the package
+  with ldlinux.bss and ldlinux.sys taken from some syslinux source directly.
+- Update README.usbboot .
+
 * Fri Aug 17 2007 Dmitry Butskoy <Dmitry at Butskoy.name>
 - Change License tag to GPLv2+
 
@@ -67,7 +96,7 @@
 - rebuild for FC5
 
 * Mon Dec 26 2005 Dmitry Butskoy <Dmitry at Butskoy.name> - 1.4-2
-- place mbrfat.bin and ldlinux.bss under %{_datadir}/%{name}/x86
+- place mbrfat.bin and ldlinux.bss under %%{_datadir}/%%{name}/x86
 
 * Mon Dec 24 2005 Dmitry Butskoy <Dmitry at Butskoy.name> - 1.4-1
 - accepted for Fedora Extra (review by John Mahowald <jpmahowald at gmail.com>)




More information about the fedora-extras-commits mailing list