Could not boot into Manjaro

I had completely removed windows from my laptop and installed manjaro, but I had to revert back to windows. I made a ntfs partition and then installed windows 7.

But now I am not getting any option to choose os whole boot. Pls help!

If you had removed or resized (maybe) Manjaro partition during windows reinstallation, you may have lost Manjaro and needs to reinstall. But if you had not, reinstalling windows will remove Manjaro bootloader but here’s a way to get it back.

Remember to

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

after booting up to Manjaro.

Good luck.

1 Like

No I had not removed ext4 and the swap. I had only resized the swap to install Windows into it. Everything else is untouched. But now while booting I can’t choose the os. Windows open by default.

Right, check if swap UUID has changed.
Check in blkid and change /etc/fstab to be the same as in blkid.

There are some ways you can do this. Through livecd is the commonest.
then try the same procedure as above but this time remove the resume=UUID=xxxxxxxxxxxxxx line in your configfile when it appears.

Hope this helps, will try later and let you know

using a live cd.

This is how my fstab looks.

And the config file:

Ok what do i do next.


But lets start all over again.
Boot up livecd OS

Print out (not screen shots - and for heaven’s sake never a you tube).
of your installed Manjaro OS

cat /etc/fstab
sudo blkid
cat /etc/default/grub

[1]
Correct swap UUID in fstab and /default/grub of Manjaro installed partition to be same as ‘sudo blkid’

[2]
Then as per my link above, at live cd also

sudo mount /dev/sdxy /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda

/dev/sdxy is the manjaro partition (eg., /dev/sda3 or /dev/sdb1) as shown in livecd ‘sudo blkid’ or ‘lsblk -f’

[3]
Then when rebooted up to Manjaro grub (without livecd),
press ‘e’ at Manjaro entry (the first entry)
Arrow down to linux line and then arrow right past 'resume=UUID=xxxxxxxxxxxxxx’
backspace to remove 'resume=UUID=xxxxxxxxxxxxxx’
Ctl ‘x’ or F10 to boot.

[4]
When booted at Manjaro OS

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

Done. Good luck.

Hope (I think) I’ve made this very clear.
But if you still need clarifications, ask. No problem.
Sometimes I get scolded (or said I’m too condescending) for assuming other users are not so proficient.
Of course, you and I have no such hang up’s.
Cheers.

1 Like

Thanks for your help

Changed the fstab and grub UUID.
However i got error while installing grub in boot directory

[manjaro@manjaro-gnome ~]$  sudo grub-install --boot-directory=/mnt/boot /dev/sda
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `overlay'.

It means you did not mount properly or chose the wrong mount point.
Partition is still unmounted in /mnt

/dev/sdxy is the manjaro partition

Why don’t you just provide the text (print, not snapshots) information for me and I’ll write out the commands for you. I really don’t mind.

Repeat, i need the following information

  1. /etc/fstab of Manjaro partition
  2. etc/default/grub of Manjaro partition
  3. sudo blkid
  4. sudo parted -l

And just mention what the partitions are, but I think in your case, it is fairly straightforward.

ps: but now, it is sleeping time for me. I’ll get back in the morning, er… noon.

cat /etc/fstab

[manjaro@manjaro-gnome 270e0bd9-351f-4e36-97f0-e20b29d6ab0a]$ cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
/dev/mapper/root-image /             auto      defaults           0      0

etc/default/grub

GRUB_DEFAULT=saved
GRUB_TIMEOUT=15
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=270e0bd9-351f-4e36-97f0-e20b29d6ab0a"
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 Hidden Menu, and optionally hide the timeout count
GRUB_HIDDEN_TIMEOUT=15
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"

sudo blkid

[manjaro@manjaro-gnome 270e0bd9-351f-4e36-97f0-e20b29d6ab0a]$ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: UUID="270e0bd9-351f-4e36-97f0-e20b29d6ab0a" TYPE="ext4" PARTUUID="4fdb438a-01"
/dev/sda2: UUID="762148a2-ea6f-4d79-9fa0-fc5649a853c7" TYPE="swap" PARTUUID="4fdb438a-02"
/dev/sda3: UUID="64D9768D1267580C" TYPE="ntfs" PARTUUID="4fdb438a-03"
/dev/sda4: UUID="3B442C4C4B55EDCA" TYPE="ntfs" PTTYPE="dos" PARTUUID="4fdb438a-04"
/dev/sdb1: LABEL="MJRO1702" UUID="227B-D016" TYPE="vfat" PARTUUID="01983f49-01"

sudo parted -l

[manjaro@manjaro-gnome 270e0bd9-351f-4e36-97f0-e20b29d6ab0a]$ sudo parted -l
Model: ATA Samsung SSD 850 (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      1049kB  316GB  316GB   primary  ext4
 2      316GB   356GB  40.6GB  primary  linux-swap(v1)
 3      356GB   413GB  56.5GB  primary  ntfs            boot
 4      413GB   500GB  87.5GB  primary  ntfs


Model: VendorCo ProductCode (scsi)
Disk /dev/sdb: 8053MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  8053MB  8052MB  primary  fat32        boot, lba

ok. this might help

Morning.
my notes:

/dev/sda1: UUID=“270e0bd9-351f-4e36-97f0-e20b29d6ab0a” TYPE=“ext4”
/dev/sda2: UUID=“762148a2-ea6f-4d79-9fa0-fc5649a853c7”



Boot to livecd, at livecd terminal,
Do again “sudo blkid” to check that /dev/sda1 is the ext4 partition with a line exactly like this

/dev/sda1: UUID=“270e0bd9-351f-4e36-97f0-e20b29d6ab0a” TYPE=“ext4” PARTUUID=“4fdb438a-01”

Then we’ll fsck that partition first.

sudo fsck /dev/sda1

and we proceed…

sudo mount /dev/sda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda

_if it is /dev/sdb1 instead in above ‘sudo blkid’, then use _
sudo mount /dev/sdb1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdb

Shut down computer, remove install media usb.
Restart computer without live media.

The original grub menu should now appear when you restart.

At the first entry (Manjaro menuentry), press 'e’
You will see something like

	menuentry 'Manjaro Linux (Kernel: 4.9.0rc2-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0rc2-1-MANJARO x64-advanced-270e0bd9-351f-4e36-97f0-e20b29d6ab0a' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  270e0bd9-351f-4e36-97f0-e20b29d6ab0a
		else
		  search --no-floppy --fs-uuid --set=root 270e0bd9-351f-4e36-97f0-e20b29d6ab0a
		fi
		echo	'Loading Linux 4.9.0rc2-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-4.9-x86_64 root=UUID=270e0bd9-351f-4e36-97f0-e20b29d6ab0a rw  quiet resume=UUID=762148a2-ea6f-4d79-9fa0-fc5649a853c7
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-4.9-x86_64.img
	}

Arrow down to linux line and then arrow right past 'resume=UUID=xxxxxxxxxxxxxx’
backspace to remove 'resume=UUID=xxxxxxxxxxxxxx’

So it should look like this.

	menuentry 'Manjaro Linux (Kernel: 4.9.0rc2-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0rc2-1-MANJARO x64-advanced-270e0bd9-351f-4e36-97f0-e20b29d6ab0a' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  270e0bd9-351f-4e36-97f0-e20b29d6ab0a
		else
		  search --no-floppy --fs-uuid --set=root 270e0bd9-351f-4e36-97f0-e20b29d6ab0a
		fi
		echo	'Loading Linux 4.9.0rc2-1-MANJARO x64 ...'
		linux	/boot/vmlinuz-4.9-x86_64 root=UUID=270e0bd9-351f-4e36-97f0-e20b29d6ab0a rw  quiet 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-4.9-x86_64.img
	}

Ctl ‘x’ or F10 to boot.

When booted at Manjaro OS

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

Done. Good luck.



[note]
Now if you get into any error (hopefully not)
At every step above, please record and let us know status, progress or error and with your command that you input.

So say…(as an example)…

[manjaro@manjaro-gnome ~]$ sudo mount /dev/sda1 /mnt
[manjaro@manjaro-gnome ~]$ sudo grub-install --boot-directory=/mnt/boot /dev/sda
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `overlay'.

or (another example)

[jerry@bhopal ~]$ sudo grub-install /dev/sda
Installing for x86_64 platform.
grub-install: error: efivar not found



4 Likes

Everything went fine until this. I rebooted directly to Manjaro. :grin:
Could not find menu entry but i removed the ‘resume=UUID=XXXXXXXX’ from the grub and updated grub. Now I could boot into my Manjaro. Thanks.:slight_smile:

I need 1 more help. I could not choose the os during boot. How do I get an option for both Windows and Manjaro.

Here is my grub file:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=15
GRUB_DISTRIBUTOR='Manjaro’
GRUB_CMDLINE_LINUX_DEFAULT="“
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 Hidden Menu, and optionally hide the timeout count

GRUB_HIDDEN_TIMEOUT=15
GRUB_HIDDEN_TIMEOUT_QUIET=false

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”

That is very good and it much simpler to fix anything now.

I take it you’ve done

If you did not do this, you should.
But if you did and have issues selecting OS, to fix it, a much simpler way is to do the following when booted to Manjaro.

