Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The difference between stage1 and *_stage1_5 is that the former doesn't understand any filesystem while the latter understands one filesystem (e.g. e2fs_stage1_5 understands ext2fs). So you can move the Stage 2 image to another location safely, even after GRUB has been installed.
So I tried to move the stage2 file to another partition, I expected to get the grub cmd so I can find the stage2 file (with the 1.5 fs drivers) but when the system boots, it just hangs with the text "GRUB"
what didn't I understand correctly ?
thanks alot !
Not that I've ever tried this before, but the way the doc describes it, it sounds like GRUB is loaded using Stage 1, which picks a Stage 1.5 filesystem. This allows GRUB to read that filesystem, so then Stage 2 can exist in any filesystem and not have to be explicitly in any exact location.
Stage 1 (load GRUB) > Stage 1.5 (pick filesystem) > Stage 2 (load OS in selected filesystem)
Quote:
These are called Stage 1.5, because they serve as a bridge between stage1 and stage2, that is to say, Stage 1.5 is loaded by Stage 1 and Stage 1.5 loads Stage 2.
Since Stage 1.5 calls Stage 2, I would assume that you'd have to adjust a Stage 1.5 file to point to the new location of Stage 2. When the docs say that the Stage 2 file can be moved anywhere, I think it means it can reside anywhere, including inside a filesystem.
Quote:
While Stage 2 cannot generally be embedded in a fixed area as the size is so large, Stage 1.5 can be installed into the area right after an MBR, or the boot loader area of a ReiserFS or a FFS.
So, to summarize:
Stage 1 fits in the MBR and boots GRUB
Stage 1.5 fits either inside or just after the MBR (since it's so small)
Stage 2 can reside anywhere because Stage 1.5 points at it. Stage 2 can't fit in the MBR (or just after) because it is too big.
Stage 1 (load GRUB) > Stage 1.5 (pick filesystem) > Stage 2 (load OS in selected filesystem)
stage 1.5 is for file system type (ext, reiserfs,iso9660 etc.), so when u say that "load OS in selected filesystem" it doesn't sounds right, because what if I had 30 hard drives with ext fs ?
I don't think grub is gonna try to find the stage 2 in all of those disks...
Quote:
Since Stage 1.5 calls Stage 2, I would assume that you'd have to adjust a Stage 1.5 file to point to the new location of Stage 2. When the docs say that the Stage 2 file can be moved anywhere, I think it means it can reside anywhere, including inside a filesystem.
The problem with that sentence is that, first of all, the root command is the command that points to the right place of needed files (including stage2).
And second of all, when u delete stage1_5 files it doesn't stops boot..
The system just boots regularly
The way to avoid all this is to simply install** GRUB with the first "root" statement pointing to the correct partition--ie the one that contains the /boot/grub files, menu.lst, etc.. Once you have done that, don't try to relocate any GRUB elements, stages, etc.
The "booting" link below might be helpful.
**My reading and experience both favor the GRUB shell method (as opposed to grub-install).
The way to avoid all this is to simply install** GRUB with the first "root" statement pointing to the correct partition--ie the one that contains the /boot/grub files, menu.lst, etc.. Once you have done that, don't try to relocate any GRUB elements, stages, etc.
The "booting" link below might be helpful.
**My reading and experience both favor the GRUB shell method (as opposed to grub-install).
well, it's always easier to install from scratch ..
the real deal is to fix it
Actually I was thinking of using the grub shell at the command prompt or with a boot disk such as SuperGrub, not the boot shell, which, as you point out, is disabled. SO... I'd get a SuperGrub disk, boot from it, and proceed. Or copy the files back to where they were and proceed.
Quote:
so when u say that "load OS in selected filesystem" it doesn't sounds right, because what if I had 30 hard drives with ext fs ?
I don't think grub is gonna try to find the stage 2 in all of those disks...
Since you know where you moved the stage2 files presumably you could just change menu.lst to point to the new location. The "find" command will indeed look in all 30 places. Don't know about the "not needing stage 1.5"; I think you'll only proceed with booting as normal under some cicumstances that way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.