[ANNOUNCE] XFS for GRUB

2001-08-28 Thread Serguei Tzukanov

Native XFS filesystem support for GRUB.
The patch and info is at http://tzukanov.narod.ru/grub-jfs_xfs.




___
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub



Re: [ANNOUNCE] XFS for GRUB

2001-08-28 Thread Seth Mos

At 14:14 28-8-2001 +0400, Serguei Tzukanov wrote:
Native XFS filesystem support for GRUB.
The patch and info is at http://tzukanov.narod.ru/grub-jfs_xfs.

Changed in the FAQ

Cheers

--
Seth
Every program has two purposes one for which
it was written and another for which it wasn't
I use the last kind.


___
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub



Hiding partitions, windows 2000 on second disk

2001-08-28 Thread i22a

When I type

hide (hd0,

and then press tab it lists 0 and 4 as possible partitions to hide. If I 
select 4, i.e.

hide (hd0,4)

it says Error this partion does not exist. ?? But anyway I worked around 
this by hiding the partitions using linux fdisk.

The reason I was doing this was because I want to get windows 95 on 
(hd1,0). However if I map this drive to (hd0), or if I hide all the 
partitions on (hd0) so that dos makes (hd1,0) drive c:, when I run the 
windows SETUP program it starts by doing a scandisk, and then crashes on 
the second check (I forget what it is). Windows won't install without 
doing a scan disk. How am I going to get around this problem?

ian


___
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub



Booting a floppy image

2001-08-28 Thread Adam Bellinson


Hey guys.

I was wondering if it would be possible to boot a floppy image file with
grub. (i.e. you could dd if=the_file.img of=/dev/fd0 and effectively boot
off of it.) Is it possible to do this without needing the floppy? I ask
because BeOS insists that I boot into the OS with this method, and it's sort
of annoying.

Thanks a lot :))

Adam

___
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub



[PATCH]: Adds --ipappend to kernel command

2001-08-28 Thread Mark Buckaway

While this is Linux specific, it's something we use here. I've patched 
the stock grub 0.90 to add support for --ipappend on the kernel command 
IF diskless support is enabled.

What does this do? It passes ip=ipnum:serverip:gateway:netmask to the 
linux kernel from a dhcp request. We use it in systems here that the on 
board ethernet card does not have the ability to do network boot. We use 
grub on a floppy to boot the  system simulate a network boot of Linux 
on the system. grub takes the place of a boot ROM.

While we use it with our software in a special initrd to set the IP 
number on the interface, it can be used to support nfsroot for Linux or 
just plan autoconfiguration in the Linux kernel (check 
linux/Documentation/nfsroot.txt). PXELINUX supports this option and we 
use it to boot PXE enabled systems...so we just added it to grub to 
netboot these boot ROMless servers.

The patch is included in the message below the sig.

It would be nice if the Grub maintainers would consider adding this 
option to the mainstream grub code.

Thanks,

-- 
==
Mark Buckaway Tel: 416-203-4582   http://www.platespin.com
Sr. Software DeveloperFax: 416-203-0621   Email: [EMAIL PROTECTED]
Platespin Inc.  Reception: 416-203-6565
--
The statements made in this message are the opinions of the author and
may or may not reflect the opinions of Platespin Inc.
--

diff -ur grub-0.90.orig/netboot/etherboot.h grub-0.90/netboot/etherboot.h
--- grub-0.90.orig/netboot/etherboot.h  Thu Jan 11 18:33:09 2001
+++ grub-0.90/netboot/etherboot.h   Mon Aug 27 16:24:15 2001
@@ -461,6 +461,7 @@
  /* main.c */
  #ifdef GRUB
  extern void print_network_configuration P((void));
+extern char *get_network_configuration P((void));
  extern int ifconfig P((char *ip, char *sm, char *gw, char *svr));
  #endif /* GRUB */

diff -ur grub-0.90.orig/netboot/main.c grub-0.90/netboot/main.c
--- grub-0.90.orig/netboot/main.c   Thu Jan 11 18:33:09 2001
+++ grub-0.90/netboot/main.cTue Aug 28 10:21:27 2001
@@ -151,15 +151,16 @@
  static const char broadcast[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};

  void
-print_network_configuration (void)
+sprint_ip_addr (char *buf, unsigned long addr)
  {
-  static void sprint_ip_addr (char *buf, unsigned long addr)
-{
grub_sprintf (buf, %d.%d.%d.%d,
addr  0xFF, (addr  8)  0xFF,
(addr  16)  0xFF, addr  24);
-}
+}

