Topic: [Resolved] recover grub

Hi,

I have 'broken' my grub, but first of all I have to say that I don't have any data to recover in my netbook (except my conky config smile ), so I have the easy solution to reinstall cruncheee completely.

I am curious anyway, to know whether there is a way to restore grub, and also to learn how to boot crunchbang from command line.

Here is my mistake: I have tried to install another linux distribution (moblin, alpha version), in the aim of having a dual boot. I did this installation, resizing the partition where my crunchbang /home was, and installing the second linux' grub in a new partition.
After this, when I started to boot cruncheee, the file system check noticed that the /home partition had changed, and prompted me for the root password to perform the maintenance operation. I tried several things, but no way to find the right password.

1) Which password should I have entered at that step ?

then, I thought "ok, let's re-install moblin, and overwrite the cruncheee grub. maybe this will get cruncheee boot normally." I did not pay attention to the posts I had opened in firefox half an hour before, warning that it's necessary to keep the original grub.

Now, moblin boots normally, but no way to have cruncheee to start : it stops right at the beginning, at the "chainloader +1" step. I tried few things with the command line of grub, but since I don't know anything about linux i couldn't go far. I just noticed that the commands work and can access to the /sda1 files (eg. /boot/grub/menu.lst), or 'load' the kernel (kernel ... command).

2) Would there exist any way to restore the boot instructions for cruncheee, so that chainloader +1 instruction works ?

3) Is there a list of the instructions to enter in command line, in order to boot cruncheee manually ?

One again, this is just by curiosity, not a big issue.

regards,

alef

Last edited by alef (2009-03-05 13:15:41)

Eee-PC 1000H    |  Statler r20110207 Openbox
Vaio VGN-FE21H  |  Statler r20110207 Openbox

no more proprietary OS at home, and still no printer smile

Re: [Resolved] recover grub

Hi,

I have also install a dual boot last night, Debian and CB.

Do this.

First, be sure to know where your CB /boot/ partition is, almost sure it is in the same as / (root).

well lets suppose it is /dev/sda and you have the other Linux in /dev/sdb

You can now do this.

sudo grup
root (hd0,0)
setup (hd0,0)
quit

And then boot in the other Linux the one that boots OK, and edit your /boot/grub/menu.lst file and add at the end this:

title Crunchbang
root (hd0,0)
chainloader +1

And it should work, be sure to check the partitions where you have your Linux installed.

You may want to read this:

http://www.go2linux.org/dual-boot-two-l … d-mandriva
http://www.go2linux.org/use-the-same-ca … ux-distros
http://www.go2linux.org/gag-boot-loader

Guillermo Garron
Linux is user-friendly... It is just selective about who its friends are.
http://garron.me

Re: [Resolved] recover grub

Hi ggarron,

thanks for your answer.

Actually, crunchbang already appears in the boot list, and code below has already been recorded.

title Crunchbang

root (hd0,0)

chainloader +1

Unfortunately, the instruction chainloader+1 ends up with an error message (Error 13: Invalid or unsupported executable format).

I forgot to mention few things :
- cruncheee is installed in sda1 partition, and moblin in sda5
- i can boot moblin, but i did not manage to perform any administrative operation (sudo is not installed, i didn't find a way to connect as root (i'm very newbie), and i couldn't add repositories in the package manager, to install sudo)
- in moblin the file system does not show me sda1 partition, so i can't access anymore to /boot/grub/menu.lst.

thanks for your links, i'll follow these tips next time to make a clean install

regards,

alef

Eee-PC 1000H    |  Statler r20110207 Openbox
Vaio VGN-FE21H  |  Statler r20110207 Openbox

no more proprietary OS at home, and still no printer smile

Re: [Resolved] recover grub

Hi,

When you boot moblin, try to check if sda1 is booteable

sudo fdisk /dev/sda

Then press "p" and check if it has the asterisk under the Boot section

regards.

Last edited by ggarron (2009-02-15 21:43:24)

Guillermo Garron
Linux is user-friendly... It is just selective about who its friends are.
http://garron.me

Re: [Resolved] recover grub

Hi ggarron,

thanks for this other tip.

i managed to connect as root using su, since the default user in moblin is not in the sudoer list, and visudo is not installed to change that.
anyway, fdisl or fdisk are not installed in moblin, i couldn't do it.

nevermind, i'm reinstalling crunchbang right now, this will be an occasion to try different post-install than last time, in order to get acpi working properly.

regards,
alef

Eee-PC 1000H    |  Statler r20110207 Openbox
Vaio VGN-FE21H  |  Statler r20110207 Openbox

no more proprietary OS at home, and still no printer smile

Re: [Resolved] recover grub

you are welcome.

regards, and good luck with your new installation.

Guillermo Garron
Linux is user-friendly... It is just selective about who its friends are.
http://garron.me

Re: [Resolved] recover grub

I might be wrong here, but chainloader +1 is the bootstrapping technique for booting windows. I'm dual booting two distros of linux and don't have it in there at all.

Re: [Resolved] recover grub

risek wrote:

I might be wrong here, but chainloader +1 is the bootstrapping technique for booting windows.

Chainloading is not necessarily just for booting into Windows. It is used to "chainload" a different boot loader on a particular partition. On my computer, I use chainloader +1 to navigate between different different instances of grub, giving each distro (or OS) its own grub menu. It's actually quite useful if you boot a few different OS's. In my case, it helps keep things organised.

-callinyouin!:o

me on last.fm.

Re: [Resolved] recover grub

Yes, I do the same thing, I usually have two or even three Linux distros in my PC, and when I upgrade Kernels on each of them I do not want to have to update the grub with that info.
So each distro has its own grub menu in its partition and the so-called Master grub only chainloads to each other.

regards,

Guillermo Garron
Linux is user-friendly... It is just selective about who its friends are.
http://garron.me