Author Topic: Grub-install problem that manjaro-howto can't solve  (Read 9619 times)

0 Members and 1 Guest are viewing this topic.

Offline Kalimba

  • Neuling
  • *
  • Posts: 5
  • I'm new. Be nice!
  • Skill: Novice
Grub-install problem that manjaro-howto can't solve
« on: 15. July 2015, 15:59:29 »
Hi,

I would like to ask you for help with a problem concerning grub that https://wiki.manjaro.org/index.php?title=Restore_the_GRUB_Bootloader couldn't solve.

I run an up-to-date version of manjaro which I use since approximately three months.
Yesterday I renamed a swap partition with swaplabel and deleted two (seemingly unnecessary) NTFS partitions with Windows bootloader files with fdisk. After rebooting grub wouldn't load any more. When trying to boot from the hard disks from BIOS boot menu nothing will happen but a black screen with a single underscore for half a second and a return to the boot menu.

I can boot into my system using super grub disk. The system partition is /dev/sdb6.
Grub-install and update-grub will run without error. Chroot and other scripts shouldn't be necessary as I have the system running, right?
Code: [Select]
$ grub-install /dev/sdb or
Code: [Select]
$ grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
$ sudo update-grub
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found Intel Microcode image
Found linux image: /boot/vmlinuz-3.16-x86_64
Found initrd image: /boot/initramfs-3.16-x86_64.img
Found initrd fallback image: /boot/initramfs-3.16-x86_64-fallback.img
Found Manjaro Linux (0.8.13) on /dev/sda2
Found Debian GNU/Linux (7.8) on /dev/sdb3
Found Mac OS X on /dev/sdc3
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Do you have an idea how I could repair this?

Thanks for reading my post.

Frickson


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

Some more information:

I appended my MBR  (sudo dd if=/dev/sda of=backupmbrsda count=1 bs=512)

Code: [Select]
$ uname -a
Linux systemkili 3.16.7.14-1-MANJARO #1 SMP PREEMPT Tue Jun 30 18:03:14 UTC 2015 x86_64 GNU/Linux
Code: [Select]
$ fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa13e5439

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048 195311615 195309568  93.1G 83 Linux
/dev/sda2       195311616 390624115 195312500  93.1G 83 Linux
/dev/sda4       474511360 976773167 502261808 239.5G  5 Extended
/dev/sda5       474513408 684228607 209715200   100G 83 Linux
/dev/sda6  *    976382544 976773167    390624 190.8M 83 Linux


Disk /dev/sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00011ef5

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb2       117186560 132810751  15624192  7.5G 82 Linux swap / Solaris
/dev/sdb3       191475712 250068991  58593280   28G 83 Linux
/dev/sdb4            2048 117186559 117184512 55.9G  5 Extended
/dev/sdb5            4096  16388095  16384000  7.8G 82 Linux swap / Solaris
/dev/sdb6  *     16390144  75110399  58720256   28G 83 Linux

Partition table entries are not in disk order.

Code: [Select]
$ lsblk -f
NAME   FSTYPE  LABEL            UUID                                 MOUNTPOINT
sda                                                                 
├─sda1 ext4    home.System1984  0418c2d6-47ce-4102-a06a-8196e52db510
├─sda2 ext4    System.Game      fdf9e02e-3f3b-4347-890d-db8199123ebf
├─sda4                                                               
├─sda5 ext4    home.System.Kili d3ee53d4-f658-4a21-9346-f1a5ad1d1e50 /home
└─sda6 vfat    bootefi.Gam      6722-DBB5                           
sdb                                                                 
├─sdb2 swap    Swap.1984        755c7119-3acc-440c-b7e3-097b1c315e5f
├─sdb3 ext4    System1984       23557cf4-3bea-48a2-824a-c693e1de1f30
├─sdb4                                                               
├─sdb5 swap    swap.Kili        70fc0255-1cd0-4916-b491-925e1bc7a881 [SWAP]
└─sdb6 ext4    System.Kili      2a772c73-63db-4668-a69b-af6e295954e2 /
sr0                                                                 
« Last Edit: 15. July 2015, 16:08:28 by Kalimba »

Offline CyberWolf2k14

  • Held Mitglied
  • *****
  • Posts: 1184
  • Computers make very fast, very accurate mistakes.
  • Branch: Stable-sysd229-LightDM
  • Desktop: MATE/Cinnamon/GNOME
  • GPU Card: nVidia GeForce GT740
  • GPU driver: nVidia-NF-364.19
  • Kernel: 4.4.9x64 / 4.2.8.9x64 / 4.1.23x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #1 on: 15. July 2015, 16:49:33 »
I currently do not have my Manjaro up, but what happened is that by doing what you did, you caused the UUID's to be reassigned/recreated, and now grub simply cannot find the associated drives/partitions.
Look through the wiki and the forum for how to chroot from a bootable install media and you will need the CURRENT UUID's of all the partitions for this. Because I believe you may have to manually edit the grub config file (I think) and run update-grub. One of the uber gurus here may have better instructions/advice.
Reason I said that? Recently I had an issue caused not by editing the drive but just by changing something in BIOS which caused all drives to be reassigned, which scrambled my UUID's as well. Only in my case, I literally had not found at that time how to change that, and ended up killing off Manjaro and reinstalling.
PowerSpec Quad core Intel Core i5-4690K w/ 16GB RAM
Dual Boot = Win 7 Ult x64 and Manjaro 15.12 x64
===================================================
"A computer lets you make more mistakes faster than any invention in human history...
with the possible exceptions of handguns and tequila".

Offline Ponder

  • Held Mitglied
  • *****
  • Posts: 577
  • When in doubt, go ahead.
  • Branch: OpenRC/Stable
  • Desktop: Xfce 4.12
  • GPU Card: Intel Haswell IGP
  • GPU driver: Free
  • Kernel: Buttered
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #2 on: 15. July 2015, 17:25:37 »
One way to get the UUIDs is to run gparted. They will be found in Information under the Partition tab.
-- systemd free, by design --

Try Manjaro OpenRC Edition for a Poettering free experience.

Offline gohlip

  • Held Mitglied
  • *****
  • Posts: 1689
  • Desktop: OpenBox
  • GPU Card: nvidia
  • GPU driver: nonfree
  • Kernel: linux46 - x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #3 on: 15. July 2015, 18:27:32 »
Readjusted  uuid's (and partition mapping -sdax) can be checked with
Code: [Select]
# blkidCorrect /etc/fstab with the right uuid's from blkid.
Check and correct if necessary uuid's of  /boot/grub/grub.cfg also of swap "resume=UUID=xxxxxxxxxxxx" and root (mostly likely corrected with your grub-install and update-grub) but verify anyway.
Yes, chroot is not necessary if you are already booted up in Manjaro.

[edit] - to be clear, you need to correct /etc/fstab
« Last Edit: 15. July 2015, 18:32:41 by gohlip »
Life is a sexually transmitted disease with a 100% mortality rate.

Offline CyberWolf2k14

  • Held Mitglied
  • *****
  • Posts: 1184
  • Computers make very fast, very accurate mistakes.
  • Branch: Stable-sysd229-LightDM
  • Desktop: MATE/Cinnamon/GNOME
  • GPU Card: nVidia GeForce GT740
  • GPU driver: nVidia-NF-364.19
  • Kernel: 4.4.9x64 / 4.2.8.9x64 / 4.1.23x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #4 on: 15. July 2015, 19:57:55 »
See? I told you the guru's would come through.  ;)
Thanks Ponder & gohlip !!
This why I love this community. So helpful. And friendly too.  8)
PowerSpec Quad core Intel Core i5-4690K w/ 16GB RAM
Dual Boot = Win 7 Ult x64 and Manjaro 15.12 x64
===================================================
"A computer lets you make more mistakes faster than any invention in human history...
with the possible exceptions of handguns and tequila".

Offline Ponder

  • Held Mitglied
  • *****
  • Posts: 577
  • When in doubt, go ahead.
  • Branch: OpenRC/Stable
  • Desktop: Xfce 4.12
  • GPU Card: Intel Haswell IGP
  • GPU driver: Free
  • Kernel: Buttered
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #5 on: 15. July 2015, 20:06:35 »
See? I told you the guru's would come through.  ;)
Thanks Ponder & gohlip !!
This why I love this community. So helpful. And friendly too.  8)

Me? No, no.  :o

I'll certainly credit gohlip with guru status, but I'm not even close.  :-[ :P
-- systemd free, by design --

Try Manjaro OpenRC Edition for a Poettering free experience.

Offline gohlip

  • Held Mitglied
  • *****
  • Posts: 1689
  • Desktop: OpenBox
  • GPU Card: nvidia
  • GPU driver: nonfree
  • Kernel: linux46 - x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #6 on: 15. July 2015, 20:21:11 »
Hey guys, that's too much a credit I can take. But thanks.
We all start as novices and we all had great help from 'gurus' too.
Me thinks both 'gurus' and novices should keep that in mind, so that gurus can keep their humility and novices can aspire to help others.
Cheers.
Life is a sexually transmitted disease with a 100% mortality rate.

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #7 on: 15. July 2015, 20:32:58 »
If it's indeed a UUID issue, then perhaps one of my older threads might be of use to you. (OP)

https://forum.manjaro.org/index.php?topic=23964.0

Offline Kalimba

  • Neuling
  • *
  • Posts: 5
  • I'm new. Be nice!
  • Skill: Novice
Re: Grub-install problem that manjaro-howto can't solve
« Reply #8 on: 15. July 2015, 21:47:01 »
Thanks for all the replies.
You're right, CyberWolf2k14. People really seem to be friendly and helpful here.

I'm afraid that it's not a UUID issue:
I checked the current UUIDs of my partitions with blkid and lsblk -f. The UUIDs in /boot/grub/grub.cfg and in /etc/fstab are up-to-date and the correct ones. (Root partitions and swap partitions). I appended my /etc/fstab and my /boot/grub/grub.cfg .

I think there's a difference between your and my situation, Heart of A Lion: You told in your old post, that you were stuck on a screen with only the words GRUB _. When I select my hdd from the bios boot menu, for half a second I see a black screen with a single _ .

It somehow appears to me, that bios tries to search for a boot loader (in my case grub) in my master boot record, but fails to find an (intact) one (even though grub-install returned no errors?). But this is only my impression.
How can I check whether the MBRs (I provided copies in the first post of this thread) are alright? Would someone like to have a look at them, maybe? :)

Does anyone have another idea?

Offline gohlip

  • Held Mitglied
  • *****
  • Posts: 1689
  • Desktop: OpenBox
  • GPU Card: nvidia
  • GPU driver: nonfree
  • Kernel: linux46 - x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #9 on: 15. July 2015, 22:56:33 »
Quote
When I select my hdd from the bios boot menu,

You do not select hdd from bios boot. [meaning - you do not need to select any hdd - just let it boot from 'power on' ] (and make sure both drives are plugged in)
even if Manjaro is in sdb, let "bios boot menu" select sda.

Can you do that and let us know?

BTW, cannot see your grub-cfg nor /etc/fstab.
But never mind , do "boot sda" and let us know.
Repeat - do not select the Manjaro hard drive. The other one.
« Last Edit: 15. July 2015, 23:04:25 by gohlip »
Life is a sexually transmitted disease with a 100% mortality rate.

Offline fraterchaos

  • Held Mitglied
  • *****
  • Posts: 1019
  • Branch: stable
  • Desktop: xfce / custom standalone Compiz/Emerald
  • GPU Card: Radeon Saphire HD 7700
  • GPU driver: non-free
  • Kernel: 3.14.1-1-MANJARO x86_64 (64 bit)
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #10 on: 16. July 2015, 05:21:42 »
not really an expert on this but something occurred to me reading the OP...

if you deleted windows boot partitions... was your Linux Boot set to the same partition as the windows boot? Usually most people set up LInux that way, especially if installing Linux as dual boot on a machine that already has windows on it.

If your Linux boot sector was stored on the windows boot partition, then deleting that partition also deleted the linux boot sector...

Not sure how one goes about fixing that... if I were in such a situation I'd probably just re-install without reformatting /Home but6 there is probably an easier way...

or am I completely off the mark here? I don't know if any of this info would apply if its a UEFI set up, so maybe I'm totally wrong.

Offline gohlip

  • Held Mitglied
  • *****
  • Posts: 1689
  • Desktop: OpenBox
  • GPU Card: nvidia
  • GPU driver: nonfree
  • Kernel: linux46 - x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #11 on: 16. July 2015, 06:45:43 »

If your Linux boot sector was stored on the windows boot partition, then deleting that partition also deleted the linux boot sector...

He most likely deleted a windows reserved partition (one other -don't know, maybe the 'windows rescue') but since he had "grub install" and "update-grub", he would have 'set' again the mbr (to linux). And this always apply to "sda" whatever drive that linux resides in. He was attempting to let bios boot from the linux drive, which is not sda.

Anyway, there is a possible issue in that from sda6 shows
Code: [Select]
/dev/sda6  *    976382544 976773167    390624 190.8M 83 Linux  ##  in fdisk -l
└─sda6 vfat    bootefi.Gam      6722-DBB5         ## in lsblk -f

I think it may refer to different drives but... there's no blkid to refer to. It cannot be both linux and vfat     Or ....worse
Oh, He's not on uefi because drives are msdos (with extended partition too).
Life is a sexually transmitted disease with a 100% mortality rate.

Offline Kalimba

  • Neuling
  • *
  • Posts: 5
  • I'm new. Be nice!
  • Skill: Novice
Re: Grub-install problem that manjaro-howto can't solve
« Reply #12 on: 16. July 2015, 15:15:05 »
With my last post I forgot to attach the fstab and the grub.cfg. I attached them now.

You do not select hdd from bios boot. [meaning - you do not need to select any hdd - just let it boot from 'power on' ] (and make sure both drives are plugged in)
even if Manjaro is in sdb, let "bios boot menu" select sda.

Can you do that and let us know?

BTW, cannot see your grub-cfg nor /etc/fstab.
But never mind , do "boot sda" and let us know.
Repeat - do not select the Manjaro hard drive. The other one.
I did a bios reset, had a look at the boot order to ensure that both, the hdd and the sdd (sda and sdb) are in the boot order and just let bios select the boot device. By itself it selected the network boot, which is the last option after both the hdd and the sdd.
not really an expert on this but something occurred to me reading the OP...

if you deleted windows boot partitions... was your Linux Boot set to the same partition as the windows boot? Usually most people set up LInux that way, especially if installing Linux as dual boot on a machine that already has windows on it.

If your Linux boot sector was stored on the windows boot partition, then deleting that partition also deleted the linux boot sector...

Not sure how one goes about fixing that... if I were in such a situation I'd probably just re-install without reformatting /Home but6 there is probably an easier way...

or am I completely off the mark here? I don't know if any of this info would apply if its a UEFI set up, so maybe I'm totally wrong.
Before deleting the windows partitions, I booted using grub without an additional boot partition. So before grub should have been installed in my MBR, too, shouldn't it?

The two windows partitions were created during failed tries to install windows from a usb drive. Windows installation froze somewhere between partitioning and copying files on the partitions. These were emtpy expect for windows boot load data, that is a folder called BCD. Wikipedia says this means Boot Configuration Data. Before deleting these partitions. But, that shouldn't matter, particularly because I did install-grub, should it?

He most likely deleted a windows reserved partition (one other -don't know, maybe the 'windows rescue') but since he had "grub install" and "update-grub", he would have 'set' again the mbr (to linux). And this always apply to "sda" whatever drive that linux resides in. He was attempting to let bios boot from the linux drive, which is not sda.

Anyway, there is a possible issue in that from sda6 shows
Code: [Select]
/dev/sda6  *    976382544 976773167    390624 190.8M 83 Linux  ##  in fdisk -l
└─sda6 vfat    bootefi.Gam      6722-DBB5         ## in lsblk -f

I think it may refer to different drives but... there's no blkid to refer to. It cannot be both linux and vfat     Or ....worse
Oh, He's not on uefi because drives are msdos (with extended partition too).
You're right, there seems to be something wrong with sda6. In fdisk -l it says that sda6 is Linux, in lsblk -f it tells me that it is vfat, blkid says it is ext4.
Code: [Select]
$ blkid
/dev/sda1: LABEL="home.System1984" UUID="0418c2d6-47ce-4102-a06a-8196e52db510" TYPE="ext4" PARTUUID="a13e5439-01"
/dev/sda2: LABEL="System.Game" UUID="fdf9e02e-3f3b-4347-890d-db8199123ebf" TYPE="ext4" PARTUUID="a13e5439-02"
/dev/sda5: LABEL="home.System.Kili" UUID="d3ee53d4-f658-4a21-9346-f1a5ad1d1e50" TYPE="ext4" PARTUUID="a13e5439-05"
/dev/sda6: LABEL="bootefi.Gam" UUID="6722-DBB5" TYPE="vfat" PARTUUID="a13e5439-06"
/dev/sdb2: LABEL="Swap.1984" UUID="755c7119-3acc-440c-b7e3-097b1c315e5f" TYPE="swap" PARTUUID="00011ef5-02"
/dev/sdb3: LABEL="System1984" UUID="23557cf4-3bea-48a2-824a-c693e1de1f30" TYPE="ext4" PARTUUID="00011ef5-03"
/dev/sdb5: LABEL="swap.Kili" UUID="70fc0255-1cd0-4916-b491-925e1bc7a881" TYPE="swap" PARTUUID="00011ef5-05"
/dev/sdb6: LABEL="System.Kili" UUID="2a772c73-63db-4668-a69b-af6e295954e2" TYPE="ext4" PARTUUID="00011ef5-06"

Sda6 is the efi partition of another installation of manjaro I installed after my primary installation. Manjaro setup told me to install this second installation with an efi partition, but I don't know thy. The primary installation does not have and never had an efi partition. My partition tables are MBR. Do you think this partition (sda6) is what is keeping me from booting? Would it help to delete this partition (sda6)?
https://en.wikipedia.org/wiki/EFI_System_partition says that EFI System partitions are somewhat different:
Quote
An ESP needs to be formatted with a file system whose specification is based on the FAT file system and maintained as part of the UEFI specification; therefore, the file system specification is independent from the original FAT specification.

Offline mandog

  • Held Mitglied
  • *****
  • Posts: 1921
  • Architect Forum And G+ Forum Owner With Daniel S
  • Branch: All
  • Desktop: Gnome, Mate, E19, Openbox,FLuxbox,Budgie, XFCE openRC,
  • GPU Card: nvidia
  • GPU driver: Non Free
  • Kernel: latest
  • Skill: Advanced
Re: Grub-install problem that manjaro-howto can't solve
« Reply #13 on: 16. July 2015, 16:29:54 »
Just a observation bios reset will set all bios settings to default so if its a modern machine it will not boot linux till the op changes BIOS settings to legacy 
quote
 "He's not on uefi because drives are msdos (with extended partition too)".  hence this.
quote
"I did a bios reset, had a look at the boot order to ensure that both, the hdd and the sdd (sda and sdb) are in the boot order and just let bios select the boot device. By itself it selected the network boot, which is the last option after both the hdd and the sdd".
So it will try to boot from the only available method unless network boot is the top option selected.
It would be best to manually boot to the selected partition the other worry is a mac partition
Found Mac OS X on /dev/sdc3 as that surly needs  uefi ? gpt.?
Just my thoughts
A ENGLISHMAN IN PERU
I'm dyslexic Please do not complain about punctuation or spelling,
FANBOY,Taken from the urban dictionary
 A pathetic insult often used by fanboys themselves to try and put down people who don't like whatever it is they like.

Offline gohlip

  • Held Mitglied
  • *****
  • Posts: 1689
  • Desktop: OpenBox
  • GPU Card: nvidia
  • GPU driver: nonfree
  • Kernel: linux46 - x64
  • Skill: Intermediate
Re: Grub-install problem that manjaro-howto can't solve
« Reply #14 on: 16. July 2015, 16:39:18 »
Yes, mandog, That makes sense.
And that's why we shouldn't mix gpt and msdos (unless it's just data)*  &&  uefi and legacy-boots.

Also he shouldn't delete windows reserved partition, that is where windows bootmgr/ntldr is.
Windows recovery partition - maybe.

(*) - edit
« Last Edit: 16. July 2015, 16:49:01 by gohlip »
Life is a sexually transmitted disease with a 100% mortality rate.