[gentoo-user] Dual booting with Windows 10

2017-09-18 Thread R0b0t1
On Monday, September 18, 2017, Peter Humphrey  wrote:
>
> On Monday, 18 September 2017 05:17:34 BST R0b0t1 wrote:
> > On Sun, Sep 17, 2017 at 9:12 AM, Peter Humphrey 
> wrote:
> > > On Thursday, 14 September 2017 19:51:37 BST R0b0t1 wrote:
> > >> On Thu, Sep 14, 2017 at 3:20 AM, Peter Humphrey <
pe...@prh.myzen.co.uk>
> > >
> > > wrote:
> > >> > On Thursday, 14 September 2017 05:09:14 BST R0b0t1 wrote:
> > >> >> The trickiest part is still the same - going from GRUB or, now,
your
> > >> >> EFI shell, to Window's bootloader. See here:
> > >> >> https://wiki.archlinux.org/index.php/GRUB#Chainloading_
Windows.2FLin
> > >> >> ux_
> > >> >> ins talled_in_UEFI_mode.
> > >> >
> > >> > That advice, though helpful, is about Grub, which isn't installed
on
> > >> > this box. I did try at first to get it to work here, but failed,
so I
> > >> > removed it and went for bootctl. It's a fiddle to keep up to date
> > >> > with
> > >> > kernel upgrades, but at least it works.
> > >>
> > >> In that case it seems like systemd-boot will check for the Windows
> > >> loader and add it to its menu automatically
> > >> (https://wiki.archlinux.org/index.php/systemd-boot#Adding_
boot_entries)
> > >> .
> > >> As above, you may need to reinstall it if the Windows bootloader
> > >> installs itself on top of systemd-boot.
> > >>
> > >> I originally thought you were just booting an EFI stub kernel, in
> > >> which case you would have needed some kind of boot manager.
> > >
> > > I have three questions now:
> > >
> > > 1.  Will Windows 10 install itself in the unpartitioned space?
I've
> > > attached a screen shot of gparted to show the current layout.
> >
> > Yes. It will split the free space into a number of partitions if you
> > give the installer no further instruction besides selecting the
> > unallocated area.
>
> That's what I was hoping to hear - thanks.
>
> > To force Windows to use one partition delete the ones it creates
> > automatically. You will need to select "custom" or "advanced" in every
> > place it is offered as an option.
> >
> > > 2.  What will happen to the UEFI kernel entries in /dev/nvme0n1p1?
> >
> > When people say "entries" they are usually referring to settings in
> > the nonvolatile memory used by a motherboard's EFI firmware. An entry
> > associates with an ID a path, priority, and name which is used to
> > start the corresponding EFI executable.
>
> I mean the things that "bootctl status" displays. I've already disabled
the
> unwanted ones in the UEFI BIOS's list of bootable kernels, but bootctl
still
> shows them and won't remove them.
>

Having checked bootctl's documentation it should be changing EFI variables
(it may manage kernels also, I am not entirely sure). Are you sure this
isn't related to the bug Mick mentioned? If it is then I am unsure why
efibootmgr works.

Now it's fixed (by using something else) and I can't expect you to care,
but I am left perplexed.

> > The actual kernels on /dev/nvme0np1 will remain there because Windows
> > won't touch that partition unless you tell it to.
> >
> > > 3.  Those entries include some left over from experimenting with
> > > other distros. How can I manage the entries and purge the ones I don't
> > > need? "Bootctl remove" ignores them.
> >
> > If you are referring to the kernels left in your /boot then simply
> > delete them. "Bootctl remove" and other EFI boot managers I have seen
> > refuse to touch your disk. They operate on the EFI configuration
> > memory.
> >
> > > Thanks everyone for your help so far.
> > >
> > > I don't want to install into a VM, because my main reason for
installing
> > > Win10 is to be able to run an occasional firmware update program, none
> > > of
> > > which, it seems, run on Linux. Of course, it should also help me get
up
> > > to speed with the M$ world.
> >
> > If you pass an entire hard disk to the VM you can then take it out and
> > put it in another computer and boot it (or boot it in the same
> > computer sans hypervisor).
>
> Maybe that's a use for a couple of spare SSDs I have here.
>
> > With Linux you can pass partitions in individually and use what the
> > guest thinks is a raw character device as a disk, so that if you
> > wanted to boot that installation from outside of the hypervisor you
> > could. This might not be possible with Windows.
> >
> > If you install into a VM you can pass almost everything to the VM
> > directly. I suppose the only thing that may not work extremely well
> > would be motherboard firmware updates, but if you look QEMU has
> > options to pass almost everything in a computer to a VM. Admittedly
> > this isn't a very plug-and-play solution.
> >
> > Aside from firmware updates (realize though that almost everything -
> > barring some low level interfaces like I2C - can be passed to a VM) I
> > would invite you to use Windows only in a VM. I find it easier to get
> > work done in this way while using Windows programs. Xfreerdp is a 

Re: [gentoo-user] Change Readline mode for all users?

2017-09-18 Thread Simon Thelen
On 17-09-19 at 01:11, Stroller wrote:
> I prefer vi-style editing for my bash prompt - that is to say I press
> the escape key, and "b" two or three times and the cursor moves back 2
> or 3 words. I can press "escape" followed by shift-I to take the
> cursor back to the very start of the line, and "v" allows me to edit
> the command line in vi itself.
> 
> I enable this in my .bashrc with "set -o vi".
> 
> I find I can set it for all Readline-based programs by putting "set
> editing-mode vi" in ~/.inputrc.
> 
> Is it possible to set this for all users, please, so that this edit
> mode is used for root?
Readline is customized by putting commands in an initialization file
(the inputrc file). The name of this file is taken from the value of the
INPUTRC environment variable.  If that variable is unset, the default is
~/.inputrc. If that file  does not exist or cannot be read, the ultimate
default is /etc/inputrc.

> I find that my pager and editor are set in /etc/env.d/99pager and
> /etc/env.d/99editor respectively, but creating a
> /etc/env.d/99bashlineediting file containing "set -o vi" doesn't seem
> to work.
Either "set-editing-mode vi" in /etc/inputrc for all readline programs
or in /etc/bash/bashrc (for bash-only)

-- 
Simon Thelen



Re: [gentoo-user] Change Readline mode for all users?

2017-09-18 Thread Vadim A. Misbakh-Soloviov
> I find that my pager and editor are set in /etc/env.d/99pager and
> /etc/env.d/99editor respectively, but creating a
> /etc/env.d/99bashlineediting file containing "set -o vi" doesn't seem to
> work.

1) env-update

env.d is just the place where all the packages places their crap so env-update 
can take care of it and rebuild all the things properly (so, no need to allow 
to edit system config directly (and accidentally brake them)

2) what you want is a bad idea.

I bet portage (which internally uses bash a lot) won't be happy with that



[gentoo-user] Change Readline mode for all users?

2017-09-18 Thread Stroller
I prefer vi-style editing for my bash prompt - that is to say I press the 
escape key, and "b" two or three times and the cursor moves back 2 or 3 words. 
I can press "escape" followed by shift-I to take the cursor back to the very 
start of the line, and "v" allows me to edit the command line in vi itself.

I enable this in my .bashrc with "set -o vi".

I find I can set it for all Readline-based programs by putting "set 
editing-mode vi" in ~/.inputrc.

Is it possible to set this for all users, please, so that this edit mode is 
used for root?

I find that my pager and editor are set in /etc/env.d/99pager and 
/etc/env.d/99editor respectively, but creating a /etc/env.d/99bashlineediting 
file containing "set -o vi" doesn't seem to work.

Any thoughts, please?

Stroller.




Re: [gentoo-user] strange behaviour in quite special case

2017-09-18 Thread Peter Humphrey
On Monday, 18 September 2017 14:13:44 BST Francisco Ares wrote:

> After days and days struggling,

I know what you mean. I've spent weeks wrestling with KMail. That included 
losing e-mails, falling behind in conversations and so on.

> I finally upgraded to the newest stable kernel and updated every package
> with a "emerge -e", just in case, twice! Then, rebuilt the kernel again.
> 
> So, like a charm, everything got back to work as before.

My technique in such cases is to emerge @system, then recompile the kernel, 
reboot on it and emerge -e world --exclude="gcc gentoo-sources". Seems to 
have worked out all right so far. You could omit the exclusion if you're 
even more paranoid than KMail has made me.

-- 
Regards,
Peter.




Re: [gentoo-user] scary (?) situation with binutils

2017-09-18 Thread allan gottlieb
On Mon, Sep 18 2017, Andreas K. Huettel wrote:

> No need to do anything complicated. Just run 
>
> emerge --depclean --ask
>
> and have it remove outdated binutils versions (it will keep the current one, 
> and also then select it for usage automatically). 
>
> Then all these problems are gone...

Thank you!
allan



Re: [gentoo-user] /sys/fs/cgroup/unified/ missing

2017-09-18 Thread Mike Gilbert
On Mon, Sep 18, 2017 at 3:12 PM, Robin Atwood  wrote:
> I just logged off KF5 after an extensive update and XDM would not restart, I
> got a message about /sys/fs/cgroup/unified/ did not exist (which it
> doesn't). The /sys/fs/cgroup/ directory is there, it's the "unified"
> sub-directory that's missing. I have not rebooted for a long time so I did
> that and still got the messages. Fortunately the system still comes up. I
> must have missed a config update somewhere I guess but I cannot find any
> useful hits when I search. Any idea what I am missing?

Regarding the cgroup message: Are you running OpenRC or systemd?

OpenRC only gained support for the "unified" cgroup hierarchy within
the last week or so in version 0.31.

systemd has supported it for at least a year.

I'm doubtful it has anything to do with XDM failing to start, however.



[gentoo-user] /sys/fs/cgroup/unified/ missing

2017-09-18 Thread Robin Atwood
I just logged off KF5 after an extensive update and XDM would not restart, I 
got a message about /sys/fs/cgroup/unified/ did not exist (which it doesn't). 
The /sys/fs/cgroup/ directory is there, it's the "unified" sub-directory 
that's missing. I have not rebooted for a long time so I did that and still 
got the messages. Fortunately the system still comes up. I must have missed a 
config update somewhere I guess but I cannot find any useful hits when I 
search. Any idea what I am missing? 

Thanks
Robin
-- 
--
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
 from "Mandalay" by Rudyard Kipling
--









-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: [gentoo-user] strange behaviour in quite special case

2017-09-18 Thread Francisco Ares
2017-08-31 4:47 GMT-03:00 Andrew Savchenko :

> Hi,
>
> On Thu, 24 Aug 2017 18:27:22 -0300 Francisco Ares wrote:
> > Hi, All.
> >
> > This is a rather special case, so I don't expect much, but who knows?
> >
> > I've built a Gentoo x86-64 system for an embedded application.
> >
> > Just after a lot of updates, which I am unable to track, it stopped
> working
> > as usual.
> >
> > There is the development system, fully loaded of a lot of packages used
> for
> > development, and the production system, that don't need all of those.
> >
> > There is a line in both systems in /etc/iniitab responsible for
> auto-login
> > the production system user and the programs we need running (in its
> > ".bash_profile" and ".xinitrc"):
> >
> > c6:2345:respawn:/sbin/agetty -a production-user 38400 tty6 linux
> >
> > The development system starts a WindowMaker session, and the production
> > system starts a program that controls the rest of the hardware of this
> > embedded system, with an X11 graphical interface.  That runs normally
> when
> > simulated at the development system.
> >
> > The development system runs smoothly.  The production system, after
> > removing the files from undesirable packages and creating a squashfs
> image
> > of the ripped-off root partition behaves strangely at boot:
> >
> > It shows the initialization messages as expected, but when the auto-login
> > and the controller program start should take place, it completely stalls
> up
> > to I plug a USB keyboard and issue some times some of the key
> combinations
> > to change to a text console and back to X11 (Ctrl-Alt-F1 and
> Ctrl-Alt-F6);
> >  only then the things resume as expected.
> >
> > As you might suspect, there is no keyboard for the production system ;-)
> .
> >
> > As a matter of fact, I don't know where the stall take place, as when I
> try
> > to switch to a text console to see the logs, it switches back to X11 and
> > starts our program.  By the way, the logs just show that the events
> > occurred at latter times than expected.
> >
> > Although the squashfs is read-only, some main directories are arranged
> in a
> > way that, using tmpfs mounts and unionfs with the read-only directory to
> > the read-write tmpfs directory to that main directory provide a way of
> > creating temporary files that has been working for a few years now.
> >
> > For instance, in "/etc/fstab":
> >
> > tmpfs   /.etc.rwtmpfs   defaults,mode=755
> > 0 0
> > union   /etcunionfs
> > default_permissions,allow_other,use_ino,nonempty,suid,
> cow,dirs=/.
> > etc.rw=rw:/.etc.ro=ro  0 0
> >
> > And there is a "/.etc.ro" with a copy of all files present in regular
> > "/etc" , a "/.etc.rw" directory to be mounted tmpfs, and the original
> > "/etc" directory, that needs to be there at boot, even before mounting
> all
> > this.
> >
> > Does anyone have a clue?
>
> Try to dissect your problem. Start with removing squashfs and all
> tmpfs/unionfs manipulations. Create the same image, but on "normal"
> writable file system and see how it goes. It may be fs-related bug,
> may be you removed too many files and some "undesired" packages are
> actually mandatory.
>
> If you have some form on snapshots of your changes, you can try to
> bisect them in a git bisect way.
>
> Another approach is to run X server (or any other app suspected as
> a troublemaker) under strace (or attach strace to a running process)
> and see what is going on. You will have a lot of low level
> information and extensive filtering will be required; strace is
> capable of that, but you will need to dig into its documentation.
>
> Best regards,
> Andrew Savchenko
>


Hi All,

After days and days struggling, I finally upgraded to the newest stable
kernel and updated every package with a "emerge -e", just in case, twice!
Then, rebuilt the kernel again.

So, like a charm, everything got back to work as before.

Unfortunately, will never know what piece of code that issue was.

Thank you, and

Best Regards,
Francisco


Re: [gentoo-user] Dual booting with Windows 10

2017-09-18 Thread Peter Humphrey
On Monday, 18 September 2017 12:17:34 BST Mick wrote:

> OK, second hint:  you may need to mount your /sys/firmware/efi/efivars as
> read-write before you can make any changes to it - bug #627964 refers, as
> well as this wiki page:
> 
> https://wiki.gentoo.org/index.php?
> title=Efibootmgr=revision=667826=667778

Yes, I'd already seen that.  :)

-- 
Regards,
Peter.




Re: [gentoo-user] Dual booting with Windows 10

2017-09-18 Thread Mick
On Monday, 18 September 2017 12:09:54 BST Peter Humphrey wrote:
> On Monday, 18 September 2017 11:52:13 BST Mick wrote:
> > On Monday, 18 September 2017 08:53:01 BST Peter Humphrey wrote:
> > > I mean the things that "bootctl status" displays. I've already disabled
> > > the unwanted ones in the UEFI BIOS's list of bootable kernels, but
> > > bootctl still shows them and won't remove them.
> > 
> > Have you deleted/moved the xxx.efi files and these continue to be shown in
> > bootctl?
> 
> There's only the one, but yes:
> 
> # find /boot -name \*.efi
> /boot/EFI/systemd/systemd-bootx64.efi
> 
> > Have you tried using efibootmgr to delete them?
> 
> Ah! That looks like just what I need. I should have thought of it myself,
> but thanks for the nudge.
> 
> Now to start poking about where angels fear to tread...

OK, second hint:  you may need to mount your /sys/firmware/efi/efivars as 
read-write before you can make any changes to it - bug #627964 refers, as well 
as this wiki page:

https://wiki.gentoo.org/index.php?
title=Efibootmgr=revision=667826=667778

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Dual booting with Windows 10

2017-09-18 Thread Peter Humphrey
On Monday, 18 September 2017 11:52:13 BST Mick wrote:
> On Monday, 18 September 2017 08:53:01 BST Peter Humphrey wrote:
> > I mean the things that "bootctl status" displays. I've already disabled
> > the unwanted ones in the UEFI BIOS's list of bootable kernels, but
> > bootctl still shows them and won't remove them.
> 
> Have you deleted/moved the xxx.efi files and these continue to be shown in
> bootctl?

There's only the one, but yes:

# find /boot -name \*.efi
/boot/EFI/systemd/systemd-bootx64.efi

> Have you tried using efibootmgr to delete them?

Ah! That looks like just what I need. I should have thought of it myself, 
but thanks for the nudge.

Now to start poking about where angels fear to tread...

-- 
Regards,
Peter.




Re: [gentoo-user] Dual booting with Windows 10

2017-09-18 Thread Mick
On Monday, 18 September 2017 08:53:01 BST Peter Humphrey wrote:
> I mean the things that "bootctl status" displays. I've already disabled the
> unwanted ones in the UEFI BIOS's list of bootable kernels, but bootctl still
> shows them and won't remove them.

Have you deleted/moved the xxx.efi files and these continue to be shown in 
bootctl?

Have you tried using efibootmgr to delete them?

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] scary (?) situation with binutils

2017-09-18 Thread Andreas K. Huettel
Am Samstag, 16. September 2017, 22:31:03 CEST schrieb allan gottlieb:
> I am one of the users experiencing the
>infinite rebuild of binutils
> bug.  Today it took a turn I find worrisome
> 
> To summarize for months now after every emerge I get
> 
> !!! existing preserved libs:
> >>> package: sys-libs/binutils-libs-2.28.1
> 
>  *  - /usr/lib64/libbfd-2.25.1.so
>  *  used by
> /usr/lib64/binutils/x86_64-pc-linux-gnu/2.25.1/libopcodes-2.25.1.so
> (sys-devel/binutils-2.25.1-r1)
> Use emerge @preserved-rebuild to rebuild packages using these libraries
[snip]

No need to do anything complicated. Just run 

emerge --depclean --ask

and have it remove outdated binutils versions (it will keep the current one, 
and also then select it for usage automatically). 

Then all these problems are gone...

-- 
Andreas K. Hüttel
dilfri...@gentoo.org
Gentoo Linux developer (council, perl, libreoffice)



Re: [gentoo-user] Dual booting with Windows 10

2017-09-18 Thread Peter Humphrey
On Monday, 18 September 2017 05:17:34 BST R0b0t1 wrote:
> On Sun, Sep 17, 2017 at 9:12 AM, Peter Humphrey  
wrote:
> > On Thursday, 14 September 2017 19:51:37 BST R0b0t1 wrote:
> >> On Thu, Sep 14, 2017 at 3:20 AM, Peter Humphrey 
> > 
> > wrote:
> >> > On Thursday, 14 September 2017 05:09:14 BST R0b0t1 wrote:
> >> >> The trickiest part is still the same - going from GRUB or, now, your
> >> >> EFI shell, to Window's bootloader. See here:
> >> >> https://wiki.archlinux.org/index.php/GRUB#Chainloading_Windows.2FLin
> >> >> ux_
> >> >> ins talled_in_UEFI_mode.
> >> > 
> >> > That advice, though helpful, is about Grub, which isn't installed on
> >> > this box. I did try at first to get it to work here, but failed, so I
> >> > removed it and went for bootctl. It's a fiddle to keep up to date
> >> > with
> >> > kernel upgrades, but at least it works.
> >> 
> >> In that case it seems like systemd-boot will check for the Windows
> >> loader and add it to its menu automatically
> >> (https://wiki.archlinux.org/index.php/systemd-boot#Adding_boot_entries)
> >> .
> >> As above, you may need to reinstall it if the Windows bootloader
> >> installs itself on top of systemd-boot.
> >> 
> >> I originally thought you were just booting an EFI stub kernel, in
> >> which case you would have needed some kind of boot manager.
> > 
> > I have three questions now:
> > 
> > 1.  Will Windows 10 install itself in the unpartitioned space? I've
> > attached a screen shot of gparted to show the current layout.
> 
> Yes. It will split the free space into a number of partitions if you
> give the installer no further instruction besides selecting the
> unallocated area.

That's what I was hoping to hear - thanks.

> To force Windows to use one partition delete the ones it creates
> automatically. You will need to select "custom" or "advanced" in every
> place it is offered as an option.
> 
> > 2.  What will happen to the UEFI kernel entries in /dev/nvme0n1p1?
> 
> When people say "entries" they are usually referring to settings in
> the nonvolatile memory used by a motherboard's EFI firmware. An entry
> associates with an ID a path, priority, and name which is used to
> start the corresponding EFI executable.

I mean the things that "bootctl status" displays. I've already disabled the 
unwanted ones in the UEFI BIOS's list of bootable kernels, but bootctl still 
shows them and won't remove them.

> The actual kernels on /dev/nvme0np1 will remain there because Windows
> won't touch that partition unless you tell it to.
> 
> > 3.  Those entries include some left over from experimenting with
> > other distros. How can I manage the entries and purge the ones I don't
> > need? "Bootctl remove" ignores them.
> 
> If you are referring to the kernels left in your /boot then simply
> delete them. "Bootctl remove" and other EFI boot managers I have seen
> refuse to touch your disk. They operate on the EFI configuration
> memory.
> 
> > Thanks everyone for your help so far.
> > 
> > I don't want to install into a VM, because my main reason for installing
> > Win10 is to be able to run an occasional firmware update program, none
> > of
> > which, it seems, run on Linux. Of course, it should also help me get up
> > to speed with the M$ world.
> 
> If you pass an entire hard disk to the VM you can then take it out and
> put it in another computer and boot it (or boot it in the same
> computer sans hypervisor).

Maybe that's a use for a couple of spare SSDs I have here.

> With Linux you can pass partitions in individually and use what the
> guest thinks is a raw character device as a disk, so that if you
> wanted to boot that installation from outside of the hypervisor you
> could. This might not be possible with Windows.
> 
> If you install into a VM you can pass almost everything to the VM
> directly. I suppose the only thing that may not work extremely well
> would be motherboard firmware updates, but if you look QEMU has
> options to pass almost everything in a computer to a VM. Admittedly
> this isn't a very plug-and-play solution.
> 
> Aside from firmware updates (realize though that almost everything -
> barring some low level interfaces like I2C - can be passed to a VM) I
> would invite you to use Windows only in a VM. I find it easier to get
> work done in this way while using Windows programs. Xfreerdp is a good
> way to interact with a Windows guest and can provide better desktop
> integration than QEMU or libvirtd.

I use VirtualBox here, mostly because some BOINC projects require it.

Thanks, R0b0t1.

-- 
Regards,
Peter.