Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
GRUB requires much more information than can be stored in the 512 byte MBR. Thus the GRUB MBR points to files stored on the boot media (usually the HD) from which it can load the supplemental information. What you've done is stored that information in a RAM disk, so it goes "poof" when you reboot.
If your system includes a floppy disk drive or if you have a USB drive, try installing GRUB on that medium.
Alternatively, create a FAT partition on your HD and put the GRUB Stage 1, 1.5, and Stage 2 files in it. (Since GRUB does not "understand" NTFS drives, you can't put he boot information in your XP NTFS formatted partition.)
GRUB requires much more information than can be stored in the 512 byte MBR. Thus the GRUB MBR points to files stored on the boot media (usually the HD) from which it can load the supplemental information. What you've done is stored that information in a RAM disk, so it goes "poof" when you reboot.
If your system includes a floppy disk drive or if you have a USB drive, try installing GRUB on that medium.
Alternatively, create a FAT partition on your HD and put the GRUB Stage 1, 1.5, and Stage 2 files in it. (Since GRUB does not "understand" NTFS drives, you can't put he boot information in your XP NTFS formatted partition.)
I don't think you understand what I am trying to do. I am trying to put GRUB's stage 1.5 and stage 2 files in my partition "hda5". This is not part of the RAMDISK. When I type "mount /dev/hda5 /tempboot/boot", the boot directory is now no longer part of the RAMDISK. It's just that the GRUB install script puts its files in /boot/grub or /grub.
You say "create a FAT partition on your HD and put the GRUB Stage 1, 1.5, and Stage 2 files in it". Why can I not use my existing hda5 partition (ext3) to do this? This is what I am trying to do. I am not trying to put the boot information in the NTFS partition.
Ah, OK. (Strange to have an ext partition sans Linux, but why not, eh?)
Then check the grub-install script, with particular attention to the map definitions. That map file needs to be correct for grub to function properly.
Also, you should have the grub info file available on the Knoppix disk.
I checked my map file and it seems to be correct, I looked at the documentation, the only line I really need is
Code:
(hd0) /dev/hda
I do not even need floppy support, my BIOS handles booting from floppy.
I do not have the grub info file on Knoppix, for some reason. Typing "info grub" simply brings up the normal manpage. However this is no big deal as the "info" manual is available online at http://www.gnu.org/software/grub/manual/.
Incidentally, the exact error which grub-install gives me is
Code:
The file /tempboot/boot/grub/stage1 not read correctly.
However I can check and this file definitely does exist. Furthermore, "file stage1" reports that it is a GRand Unified Bootloader file.
Ah, but that error is, explicitly, telling you that GRUB could not read the file. So, maybe a hardware problem. Can you run fsck on the device from which /tempboot is mounted?
Ah, but that error is, explicitly, telling you that GRUB could not read the file. So, maybe a hardware problem. Can you run fsck on the device from which /tempboot is mounted?
In any case, I do not think that this is a hardware problem. I think that I am not typing in the right commands. Please could someone check the commands I am running, to see if I am making some stupid error somewhere.
I've found (when booting from a USB drive) the GRUB syntax (hd0,4)/tempboot/... soemtimes works better.
Boot to the GRUB menu, and use the "e" option to edit the in-memory copy of the boot instructions. A handy feature is that the <Tab> key will list available "completions" from wherever you are in the line.
Of course the message you get -- "Not read properly" -- implies that the file was found, but not readable. Have you tried re-creating it?
I've found (when booting from a USB drive) the GRUB syntax (hd0,4)/tempboot/... soemtimes works better.
Ah, but the point is that tempboot is not a subdirectory of (hd0,4). It is a directory, which hda5 just happens to be mounted to. This is under the root filesystem (which is a RAMDISK, as you pointed out earlier).
Quote:
Boot to the GRUB menu, and use the "e" option to edit the in-memory copy of the boot instructions.
I can't boot to the GRUB menu. GRUB is not installed. Installing GRUB is what I am trying to do right now.
Of course the message you get -- "Not read properly" -- implies that the file was found, but not readable. Have you tried re-creating it?
I am not quite sure how to do this. Presumably I would have to rebuild GRUB from source, but then I would get a different version of stage1 from the one associated with the grub binary included in Knoppix...
1) You have the GRUB stage boot information on a directory physically located in a RAM disk.
2) You have created a symbolic link to the boot information.
3) You want to point GRUB to the symlink, and boot.
So, a couple questions:
1) When you reboot (to get the GRUB boot process started), how are the contents of the RAM disk recreated? My confusion here is that, unless the RAM disk is created by your BIOS, your RAM will be reset (usually to zeros) during the reboot. If the contents of the RAM disk are copied from some other place (where the contents are preserved across boots), why don't you point GRUB to that place instead of a RAM disk?
2) Any symlink must be interpreted by a running Linux system. What Linux system is running prior to any Linux system being booted?
Why don't you put the /tempboot directory on sda5 as a real, physical, directory and point GRUB to it? (That's the point of my last sentence in item 1, above.)
Bottom line: If the information does not (or will not) exist at the time that GRUB tries to boot, just how do you expect GRUB to be able to run correctly? (I do like reading Si-Fi and Fantasy novels, but I don't really expect magic to work whilst my computer boots.)
I see wht you are trying to do and it makes sense... except one part..
I dont think GRUB can boot from an extended partition. Try creating a hda3 (as a primary partition) as your boot instead of hda5.
Yes, in fact I had already realised this by the time I am posting this. My hda5 partition crosses the cylinder boundary, and is not a primary partition. In addition, I realised the fs type had not been set correctly in the actual partition table. I wish there was a simple partition table editor, I used to use something called RANISHPART in the old days, but that doesn't work anymore... Anyway I corrected my problem with PartitionMagic from PowerQuest, and everything is now fine.
Thanks for your help everyone. I am sure I will be posting again presently with more problems (as I am getting a "Attempted to kill init" error coming up now) but for now, I just thank you for your suggestions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.