PDA

View Full Version : 'Little' GRUB problem. Help! :(



Grisnackh
12th February 2012, 01:25 PM
Hy!

I've got a problem with GRUB. I'm a new Fedora user, but I've got another Linux system (BlackPanther) on sda1. Fedora is on sda7. So, after I'm installed Fedora and updated it (the GRUB, too), from the GRUB menu disappeared my another Linux distro. I read some description about this problem solving, but I'm not a big...'master' on informatic's platform. Anyway, my english is horrible too, I know...:C
So, is there anyone, who give me a step-by-step, thorough description? :confused:

glennzo
12th February 2012, 01:28 PM
Open a terminal and type

su -c 'grub2-mkconfig -o /boot/grub2/grub.cfg'
Reboot and see if your other OS is part of the boot menu.

Grisnackh
12th February 2012, 01:42 PM
Open a terminal and type

su -c 'grub2-mkconfig -o /boot/grub2/grub.cfg'
Reboot and see if your other OS is part of the boot menu.

Thank you, man! But it's not good. :(
I typed it to the terminal, and this came out:

"Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.5-3.fc16.i686
Found linux image: /boot/vmlinuz-3.1.0-7.fc16.i686
Found initrd image: /boot/initramfs-3.1.0-7.fc16.i686.img
No volume groups found
Found blackPanther OS 11.1 (11.1) on /dev/sda1
done
"
It's okay, I reboot, but in the menu still there isn't bP. :/

When I partitioned for Fedora, I don't picks bP's partition, so (in principle) it's good. But shouldn't have been found more Linux image? In bP, there's 2.6.38.2 kernel, but I'm not see it in the list. I don't understand...:(

glennzo
12th February 2012, 01:55 PM
Boot Fedora, open a terminal and type

su -c 'fdisk -l'
Post that output here please.

Grisnackh
12th February 2012, 01:58 PM
Boot Fedora, open a terminal and type

su -c 'fdisk -l'
Post that output here please.

"Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 fej, 63 szektor, 9729 cilinder, összesen 156301488 szektor
Egység: szektorok 1 * 512 = 512 bájt
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Lemezazonosító: 0xd412d412

Eszköz Indítás Eleje Vége Blokkok Az Rendszer
/dev/sda1 * 63 25189919 12594928+ 83 Linux
/dev/sda2 25189920 156296384 65553232+ 5 Kiterjesztett
/dev/sda5 25189983 33367004 4088511 82 Linux lapozó / Solaris
/dev/sda6 33367068 61403135 14018034 83 Linux
/dev/sda7 61405184 156296384 47445600+ 83 Linux
"

sea
12th February 2012, 02:07 PM
I find it rather intersting that grub DOES find your bP installation:

Found blackPanther OS 11.1 (11.1) on /dev/sda1
done

Whats the output of:

cat /boot/grub2/grub.cfg|grep menuentry

EDIT:
Do you have a seperate boot partition?
If so, whats the output of:

lsblk ; blkid

Grisnackh
12th February 2012, 02:13 PM
I find it rather intersting that grub DOES find your bP installation:


Whats the output of:

cat /boot/grub2/grub.cfg|grep menuentry

"[root@grisnackh grisnackh]# cat /boot/grub2/grub.cfg|grep menuentry
menuentry 'Fedora Linux, with Linux 3.2.5-3.fc16.i686' --class fedora --class gnu-linux --class gnu --class os {
menuentry 'Fedora Linux, with Linux 3.2.5-3.fc16.i686 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.i686' --class fedora --class gnu-linux --class gnu --class os {
menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.i686 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
menuentry "linux-nonfb (on /dev/sda1)" --class gnu-linux --class gnu --class os {
menuentry "failsafe (on /dev/sda1)" --class gnu-linux --class gnu --class os {
"

sea
12th February 2012, 02:17 PM
Try booting into the 'linux', 'linux-nonfb' or the 'failsafe', as they all refer to sda1.
Please report if it was working (boot successfull to black panther or not).

Grisnackh
12th February 2012, 07:55 PM
I find it rather intersting that grub DOES find your bP installation:


Whats the output of:

cat /boot/grub2/grub.cfg|grep menuentry

EDIT:
Do you have a seperate boot partition?
If so, whats the output of:

lsblk ; blkid

The lsblk ; blkid's output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 74,5G 0 disk
├─sda1 8:1 0 12G 0 part
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 3,9G 0 part [SWAP]
├─sda6 8:6 0 13,4G 0 part
└─sda7 8:7 0 45,3G 0 part /
sr0 11:0 1 1024M 0 rom
sdb 8:16 1 48,1M 0 disk
└─sdb1 8:17 1 48M 0 part /media/0000-2AE6
sdc 8:32 1 1,9G 0 disk
└─sdc1 8:33 1 1,9G 0 part /media/B6E0-E38E
/dev/sda1: UUID="c5b3c48c-963e-4dab-8cd2-0e58bcd707db" TYPE="ext4"
/dev/sda6: UUID="f8fbeb48-1653-4d8d-aacf-3cf7ffb9986b" TYPE="ext4"
/dev/sda5: UUID="a1e25449-d47d-4aac-ac8f-8fe16ebada55" TYPE="swap"
/dev/sda7: LABEL="_Fedora-16-i686-" UUID="7e0dca64-a7bc-4af8-b56b-bdec2cacb629" TYPE="ext4"
/dev/sdb1: SEC_TYPE="msdos" UUID="0000-2AE6" TYPE="vfat"
/dev/sdc1: SEC_TYPE="msdos" UUID="B6E0-E38E" TYPE="vfat"


Yes, I've got another partitions too. :)

---------- Post added at 07:55 PM ---------- Previous post was at 07:50 PM ----------


Try booting into the 'linux', 'linux-nonfb' or the 'failsafe', as they all refer to sda1.
Please report if it was working (boot successfull to black panther or not).

I tried it, but it wasn't working. It wrote this:

"VGA 778 is deprecated. Use set gfxpayload 800x600x16, 800x600 before linux command instead.
error: no such partition

Press any key to continue..."

So, I pressed one key, and the consequence is:

http://kepfeltoltes.hu/view/120212/P120212_19.58_www.kepfeltoltes.hu_.jpg

I tried document it. :D From this step, it doesn't go forward.
Any idea? :(

sea
12th February 2012, 08:55 PM
Hmm lets get your hands dirty ;)

Go for this:

su
cp /boot/grub2/grub.cfg /boot/grub2/grub.bak
gedit /boot/grub2/grub.cfg

1) Replace gedit with your prefered gui editor.
2) Scroll down the the menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
and mark everything till the closing }.
3) Paste that part here within either code or quote tags

Grisnackh
12th February 2012, 10:55 PM
Hmm lets get your hands dirty ;)

