-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>> The usual setup is: directory /boot ---> contains the kernel image(s)
>> and initial ramdisk directory /boot/grub ---> contains grub setup,
>> menu.lst, mapfile, chain loader
>>
>> Thus, if possible, try to move away this file /boot/grub, otherwise grub
>> won't be able to create his setup directory for the installation.
Mathias Krause schrieb:
> I think, i can remove that file, but i cannot read it. Okay .. if there's no
> way around, i'll have to delete the file and then try to restore grub. I hope
> grub can find my kernel?
Hi Mathias,
just to reiterate the whole procedure, i.e. what is happening when
you "install" grub?
- - you have somehow a running linux system. (Installer, Live CD, other
partition)
- - you have mounted the prospective root disk of the final system somewhere.
- - then you invoke grub-install, and provide the following informations:
(1) what disk to install the boot loader into the MBR
(2) where the root of the prospective root disk is locared *currently*
- - this allows grub-install to do the following
* figure out the raw disk id and block numbers.
He stores these into a "map file" (a binary file)
* Moreover, it will detect all the available kernels and make an entry
for each of them into the "menu.lst" file (a text file you can review
and edit and tweak with an text editor afterwards)
* find out what "chain loader" to install. Grub needs more code than fits
into the MBR, thus he uses the MBR to invoke an "chain loader" executable,
which then will present the menu on screen and finally load and start the
kernel.
- From your previous message I conclude that, if you boot into the live CD
(Knopix?), you get the root partition of your (currently not bootable on itself)
linux system mounted at /mnt/hda2 (correct?)
Quoting from the grub-install manpage:
--root-directory=DIR
install GRUB images under the directory DIR instead of the root directory
grub-install copies GRUB images into the DIR/boot directory specfied by
--root-directory, and uses the grub shell to install grub into the
boot sector.
Thus, in your case:
- - the new system root partition is mounted as /mnt/hda2
- - in this partition, there is a directory "boot", which contains the kernels
i.e. if you do a:
ls -l /mnt/hda2/boot
then you should see some "vmlinuz*" (the kernel) and some "initrd*" (ramdisk)
files.
- - moreover, there should be no *file* or *directory* /mnt/hda2/boot/grub
because grub-install will try to create this directory. (alternatively
there can be an existing installation of grub, which will then be updated.
But in your case, we should rather try to start out from a pristine state)
if so, you should now be able to run
grub-install --recheck --root-directory=/mnt/hda2 /dev/hda
and it should create the directory /mnt/hda2/boot/grub , then place the
described files into that directory, add an entry for each kernel found in
the "boot" directory, and finally write the new MBR to /dev/hda
It should terminate with a message like "successfully...."
If the output instead indicates some error, then please paste us this
message here.
And btw, don't worry! You can't mess up things more than they are already.
Grub is pretty much self contained and just touches his own files within the
grub directory (and of course overwrites the MBR, but the existing MBR is
broken anyway, thus it doesn't matter...)
hope that helps
Cheers,
Hermann V.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkuRnL8ACgkQZbZrB6HelLLX4gCgwMDu40qVqUflur5vHQar6zKp
7egAoP6o8n3xx/LPmUpCOpXare0mSQsq
=KkGY
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users