Loss of Dual-Boot Again [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :)

Moderator: Moderators

VolvoBirkenstock
Advanced Hen
Posts: 249
Joined: Sun Mar 31, 2013 5:34

Loss of Dual-Boot Again [Solved]

Post by VolvoBirkenstock » Tue Apr 07, 2020 17:31

Hello, Sabayon Gurus.

Once this post is acknowledged, I will mark it as "Solved".

My dual-boot systems were again removed from grub. I implemented sabayonino's instructions provided here (viewtopic.php?f=86&t=35749) and all was well again.

Why is this problem recurring? Isn't there some way for the update process to avoid doing this?

Thank you very much in advance.
Last edited by VolvoBirkenstock on Wed Apr 08, 2020 3:26, edited 1 time in total.

joost
Sagely Hen
Posts: 2818
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands
Contact:

Re: Loss of Dual-Boot Again

Post by joost » Tue Apr 07, 2020 23:09

AFAIK your windows partition needs to be mounted, otherwise os-prober does not detect your windows system.
My blog | Mastodon | Please support Sabayon: Become a Patron

VolvoBirkenstock
Advanced Hen
Posts: 249
Joined: Sun Mar 31, 2013 5:34

Re: Loss of Dual-Boot Again

Post by VolvoBirkenstock » Wed Apr 08, 2020 3:26

Yes, I understand that mounting the Windows partition avoids the issue.
My point is that the Windows partition did not always need to be mounted before.
I have had dual-bootable systems for multiple years running Sabayon.
Perhaps "fdisk" or similar was used in past scripts to detect other bootable partitions.
I do not know when the behavior/process changed, because I may go multiple months without booting into Windows.

Thank you very much, joost.
Placing this subject at "Solved".

User avatar
sabayonino
Sagely Hen
Posts: 3559
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Loss of Dual-Boot Again [Solved]

Post by sabayonino » Wed Apr 08, 2020 9:14

os-prober should mount Windows partition(s) by itself but it doesn't happen.
I checked os-prober scripts but they seem to be ok .

VolvoBirkenstock
Advanced Hen
Posts: 249
Joined: Sun Mar 31, 2013 5:34

Re: Loss of Dual-Boot Again [Solved]

Post by VolvoBirkenstock » Sat Apr 18, 2020 18:46

Hi, sabayonino.

As reported by "fdisk -l":
My filesystem partitioning runs from /dev/sda1 up through /dev/sda7.
/dev/sda1 is the boot partition with filesystem type "HPFS/NTFS/exFAT".
/dev/sda2 is also "HPFS/NTFS/exFAT" and contains the large bulk of the Windows system.
/dev/sda3 is filesystem type "Linux".
/dev/sda4 is filesystem type "Extended".
/dev/sda5 through /dev/sda7 are filesystem type "Linux".

When I look at different partition managers, I see that /dev/sda1 and /dev/sda2 are listed as ntfs, /dev/sda3 is ext4, /dev/sda4 is extended, and /dev/sda5 through /dev/sda7 are ext4.

Perhaps the issue has to do with the use of ext4? During previous installations that did not use ext4, I found that executables such as lvdisplay, pvdisplay and vgdisplay would function because a typical hard drive is limited to four partitions, and since Windows requires two partitions, then linux installations had to squeeze into two partitions, so greater than two mount points required the use of logical volumes. The automatic installation for Sabayon would produce volume groups.

This current Linux installation uses ext4, and when I try to execute lvs, pvs, vgs or any related commands, the following is returned:
"WARNING: Failed to connect to lvmetad. Falling back to device scanning."
Then again, maybe the lvmetad daemon isn't running and I'm just a little slow of thought. ; - )

Is it possible that os-prober does not correctly address the combined use of ntfs and ext4, and instead expects ntfs and some earlier file system or logical volume manager?

I've also looked at the os-prober and common shell-scripts. I've noted that stdout is occasionally used with echo without redirection for intermediate output, and that makes it a little more difficult to use debug statements, and as such I can only provide conjecture without rewriting shell-script internals.

