Grub fix does not stick

Hello Everyone!

Firstly, I would like to apologize, for this post/inquiry would be long. I figured that it might be helpful for you guys to know the background. Fairly new to Linux, the last time I tried it was back in 2012 with a Ubuntu-Windows dual boot setup on a PC.

====

I have a Samsung NP300E4A laptop with the ff specs:

  • 2nd gen Intel i3 processor
  • 2GB RAM
  • 1TB HDD
  • Phoenix BIOS (forgot the version)
  • Has UEFI but can’t find if there is a secure boot option – I assume there is none

====

During the course of last week, I have tried to install 4 Linux distros:

  • Ubuntu 18.04 LTS
  • Elementary OS Loki
  • Deepin (did not actually installed, just played around with the live usb)
  • SolusOS
  • Manjaro KDE

All of these were installed using a live usb prepared from Rufus

====

BIOS/Legacy setup - every install, I completely wipe the HDD

Ubuntu, Elementary, and SolusOS failed me, with the common problem of:

  • After installation and reboot. I am prompted with just a split-second screen showing Grub loading and a blinking _ under it, after this a split-second black screen. This two screens goes on-and-on up until I power off the laptop. I retried the install for the 3 distros several times while fixing grub via chroot method but no luck.

After getting tired of this, I tried the dual boot approach that worked for me in the past.

First, I partitioned the HDD and installed Ubuntu first. I chose to install the bootloader on the Ubuntu partition instead of /dev/sda. After this, I installed Windows and of course, the laptop would boot to Windows every time. I installed EasyBCD and added a Ubuntu entry on the boot menu.

After reboot, I chose Ubuntu and it forwarded me to GRUB4DOS prompt which I really don’t have an idea how to use. After hours of reading on the web, I tried the makeactive command which I thought did not do anything. Defeated, I forced shutdown the laptop via power button and then started it again and viola! I was greeted by the GRUB menu. I had successfully managed to boot to Ubuntu and Windows with no problems, even after a reboot or a shutdown.

Having this experience and still ticking curiosity, I tried to recreate what I have done with Elementary OS and SolusOS, but unfortunately both did not work, even after the grub fix via chroot+ live usb method. I tried going back to Ubuntu-Windows that worked for me, but I have never managed to make it work again.

====

UEFI enabled setup - every install, I completely wipe the HDD

Still wanting to have a working Linux setup, I tried enabling UEFI and tried to install Ubuntu. This worked! Just one try and it worked, no pains and I was happy. However, upon playing around with Ubuntu, I figured that my modestly spec’ed laptop can’t run it smoothly. I then tried installing Elementary OS which also flawlessly worked. However, it was worse that Ubuntu and was pretty much unusable so I tried SolusOS. SolusOS did not work, just a UEFI menu of booting to the live usb, nothing else on that menu.

====

Here comes Manjaro KDE!

I did go back to BIOS/Legacy mode and wiped the HDD again.

Installation was quick and easy. After the first reboot, nothing happened. Just a black screen and then reboot loop. I tried booting to the live usb and then checked on the partitions, with really no reasoning, I tried to put the ‘boot’ flag on the / (root) partition. Tried to reboot and then I was greeted by the Grub loading + a blinking _ under it screen, however there was no reboot loop, I was stuck with that screen.

After some research, I ended up with this tutorial [1] which helped me boot to my Manjaro KDE desktop. I did what it said to fix grub. However, the fix is not persisting. Every reboot, I always end up with the Grub loadingscreen and have to redo the commands below to boot to my system:
search.file /etc/manjar.......
configfile /boot/grub.........

On the Manjaro grub menu, I tried to press e to see the settings and saw something like hd1, msdos3 thing. But on the search.file command above, I am finding hd1,3 as my Manjaro partition. I did not edit anything for now as I am afraid to break my current running (albeit the workaround) system and start all over again with the installation and setup.

So after that novel of a background, I am seeking for your help guys. For now, I am doing the workaround on every boot but I am hoping for a permanent solution.

Hope someone can point me to the right direction and again, sorry for the long post.

[1] Using livecd v17.0.1 as grub to boot OS with broken bootloader

Ok - just to clarify:

  • This is BIOS/Legacy, correct ?
  • once booted into manjaro, do you also follow:
sudo grub-install /dev/sda
sudo update-grub

In that link, there is the part for you to fill in the output of some commands.
Can you do that?

That is correct. I am now on the BIOS/legacy mode.

Sorry, forgot to mention that yes, I do grub-install and update-grub on every successful boot but I still go back to the Grub loading screen after I reboot my system.

Hello sir, can you specify which part?

Is it this one?

grub> echo $grub_platform

If it is. The output is pc

If this one

efibootmgr

This is the output – EFI variables are not supported on this system.

I also believe, I have the setting of root correctly as I have done grub> ls (hd1,3)/ which showed the root(?) folder. cat did also show manjaro.

Please provide some info

cat /etc/fstab
inxi -pulo
cat /etc/default/grub

cat /etc/fstab