Go for this:

su
cp /boot/grub2/grub.cfg /boot/grub2/grub.bak
gedit /boot/grub2/grub.cfg

1) Replace gedit with your prefered gui editor.
2) Scroll down the the menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
and mark everything till the closing }.
3) Paste that part here within either code or quote tags

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=c5b3c48c-963e-4dab-8cd2-
initrd (hd0,0)/boot/initrd.img
}
menuentry "linux-nonfb (on /dev/sda1)" --class gnu-linux --class gnu --class os
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=c5b3c48c-963e-4dab
initrd (hd0,0)/boot/initrd.img
}
menuentry "failsafe (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd



Do you think of this? :)
But...if "ext2" is the file system...why? bP-s file system was ext3, I think. No way ext2.
And...what's msdos? I don't understand it. :S

sea
12th February 2012, 10:59 PM
/dev/sda1: UUID="c5b3c48c-963e-4dab-8cd2-0e58bcd707db" TYPE="ext4"

menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=c5b3c48c-963e-4dab-8cd2-
initrd (hd0,0)/boot/initrd.img
}

Have a closer look at the bold ones...

EDIT:
Copy this text and append (add at the end of existing code in there) it corrected to: /etc/grub.d/40_custom
However, id rename 'linux (on /dev/sda1)' of the first line to something like: 'black Panther - custom'
Yes this will make another entry to your boot menu, but that entry wont be changed!
I suggest this because grub seems to cut off your UUID of sda1.

