LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Problems reinstalling GRUB (https://www.linuxquestions.org/questions/mandriva-30/problems-reinstalling-grub-755671/)

eschrock 09-16-2009 12:25 PM

Problems reinstalling GRUB
 
Hi,

I have a new dell studio 15 laptop on which Vista came natively, and I'm currently triple booting both the 32 bit Mandriva Spring and the 64 bit Mandriva Spring along with Windows. Recently I was having trouble with booting the 64 bit version, and decided to try a disk check. Mandriva warned me that checking the disk while it was mounted could lead to problems. Unfortunately, I accidently chose the wrong option, and GRUB got corrupted (I think). In any case, after that when I tried to start my computer again, GRUB issued an error and wouldn't load anything to boot. So, I decided to reinstall GRUB. I used the 64 bit install CD in "Rescue System" mode, and it reinstalled GRUB for only my 64 bit Mandriva (and Windows too) but not for my 32 bit. I then used the 32 bit install CD to try and reinstall a version of GRUB that had my 32 Mandy as a boot option, but it would only try to reinstall GRUB for the 64 bit (I assume because the 64 bit comes before the 32 bit on my drive, and I have no way to choose which). So then I thought, ok, I'll just use the install CD to 'update' my 32 bit version, and since it doesn't need updating, I'll be quickly brought to a screen allowing me to install GRUB for 32. Well, I was right. However, when I tried to install it, it gave me an error, something like

Install error: /boot/[other stuff]/menu.lst = Not a file.

So I assumed that I could navigate to that folder and see what's wrong with menu.lst. But I don't really know how I would go about fixing it, and I don't want to do it wrong. What should I do? Please help!

Thank you in advance.

mobinskariya 09-16-2009 12:31 PM

now can you boot into 64 bit mandriva?? which all os lists in grub when booting?

ongte 09-16-2009 08:03 PM

If you ran fsck on a mounted partition (your 64bit Mandy), this partition may be corrupted beyond repair. Your GRUB in Stage1 in MBR is probably still there, but it can no longer read the menu.lst file on your partition (which you have corrupted).

I suggest reinstalling Mandriva 64bit again. You probably cannot recover any data from that partition anyway.

eschrock 09-16-2009 11:24 PM

Right, so, when I ran fsck, I believe I only ran it on the boot sector (it asked me if I wanted to check the rest of the drive too, but by then I had realized my mistake). I can run my 64 bit Mandy no problem (relatively), after I reinstalled GRUB for 64 bit that is, and when I access files on the 32 drive nothing gives me errors. So I think all I need to do is edit/replace the menu.lst, but I dont know how to do that. That's where I need help...

eschrock 09-16-2009 11:26 PM

Oh, and all three OSs are listed on GRUB's menu, but when I select the 32 bit version, it gives me an error.

ongte 09-17-2009 08:29 AM

What's the error? Can u post the full error message & the content of your menu.lst?

eschrock 10-03-2009 05:55 PM

Hi, thank you for responding, I've been very busy so I haven't had a chance to get to this for a bit. Here is the error:

root (hd0,6)
Filesystem type ext2fs, partition type 0x83
configfile /boot/grub/menu.lst

Error 15: File not found

And here are the contents of the menu.lst file:

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 splash=silent
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162
initrd (hd0,4)/boot/initrd.img

title 2.6.27-serverrc8-2mnb
kernel (hd0,4)/boot/vmlinuz-2.6.27-server-0.rc8.2mnb BOOT_IMAGE=2.6.27-serverrc8-2mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 splash=silent vga=788
initrd (hd0,4)/boot/initrd-2.6.27-server-0.rc8.2mnb.img

title windows
root (hd0,1)
makeactive
chainloader +1

title windows1
root (hd0,2)
makeactive
chainloader +1

title Mandriva Linux (Official)
root (hd0,6)
configfile /boot/grub/menu.lst

title server 2.6.27.19-1mnb
kernel (hd0,4)/boot/vmlinuz-2.6.27.19-server-1mnb BOOT_IMAGE=server_2.6.27.19-1mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 splash=silent
initrd (hd0,4)/boot/initrd-2.6.27.19-server-1mnb.img

title server 2.6.29.1-4mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.1-server-4mnb BOOT_IMAGE=server_2.6.29.1-4mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 splash=silent
initrd (hd0,4)/boot/initrd-2.6.29.1-server-4mnb.img

title server 2.6.29.3-1mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.3-server-1mnb BOOT_IMAGE=server_2.6.29.3-1mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 splash=silent
initrd (hd0,4)/boot/initrd-2.6.29.3-server-1mnb.img

title server 2.6.29.6-1mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.6-server-1mnb BOOT_IMAGE=server_2.6.29.6-1mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 vga=788
initrd (hd0,4)/boot/initrd-2.6.29.6-server-1mnb.img

title server 2.6.29.6-2mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.6-server-2mnb BOOT_IMAGE=server_2.6.29.6-2mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 splash=silent vga=788
initrd (hd0,4)/boot/initrd-2.6.29.6-server-2mnb.img

title alt_linux-nonfb
kernel (hd0,4)/boot/vmlinuz-2.6.29.6-server-2mnb BOOT_IMAGE=alt_linux-nonfb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162
initrd (hd0,4)/boot/initrd-2.6.29.6-server-2mnb.img

title alt_server 2.6.29.3-1mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.3-server-1mnb BOOT_IMAGE=alt_server_2.6.29.3-1mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 vga=788
initrd (hd0,4)/boot/initrd-2.6.29.3-server-1mnb.img

title alt_server 2.6.29.1-4mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.1-server-4mnb BOOT_IMAGE=alt_server_2.6.29.1-4mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 vga=788
initrd (hd0,4)/boot/initrd-2.6.29.1-server-4mnb.img

title alt_server 2.6.27.19-1mnb
kernel (hd0,4)/boot/vmlinuz-2.6.27.19-server-1mnb BOOT_IMAGE=alt_server_2.6.27.19-1mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 vga=788
initrd (hd0,4)/boot/initrd-2.6.27.19-server-1mnb.img

title alt_windows
root (hd0,1)
makeactive
chainloader +1

title alt_windows1
root (hd0,2)
makeactive
chainloader +1

title alt_server 2.6.29.6-2mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.6-server-2mnb BOOT_IMAGE=alt_server_2.6.29.6-2mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162
initrd (hd0,4)/boot/initrd-2.6.29.6-server-2mnb.img

title alt2_server 2.6.29.6-2mnb
kernel (hd0,4)/boot/vmlinuz-2.6.29.6-server-2mnb BOOT_IMAGE=alt2_server_2.6.29.6-2mnb root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b splash=silent resume=UUID=42ced87f-e400-468a-a02f-17768fafe162 vga=788
initrd (hd0,4)/boot/initrd-2.6.29.6-server-2mnb.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=dae79b41-078b-4a19-b7ca-3c313deef55b failsafe splash=silent
initrd (hd0,4)/boot/initrd.img



The one that is supposed to be my 32 bit mandy is the one right below the two windows loaders, and called Mandriva Linux (Official). How can I fix this?

rolf 10-15-2009 08:17 PM

Quote:

when I access files on the 32 drive nothing gives me errors.
Can you see /boot/grub/menu.lst when you do that? Can you copy it back here? Also, /etc/fstab? All from the 32-bit installation.

eschrock 10-17-2009 02:24 AM

No, I can't seem to access the boot folder at all on the 32 bit drive. When I click on the "137.5 GB Media" icon on my desktop (which seems to have all of my files from my 32 bit partition), it takes me straight to my 32 bit home folder. When I press 'Up' it just takes me to the media folder of the 64 bit partition.

rolf 10-17-2009 02:46 AM

It seems you might have a separate /home partition that is automatically mounted. One more thing to try is to see if your / partition, the one containing /boot, can be detected in the grub shell. To do so, get to be root in the terminal: konsole or other terminal program.

Code:

[rolf@localhost ~]$ su
Password:
[root@localhost rolf]# grub
Probing devices to guess BIOS drives. This may take a long time.

-----------------------------------------------------------------

GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
  lists possible command completions.  Anywhere else TAB lists the possible
  completions of a device/filename. ]

grub> find /boot/grub/stage1
 (hd5,0)
 (hd5,4)

grub> quit

----------------------------------------------------------------
[root@localhost rolf]#

It looks like that. When you invoke the grub shell, it takes over the terminal display and it disappears when you quit it. So, copy and paste the results of the grub find command back here before you quit the grub shell. grub will report the location of the stage1 file and it should report the 64-bit partition containing stage1 and, if it still exists, stage1 on your 32-bit / partition.

eschrock 10-18-2009 02:32 PM

here it is:

Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /boot/grub/stage1
find /boot/grub/stage1
(hd0,4)
grub> quit

so apparently it's gone... what can i do?

rolf 10-18-2009 02:47 PM

Typically, the important user files and documents are in /home, so I would check and see if the vital stuff can be retrieved.

Beyond that, re-install is not such a bad idea, in which case you can keep /home.

It looks like you have one drive in that machine and, not knowing exactly what happened, I'd be careful to see what the disk has in the way of partitions, at this point. You can run diskdrake (called as root) to get a visual display. It's also available in Mandriva Control Center > local disks > manage disk partitions or similar.

In terminal, as root,

fdisk -l

gives the same information without graphics. You could copy/paste that info back here.

There is a program, testdisk, that is packaged for Mandriva and in main/. It looks at previous partition tables and can roll back so that deleted partitions can be undeleted and the files read. That's a possible strategy but, if you have some space for a new / partition, re-install is probably safer.

eschrock 10-23-2009 11:15 PM

Are you talking about a total reinstall or just GRUB? Also, here is the output of fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x08000000

Device Boot Start End Blocks Id System
/dev/sda1 1 10 80293+ de Dell Utility
/dev/sda2 11 1316 10485760 7 HPFS/NTFS
/dev/sda3 * 1316 28193 215893616+ 7 HPFS/NTFS
/dev/sda4 28194 60801 261923760 5 Extended
/dev/sda5 28194 29212 8185086 83 Linux
/dev/sda6 29213 29721 4088511 82 Linux swap / Solaris
/dev/sda7 29722 42557 103105138+ 83 Linux
/dev/sda8 42558 43576 8185086 83 Linux
/dev/sda9 43577 44085 4088511 82 Linux swap / Solaris
/dev/sda10 44086 60801 134271238+ 83 Linux

rolf 10-23-2009 11:42 PM

I was talking about formatting and re-installing to your / partition, keeping /home intact. That assumes those are the only two partitions, save swap, that you made for that installation.

Quote:

When I click on the "137.5 GB Media" icon on my desktop (which seems to have all of my files from my 32 bit partition), it takes me straight to my 32 bit home folder.
It looks like sda10, with "134271238+" blocks, would be most likely to be "137.5 GB Media". The grub menu has / on (hd0,6) or sda7.

There are more ways to skin a cat but one way to try to view that partition would be to become root in terminal and

mkdir /mnt/disk

mount /dev/sda7 /mnt/disk

If that succeeds, you should be able to browse 'up' to the / of your filesystem in konqueror or other file browser, then drill 'down' to /mnt/disk and look around.

ll /mnt/disk/boot
cat /mnt/disk/etc/fstab
cat /mnt/disk/boot/grub/menu.lst

might be interesting things to look at, paste back here, if you can mount it.

eschrock 10-25-2009 11:46 PM

Ok, so I tried that, unfortunately, that disk doesn't contain any boot info at all. There is no boot folder, nor is there an etc folder. All that is there is my home folder from that partition. What do I do? Is there a way to reinstall grub, or reinstall altogether while keeping my settings and programs? Thanks...


All times are GMT -5. The time now is 02:29 PM.