+void
+print_network_configuration (void)
+{
if (! eth_probe ())
  grub_printf (No ethernet card found.\n);
else if (! network_ready)
@@ -176,6 +177,31 @@
grub_printf (Address: %sNetmask: %s\nServer: %sGateway: 
%s\n,
   me, my_mask, server, gw);
  }
+}
+
+
+char *
+get_network_configuration (void)
+{
+  static char ipinfo[128];
+
+  if (! eth_probe ())
+grub_printf (No ethernet card found.\n);
+  else if (! network_ready)
+grub_printf (Not initialized yet.\n);
+  else
+{
+  char me[16], my_mask[16], server[16], gw[16];
+
+  sprint_ip_addr (me, arptable[ARP_CLIENT].ipaddr.s_addr);
+  sprint_ip_addr (my_mask, netmask);
+  sprint_ip_addr (server, arptable[ARP_SERVER].ipaddr.s_addr);
+  sprint_ip_addr (gw, arptable[ARP_GATEWAY].ipaddr.s_addr);
+ 

+  grub_sprintf (ipinfo,%s:%s:%s:%s,me, server, gw, my_mask);
+  return(ipinfo);
+}
+return(NULL);
  }


diff -ur grub-0.90.orig/stage2/boot.c grub-0.90/stage2/boot.c
--- grub-0.90.orig/stage2/boot.cThu Jul  5 06:52:59 2001
+++ grub-0.90/stage2/boot.c Tue Aug 28 10:10:21 2001
@@ -339,7 +339,26 @@
*(dest++) = 'K';
  }

+#ifdef SUPPORT_NETBOOT
+ 
 /* Tack on the IP information from DHCP if so requested */
+ 
 if (! grub_strstr (arg, ip=)
+ 
 (load_flags  KERNEL_IPAPPEND_OPTION))
+ 
   {
+ 
char *ipinfo;
+ 
int iplen;
+
+ 
ipinfo = get_network_configuration();
+ 
if (ipinfo != NULL) {
+ 
iplen=grub_strlen(ipinfo);
+ 
grub_sprintf (dest,  ip=%s,ipinfo );
+ 
dest += (iplen+4);
+
+ 
}   
+ 
   }
+
*dest = 0;
+   grub_printf(Cmdline: %s\n,CL_MY_LOCATION);
+#endif
  }

  /* offset into file */
diff -ur grub-0.90.orig/stage2/builtins.c grub-0.90/stage2/builtins.c
--- grub-0.90.orig/stage2/builtins.cThu Jun 21 19:15:02 2001
+++ grub-0.90/stage2/builtins.c Tue Aug 28 14:48:20 2001
@@ -2224,7 +2224,6 @@
Probe I/O ports used for the drive DRIVE.
  };

-
  /* kernel */
  static int
  kernel_func (char *arg, int flags)
@@ -2271,6 +2270,10 @@
 has no effect.  */
else if (grub_memcmp (arg, --no-mem-option, 15) == 0)
load_flags |= KERNEL_LOAD_NO_MEM_OPTION;
+#ifdef 

chain.os2

2001-08-28 Thread Felix Miata

This is mentioned in the info sample menu section and nowhere else. It
needs explanation. Nowhere can I find a file by this name nor any other
reference to it. How does one use GRUB to boot OS/2 from (hd0,5)? Simply
using uncommented portion of the example for OS/2 and substituting the 5
for the 1 does not work, and the commented portion with the subject file
can't be used without that file.
-- 
Our Constitution was made only for a moral and religious people. It is
wholly inadequate to the government of any other.
President John Adams

Felix Miata  ***  http://mrmazda.members.atlantic.net/


___
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub



Re: grub command works, but GRUB boot loader hangs

2001-08-28 Thread Ben Liblit

From earlier discussions in this thread we have concluded that
get_diskinfo_floppy() should go away.  Attached below is a proposed
patch to remove it.

I've also reorganized the tail end of get_diskinfo() to unify the floppy
and non-floppy calls to get_diskinfo_standard(), which previously were
in distinct branches of a conditional.  Someone should give that a
second look before checking it in to make sure that I haven't done
something boneheaded to the control flow.

Index: ChangeLog
===
RCS file: /cvsroot/grub/grub/ChangeLog,v
retrieving revision 1.429
diff -u -u -r1.429 ChangeLog
--- ChangeLog   2001/08/08 08:00:01 1.429
+++ ChangeLog   2001/08/29 05:58:15
@@ -1,3 +1,12 @@
+2001-08-28  OKUJI Yoshinori  [EMAIL PROTECTED]
+
+   From Ben Liblit  [EMAIL PROTECTED]
+   * stage2/bios.c (get_diskinfo): Do not call get_diskinfo_floppy to
+   get information on floppy drives.  It confuses some BIOSes, and we
+   seem to be able to get everything we need by simply calling
+   get_diskinfo_standard instead.
+   * stage2/asm.S (get_diskinfo_floppy): Removed.
+
 2001-08-08  OKUJI Yoshinori  [EMAIL PROTECTED]
 
From Derrik Pates [EMAIL PROTECTED]:
Index: stage2/asm.S
===
RCS file: /cvsroot/grub/grub/stage2/asm.S,v
retrieving revision 1.57
diff -u -u -r1.57 asm.S
--- stage2/asm.S2001/08/08 08:00:01 1.57
+++ stage2/asm.S2001/08/29 05:58:18
@@ -1221,91 +1221,6 @@
ret
 

-/*
- *   int get_diskinfo_floppy (int drive, unsigned long *cylinders, 
- *unsigned long *heads, unsigned long *sectors)
- *
- *   Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an
- *   error occurs, then return non-zero, otherwise zero.
- */
-
-ENTRY(get_diskinfo_floppy)
-   pushl   %ebp
-   movl%esp, %ebp
-
-   pushl   %ebx
-   pushl   %esi
-
-   /* drive */
-   movb0x8(%ebp), %dl
-   /* enter real mode */
-   callEXT_C(prot_to_real)
-
-   .code16
-   /* init probe value */
-   movl$probe_values-1, %esi
-1:
-   xorw%ax, %ax
-   int $0x13   /* reset floppy controller */
-
-   incw%si
-   movb(%si), %cl
-   cmpb$0, %cl /* probe failed if zero */
-   je  2f
-
-   /* perform read */
-   movw$SCRATCHSEG, %ax
-   movw%ax, %es
-   xorw%bx, %bx
-   movw$0x0201, %ax
-   movb$0, %ch
-   movb$0, %dh
-   int $0x13
-
-   /* FIXME: Read from floppy may fail even if the geometry is correct.
-  So should retry at least three times.  */
-   jc  1b  /* next value */
-   
-   /* succeed */
-   jmp 2f
-   
-probe_values:
-   .byte   36, 18, 15, 9, 0
-   
-2:
-   /* back to protected mode */
-   DATA32  callEXT_C(real_to_prot)
-   .code32
-
-   /* restore %ebp */
-   leal0x8(%esp), %ebp
-   
-   /* cylinders */
-   movl0xc(%ebp), %eax
-   movl$80, %ebx
-   movl%ebx, (%eax)
-   /* heads */
-   movl0x10(%ebp), %eax
-   movl$2, %ebx
-   movl%ebx, (%eax)
-   /* sectors */
-   movl0x14(%ebp), %eax
-   movzbl  %cl, %ebx
-   movl%ebx, (%eax)
-
-   /* return value in %eax */
-   xorl%eax, %eax
-   cmpb$0, %cl
-   jne 3f
-   incl%eax/* %eax = 1 (non-zero) */
-3:
-   popl%esi
-   popl%ebx
-   popl%ebp
-
-   ret
-
-
 /* Source files are splitted, as they have different copyrights.  */
 #ifndef STAGE1_5
 # include setjmp.S
Index: stage2/bios.c
===
RCS file: /cvsroot/grub/grub/stage2/bios.c,v
retrieving revision 1.12
diff -u -u -r1.12 bios.c
--- stage2/bios.c   2000/12/13 17:11:19 1.12
+++ stage2/bios.c   2001/08/29 05:58:19
@@ -33,10 +33,6 @@
  unsigned long *cylinders,
  unsigned long *heads,
  unsigned long *sectors);
-extern int get_diskinfo_floppy (int drive,
-   unsigned long *cylinders,
-   unsigned long *heads,
-   unsigned long *sectors);
 
 
 /* Read/write NSEC sectors starting from SECTOR in DRIVE disk with GEOMETRY
@@ -123,6 +119,7 @@
 get_diskinfo (int drive, struct geometry *geometry)
 {
   int err;
+  unsigned long total_sectors = 0;
 
   /* Clear the flags.  */
   geometry-flags = 0;
@@ -131,7 +128,6 @@
 {
   /* hard disk */
   int version;
-  unsigned long total_sectors = 0;
   
   version = check_int13_extensions (drive);
   if (version)
@@ -187,47 +183,24 @@
total_sectors = drp.cylinders *