Skip to contentSkip to conversation

grub-mkrescue: Make GRUB rescue image

PATCH Robert Millan 2 participants 4 messages Jun 7, 2007 – Jun 11, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

I'm attaching a small utility to generate a floppy or cdrom (based on floppy emulation) rescue image, that takes all the hassle of generating the image and doesn't need root permissions.

If nobody objects, I'd like to put this in CVS.

Signature · 4 lines
Robert Millan

My spam trap is [email protected].  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

Binary files grub2-1.95+20070604.old/- and grub2-1.95+20070604/- differ

conf/i386-pc.rmk +9 -0
diff -x i386-pc.mk -Nur grub2-1.95+20070604.old/conf/i386-pc.rmk grub2-1.95+20070604/conf/i386-pc.rmk
@@ -114,10 +114,19 @@
 
 # Scripts.
 sbin_SCRIPTS = grub-install
+bin_SCRIPTS = grub-mkrescue
 
 # For grub-install.
 grub_install_SOURCES = util/i386/pc/grub-install.in
 
+# For grub-mkrescue.
+grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in
+CLEANFILES += grub-mkrescue
+
+grub-mkrescue: util/i386/pc/grub-mkrescue.in config.status
+	./config.status --file=grub-mkrescue:util/i386/pc/grub-mkrescue.in
+	chmod +x $@
+
 # Modules.
 pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \
 	_multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod	\
Makefile.in +7 -2
diff -x i386-pc.mk -Nur grub2-1.95+20070604.old/Makefile.in grub2-1.95+20070604/Makefile.in
@@ -88,7 +88,7 @@
 DATA = $(pkgdata_IMAGES) $(pkgdata_MODULES) $(pkgdata_PROGRAMS) \
 	$(pkgdata_DATA) $(lib_DATA)
 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
-SCRIPTS = $(sbin_SCRIPTS) $(update-grub_SCRIPTS)
+SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(update-grub_SCRIPTS)
 
 CLEANFILES =
 MOSTLYCLEANFILES = 
@@ -149,6 +149,11 @@
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
 	done
+	@list='$(bin_SCRIPTS)'; for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
+	  $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
+	done
 	@list='$(sbin_SCRIPTS)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
@@ -182,7 +187,7 @@
 	  dest="`echo $$file | sed 's,.*/,,'`"; \
 	  rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
 	done
-	@list='$(bin_UTILITIES)'; for file in $$list; do \
+	@list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  rm -f $(DESTDIR)$(bindir)/$$dest; \
 	done

Binary files grub2-1.95+20070604.old/tmp/floppy and grub2-1.95+20070604/tmp/floppy differ

util/i386/pc/grub-mkrescue.in +119 -0

119 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Robert Millan

I'm attaching a small utility to generate a floppy or cdrom (based on floppy emulation) rescue image, that takes all the hassle of generating the image and doesn't need root permissions.

If nobody objects, I'd like to put this in CVS.

The rescue disk can recover a grub2 installation with something similar to the grub legacys' root and setup commands ?

Or is it a disk that where you only see

grub rescue >

?
adrian15

#2 lore raw
Quoted 11 lines · On Fri, Jun 08, 2007 at 12:01:57PM +0200, adrian15 wrote:
Quoted 7 lines · Robert Millan

I'm attaching a small utility to generate a floppy or cdrom (based on floppy
emulation) rescue image, that takes all the hassle of generating the image and
doesn't need root permissions.

If nobody objects, I'd like to put this in CVS.

The rescue disk can recover a grub2 installation with something similar to the grub legacys' root and setup commands ?

No, that's not possible with grub2 (due to design decisions).

Quoted 5 lines

Or is it a disk that where you only see

grub rescue >

?

Yes. Well, you can also type commands in it ;-)

Signature · 4 lines
Robert Millan

My spam trap is [email protected].  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.
#3 lore raw
In reply to Robert Millan
Quoted 6 lines · Robert Millan

I'm attaching a small utility to generate a floppy or cdrom (based on floppy emulation) rescue image, that takes all the hassle of generating the image and doesn't need root permissions.

If nobody objects, I'd like to put this in CVS.

Committed.

Signature · 4 lines
Robert Millan

My spam trap is [email protected].  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.