bug-grub
[Top][All Lists]
Advanced

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

[Bug-grub] Using grub for booting imaged machines


From: R Sen
Subject: [Bug-grub] Using grub for booting imaged machines
Date: Thu, 21 Sep 2000 17:41:36 +0100 (BST)

I have a funny request - 

I'm trying to install Linux and NT on lots of machines.  Now, that's
normally no problem, install it once, image it, etc, but due to the fact
that I'm not in charge of the NT stuff (which unfortunately came first)
I'm in the unenviable situation that I get the last partition to install
Linux, and that's after a partition that is variable in size, depending on
the size of the hard disk.

So, I've written a utility in DOS (because our image download system is
DOS based, over a remote boot system, and there's no chance of changing
all that), that finds the grub stage2 in the linux partition and patches
the sector number in the stage1, in the MBR.

So far so good, that works fine, it finds the second stage.  But then it
hangs, because I also need to change the stage2 slightly, I realise, to
point to the stage2 sector 2, and possibly the menu?  I've found that the
following bits of stage 2 change - parts of the last 16 bytes of sector 1,
and the 16 bytes of sector 2.

000001f0 49 38 F8 00 2A 00 00 14 E2 37 F8 00 5F 00 20 08 
00000200 EA 70 82 00 00 00 03 01 FF FF 02 00 00 00 30 2E

I've found the bit in the source code ('install_func' in builtins.c) where
this happens, but unfortunately I was unable to easily follow what is
going on.

Can anyone explain what I need to point where in this region of stage2?

I just need something quick and dirty that will do the job for now. I
suppose in the long run, something like a proper grub installer for DOS
would be useful, but I haven't found one (did I miss it?), and I haven't
enough time in day job to write it :-(

I'm using grub version 0.5.95.

In a future version of Grub it might be nice (for us poor imaging people
with hundreds/thousands of machines, some with different sized disks) if
it was possible to take the offset from the start of the partition, or
something like that, which would allow the partition to move?

Thanks for your time, and your programming efforts.

Ramen


Ramen Sen
System Programmer
University of Sheffield, UK.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]