/etc/fstab: static file system information.

Use ‘blkid’ to print the universally unique identifier for a device; this may
be used with UUID= as a more robust way to name devices that works even if
disks are added and removed. See fstab(5).


UUID=88526553-c87e-4438-afee-97d8c83f8530 / ext4 defaults,noatime 0 1
UUID=4ed0a506-2e55-43ab-8a0b-6dd2611b709d swap swap defaults,noatime 0 2
UUID=92e87f70-d437-45e5-b2d2-5c751387f84b /home ext4 defaults,noatime 0 2

inxi pulo

Partition:
ID-1: / size: 98.91 GiB used: 6.35 GiB (6.4%) fs: ext4 dev: /dev/sda3
label: N/A uuid: 88526553-c87e-4438-afee-97d8c83f8530
ID-2: /home size: 294.29 GiB used: 275.5 MiB (0.1%) fs: ext4
dev: /dev/sda6 label: N/A uuid: 92e87f70-d437-45e5-b2d2-5c751387f84b
ID-3: swap-1 size: 4.00 GiB used: 193.8 MiB (4.7%) fs: swap
dev: /dev/sda5 label: N/A uuid: 4ed0a506-2e55-43ab-8a0b-6dd2611b709d
Unmounted:
ID-1: /dev/sda1 size: 1 KiB fs: label: N/A uuid: N/A
ID-2: /dev/sda2 size: 526.51 GiB fs: ntfs label: N/A
uuid: 3A4418E15797A148

cat /etc/default/grub

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=4ed0a506-2e55-43ab-8a0b-6dd2611b709d"
GRUB_CMDLINE_LINUX=""

* If you want to enable the save default function, uncomment the following
* line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

* Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

* Uncomment to enable booting from LUKS encrypted devices
*GRUB_ENABLE_CRYPTODISK=y

* Uncomment to enable Hidden Menu, and optionally hide the timeout count
*GRUB_HIDDEN_TIMEOUT=5
*GRUB_HIDDEN_TIMEOUT_QUIET=true

* Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

* Uncomment to disable graphical terminal
*GRUB_TERMINAL_OUTPUT=console

* The resolution used on graphical terminal
* note that you can use only modes which your graphic card supports via VBE
* you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

* Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

* Uncomment if you want GRUB to pass to the Linux kernel the old parameter
* format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
*GRUB_DISABLE_LINUX_UUID=true

* Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

* Uncomment and set to the desired menu colors.  Used by normal and wallpaper
* modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

* Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/usr/share/grub/background.png"
*GRUB_THEME="/path/to/gfxtheme"

* Uncomment to get a beep at GRUB start
*GRUB_INIT_TUNE="480 440 1"

(replaced # with * just for the formatting, but the files has # for comments)

Done this from windblows? Use Etcher . Rufus needs dd-mode to work properly, but members in forum reported problems with it.
On any Linux you can use dd command (doing this with caution, it’s powerful).

sudo parted -l (all disks - do not omit any drive)
findmnt /

sudo parted -l
==============

Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 3      1049kB  108GB   108GB   primary   ext4            boot
 1      108GB   435GB   326GB   extended
 5      108GB   113GB   4295MB  logical   linux-swap(v1)
 6      113GB   435GB   322GB   logical   ext4
 2      435GB   1000GB  565GB   primary   ntfs


Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 16.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  16.8GB  16.8GB  primary  fat32        boot, lba

findmnt /
==============
TARGET SOURCE    FSTYPE OPTIONS
/      /dev/sda3 ext4   rw,noatime,data=ordered


Have you tried this?

sudo grub-install --recheck /dev/sda
sudo update-grub

Edited a mistake in the command, for future readers

sudo grub-install --target=i386-pc --recheck --debug /dev/sda
sudo update-grub

Check that ‘findmnt /’ is /dev/sda3 (not /dev/sdb3) before doing the above.

1 Like

@petsam Yes. I do tried that many times with no errors but still the same scenario on reboot.

@gohlip Tried your suggestion, no errors on the commands. But still, the problem persists on reboot.

==========

I decided to just reinstall Manjaro with UEFI enabled. This works like a charm. No problem on boot whatsoever. I guess my laptop just likes the UEFI being enabled. Maybe I’ll come back to trying out the BIOS mode when I got the free time.

Thanks for the people that helped me out here. A good welcome to the forum, indeed.

Perhaps your system is only UEFI? Or set to UEFI?
Anyway, good to hear and welcome to Manjaro.
Cheers.

ps: if your disk is still msdos partitioned and your system (boot) is uefi. You may have problems later on. Make the disk gpt. Start again.

I manually set my system to UEFI before proceeding with the installation. Although my system can also handle BIOS/Legacy mode

Thanks for the advise. I checked on my machine and it appears that the graphical installer did the conversion to GPT.

sudo parted -l

Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      2098kB  317MB   315MB   fat32                 boot, esp
 2      317MB   996GB   996GB   ext4
 3      996GB   1000GB  4253MB  linux-swap(v1)

Thanks again for the help!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.