Page 1 of 1

[SOLVED] grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 22nd, '18, 23:53
by canadaist
I have replaced the 32bit cpu, motherboard and ram
with an amd A10, motherboard and ram (all of which had been running mageia6/64 in another machine)
wiped / root during install and (during install, custom partitioning, install) put a fat32 /boot/EFI in
it installs grub2 and asks for reboot

on reboot it has twice said
Code: Select all
Grub Loading Stage1.5.
Internal error: the second sector of Stage 2 is unknown.


The second attempt was after a re-install of 6, but unchecked Probe Foreign OS in the grub setup dialogue,
same Internal error message on boot attempt

Ps. Live boot worked fine

I was wondering if this was something repairable. I am going back to install help areas now.

Edit Post: Is it possible that this is a grub/grub2 upgrade problem, and if so do I

Code: Select all
 run 'grub-install'


from a live disk terminal and if so how do I determine the place for it ie. "grub-install /dev/hda" or where?

PPs. I am always really grateful for help, thanks in advance, and sorry for errors in my request.

PPPs. I am also willing to 'turn off' UEFI in Bios and delete the /boot/EFI partition

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 02:50
by gohlip
See this viewtopic.php?f=8&t=11972#p70022

1. It seems it is possible you did not boot up livecd in UEFI

To check if you are booted in UEFI mode at livecd, at livecd terminal
Code: Select all
test -d /sys/firmware/efi && echo UEFI || echo BIOS

It should output 'UEFI' not 'BIOS'. Otherwise try to reboot in UEFI, - fix at your bios setup.

2. Also possible you did not install using grub2-install command (you used grub-install command)

3. You can use /mnt and /mnt/boot/efi rather than /mnt/MageiaRoot (in the linked post) to mount your root and $esp partitions.
(make sure you have $esp mounted (as /boot/efi) at your fstab - should be done during your installation)

Good luck.

ps: if you need further help, provide (at livecd),
sudo parted -l {#small -L}
sudo blkid
/etc/fstab {of your installed Magiea OS}
efibootmgr -v

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 13:54
by canadaist
Bios is set to legacy/uefi
1.
Code: Select all
test -d /sys/firmware/efi && echo UEFI || echo BIOS

Produces "UEFI"
2. Also possible you did not install using grub2-install command (you used grub-install command)

The automated portion of the install includes a dialogue box showing the install of grub2

Still using Live DVD, I attempted to run
Code: Select all
urpmi grub2 grub2-common grub2-efi
as the primary suggestion from your linked page, the return was
'No package named grub2-common'

So, yes, I guess I need more help thanks.

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 15:27
by gohlip
canadaist wrote:So, yes, I guess I need more help thanks.

gohlip wrote:ps: if you need further help, provide (at livecd),
# parted -l {#small -L}
# blkid
/etc/fstab {of your installed Magiea OS}
# efibootmgr -v


Ignore the sudo earlier, I use/enable sudo (and kdesu) in my Mageia.
# means as root

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 15:40
by canadaist
Model: ATA WDC WD5000AAKS-6 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 32.3kB 12.6GB 12.6GB primary ext4 boot
2 12.6GB 500GB 488GB extended
5 12.6GB 12.9GB 335MB logical fat32 esp
6 12.9GB 17.1GB 4187MB logical linux-swap(v1)
7 17.1GB 500GB 483GB logical ext4

blkid
/dev/sda1: UUID="8864294c-2f6b-4032-9c49-972ff50ebf61" TYPE="ext4" PARTUUID="1549f232-01"
/dev/sda5: UUID="7F22-AAF0" TYPE="vfat" PARTUUID="1549f232-05"
/dev/sda6: UUID="34ad1e9f-c8ce-4d70-9826-cf7049c3ef03" TYPE="swap" PARTUUID="1549f232-06"
/dev/sda7: UUID="7c6e240d-a0cd-49da-9ad5-93911ab91e82" TYPE="ext4" PARTUUID="1549f232-07"
/dev/loop0: TYPE="squashfs"
/dev/sdb1: UUID="2017-07-11-20-04-49-00" LABEL="Mageia-6-Plasma-LiveDVD" TYPE="iso9660" PTUUID="2bc829b9" PTTYPE="dos" PARTUUID="2bc829b9-01"
/dev/sdb2: SEC_TYPE="msdos" UUID="DA20-A358" TYPE="vfat" PARTUUID="2bc829b9-02"



/etc/fstab from harddrive

Entry for /dev/sda1 :
UUID=8864294c-2f6b-4032-9c49-972ff50ebf61 / ext4 defaults 1 1
# Entry for /dev/sda5 :
UUID=7F22-AAF0 /boot/EFI vfat defaults 0 0
# Entry for /dev/sda7 :
UUID=7c6e240d-a0cd-49da-9ad5-93911ab91e82 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=34ad1e9f-c8ce-4d70-9826-cf7049c3ef03 swap swap defaults 0 0


efibootmgr -v
root@localhost live]# efibootmgr -v
bash: efibootmgr: command not found

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 15:50
by gohlip
Oh no, your disk is msdos.
To install in uefi, your disk needs to be in gpt.

Use gparted ( you need to download gparted and boot from another media to do your disk.
Prepare all partitions ready before installation.
That includes a partition in fat 32 of 150 MB.
When installing, mount that fat 32 partition as /boot/efi as your $esp.
The installation should proceed nicely now that it is in gpt.

Of course, you can elect to use disk as msdos but you have to install in bios-legacy.
I'm rushing this over to you first, but if you more questions, please ask. Take your time.


[edit] - to prepare disk as gpt. at gparted gui, there is a tab on top of the table "Device". Select that "Device" tab, a drop down menu will appear and you can select 'msdos' or 'gpt' and others.
You have to do this before creating any partitions. Note this will wipe out all data totally in your disk.

ps: I personally find the kde partitioning tool not ...er...satisfactory.
Regretfully that also goes for mdrake something, the mageia partitioning tool. Sorry. Not good enough. It won't do some things well.
I haven't used these for some time now. I may be wrong, But ... just in case.

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 16:03
by canadaist
So it will have to be msdos, cant wipe it.
I can switch to legacy from efi/legacy in bios, then delete EFI and / - then one presumes, and begin again?

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 16:08
by gohlip
canadaist wrote:So it will have to be msdos, cant wipe it.
I can switch to legacy from efi/legacy in bios, then delete EFI and / - then one presumes, and begin again?

Yes. Make sure you boot up install media in bios-legacy then.
You can leave the EFI as is and don't use it, if you want.

Oh, good luck.
Cheers.

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 16:14
by canadaist
I am unsure as to what I am to do to ensure this.

"Make sure you boot up install media in bios-legacy then."

Also: using the usb live disk sure is fast

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 16:47
by gohlip
canadaist wrote:I am unsure as to what I am to do to ensure this.

"Make sure you boot up install media in bios-legacy then."

Also: using the usb live disk sure is fast


Surest way is at you bios setup (usually F2 when starting computer), at the "Boot" section, there are one of...
o Disable uefi boots
o Disable csm
o Bios-legacy boots only
o Prioritise bios-legacy boots
o or similar.. depending on motherboard.


And as my earlier post, when booted up in livecd OS, before installation,
test -d /sys/firmware/efi && echo UEFI || echo BIOS
make sure 'BIOS' is output, not 'UEFI'.

[edit] - One more thing, if there is a 'secure boot' section, disable it.

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 16:51
by canadaist
AFK for the box in question for an hour, but I will look for parameters to set it that way, as well setting legacy. I will report back, no matter the outcome.

OK, that worked a peach, which is to say, all went well, I set bios to legacy, rebooted twice, installed Mageia, booted Mageia nicely.

However, in all my futzing, some how the big partition was not picked up as home, I am sure it's an error of mine. So is there a methodology to set it as home, without reinstalling? I've done a number of updates.....

Sorry, I guess you stay a newb for decades

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 18:27
by canadaist
OK stop laughing, it's always picked up /home before, I was watching to make sure about only formatting root. :lol:

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 19:01
by gohlip
Yay!! Very good to hear you've got it working.
Cheers. Take care.

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 19:10
by isadora
Sounds like your initial problem is solved now?

Would you mind, marking this topic [SOLVED]?
You can do so by editing the title/subject of the first message in the topic.
Place [SOLVED] in front of subject/title.

Thanks ahead canadaist. :)

Re: grub error on upgrade to 6 (and hardware upgrade)

PostPosted: Jan 23rd, '18, 19:49
by canadaist
It works. I re-installed to solve the post UEFI kerfuffle - to repair the "make sure it picks up /home" error.

The solution I used was (as recounted above) set the bios to legacy only and don't try to deal with UEFI weirdness.