i wonder whether it is pssible to define a *generic boot loader*, which is
able to *find out* (discover) what OSs’ that are installed on a particular
system, and on boot able to provide a list of options to the user to boot
from.
Such a boot loader would be very effective in cases where a new OS install
wipes off the MBR.
The solution should focus on OS discovery rather than data display at boot
time.
I am doing some work on this…but have got no headway. suggestions will be
appreciated…
i wonder whether it is pssible to define a *generic boot loader*,
which is able to * find out* (discover) what OSs’ that are installed
on a particular system, and on boot able to provide a list of options
to the user to boot from.
Sure, it’s theoretically possible. As long as the partition table is
alive, it isn’t even very hard. The recovery console already does this
for NT-based systems. If you want to add the 16-bit systems (95/98/ME),
that’s also easy. If you want to add Linux as well, that’s only
slightly bit tricker, but not rocket science.
If the partition table is damaged, then you have to start using forensic
analysis.
Such a boot loader would be very effective in cases where a new OS
install wipes off the MBR.
The solution should focus on OS discovery rather than data display at
boot time.
I am doing some work on this…but have got no headway. suggestions
will be appreciated…
What have you already done?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
at the boot loader level, we can find out the partitions and from their type
make some guessses abou the OSes.
Say if it is NTFS then it is probably one variant of NT on it,.
If it is FAt 32 then the options increase.
The boot loader, might go ahead and read the boot sector also, and make out
something from theversions there. But beyond that I do not see how it is
possible. If the bootloader was intelligent enough to read the filesystems,
then the versions of the NTOS kernel might have helped, but then th user can
install Windows in any folder!
If the partition typ is linux, then it again is another story!!
On 9/11/06, Tim Roberts wrote: > > A P wrote: > > > i wonder whether it is pssible to define a generic boot loader, > > which is able to * find out* (discover) what OSs’ that are installed > > on a particular system, and on boot able to provide a list of options > > to the user to boot from. > > > Sure, it’s theoretically possible. As long as the partition table is > alive, it isn’t even very hard. The recovery console already does this > for NT-based systems. If you want to add the 16-bit systems (95/98/ME), > that’s also easy. If you want to add Linux as well, that’s only > slightly bit tricker, but not rocket science. > > If the partition table is damaged, then you have to start using forensic > analysis. > > > Such a boot loader would be very effective in cases where a new OS > > install wipes off the MBR. > > > > The solution should focus on OS discovery rather than data display at > > boot time. > > > > I am doing some work on this…but have got no headway. suggestions > > will be appreciated… > > > What have you already done? > > – > Tim Roberts, xxxxx@probo.com > Providenza & Boekelheide, Inc. > > > — > Questions? First check the Kernel Driver FAQ at > http://www.osronline.com/article.cfm?id=256 > > To unsubscribe, visit the List Server section of OSR Online at > http://www.osronline.com/page.cfm?name=ListServer >
>The recovery console already does this
>for NT-based systems.
That is because the recovery console has knowledge how to read FAT32
and NTFS! For a third party bootloader it is not easy. Is it?
Right. You’ll have to understand FAT32, NTFS, and ext2/ext3. Those are
all solveable problems, given time and patience. There are Sourceforge
projects for all of them.
This is going to be a multi-month project.
How had you planned on implementing this? Bootable CD? You might want
to take a look at one of the small Linux distributions and base your
work on that. You can actually get a full Linux to fit on a floppy, and
you can configure them to include only the tools you need.
>f you want to add the 16-bit systems (95/98/ME),
>hat’s also easy.
I think this can be done by checking the contents of the IO.SYS and
MSDOS.SYS, they are dummies fro NT based systems! Am I correct?
That tells you that you have a bootable partition, but not where Windows
might be installed. For that, you need to look for something like win.com.
>f you want to add Linux as well, that’s only
>lightly bit tricker, but not rocket science.
How?
Once you find an ext2/ext3 partition, you look for a Linux boot file.
For LILO, it’s boot.b. For grub, there’s a similar file.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
>If the partition table is damaged, then you have to start using forensic
>analysis.
>
>
UNIX, “dd” and “strings” help a lot to find the sector 0 of both NTFS and FAT
and thus to restore the partition table from scratch.
Yes, but he was hoping to do this automatically. To be honest, this
sounds like a fun challenge, but I’ll bet it’s six or eight months work
for an experienced hard-core programmer.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
but then…would it remain a boot loader if I use a linx distro and read
all the nurerous filesystems available and give it the intelligence to boot
off any of teh different OS boot systems?
it would more be in teh domain of OS recovery softwares!
also, once i boot into linux (say my bootloader loads off a mini linux to
help me) acn i again reboot into another os from inside it?
also, once i boot into linux (say my bootloader loads off a mini linux to
help me) acn i again reboot into another os from inside it?
You can reference kexec. However, I’m afraid it could only boot linux
kernel.
but then…would it remain a boot loader if I use a linx distro and
read all the nurerous filesystems available and give it the
intelligence to boot off any of teh different OS boot systems?
it would more be in teh domain of OS recovery softwares!
Yes. I thought that’s exactly what you were trying to do – recover the
OSes from a disk with a trashed MBR… That’s certainly the task you
described.
also, once i boot into linux (say my bootloader loads off a mini linux
to help me) acn i again reboot into another os from inside it?
Yes, that part is easy. You just load the new boot sector into memory,
switch back into real mode, and jump to it.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
> Right. You’ll have to understand FAT32, NTFS, and ext2/ext3.
Also, if you (A P) need to support Itanium, then you’ll also want to parse
GUID partition tables as well as MBR. Probably wouldn’t bother with it for
first rev – but if you’re writing a spec for this, you’ll want it
documented.
Reply Forward Invite Tim to Gmail
King Brian to Windows More options 7:53 am (3? hours ago) > Right. You’ll have to understand FAT32, NTFS, and ext2/ext3.
Also, if you (A P) need to support Itanium, then you’ll also want to parse GUID partition tables as well as MBR. Probably wouldn’t bother with it for first rev – but if you’re writing a spec for this, you’ll want it documented.
>Yes. I thought that’s exactly what you were trying to do – recover the
>OSes from a disk with a trashed MBR… That’s certainly the task you
>described.
It is, however, I would like to make a bootloader like grub, this is
more into using some other OS to boot. A simpler approach is sought.
There is no “simpler” approach to writing a completely general
multi-operating system boot loader. You have to be able to find the
boot sectors, and that means understanding partition and file system
formats.
>Yes, that part is easy. You just load the new boot sector into memory,
>switch back into real mode, and jump to it.
won’t shifting from protected to real mode need drivers, I dont think
any user app can do this (in win). Is lin any diferent?
No, but you aren’t writing a user app in Windows. You are writing a
boot loader. You control the environment, 100%. The only reason you
would be in protected mode to begin with is if you loaded a
mini-operating system to get you known-good file system drivers. In
that case, you will have the control you need to switch back to real mode.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
>won’t shifting from protected to real mode need drivers, I dont think
any user app can do this (in win). Is lin any diferent?
I talked to some linux pl out here, they say that even in Linux you need
kernel mode components to achieve this. But then you are writing a
bootloader, and a customized linux distro, so what stops you from doing the
same??