Page 2 of 3

Re: Chain loading and large non-IDE discs

Posted: Mon Nov 14, 2011 9:48 am
by Solar
rdos wrote:By only supporting Unix-like systems, they lose all credibility as a "free software" organization. GNU, in fact, is an acronym for Linux. :evil:
I think we all know that.

Hence, it seems like a LiveCD (Knoppix or other) would be the way to go for you, unless you settle for the ready-made floppy images linked in the Wiki.

Re: Chain loading and large non-IDE discs

Posted: Mon Nov 14, 2011 11:51 am
by tom9876543
rdos wrote: 1. What is the use of 48-bit LBA access when partition tables only contain 32-bit entries?
2. How does a chain-loaded boot-sector know it's disc location? The disc drive should be passed in DL, but what about the start sector of the partition?
1. Look at GPT
2. From memory, I think Microsoft Windows HARD CODES the partition offset in the BPB. How your chain-loaded boot sector solves this problem is up to you.

Re: Chain loading and large non-IDE discs

Posted: Mon Nov 14, 2011 12:07 pm
by egos
rdos wrote:This really sounds too complex.

What would be the easiest solution if I wanted a PC with a SATA-disc (non-IDE mode) to boot a multiboot-compliant kernel from a FAT32 partition located in the third partition slot? Partition 1 and 2 are NTFS. I also want to chain-load Windows 7 from partition 2. Additionally, the boot-loader must be placed in the MBR of the disc, as booting from a CD/DVD is too time-consuming because it is not possible to permanently set default-boot from CD/DVD.

