Restoring Manjaro Grub after Ubuntu upgrade

On a multi-boot Linux computer where Ubuntu has already been installed, adding on Manjaro Linux installs its own version of Grub (that I’ll call Arch-Grub) that is different but compatible with that previously installed (that I’ll call Debian-Grub).

Addendum:  The below instructions worked for Manjaro releases before March 2018.  For some instructions dated May 2021 (that worked in February 2022), see “Restore Manjaro boot after dualbooted Ubuntu-Mate replaced grub” at 

  • On some of my laptops, the “grub-install — rechedk — no-rs-codes” would give a response “grub-install: error: install device isn’t specified”.
  • The manual command was then “grub-install /dev/sda” for the laptop with a single drive, and “grub-install /dev/sdb” for the laptop with two drives where I wanted to not boot off the first drive with Windows installed.

Updating Ubuntu to a newer version (or installing an older version) restores Debian-Grub, replacing the working Arch-Grub.  This will result in Debian-Grub showing both Ubuntu and Manjaro as options on booting.  Choosing Ubuntu from Arch-Grub works just fine.  However, choosing Manjaro from Debian-Grub will lead to a black screen with messages, e.g.:

… Failed to execute /init (error -13)
… Starting init: /sbin/init exists but couldn’t execute it (error -13)
… Starting init: /bin/init exists but couldn’t execute it (error -13)
… Starting init: /bin/sh exists but couldn’t execute it (error -13)
… Kernel panic – not syncing: No working init found. Try passing init option to kernel …

… —[ end Kernel panic – not syncing: No working init found …

Kernel Panic after upgrade

“Kernal Panic after upgrade” as reported by ben1 in December 2017

On my Thinkpad X200, the only way to exit this screen was to pull the battery for a cold reboot.

The reason that Arch-Grub is different from Debian-Grub is that it loads Intel microcode before the OS, rather than inside the OS.

Manjaro will load intel-ucode using grub.
Unlike other OS’s, it is not built into initd (initramfs) nor into kernel.
But it will load this separately (first) from /boot/intel-ucode.img

But don’t worry about this. It will be done automatically for you when you install or boot Manjaro (provided you use Manjaro’s bootloader (grub) as default bootloader).

… says gohlip | “Does manjaro supply intel microcode automatically?” | May 2016 at

Thus, Arch-Grub does more work than Debian-Grub.  Arch-Grub will successfully start Ubuntu (based on Debian), but Debian-Grub will not successfully start Manjaro (based on Arch).  The resolution is to replace Debian-Grub with Arch-Grub to the multiboot system.

gohlip suggests seven ways to fix this …

1. chroot from livecd (which you’re aware of, I think)
2. use this method which does not need chroot or boot livecd but still make manjaro default boot
3. remove intel-code from manjaro OS but you’ll boot Manjaro without intel microcode enabled
4. …

The Intel microcode updates are theoretically desirable for patches, e.g. Spectre, but unfortunately the Core 2 Duo Penryn CPU I have isn’t one of the them, says “Intel finishes Spectre patching, some older CPUs won’t receive planned updates” | Brad Chacos | April 4, 2018 at

After digging into trying to remove the intel-ucode, I figured out it was simpler to just use a Manjaro install DVD (or USB) to restore the Arch-Grub. This then has to be done after every Ubuntu upgrade … but is relatively straightforward (and having a Manjaro install ISO burned onto a DVD means that it’s readily at hand).

Here’s a summary of the steps I’ve used:

  1. With Ubuntu running, use GPartEd to confirm which partition has Manjaro installed.  (In my case, it was sda11).
  2. Boot from the Manjaro install DVD or USB.
  3. When the menu appears, choose the LiveDVD option (rather than immediately (re-)installing Manjaro, which isn’t necessary).
  4. Open a terminal.
  5. Confirm the partition with Manjaro installed:
    $ sudo fdisk -l
    $ lsblk -f
  6. Mount the Manjaro system partition (mine was sda11):
    $ sudo mount  /dev/sda11  /mnt
  7. Reinstall Arch-Grub:
    $ sudo  grub-install  –boot-directory=/mnt/boot  /dev/sda

(That’s two hyphens preceding “boot-directory”)!

This method is consistent with the description of “Restore the GRUB Bootloader” at for a BIOS (not UEFI) system.

While this procedure will have to be repeated after every Ubuntu upgrade, it’s understandable and replicable.


#arch, #boot, #debian, #dual-boot, #kernel-panic, #manjaro, #multiboot, #ubuntu

Ubuntu L2TP VPN

Now with Ubuntu 17.04, since Ubuntu 16.04, I’ve had problems with connecting to a VPN that uses L2TP.  I found a fix through a series of steps, beginning with “Enabling L2TP over IPSec on Ubuntu 16.04” | Zaid Daba’een | Aug. 22, 2016, updated Mar. 29, 2017 at .

sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp

Trying to then configure L2TP, I found that I was missing a component. Instructions were at “Connect to L2TP over IPsec” | July 2017 at

sudo apt install network-manager-l2tp-gnome
killall nm-applet
nm-applet &

The “VPN Connection Failed”, so I needed some diagnostics. These were found at “How can I troubleshoot ‘VPN Connection Failed’?” | Jan. 22, 2016 at

journalctl -u NetworkManager.service

Based on those error messages, I found that the problem could be the ciphers. A similar error was found with “Unable to connect L2TP IPSec VPN from ubuntu 16.04 [duplicate]” | March 30, 2017 at

$ sudo systemctl stop strongswan
$ sudo ike-scan .com

Ike-scan returned a result similar to that example, So, in the advanced section of the IPsec dialog box, I added:

Phase1 Algorithms : 3des-sha1-modp1024
Phase2 Algorithms : 3des-sha1

Unity Network Connections L2TP Advanced


#ipsec, #l2tp, #ubuntu

GParted fails; KDE Partition Manager succeeds

Repartitioning disk with Ubuntu 16.04 GParted fails; Kubuntu 17.04 KDE Partition Manager works.

Booting my Thinkpad X200 from an Ubuntu 16.04 live USB key, GParted was able to successfully shrink a NTFS partition and leave unallocated space.  Then, a request to either (i) shrink the existing \ EXT4 partition, or (ii) create a new empty Home EXT4 partition in the unallocated space resulted in a message:

Unable to satisfy all constraints on the partition

Following the trail of many others with the same issue, I tried Testdisk, which analyzed the partition structure.  The structure was found as expected.  Specifying the “primary bootable”, “primary”, and “logical” partitions seemed okay, but a “Bad Structure” warning would not be resolved unless the “Lenovo Recovery” partition was marked for deletion.  This caused me to pause, as that’s the way that Windows 7 could be reinstalled to the factory state (albeit on a larger disk than the original hardware build).

As I’ve been moving over from Ubuntu 16.04 to Kubuntu 17.04, there was nothing to be lost by trying instead with a Kubuntu live USB key.  Using KDE Partition Manager, the repartitioning went smoothly, without the error message from GParted that I saw over and over, for hours.

KDE Partition Manager


Conclusion:  There’s more to Kubuntu than just a change in the Desktop Environment.

All of this effort was towards migrating the home directory into its own dedicated partition.

#gparted, #kde-partition-manger, #kubuntu, #ubuntu

From Mint 16 Petra Mate Edition to Ubuntu 13.10 with Mate Desktop Environment

Replaced @Linux_Mint 16 Mate Edition with @Ubuntu 13.10 plus @Mate_Desktop to replicate the feel of Ubuntu 12.04 @Gnome Fallback, since discontinued in favour of Gnome Flashback (based on Gnome 3 Shell).  Before that, I first tried superseding Ubuntu 12.04 with Ubuntu Gnome 13.10.

I’m used to having the Window List at the top of the screen, and launch panel at the bottom of the screen.  This was configurable in Gnome 2 Panel but is not configurable in Gnome 3 Shell.

Linux Mint 16 Petra Mate Edition was a better choice for me than the Linux Mint 16 Petra Cinnamon Edition, as I have two drives in this laptop, and the Nemo file manager didn’t sufficiently make the “Documents” folder under “Computer” with the Linux disk sufficiently different from the “Documents” folder as a Bookmark from the Windows 7 disk.  The Caja file manager on Linux Mint 16 Petra Mate Edition did make the Bookmark distinct.

However, when I failed to install Dropbox onto Linux Mint 16 Petra Mate Edition with the Caja file manager, a forum thread on “Dropbox breaks after last mint update” discouraged me from proceeding with Mint.

There’s a long thread on “Why does everyone hate Unity?”  Unity has been the standard desktop provided by Canonical since 2010, and provides a bridge for Ubuntu to have a more uniform experience on tablets and smartphones.  However, I’ve found that I can work faster with the Gnome 2 look-and-feel, than either Gnome 3 or Unity.

Unlike the recent criticisms that “Forcing the Modern UI on Windows 8 users was Microsoft’s biggest mistake“, Linux gives users a choice with many distributions and flavours.

Mate Desktop

#bandieuhoacuanphuc, #baoduongdieuhoaanphuc, #ban_dieu_hoa_cu_an_phuc, #cinnamon, #dropbox, #ha_tuan_khang, #lapdieuhoaanhuc, #linux, #mate, #muadieuhoacu, #seoconghuong, #signal_buiding, #suadieuhoaanphuc, #trendy, #ubuntu, #unity, #user_is_king