User avatar
sabayonino
Sagely Hen
Posts: 3559
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Loss of Dual-Boot Again [Solved]

Post by sabayonino » Sat Apr 18, 2020 19:22

I'm not sure and I can't test but you can do this

/etc/lvm/lvm.conf

Code: Select all

# Configuration option global/use_lvmetad.
        # Use lvmetad to cache metadata and reduce disk scanning.
        # When enabled (and running), lvmetad provides LVM commands with VG
        # metadata and PV state. LVM commands then avoid reading this
        # information from disks which can be slow. When disabled (or not
        # running), LVM commands fall back to scanning disks to obtain VG
        # metadata. lvmetad is kept updated via udev rules which must be set
        # up for LVM to work correctly. (The udev rules should be installed
        # by default.) Without a proper udev setup, changes in the system's
        # block device configuration will be unknown to LVM, and ignored
        # until a manual 'pvscan --cache' is run. If lvmetad was running
        # while use_lvmetad was disabled, it must be stopped, use_lvmetad
        # enabled, and then started. When using lvmetad, LV activation is
        # switched to an automatic, event-based mode. In this mode, LVs are
        # activated based on incoming udev events that inform lvmetad when
        # PVs appear on the system. When a VG is complete (all PVs present),
        # it is auto-activated. The auto_activation_volume_list setting
        # controls which LVs are auto-activated (all by default.)
        # When lvmetad is updated (automatically by udev events, or directly
        # by pvscan --cache), devices/filter is ignored and all devices are
        # scanned by default. lvmetad always keeps unfiltered information
        # which is provided to LVM commands. Each LVM command then filters
        use_lvmetad = 0
Try to switch
use_lvmetad = 0
to
use_lvmetad = 1

This can conflict with udev rules

VolvoBirkenstock
Advanced Hen
Posts: 249
Joined: Sun Mar 31, 2013 5:34

Re: Loss of Dual-Boot Again [Solved]

Post by VolvoBirkenstock » Sat Apr 18, 2020 21:35

It looks like use_lvmetad has always been set to 1.

Code: Select all

$ grep use_lvmetad /etc/lvm/lvm.conf
        # See the use_lvmetad comment for a special case regarding filters.
        #     This is incompatible with lvmetad. If use_lvmetad is enabled,
        # Configuration option global/use_lvmetad.
        # while use_lvmetad was disabled, it must be stopped, use_lvmetad
        use_lvmetad = 1
$ 

VolvoBirkenstock
Advanced Hen
Posts: 249
Joined: Sun Mar 31, 2013 5:34

Re: Loss of Dual-Boot Again [Solved]

Post by VolvoBirkenstock » Sun Apr 19, 2020 1:32

Interestingly, /proc/partitions shows entries for sda, sda1, sda2, sda3, sda4, sda5, sda6 and sda7, so the operating system has a means of detecting all partitions, whether or not they are mounted, because sda1 and sda2 are not mounted.

User avatar
sabayonino
Sagely Hen
Posts: 3559
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Loss of Dual-Boot Again [Solved]

Post by sabayonino » Mon May 04, 2020 12:34

I've installed Sabayon + Kubuntu on GPT disk

Grub boots from Kubuntu bootloader .

Kubuntu detect Sabayon
Sabayon when a grub.cfg is updated detect Kubuntu

My suspect is that os-prober has a lot of problems to detect fat/ntfs unmounted partititons but I can't confirm this 'cause I've not any Windows OS by my side :mrgreen:

I could try to install Kubuntu on FAT/NTFS partitions :P :lol:

Aedu
Baby Hen
Posts: 11
Joined: Fri Jun 17, 2016 2:50

Re: Loss of Dual-Boot Again [Solved]

Post by Aedu » Mon May 04, 2020 18:05

I am having the same problem. So what could be the solution? Mount the ntfs partition in the live system that I am using to install Sabayon?

THANKS

Post Reply