sudo pacman-mirrors -g
sudo pacman -Syyu
sudo pacman -S grub
sudo grub-install /dev/sda
sudo update-grub

It will make a new default /etc/default/grub for you.
But I see nothing wrong with your /etc/default/grub.
Anyway, no problem if you redo it with the above commands.

Oh, you’re welcome. Cheers and take care.

2 Likes

Installed grub and updated it. My grub looks fine too. But still no option for dual boot. Is there something that I am missing?

Please confirm you can now boot Manjaro and please say if there is any entry at all for Windows.
(You need to be clearer :yum: )

[1] If there is an entry for windows, please print (text) out the windows entry (of /boot/grub/grub.cfg).
If there are 2 entries for windows, print out both.
[2] There is one more thing I want you to try out.
At grub menu, press’ c’ and you will get to grub prompt (grub>).
Type the following and let us know the output.
You will need to copy output manually by hand and type it for us.

grub> search -f /bootmgr

If there is an output, copy it down and continue.
If there is no output, I have very bad news.
You have no windows boot or your (re)installation of windows is wrong.

Continuing if there is an output.

grub> search -f --set=root /bootmgr
grub> ntldr /bootmgr
grub> boot

Yes Manjaro is up and running smoothly. There is no option to choose windows , manjaro opens only now.

There is no option in grub menu. Also even if i try to click “c” or"e" , nothing happens. It directly boots and Manjaro opens.

I think I have messed up my grub somehow. About 6 months ago, I was trying to silent boot to Manjaro and had done a lot of changes everywhere. So I think thats the reason why on clicking “c” or “e” nothing shows up. Do you know how to reset grub and all the other changes for startup entirely. (I think I have to make a youtube of my entire boot process :wink:)

No. That’s because you only have one OS (Manjaro) and with only one OS, it boots up without going to grub menu. You did not screw up the grub.

To go to the grub menu, (I cannot remember exactly if that is the case - I always have lots of OS’s) keep tapping ‘shift’ key when you start up the computer. That should get you to the grub menu and you can go to grub prompt then (press ‘c’). If you want the grub menu to always appear even with one OS (without tapping ‘shift’ key), we can do something at the /etc/default/grub and fix it there. As I said, i cannot remember now and will come back if I recall or check it out.

But no, you did not screw up grub. But I think you screwed up windows boot when you tried reinstalling windows.

[edit] - either the ‘shift’ key (I think only the right ‘shift’ key) or the ‘esc’ key.
Try tapping, do not hold the key.

And to make grub menu permanently appear, try this (most likely,but not certain) at /etc/default/grub/ (need to update-grub after modification.
GRUB_HIDDEN_TIMEOUT=10
GRUB_TIMEOUT=10

From here

‘GRUB_TIMEOUT’

    Boot the default entry this many seconds after the menu is displayed, unless a key is pressed. The default is ‘5’. Set to ‘0’ to boot immediately without displaying the menu, or to ‘-1’ to wait indefinitely.

    If ‘GRUB_TIMEOUT_STYLE’ is set to ‘countdown’ or ‘hidden’, the timeout is instead counted before the menu is displayed.```



‘GRUB_HIDDEN_TIMEOUT’

Wait this many seconds before displaying the menu. If ESC is pressed during that time, display the menu and wait for input according to ‘GRUB_TIMEOUT’. If a hotkey associated with a menu entry is pressed, boot the associated menu entry immediately. If the timeout expires before either of these happens, display the menu for the number of seconds specified in ‘GRUB_TIMEOUT’ before booting the default entry.

If you set ‘GRUB_HIDDEN_TIMEOUT’, you should also set ‘GRUB_TIMEOUT=0’ so that the menu is not displayed at all **unless ESC is pressed.**

This option is unset by default, and is deprecated in favour of the less confusing ‘GRUB_TIMEOUT_STYLE=countdown’ or ‘GRUB_TIMEOUT_STYLE=hidden’.

.

Ah… no wonder I get confused over ‘esc’ or ‘shift’ (besides not using them :wink:slight_smile:

So set
GRUB_HIDDEN_TIMEOUT=0
and
GRUB_TIMEOUT=10 (or more)

In your case to temporarily make grub menu appear (without modifying /etc/default/grub), keep tapping ‘shift’ key.

This did the trick… :grinning::slight_smile::slight_smile::slight_smile::slight_smile::slight_smile::slight_smile:

A lot of Thanks for your patience and help… Now I got what I wanted. (I am from India. A student of B- school … so didnt have time to reply quickly… I was busy in work… So thanks for your patience for bearing with this issue for 2 days :grin::wink: )

Forum kindly sponsored by Bytemark