It seems like legacy-GRUB cannot handle this as it is not possible to place GRUB stages on the first partition (it is not even visible in Windows 7).
It's important only what size and partitioning scheme disk has. You should note that GPT is bad suitable for booting existing BIOS-based Windows systems. If you have disk with size up to 2 Tb don't think about to use GPT. As JAAman said there is theoretical possibility to use disk with size up to 4 Tb minus 1 Kb without GPT too (when partition with position and length 0FFFFFFFFh is used). If you use multiboot-compliant boot loader then no reason to get position of the boot partition from boot loader. The partition number is enough. You can put legacy GRUB on NTFS partition only if it will be running directly by GRUB's stage1 (not by stage1_5). But this is not used because GRUB's config file and other data should be placed on non-NTFS paftition anyway. Therefore your partition configuration is typical for legacy GRUB/NTFS. You can install GRUB and your kernel on FAT partition (stage1 should be placed into MBR) and use simple config file to choice between Windows 7 or your kernel. Or you can use my technique (see below).
Solar wrote:That's the single most annoying thing with Windows Setup. Whatever boot manager I use is my decision. An OS setup has no business doing anything outside its assigned installation partition(s). You may subserviently ask me if I already have an MBR boot manager installed, and if you could do me the favor of installing one, but generally speaking an OS is a guest of mine given a specific partition to reside in, and my MBR / boot manager is none of its business. I will chain-load the partition bootloader. How I do that is my business.
I will take your wishes into account :) I just wanted to say that advanced users can use setupmbr/setupldr tools separately. I understand your indignation and I'm solid with you because I practice double system configurations (Win/Win, Win/Linux-based OS, Win/my kernel-based OS) and when I install Windows in second turn it has replaced my MBR boot loader :x
rdos wrote:I think I found the solution after I posted this. It seems like I'm using an old GRUB (legacy) version and this is why it cannot read NTFS, nor can place the boot stages on any partition.
You can install legacy GRUB on the partition where your system is placed (I don't believe that NTFS is base FS for your system) and then use "chainloader (hd0,x)+1" to the NTFS partition. Or you can install my Alter into MBR and GRUB's stage1 into VBR of "your partition" and then use GRUB only for your specific needs (for example I use modified GRUB just as one of my second stage boot loaders).
So, the answer probably is GRUB legacy. I also searched for GRUB2 solutions, but I'm unable to find anything that does not require a Linux / UNIX installation (there are no prebuilt floppy-images available).
Let we try to do that floppy. Why did you not try some Linux LiveCD?

Re: Chain loading and large non-IDE discs

Posted: Mon Nov 14, 2011 3:26 pm
by rdos
egos wrote:Let we try to do that floppy. Why did you not try some Linux LiveCD?
A GRUB legacy 0.97 floppy image would be appreciated. I can mount it with vfd in Windows in order to update the contents of the menu.lst file. I could also host such an image on my website, and someone could link it from the GRUB wiki-page so others can use it as well. The floppy-image of GRUB that I use is 0.5.97 (I think it is from 2001).

Re: Chain loading and large non-IDE discs

Posted: Mon Nov 14, 2011 5:29 pm
by egos
Did you see my Grub(ldr)OnFloppy* sources? I have put minimal set of files in GRUB2 package but I have some other files as well. I have put GRUB 0.90 files with only one fat_stage1_5 in legacy GRUB package but I have all precompiled files for legacy GRUB 0.96, 0.97 as well. I have put my stage1 and modified GRUB (grub.os) in Grubldr package/floppy image (for demo purposes only).

Edited: links updated.

Re: Chain loading and large non-IDE discs

Posted: Tue Nov 15, 2011 12:15 am
by Solar
@ rdos:

Am I on your ignore list or something?

Trying again: Disk Images links to two different ready-made GRUB floppy images at the bottom of the page. Also, installing GRUB through a Knoppix LiveCD is an option that does not require you to install Linux on your laptop.

It would be nice if you'd at least acknowledge those suggestions, or give a hint as to why they won't float your boat.

Unless, of course, I really am on your ignore list... :?

Re: Chain loading and large non-IDE discs

Posted: Tue Nov 15, 2011 2:07 am
by rdos
Solar wrote:Am I on your ignore list or something?
:?:

Why would you be?
Solar wrote:Trying again: Disk Images links to two different ready-made GRUB floppy images at the bottom of the page.
There is no mention of which version they contain. The first one seems to be from 2004, and thus would (probably) not be 0.97. In fact, it is only 3 years younger than the one I already have. The second one is in bz2-format, which is not readable in Windows (yes, I know there are Windows tools for this, but without knowing if this is version 0.97 I wouldn't bother to install those tools).
Solar wrote:Also, installing GRUB through a Knoppix LiveCD is an option that does not require you to install Linux on your laptop.
I'll look into that.

Updated: Downloaded, burned and booted Knoppix lastest version. It simply hangs as it changes video-mode on my portable computer. Actually, RDOS works better than Linux does as it can handle the video-card. :mrgreen:

Re: Chain loading and large non-IDE discs

Posted: Tue Nov 15, 2011 4:02 am
by egos
My GRUB 0.97 build has messaged version 0.96 :?:

Look what I found: Super Grub2 Disk

Re: Chain loading and large non-IDE discs

Posted: Tue Nov 15, 2011 5:33 am
by Solar
It's a bit pathetic to fail at either getting a LiveCD to run on your (or some other) system, or getting a Cygwin environment up and running, or unpacking a bz2 file to check its contents, and still pointing to others for blame.

http://www.rootdirectory.de/solar/floppy.img.zip. That's 0.97-somewhat-ubuntu, because I couldn't be bothered to compile from vanilla sources for you. I didn't test it either, it's a simple follow-the-Wiki-tutorial. You're welcome.

Re: Chain loading and large non-IDE discs

Posted: Wed Nov 16, 2011 2:33 pm
by rdos
Solar wrote:http://www.rootdirectory.de/solar/floppy.img.zip. That's 0.97-somewhat-ubuntu, because I couldn't be bothered to compile from vanilla sources for you. I didn't test it either, it's a simple follow-the-Wiki-tutorial. You're welcome.
Works perfectly good. I just installed it on the MBR of my Sony Vaio. Thanks, Solar. =D>

Re: Chain loading and large non-IDE discs

Posted: Fri Nov 18, 2011 1:19 am
by Solar
Basically, I failed. Because I was unable to make you do it yourself, which would have been easy enough...

Re: Chain loading and large non-IDE discs

Posted: Fri Nov 18, 2011 1:52 am
by rdos
Solar wrote:Basically, I failed. Because I was unable to make you do it yourself, which would have been easy enough...
I've got passed the stage "do everything yourself". :mrgreen:

Especially when it comes to compiling things on Unix/Linux. I've been there, and decided "no more". :wink:

Re: Chain loading and large non-IDE discs

Posted: Fri Nov 18, 2011 1:59 am
by Solar
rdos wrote:Especially when it comes to compiling things on Unix/Linux. I've been there, and decided "no more". :wink:
But that's your failure, not a failure of the GRUB team to provide Windows binaries, nor a failure of our Wiki, which provides a really simple description of how to do it.

Deciding against something is one thing. But don't point to others for blame.

To summarize...
rdos wrote:It seems like legacy-GRUB cannot handle this.
False.
rdos wrote:(there are no prebuilt floppy-images available)
False.
rdos wrote:It also assumes that it is Linux (or a UNIX-derivate) that is to be dual-booted with something, and that this OS is already installed.
False.

Re: Chain loading and large non-IDE discs

Posted: Fri Nov 18, 2011 2:12 am
by rdos
Solar wrote:
rdos wrote:Especially when it comes to compiling things on Unix/Linux. I've been there, and decided "no more". :wink:
But that's your failure, not a failure of the GRUB team to provide Windows binaries, nor a failure of our Wiki, which provides a really simple description of how to do it.

Deciding against something is one thing. But don't point to others for blame.
You didn't provide the "Windows binaries". You provided a boot-disc for GRUB, which the GRUB team should have done. There is no sense in every user (that might not run a Linux/Unix-derivate) having to create a bootable floppy for GRUB. This should be part of making a new version! It is like distributing an OS as source-only.

Besides, if you've noticed, I offered the old GRUB image to my potential OS-users. Now I will offer the new + a CD/DVD iso-image I made with my (non-free) toolset. I even offer complete disc-images for 2-8GB compact flashes that can be written directly and thus could create a bootable OS in less than a minute (I use these myself as we deploy new systems).

Re: Chain loading and large non-IDE discs

Posted: Fri Nov 18, 2011 12:04 pm
by Brynet-Inc
rdos wrote:You didn't provide the "Windows binaries". You provided a boot-disc for GRUB, which the GRUB team should have done. There is no sense in every user (that might not run a Linux/Unix-derivate) having to create a bootable floppy for GRUB. This should be part of making a new version! It is like distributing an OS as source-only.
There are binaries of grub legacy.. They're not "Windows binaries", because that doesn't make any sense.

http://alpha.gnu.org/gnu/grub/grub-0.97-i386-pc.tar.gz
http://alpha.gnu.org/gnu/grub/grub-0.97-i386-pc.ext2fs (..ext2 disk image).