Grisnackh
13th February 2012, 12:11 AM
Have a closer look at the bold ones...

EDIT:
Copy this text and append (add at the end of existing code in there) it corrected to: /etc/grub.d/40_custom
However, id rename 'linux (on /dev/sda1)' of the first line to something like: 'black Panther - custom'
Yes this will make another entry to your boot menu, but that entry wont be changed!
I suggest this because grub seems to cut off your UUID of sda1.

Ugh...once more, please. So, this is the source code's piece of menuetry:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.2.5-3.fc16.i686' --class fedora --class g
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root 7e0dca64-a7bc-4af8-b56b-bdec2ca
echo 'Loading Linux 3.2.5-3.fc16.i686 ...'
linux /boot/vmlinuz-3.2.5-3.fc16.i686 root=/dev/sda7 ro rd.md=0 rd.lv
}
menuentry 'Fedora Linux, with Linux 3.2.5-3.fc16.i686 (recovery mode)' --class
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root 7e0dca64-a7bc-4af8-b56b-bdec2ca
echo 'Loading Linux 3.2.5-3.fc16.i686 ...'
linux /boot/vmlinuz-3.2.5-3.fc16.i686 root=/dev/sda7 ro single rd.md=
}
menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.i686' --class fedora --class g
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root 7e0dca64-a7bc-4af8-b56b-bdec2ca
echo 'Loading Linux 3.1.0-7.fc16.i686 ...'
linux /boot/vmlinuz-3.1.0-7.fc16.i686 root=UUID=7e0dca64-a7bc-4af8-b5
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.0-7.fc16.i686.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.i686 (recovery mode)' --class
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root 7e0dca64-a7bc-4af8-b56b-bdec2ca
echo 'Loading Linux 3.1.0-7.fc16.i686 ...'
linux /boot/vmlinuz-3.1.0-7.fc16.i686 root=UUID=7e0dca64-a7bc-4af8-b5
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.0-7.fc16.i686.img
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=c5b3c48c-963e-4dab-8cd2-
initrd (hd0,0)/boot/initrd.img
}
menuentry "linux-nonfb (on /dev/sda1)" --class gnu-linux --class gnu --class os
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=c5b3c48c-963e-4dab
initrd (hd0,0)/boot/initrd.img
}
menuentry "failsafe (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=c5b3c48c-963e-4dab-8c
initrd (hd0,0)/boot/initrd.img
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###

So...copy your source code the end of

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "linux (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5b3c48c-963e-4dab-8cd2-0e58bcd
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=c5b3c48c-963e-4dab-8cd2-
initrd (hd0,0)/boot/initrd.img
}

...this? But exchange them?

And the " it corrected to: /etc/grub.d/40_custom" section...I don't understand this. I've got some /etc/grub.d/... line, so...:D

I shame it, but I disturbed to this totally...:C My boyfriend tried to solve my problem, so there may be some interesting thing...:D

sea
13th February 2012, 12:24 AM
There is a file in the folder /etc/grub.d that is called 40_custom.
To that file you add (below the current lines in there).


menuentry "Black Panther (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext4
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root /dev/sda1
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=c5b3c48c-963e-4dab-8cd2-0e58bcd707db
initrd (hd0,0)/boot/initrd.img
}

You need to open that file with root rights, or you wont be able to save it.

Hope this helps, i'm off to sleep ;)

Grisnackh
13th February 2012, 12:43 AM
There is a file in the folder /etc/grub.d that is called 40_custom.
To that file you add (below the current lines in there).


menuentry "Black Panther (on /dev/sda1)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext4
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root /dev/sda1
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=c5b3c48c-963e-4dab-8cd2-0e58bcd707db
initrd (hd0,0)/boot/initrd.img
}

You need to open that file with root rights, or you wont be able to save it.

Hope this helps, i'm off to sleep ;)

Ahh...I think, this is the problem. I can't find that file anywhere. :confused: