FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > 64 Studio > 64 Studio User

 
 
LinkBack Thread Tools
 
Old 03-03-2010, 07:33 AM
"Mathias Krause"
 
Default Damn! I think i killed my grub installation

Hi Hermann,

> Hi,
> Just for the record (I don't know if your problem got resolved meanwhile).
> That is a simple problem I myself ran into several times.
> Grub tries to setup a new grub installation. If you want to use the
> existing one, just give the full path instead of the bare "root".
>
> I.e.
>
> grub-install --root-directory=/mnt/hda/boot/grub
>
> did work for me under similar circumstances.
> Additionally, I always give the option --recheck, which causes grub
> to verify the drive mappings.

i will try that out. Thank you.

Regards,
Mathias
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-03-2010, 04:24 PM
"Mathias Krause"
 
Default Damn! I think i killed my grub installation

Hi,

> Instead of Knoppix, can I suggest that you try the Ubuntu 8.04 Live CD?
> Do not use the latest version (9.10) which is what will be shown on
> the download page by default.

okay, i tried with ubuntu 8.04. Did boot fine. Mount went fine. But still,
/mnt/sda2/boot/grub is a file, not a directory ... maybe i killed that
with some tries before ... damn! I think, now, it's lost...

Regards,
Mathias
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-03-2010, 04:32 PM
"Mathias Krause"
 
Default Damn! I think i killed my grub installation

Hi,

> Hi,
> Just for the record (I don't know if your problem got resolved meanwhile).
> That is a simple problem I myself ran into several times.
> Grub tries to setup a new grub installation. If you want to use the
> existing one, just give the full path instead of the bare "root".
>
> I.e.
>
> grub-install --root-directory=/mnt/hda/boot/grub

also that does not help, as directory /mnt/hda/boot/grub does not exist.
It's only recognized as a file ...

i think your hint is not correct, as answer is:
cannot create directory /mnt/sda2/boot/grub/boot ... so he wants to create
direcoty /boot under /boot/grub ...

but still, when i use root-directory=/mnt/sda2 it says
cannor create directory /mnt/sda2/boot/grub: No such file or directory

i think that is because of /boot/grub is already there, but as a file ....


Regards,
Mathias
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-03-2010, 10:13 PM
Gustin Johnson
 
Default Damn! I think i killed my grub installation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mathias Krause wrote:
<snip>
>
>>> cat /mnt/hda2/boot/grub/menu.lst
>>> -> i/o error
>>>
>> That is really bad.
>>
>> Can you see any other files in grub folder by using ls -l?
>
> No. As i understand. /boot/grub is not recognized as a directory, but as a
> file.

Can you rename or remove that file?
>
>> What do you get when you do "ls -la /mnt/hda2/boot/grub/menu.lst"?
>
> i am sure i will get an i/o error, too, as /grub is not a directory anymore.
> I will try ubuntu live disk if /grub folder is still okay.
>
grub-install is failing because it cannot write any files into that
directory. /boot/grub needs to be a directory, not a file.

Hth,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuO7SQACgkQwRXgH3rKGfNN5wCdGmMIB4uz7o NqS9n+5iwlmARB
NnYAoIJEDeQ1Gd3IIa375hE23NNy/9h4
=XnMG
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-04-2010, 09:16 PM
Ichthyostega
 
Default Damn! I think i killed my grub installation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>>
>> grub-install --root-directory=/mnt/hda/boot/grub

Mathias Krause schrieb:
> also that does not help, as directory /mnt/hda/boot/grub does not exist. It's
> only recognized as a file ...
...
> but still, when i use root-directory=/mnt/sda2 it says cannor create
> directory /mnt/sda2/boot/grub: No such file or directory

> i think that is because of /boot/grub is already there, but as a file ....

Hi Mathias,

ah, that may give us a clue.
what is this file /boot/grub about? any idea who created it?

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.

hope that helps
Hermann



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuQMVoACgkQZbZrB6HelLJTHgCgjzDS8D/qXEoovOZHc2Wmd+3T
LAcAoIiIpkoaHwvDk/FKDsuKWVF09kM8
=q+j+
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-05-2010, 03:35 PM
Mathias Krause
 
Default Damn! I think i killed my grub installation

Hi,

>>>> cat /mnt/hda2/boot/grub/menu.lst
>>>> -> i/o error
>>>>
>>> That is really bad.
>>>
>>> Can you see any other files in grub folder by using ls -l?
>>
>> No. As i understand. /boot/grub is not recognized as a directory,
>> but as a
>> file.
>
> Can you rename or remove that file?

yeah. I am pretty sure i can do that. But i am still hoping, that
someone knows a way, how to re-store that directory.

>
>>
>>> What do you get when you do "ls -la /mnt/hda2/boot/grub/menu.lst"?
>>
>> i am sure i will get an i/o error, too, as /grub is not a directory
>> anymore.
>> I will try ubuntu live disk if /grub folder is still okay.
>>
> grub-install is failing because it cannot write any files into that
> directory. /boot/grub needs to be a directory, not a file.

yeah, i understand that ...

Regards,
mathias
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-05-2010, 03:39 PM
Mathias Krause
 
Default Damn! I think i killed my grub installation

Hi,

>
>> also that does not help, as directory /mnt/hda/boot/grub does not
>> exist. It's
>> only recognized as a file ...
> ...
>> but still, when i use root-directory=/mnt/sda2 it says cannor create
>> directory /mnt/sda2/boot/grub: No such file or directory
>
>> i think that is because of /boot/grub is already there, but as a
>> file ....
>
> Hi Mathias,
>
> ah, that may give us a clue.
> what is this file /boot/grub about? any idea who created it?
>
> 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.

I don't know, who created that directory. I think, I created it with a
boot cd by making a mistake ... with a tool like grub-install ...

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?

Regards,
mathias
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-05-2010, 11:07 PM
Ichthyostega
 
Default Damn! I think i killed my grub installation

-----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

iEYEARECAAYFAkuRnL8ACgkQZbZrB6HelLLX4gCgwMDu40qVqU flur5vHQar6zKp
7egAoP6o8n3xx/LPmUpCOpXare0mSQsq
=KkGY
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-05-2010, 11:39 PM
Gustin Johnson
 
Default Damn! I think i killed my grub installation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mathias Krause wrote:
> Hi,
>
>>>>> cat /mnt/hda2/boot/grub/menu.lst
>>>>> -> i/o error
>>>>>
>>>> That is really bad.
>>>>
>>>> Can you see any other files in grub folder by using ls -l?
>>> No. As i understand. /boot/grub is not recognized as a directory,
>>> but as a
>>> file.
>> Can you rename or remove that file?
>
> yeah. I am pretty sure i can do that. But i am still hoping, that
> someone knows a way, how to re-store that directory.
>
Right, once you move the file named "grub" out of the way (eg. something
like grub.old or something), the install grub command should do this for
you. Worst case is that you have to reinstall grub via apt/aptitude.
This should not be necessary as everything in that directory can be
generated by the grub utilities, including the default menu.lst (which
is generated by the kernels grub finds in /boot).

Nothing can happen as long as there is a file with the same name as the
directory standing in the way.

>>>> What do you get when you do "ls -la /mnt/hda2/boot/grub/menu.lst"?
>>> i am sure i will get an i/o error, too, as /grub is not a directory
>>> anymore.
>>> I will try ubuntu live disk if /grub folder is still okay.
>>>
>> grub-install is failing because it cannot write any files into that
>> directory. /boot/grub needs to be a directory, not a file.
>
> yeah, i understand that ...
>
Then move the file /boot/grub out of the way (you don't have to delete
it if that bothers you, just rename it at the very least).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuRpB0ACgkQwRXgH3rKGfODtgCfdq5sw/hVcgHp53mU1jp33Uex
Zm4AnAhOzVy7fp5Z82bJRlEMTRxzZOXB
=yBLK
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 03-12-2010, 12:55 PM
Ralf Mardorf
 
Default Damn! I think i killed my grub installation

Gustin Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mathias Krause wrote:
>
>> Hi,
>>
>>
>>>>>> cat /mnt/hda2/boot/grub/menu.lst
>>>>>> -> i/o error
>>>>>>
>>>>>>
>>>>> That is really bad.
>>>>>
>>>>> Can you see any other files in grub folder by using ls -l?
>>>>>
>>>> No. As i understand. /boot/grub is not recognized as a directory,
>>>> but as a
>>>> file.
>>>>
>>> Can you rename or remove that file?
>>>
>> yeah. I am pretty sure i can do that. But i am still hoping, that
>> someone knows a way, how to re-store that directory.
>>
>>
> Right, once you move the file named "grub" out of the way (eg. something
> like grub.old or something), the install grub command should do this for
> you. Worst case is that you have to reinstall grub via apt/aptitude.
> This should not be necessary as everything in that directory can be
> generated by the grub utilities, including the default menu.lst (which
> is generated by the kernels grub finds in /boot).
>
> Nothing can happen as long as there is a file with the same name as the
> directory standing in the way.
>
>
>>>>> What do you get when you do "ls -la /mnt/hda2/boot/grub/menu.lst"?
>>>>>
>>>> i am sure i will get an i/o error, too, as /grub is not a directory
>>>> anymore.
>>>> I will try ubuntu live disk if /grub folder is still okay.
>>>>
>>>>
>>> grub-install is failing because it cannot write any files into that
>>> directory. /boot/grub needs to be a directory, not a file.
>>>
>> yeah, i understand that ...
>>
>>
> Then move the file /boot/grub out of the way (you don't have to delete
> it if that bothers you, just rename it at the very least).

Long time no see

IIRC you do have an empty partition.

If moving a file named "grub" to any other name won't solve your issues,
try something completely different.

Use your empty partition to install any small Linux, e.g. just a text
based Linux without X, but with a completely new grub (for this new
Linux install).

If this GRUB also shouldn't be able to boot your 64 Studio, then we
should pay attention at the LBA issue.

Inconsistencies between LBA and CHS aren't important, anyway, the MBR
and BIOS settings must fit to the hard disk. Your BIOS settings didn't
change, but while installing Windows your MBR did change.

If this GRUB should be able to boot your 64 Studio, then try to fix
Studio's GRUB again when it's booted or just keep this additional small
Linux install.

Cheers!
Ralf
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 

Thread Tools




All times are GMT. The time now is 08:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org