Help With etc/default/grub

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

Help With etc/default/grub

Postby TNKEG » Mar 3rd, '18, 15:16

Hello, I recently had to reinstall another distro.When I did that it somehow disconnect Mageia from /swap.I noticed long boot times and no swap when I ran Gparted.I edited my fstab file and that got Mageia mounting swap again but I am having trouble with etc/default/grub.Maybe I am using the wrong procedure, I may have an error in the editing of line 1 of etc/default/grub.I changed the UUID there in an attempt to fix swap and now when i run update-grub I get " /etc/default/grub: line 1: GRUB_CMDLINE_LINUX_DEFAULT=nokmsboot splash quiet noiswmd resume=UUID=78ce7bba-22fa-48dd-ac94-5e9cfa16fa03 audit=0: command not found ". The 78cxxxxxxxx UUID is the edit I put in to point Mageia back to swap, it was 70xxxxxxxxxxx. Here is my current etc/default/grub, dfoes anyone see an error in the syntax of line 1 ;
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="nokmsboot splash quiet noiswmd resume=UUID=78ce7bba-22fa-48dd-ac94-5e9cfa16fa03  audit=0"
GRUB_DEFAULT=saved
GRUB_DISABLE_OS_PROBER=false
GRUB_DISABLE_RECOVERY=false
GRUB_DISABLE_SUBMENU=n
GRUB_DISTRIBUTOR=Mageia
GRUB_ENABLE_CRYPTODISK=y
GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=auto
GRUB_SAVEDEFAULT=true
GRUB_TERMINAL_OUTPUT=gfxterm
GRUB_THEME=/boot/grub2/themes/maggy/theme.txt
GRUB_TIMEOUT=10

Your help would be greatly appreciated.
TNKEG
 
Posts: 2
Joined: Mar 3rd, '18, 15:02

Re: Help With etc/default/grub

Postby gohlip » Mar 3rd, '18, 20:20

Hi, replying to you here again. ;)
Unfortunately, Mageia ia not so easy to fix, assuming you've done your 'edit' of your fstab and /etc/default/grub correctly.
I had the same trouble as you and while I could fix the other distro's (I had lots) without problem, I couldn't fix Mageia in the similar fashion.
Mageia has a different mechanism and will prevent proper booting when the swap uuid is changed.

I reinstalled Mageia (it's easier). I'll search for the Mageia topic (if I can find it) and will later post the link.
I guess (belatedly) I could have tried (but I didn't) to change back to the original uuid and see if that worked.
You can try that yourself and let us know. There are steps that can change uuid's from another uuid.

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

Re: Help With etc/default/grub

Postby gohlip » Mar 3rd, '18, 20:35

It's an old issue (for me) and I couldn't find the posts, but another suggestion is to to upgrade to M6 (if currently yours is older than M6) and recheck your 'resume=UUID=xxxxxxxxxxxxx" in /etc/default/grub and your /etc/fstab (check carefully for edit errors) followed by 'grub2-mkconfig -o /boot/grub2/grub.cfg'.

ps: I will no longer install or test out Debian or their derivatives following this 'incident'. No way should an install change an existing uuid of any partition, even if it is correctable (not in Mageia's case).
Also a bit disappointing that Mageia made it so hard to to correct with a change in uuid's.

[edit 1]
Found it (the topic).
Here it is.
viewtopic.php?f=7&t=7093

[edit 2] As said earlier, try to 'upgrade' your Mageia with the install media and recheck your uuid's in fstab and default/grub after upgrading.
Found a topic here.
viewtopic.php?f=15&t=11783
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: Help With etc/default/grub

Postby TNKEG » Mar 3rd, '18, 21:30

Thank you once again gohlip.Hopefully with the links you have given I can figure it out.I wish I had know Debian was going to change swaps UUID.I am multibooting an /sda disk and several distros on /sdb. It was working wonderfully until I added Debian,as you already know.Now I have to go back and fix each one.They are all still booting but slowly and with no swap.You may see me in another forum, LOL.If I was to reformat /sdb again and decided to keep Debian, I know now to install it first.I agree 100% none of the other distros go about changing settings which affect other boot sequences.Multibooting is an "iffy" affair.Several of the distros, no matter how much you point to the efi partition on /sdb still rush toward /sda and put the bootloader there.I have to use "Hasleo UEFI" or efibootmgr, to set the boot order.Then I can one time boot using F12 or allow it to boot the default on /sda automatically.It is a shame it is hard to fix in Mageia, Manjaro was fairly easy with your assistance.I will get it though.Does it look to you like I have anything out of place in line 1 of etc/default/grub I posted above?I am not experienced enough to be editing files too much, to be honest.
TNKEG
 
Posts: 2
Joined: Mar 3rd, '18, 15:02

Re: Help With etc/default/grub

Postby gohlip » Mar 4th, '18, 00:00

To be fair, nowadays, swap entry need not to be in fstab for swap to be used if required when ram is out of space.
I read somewhere that when installing Debian (and derivatives), we should not specify swap in the installer.
It is just that it needs to be when we need to hibernate or put into suspend.

I personally now do not have a swap partition (in one of my systems) and I should not have any problem now when installing Debian.
But I wont be doing that (installing Debian) anytime soon.


As to Mageia's /etc/default/grub, I'm on M6, I do not have 'nokmsboot', 'noiswmd' and 'audit=0'.
I manually removed 'nokmsboot' and 'noiswmd' because they are not required. As for 'audit=0', it was not there in the first place.
I noticed you have
GRUB_ENABLE_CRYPTODISK=y
which I do not have. Is your grub encrypted? (or password protected?)
There are other changes (gfxpayload...) I made but I think would not be significant to the issue here.

As to your needing F12 to select booting different distros in uefi, I find that strange; grub2 (not grub-legacy) should take care of everything including other distros on other bootloaders (refind, systemd-boot, grub-legacy lilo, windows or no bootloaders). It may be that you have mixed uefi with bios-legacy boots or mixed gpt with msdos. Or on a removable external disk on uefi with $esp in that removable device (which you should include '--removable' in your grub-install command). Bootorder may be changed with grub updates (not update-grub or new kernels) and can be easily reverted back with efibootmgr command. But we won't know what causes your problem unless we have more information about your system (parted-l, efibootmgr -v, blkid, findmnt -s).

Anyway, hope you get your Mageia sorted out on the swap thingy first. Good luck.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: Help With etc/default/grub

Postby benmc » Mar 4th, '18, 21:11

hi

I run a multi system unit (8 / + /home, M5.1 32+64, M6 32+64, M7 32+64, M6 32+64 for QA testing).

I recently doubled my ram and to use suspend safely needed to change my swap partition size.
I changed the size of 2 partitions in my system.
as I used MCC to edit the partitions, I chose to delete the swap partition and then re-create it. In hindsight, probably not the best to do!
afterwards I had a very long boot time. 3 min 30 second timeout as swap uuid incorrect in fstab

fix for me:
correct swap uuid in fstab
correct swap uuid in /etc/default/grub2
run
Code: Select all
# dracut -f
(as root)

finally run
Code: Select all
# update-grub2
(as root)

I needed to do this for each of my Mageia systems
benmc
 
Posts: 1214
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron