grub problem

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Re: grub problem

Postby doktor5000 » Nov 11th, '14, 21:04

Why do you want to compile something when you can simply install it via Mageia repositories?

Apart from that, it does not need to be compiled, as it's only a script. Simply download and extract it.

Code: Select all
┌─[doktor5000@Mageia4]─[20:04:00]─[~]
└──╼ wget http://ftp.de.debian.org/debian/pool/main/o/os-prober/os-prober_1.64.tar.xz && tar -xf os-prober_1.64.tar.xz && cd os-prober
--2014-11-11 20:04:20--  http://ftp.de.debian.org/debian/pool/main/o/os-prober/os-prober_1.64.tar.xz
Resolving ftp.de.debian.org (ftp.de.debian.org)... 141.76.2.4
Connecting to ftp.de.debian.org (ftp.de.debian.org)|141.76.2.4|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24672 (24K) [application/x-tar]
Saving to: 'os-prober_1.64.tar.xz'

100%[==============================================================================================================================>] 24,672      --.-K/s   in 0.04s   

2014-11-11 20:04:20 (659 KB/s) - 'os-prober_1.64.tar.xz' saved [24672/24672]

┌─[doktor5000@Mageia4]─[20:04:20]─[~/os-prober]
└──╼ ll
total 48
-rw-r--r-- 1 doktor5000 doktor5000  109 May 19  2013 Makefile
-rw-r--r-- 1 doktor5000 doktor5000 3442 Jan 17  2011 README
-rw-r--r-- 1 doktor5000 doktor5000  858 Jan 17  2011 TODO
-rw-r--r-- 1 doktor5000 doktor5000 6414 Sep 23  2012 common.sh
drwxr-xr-x 3 doktor5000 doktor5000 4096 Aug 17 23:37 debian/
-rwxr-xr-x 1 doktor5000 doktor5000 1577 Jan 17  2011 linux-boot-prober*
drwxr-xr-x 4 doktor5000 doktor5000 4096 Jan 17  2011 linux-boot-probes/
-rw-r--r-- 1 doktor5000 doktor5000  680 Jan 17  2011 newns.c
-rwxr-xr-x 1 doktor5000 doktor5000 4261 Dec 25  2013 os-prober*
drwxr-xr-x 5 doktor5000 doktor5000 4096 Jan 17  2011 os-probes/
┌─[doktor5000@Mageia4]─[20:04:23]─[~/os-prober]
└──╼
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18053
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: grub problem

Postby barjac » Nov 12th, '14, 01:32

Well again it's really a question for a Mint forum, but you may get some pointers from the Mga spec file:
http://svnweb.mageia.org/packages/cauld ... iew=markup
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: grub problem

Postby ohmysql » Nov 13th, '14, 02:52

You have put this issue in 2 different topics. It's crazy answering to you on both.
Not good to dredge out an old topic especially if it is not too related to your issue.
Choose one and stick with it.


Ok, thanks for the thought. You're right, let's leave the topic here :)

This thread is relevant to my problem since I am trying to boot Mageia from Mint's grub! You can see my earlier comments in this thread, building directly on the previous comments!

Now, you said you want to update os-prober.
To help you better, it is good to tell us why you want to upgrade os-prober.
What problem exactly do you face in wanting to do this.

Also through the course of your posts (always better to lay out everything in your first post so it's clearer), we get the impression you want it 'actually' in Linux Mint.
What OS bootloader exactly boot up all OS's? (what OS grub is set to mbr?)

If you are not clear in telling us, most of us will ignore your posts as we do not exactly know what you want to do.


I want to update os-prober because it is creating erroneous entries in my Mint grub that is preventing mageia from loading! I had installed Mageia and everything was fine, then grub2 updated in mint and screwed everything up. I haven't been able to fix these entries manually so Mageia won't boot! This probably is relevant to anyone who accidentally updated their grub on the master boot record via another operating system. They're screwed without the install CD (which I don't have). That's why I'm posting on the mageia forum (to response to the question below) because nobody on Mint needs to update os-prober! :)

Moreover, it's the Mageia instructions that tell me to "update os-prober" but they don't give any ideas how to do that!

Why do you want to compile something when you can simply install it via Mageia repositories?


See above! I can't install it from the Mint repos !

Apart from that, it does not need to be compiled, as it's only a script. Simply download and extract it.


Ok, I've downloaded it and extracted it. Now what?

Code: Select all
Code: Select all
    ┌─[doktor5000@Mageia4]─[20:04:00]─[~]
    └──╼ wget http://ftp.de.debian.org/debian/pool/main/o/os-prober/os-prober_1.64.tar.xz && tar -xf os-prober_1.64.tar.xz && cd os-prober
    --2014-11-11 20:04:20--  http://ftp.de.debian.org/debian/pool/main/o/os-prober/os-prober_1.64.tar.xz
    Resolving ftp.de.debian.org (ftp.de.debian.org)... 141.76.2.4
    Connecting to ftp.de.debian.org (ftp.de.debian.org)|141.76.2.4|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 24672 (24K) [application/x-tar]
    Saving to: 'os-prober_1.64.tar.xz'

    100%[==============================================================================================================================>] 24,672      --.-K/s   in 0.04s   

    2014-11-11 20:04:20 (659 KB/s) - 'os-prober_1.64.tar.xz' saved [24672/24672]

    ┌─[doktor5000@Mageia4]─[20:04:20]─[~/os-prober]
    └──╼ ll
    total 48
    -rw-r--r-- 1 doktor5000 doktor5000  109 May 19  2013 Makefile
    -rw-r--r-- 1 doktor5000 doktor5000 3442 Jan 17  2011 README
    -rw-r--r-- 1 doktor5000 doktor5000  858 Jan 17  2011 TODO
    -rw-r--r-- 1 doktor5000 doktor5000 6414 Sep 23  2012 common.sh
    drwxr-xr-x 3 doktor5000 doktor5000 4096 Aug 17 23:37 debian/
    -rwxr-xr-x 1 doktor5000 doktor5000 1577 Jan 17  2011 linux-boot-prober*
    drwxr-xr-x 4 doktor5000 doktor5000 4096 Jan 17  2011 linux-boot-probes/
    -rw-r--r-- 1 doktor5000 doktor5000  680 Jan 17  2011 newns.c
    -rwxr-xr-x 1 doktor5000 doktor5000 4261 Dec 25  2013 os-prober*
    drwxr-xr-x 5 doktor5000 doktor5000 4096 Jan 17  2011 os-probes/
    ┌─[doktor5000@Mageia4]─[20:04:23]─[~/os-prober]
    └──╼



Well again it's really a question for a Mint forum, but you may get some pointers from the Mga spec file:
http://svnweb.mageia.org/packages/cauld ... iew=markup


Ok, thanks--I followed those steps. Now how do I replace the os-prober I have with that version? I had already downloaded a copy. Also, someone said I don't need to compile anything, but if that's true why is there a make file?

Also, I don't understand what you'd like me to glean from that link at svnweb.

Thanks y'all!!

oh my SQL
ohmysql
 
Posts: 39
Joined: Nov 8th, '12, 16:59

Re: grub problem

Postby gohlip » Nov 13th, '14, 05:13

Alright, the issue is
o OS grub set to mbr is from Linux Mint.
o Mageia entry in Mint grub.cfg wont boot Mageia.
If I get it wrong or miss anything, please get back and clarify.

I am on Mageia 5, skipped M4 and know that M3 and below have problems like this (M5 is ok).
Unless grub is updated to your current M version, you may face this also.
Mageia also gets its own grub.cfg wrong, not to mention other OS getting it wrong.
The issue is not with Mint, but with Mageia and let's not be fixated on os-prober.

I'll start with what will boot Mageia

Code: Select all
menuentry 'Mageia  ' {
   insmod part_msdos
   insmod ext2
        search --no-floppy --fs-uuid --set=root   xxxxxxxxxxxxxxxxxxx
   linux   /boot/vmlinuz-desktop root=UUID=xxxxxxxxxxxxxxxxx ro   nokmsboot splash quiet
   initrd   /boot/initrd-desktop.img
}
You can include --hints if you like, menu id option, set root=(x,y) [above search line, please], etc, but not required.
But note the following...
o vmlinuz and initrd is vmlinuz-desktop and initrd-desktop.img
o linux line has nokmsboot

Right, how to get into Mint's OS grub.cfg and such that each update (either from Mint or Mageia) don't mess it it up again.
A simple, easy method, in my opinion, is as follows

Do all this in Linux Mint....
o Create a custom.cfg (if not created already)
Code: Select all
sudo touch /boot/grub/custom.cfg

o Open up newly created empty custom.cfg and put the above entry in it.
Code: Select all
kdesudo kate /boot/grub/custom.cfg
or gksudo or whatever

That's it. No need to update-grub. Mageia entry will appear at the bottom of grub menu when you reboot.

Notes:
o The custom.cfg will be there always (unless you remove it) regardless of update-grub or kernel change in Mageia or Mint. And it will boot the latest Mageia kernel.
o M3 and below (and other OS) generates grub.cfg to other sym-link (not vmlinuz-desktop) so you have problems on Mageia grub.cfg and other OS update-grub.
o You can include other entries in custom.cfg
o This issue also cause problems in --auto-orphans as it remove old kernels and hence the (wrong) sym-link in grub.cfg
o os-prober - that's not the issue; it's getting the sym-links wrong (ln -sf /boot/latest kernel /boot/wrong sym-link)
o If you want the entries in custom.cfg not to be at bottom, move the following in grub.cfg (Mint's in your case) above the main entries.
Code: Select all
### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Yes, there are ominous warnings not to manually change grub.cfg. I assure you it's okay, but know update-grub will revert to moving it back to the bottom again. Redo.
Or...you can rename 41_custom....., ah, too much hassle.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: grub problem

Postby ohmysql » Nov 15th, '14, 02:05

Hmm, ok. I modified what you suggested a bit and I put the code you suggested in 40_custom for my grub 2 on mint. I updated-grub and Mageia started to load and then crashed.

Well, I guess that probably worked, although I'm confused about why it crashed. I didn't get much information out of the system as to why.

It said:

Code: Select all
early decompress_linx
Decompressing... Parsing ELF...
Booting the kernel...


And that's where it froze.

Also, mageia is creating 14 automatic entries for itself on grub. Not sure what's up with that, I wish they would go away. Want me to post them?

OMS!
ohmysql
 
Posts: 39
Joined: Nov 8th, '12, 16:59

Re: grub problem

Postby gohlip » Nov 15th, '14, 05:00

..... I put the code you suggested in 40_custom for my grub 2 on mint.....

I suggested putting it in custom.cfg, not 40_custom

Try again. update-grub will not only not crash, but will not affect this entry, as I said.

ps; please read again my post. It is clear enough. Perhaps too clear.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: grub problem

Postby ohmysql » Nov 15th, '14, 07:38

Can you tell me what difference it makes?
ohmysql
 
Posts: 39
Joined: Nov 8th, '12, 16:59

Re: grub problem

Postby gohlip » Nov 15th, '14, 10:36

ohmysql wrote:Can you tell me what difference it makes?

Yes, they are different. Very different.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: grub problem

Postby gohlip » Nov 15th, '14, 11:14

Your linx Mint grub crashed. You may have removed the headers in 40_custom.
Never remove headers.

Suggest you reinstall grub in Mint.
Sudo apt-get install --reinstall grub-pc
Sudo grub-install /dev/sda
Sudo update-grub

Repeat my procedures

Typing from phone.
I am outside.
Amend what's obvious.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: grub problem

Postby ohmysql » Nov 15th, '14, 19:20

My mint grub is fine--I'm writing you from mint. And I know how to recover a crashed mint, but thank you just in case!

In this case, neither the 40_custom nor the custom.cfg boot Mage correctly. They both drop down to debug shell the first time and then freeze at the point I mentioned in the previous post every successive time. It mentions that it was unable to find the drive referred to (and of course I replaced xxxxxxxxxxxxxxxxx with the UUID found in gparted under information).

I'll try to get you a more exact error message, but basically it starts loading the kernel, I see the boot splash, then it says it can't find the drive and crashes. That is really strange, but maybe not a grub problem? I'll work now to get you more information.
ohmysql
 
Posts: 39
Joined: Nov 8th, '12, 16:59

Re: grub problem

Postby gohlip » Nov 15th, '14, 22:53

......In this case, neither the 40_custom nor the custom.cfg boot Mage correctly. They both drop down to debug shell the first time and then freeze at the point I mention.........


The problem may therefore lie in Mageia itself.
First try booting using Mageia grub itself (provided your Mageia installed grub2, grub-legacy in Mageia won't do)
To do this, at Mint's grub menu,
Code: Select all
grub> search --set=root --label xxxxx
grub> multiboot /boot/grub2/i386-pc/core.img

or if you don't use labels ,
Code: Select all
grub> set root='hd0,msdosx'
grub> multiboot /boot/grub2/i386-pc/core.img
'hd0,msdosx' is Mageia's partition, 'x' is a number.
or use uuid, type carefully.
Code: Select all
 search --set=root --fs-uuid xxxxxxxxxxxxxxxxxxxxxxx

If you still have problems, then boot up to prompt by adding "systemd.unit=multi-user" (without appos) in the linux line
and then fix your initramfs/initrd in prompt using command
Code: Select all
dracut -f
as root.
See https://ask.fedoraproject.org/en/questi ... initramfs/ if you need explanations.
[edit] - not a good link for explanations on dracut -f
check out Mageia wiki on this. Google yourself.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: grub problem

Postby ohmysql » Nov 18th, '14, 07:44

Thanks! Ok, everything in 40_custom is working fine... I'm able to get Mageia's own grub loader to load using your instructions, but everything crashes after that.

I'll start a new thread with the more precise problem. But basically, something in the boot sequence is calling a UUID that doesn't exist, and I don't know how to get it to stop!

Thanks, this part is resolved!

OMS!
ohmysql
 
Posts: 39
Joined: Nov 8th, '12, 16:59

Re: grub problem

Postby gohlip » Nov 18th, '14, 07:47

ohmysql wrote:I'll start a new thread with the more precise problem. But basically, something in the boot sequence is calling a UUID that doesn't exist, and I don't know how to get it to stop!
OMS!

Just check your /etc/fstab with the actual UUID's from
Code: Select all
# blkid

[edit] - including your swap UUID, comment out if necessary and remove "resume=UUID=xxxxxxxxxxxxxxxxxx" from grub linux line.
Correct and reboot.


note: systemd is very particular with wrong fstab entries.
ps: grub, on the hand, is very forgiving.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: grub problem

Postby ohmysql » Dec 2nd, '14, 00:05

Ok, thanks! I mean the grub issue is clearly now fixed, so thanks!

I'm still having another issue that clearly transcends grub around an fstab trying to call an old UUID of a swap partition, but let me save that for another thread.
ohmysql
 
Posts: 39
Joined: Nov 8th, '12, 16:59

Previous

Return to Basic support

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 1 guest