[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GRUB shell works on Hurd!


The attached patch against the CVS version of GRUB (it should apply to
GRUB-0.5.92 as well) makes it possible to use the GRUB shell on OS'es
other than Linux.


- Only floppy disks are supported
- All floppy disks are assumed to be 1.44 Mb in size (80 cylinders,
  2 heads, 18 sectors)
- The floppy disk should not be mounted during the installation

I have successfully created a bootable floppy under GNU Hurd (i.e.
without rebooting)

I'm not experienced in low-level file operations, so one may want to use
a better method for checking the result of lseek()


	* grub/asmstub.c [!__linux__]: compare the result of lseek
	with the requested position

Pavel Roskin
--- grub/asmstub.c	Wed Sep  1 10:01:17 1999
+++ grub/asmstub.c	Fri Sep 10 02:24:19 1999
@@ -755,7 +755,7 @@
       return -1;
-  if (lseek (fd, sector * SECTOR_SIZE, SEEK_SET))
+  if (lseek (fd, sector * SECTOR_SIZE, SEEK_SET) != sector * SECTOR_SIZE)
      return -1;
 #endif /* __linux__ */

Reply to: