Discussion:
[tclug-list] tricks with installing Linux on the HP Pavilion x360 Convertible 15-cr0017nr
Mike Miller
2018-08-09 21:21:48 UTC
Permalink
I'm installing Ubuntu 18.04. It was very smooth and fast to install it as
a dual boot system with Windows 10 already there. It hardly took any of
my time and it must have only run for 15 minutes. But...

WiFi isn't working. It's a Realtek RTL8822BE network adapter, so it's
supposed to work with version 4.14 of the kernel and I have 4.15:

https://www.phoronix.com/scan.php?page=news_item&px=Linux-Realtek-RTL8822BE

But it looks like I need certain programs to install a driver, and those
programs were not included with the base system. For example, this bit of
codee uses dkms...

git clone -b extended https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6
sudo cp /usr/src/rtlwifi-new-0.6/firmware/rtlwifi/* /lib/firmware/rtlwifi/

...and this uses make:

git clone https://github.com/synthtc/rtlwifi-next
cd rtlwifi-next
sudo make install
sudo modprobe -r rtl8822be
# make sure secure boot is turned off or the next line will fail
sudo modprobe rtl8822be

But I don't have either dkms or make installed and they have a bunch of
dependencies:

$ sudo apt show dkms
Package: dkms
Version: 2.3-3ubuntu9.2
Priority: optional
Section: admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-***@lists.ubuntu.com>
Original-Maintainer: Dynamic Kernel Modules Support Team <pkg-dkms-***@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 290 kB
Depends: kmod | kldutils, gcc, dpkg-dev, make | build-essential, coreutils (>= 7.4), patch
[snip]

So ... what's the trick? I have the bootable USB stick I used to install
Ubuntu and it has plenty of room on it. Is there an easy way to download
all the packages to that USB stick? (Could boot it on another laptop
where networking works.) I could then copy the package files to the
laptop, and there must be another easy command I could use there, right?
It seems like there should be a fairly automatic way of doing it.

TIA.

Best,

Mike
Clug
2018-08-09 21:23:41 UTC
Permalink
Just got "apt install dkms" and "apt install make", that should resolve
all dependencies.
I'm installing Ubuntu 18.04. It was very smooth and fast to install it as a
dual boot system with Windows 10 already there. It hardly took any of my
time and it must have only run for 15 minutes. But...
WiFi isn't working. It's a Realtek RTL8822BE network adapter, so it's
https://www.phoronix.com/scan.php?page=news_item&px=Linux-Realtek-RTL8822BE
But it looks like I need certain programs to install a driver, and those
programs were not included with the base system. For example, this bit of
codee uses dkms...
git clone -b extended https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6
sudo cp /usr/src/rtlwifi-new-0.6/firmware/rtlwifi/* /lib/firmware/rtlwifi/
git clone https://github.com/synthtc/rtlwifi-next
cd rtlwifi-next
sudo make install
sudo modprobe -r rtl8822be
# make sure secure boot is turned off or the next line will fail
sudo modprobe rtl8822be
But I don't have either dkms or make installed and they have a bunch of
$ sudo apt show dkms
Package: dkms
Version: 2.3-3ubuntu9.2
Priority: optional
Section: admin
Origin: Ubuntu
Original-Maintainer: Dynamic Kernel Modules Support Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 290 kB
Depends: kmod | kldutils, gcc, dpkg-dev, make | build-essential, coreutils (>= 7.4), patch
[snip]
So ... what's the trick? I have the bootable USB stick I used to install
Ubuntu and it has plenty of room on it. Is there an easy way to download all
the packages to that USB stick? (Could boot it on another laptop where
networking works.) I could then copy the package files to the laptop, and
there must be another easy command I could use there, right? It seems like
there should be a fairly automatic way of doing it.
TIA.
Best,
Mike
_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://mailman.mn-linux.org/mailman/listinfo/tclug-list
Mike Miller
2018-08-09 21:53:06 UTC
Permalink
Post by Clug
Just got "apt install dkms" and "apt install make", that should resolve
all dependencies.
The issue is that the machine that needs those programs has no networking,
so if I run this...

sudo apt install dkms

...for example, it just tells me that the network is unreachable. So I
have to somehow run it on another machine and move the files over. The
question is, how do I do that?

Thanks.

Mike
Mike Miller
2018-08-09 22:13:27 UTC
Permalink
Just got "apt install dkms" and "apt install make", that should resolve all
dependencies.
The issue is that the machine that needs those programs has no networking, so
if I run this...
sudo apt install dkms
...for example, it just tells me that the network is unreachable. So I
have to somehow run it on another machine and move the files over. The
question is, how do I do that?
Maybe the key is to use apt-get with the -d option:

-d, --download-only
Download only; package files are only retrieved, not unpacked or
installed. Configuration Item: APT::Get::Download-Only.

Apparently, "apt-get -d install will download the given package and all
missing dependencies to the system packages directory
(/var/cache/apt/archives)." And this is best for use of "if you want to
'pre-download' a set of packages for later installation." Or so I'm
told...

https://askubuntu.com/questions/463380/difference-between-apt-get-d-install-apt-get-download

So, maybe I can do that on the USB stick, then copy the downloaded files
over to the laptop, putting them in /var/cache/apt/archives. If that
works, then I just need to know the command to install the
"pre-downloaded" files. Any ideas?

Mike
Mike Miller
2018-08-09 23:09:07 UTC
Permalink
Post by Mike Miller
-d, --download-only
Download only; package files are only retrieved, not unpacked or
installed. Configuration Item: APT::Get::Download-Only.
Apparently, "apt-get -d install will download the given package and all
missing dependencies to the system packages directory
(/var/cache/apt/archives)." And this is best for use of "if you want to
'pre-download' a set of packages for later installation." Or so I'm told...
https://askubuntu.com/questions/463380/difference-between-apt-get-d-install-apt-get-download
So, maybe I can do that on the USB stick, then copy the downloaded files
over to the laptop, putting them in /var/cache/apt/archives. If that
works, then I just need to know the command to install the
"pre-downloaded" files. Any ideas?
It looks like the following command (no sudo needed) is a great way to
grab all files needed for a package like dkms:

apt-get download $(apt-rdepends dkms | grep -v "^ ")

But I first had to install apt-rdepends:

sudo apt install apt-rdepends

It lists out all the dependencies. There were 65 altogether for dkms.
But when I ran it, this happened:

$ apt-get download $(apt-rdepends dkms | grep -v "^ ")
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Can't select candidate version from package libc-dev as it has no candidate
E: Can't select candidate version from package kldutils as it has no candidate

There are two other libc-dev packages:

libc-dev-bin
linux-libc-dev

So I'm not sure if libc-dev is real and needed. And kldutils might have
been usurped by kmod, which also is being installed.

So I dropped those two packages by grepping them out of the list like so:

apt-get download $(apt-rdepends dkms | grep -v "^ " | grep -vE '^(libc-dev|kldutils)$')

That ran and it gave me 64 .deb files.

So now I'll move those to the other machine and maybe I'll figure out what
to do and maybe it will work. Fingers crossed.

Mike
gregrwm
2018-08-09 22:17:27 UTC
Permalink
Post by Mike Miller
Post by Mike Miller
Post by Clug
Just got "apt install dkms" and "apt install make", that should resolve
all dependencies.
The issue is that the machine that needs those programs has no
networking, so if I run this...
sudo apt install dkms
...for example, it just tells me that the network is unreachable. So I
have to somehow run it on another machine and move the files over. The
question is, how do I do that?
-d, --download-only
Download only; package files are only retrieved, not unpacked or
installed. Configuration Item: APT::Get::Download-Only.
Apparently, "apt-get -d install will download the given package and all
missing dependencies to the system packages directory
(/var/cache/apt/archives)." And this is best for use of "if you want to
'pre-download' a set of packages for later installation." Or so I'm told...
https://askubuntu.com/questions/463380/difference-between-
apt-get-d-install-apt-get-download
So, maybe I can do that on the USB stick, then copy the downloaded files
over to the laptop, putting them in /var/cache/apt/archives. If that
works, then I just need to know the command to install the "pre-downloaded"
files. Any ideas?
if you get that far, just repeat the apt command on the box with the
infused packages, it should see and use them.
Mike Miller
2018-08-09 23:16:30 UTC
Permalink
Post by gregrwm
Post by Mike Miller
Post by Mike Miller
The issue is that the machine that needs those programs has no
networking, so if I run this...
sudo apt install dkms
...for example, it just tells me that the network is unreachable. So I
have to somehow run it on another machine and move the files over. The
question is, how do I do that?
-d, --download-only
Download only; package files are only retrieved, not unpacked or
installed. Configuration Item: APT::Get::Download-Only.
Apparently, "apt-get -d install will download the given package and all
missing dependencies to the system packages directory
(/var/cache/apt/archives)." And this is best for use of "if you want to
'pre-download' a set of packages for later installation." Or so I'm told...
https://askubuntu.com/questions/463380/difference-between-
apt-get-d-install-apt-get-download
So, maybe I can do that on the USB stick, then copy the downloaded files
over to the laptop, putting them in /var/cache/apt/archives. If that
works, then I just need to know the command to install the "pre-downloaded"
files. Any ideas?
if you get that far, just repeat the apt command on the box with the
infused packages, it should see and use them.
Do you mean that if the .deb files are all copied into
/var/cache/apt/archives and I run this command...

sudo apt install dkms

...then it will find and install that package and dependencies from the
files without trying to look to the internet repositories?

Mike
gregrwm
2018-08-09 23:52:39 UTC
Permalink
Post by Mike Miller
Post by Mike Miller
The issue is that the machine that needs those programs has no
Post by Mike Miller
Post by Mike Miller
networking, so if I run this...
sudo apt install dkms
...for example, it just tells me that the network is unreachable. So I
have to somehow run it on another machine and move the files over. The
question is, how do I do that?
-d, --download-only
Download only; package files are only retrieved, not unpacked or
installed. Configuration Item: APT::Get::Download-Only.
Apparently, "apt-get -d install will download the given package and all
missing dependencies to the system packages directory
(/var/cache/apt/archives)." And this is best for use of "if you want to
'pre-download' a set of packages for later installation." Or so I'm
told...
https://askubuntu.com/questions/463380/difference-between-
apt-get-d-install-apt-get-download
So, maybe I can do that on the USB stick, then copy the downloaded files
over to the laptop, putting them in /var/cache/apt/archives. If that
works, then I just need to know the command to install the
"pre-downloaded"
files. Any ideas?
if you get that far, just repeat the apt command on the box with the
infused packages, it should see and use them.
Do you mean that if the .deb files are all copied into
/var/cache/apt/archives and I run this command...
sudo apt install dkms
...then it will find and install that package and dependencies from the
files without trying to look to the internet repositories?
that is what i meant, tho on second thought apt-get may still want the
network to check the metadata, and i'm not sure --no-download will help,
tho you may as well try. the help.ubuntu.com topic "Installing packages
without an Internet connection" makes it look a bit harder. i suppose you
still might be able to just fool apt-get by copying in the metadata too,
and running it before the metadata expires.
Mike Miller
2018-08-10 01:00:42 UTC
Permalink
Post by gregrwm
Post by Mike Miller
Do you mean that if the .deb files are all copied into
/var/cache/apt/archives and I run this command...
sudo apt install dkms
...then it will find and install that package and dependencies from the
files without trying to look to the internet repositories?
that is what i meant, tho on second thought apt-get may still want the
network to check the metadata, and i'm not sure --no-download will help,
tho you may as well try. the help.ubuntu.com topic "Installing packages
without an Internet connection" makes it look a bit harder. i suppose
you still might be able to just fool apt-get by copying in the metadata
too, and running it before the metadata expires.
I think I can put all the .deb files in a directory (say,
package-directory) and then run this command:

sudo dpkg -iR --no-force-depends package-directory

-i install
-R recursive (will do everything in the directory
--no-force-things where "things" is "depends" turns off dependency checking

That seems like the right plan. All the dependencies are supposedly taken
care of, so no checking is needed.

I'll let you know what happens!

Mike
Mike Miller
2018-08-10 02:17:00 UTC
Permalink
Post by Mike Miller
I think I can put all the .deb files in a directory (say,
sudo dpkg -iR --no-force-depends package-directory
-i install
-R recursive (will do everything in the directory
--no-force-things where "things" is "depends" turns off dependency checking
That seems like the right plan. All the dependencies are supposedly
taken care of, so no checking is needed.
I'll let you know what happens!
Yep. It worked. I had a MOK enrollment thingy to deal with, but my
guesses were correct enough and after reboot I had WiFi. Thank goodness
that is over! ;-)

Thanks everyone for the tips. Also, thanks to the many people who ask
questions and post answers on Linux internet forms.

Mike
Mike Miller
2018-08-10 05:58:24 UTC
Permalink
It was a pain to figure things out, but now that I have done it, I would
definitely recommend this machine. It seems like everything is working in
Ubuntu 18.04. The wifi was tricky, though, and it didn't just do grub
without some intervention -- I didn't have to make any software changes,
just a very thoughtful selection in the boot process.

With dual boot there's a trick with the system clock -- I want to use UTC
in Linux and have it use the time zone to display local time. The trick
is to use UTC, and make a reg edit in Windows to tell it to use UTC also,
but you have to also tell Windows not to use internet time updates. I'm
mostly using Ubuntu, so that works for me.

One little issue -- it's pretty easy to accidentally hold down the power
button. I set it to "do nothing" in Ubuntu, but it still kills the power
to the system if you hold it for 5 seconds. The button is in the middle
of the left side. I was just looking at some photos in tablet mode (works
great) when I rotated the screen to the left to look at a photo in
portrait mode, but I held down the button for 5 seconds. Oops!

I'll probably learn not to do that, eventually.

Boot times starting from power-on are very fast:

Ubuntu 15 seconds to login, 23 seconds to Gnome desktop
Windows 20 seconds to login, 28 seconds to desktop

That's the total time from hitting the power button to having the Gnome
desktop fully loaded and ready. That's including passing through the Grub
screen and the Gnome login screen. 23 seconds. I'm sure the SSD helps.

So I'm kinda loving this laptop.

Mike
Iznogoud
2018-08-10 16:51:12 UTC
Permalink
This is good info. I have wanted a tablet-like Linux to see how it would work
for me.

The 5 sec to power cycle press is a hardware feature -- I am sure.

Your bravery in touching the Win10 registry, by your own admission, has
automatically made you our resident Windows expert!
Mike Miller
2018-08-11 19:52:56 UTC
Permalink
Post by Iznogoud
This is good info. I have wanted a tablet-like Linux to see how it would
work for me.
Another good thing -- I put in an SD card from my Canon T3i and started
looking at photos in tablet mode with eog. These photos are about 8 MB
apiece, but I could look at one per second and they looked great. I might
have to look a little more at eog functionality -- I had to click the
screen to get the side arrows to show, then click those arrows to cycle to
the next (or previous) photo. So it was two clicks per transition which
seems like one too many!
Post by Iznogoud
The 5 sec to power cycle press is a hardware feature -- I am sure.
Yes, and it is essential because I can't take off the battery to force a
power-off if it hangs. But here's the thing -- it would be best for me if
the button were recessed, or even hard to get to, but it sticks out just a
touch (maybe just 1 mm) from the side of the case. I almost want to take
a file to it! Flush would be better, recessed would be best -- make me
use a fingernail to push it!
Post by Iznogoud
Your bravery in touching the Win10 registry, by your own admission, has
automatically made you our resident Windows expert!
Ha! That's good -- we don't want Windows experts. My only reason for
keeping Windows is that I have some programs for managing musical
equipment and they are Windows-only. If I didn't have them, I'd drop the
Windows altogether, and on my last two laptops, I did exactly that -- just
wiped the partition and made it all ext4.

Best,

Mike
Iznogoud
2018-08-11 20:21:12 UTC
Permalink
Post by Mike Miller
Ha! That's good -- we don't want Windows experts. My only reason for
keeping Windows is that I have some programs for managing musical
equipment and they are Windows-only. If I didn't have them, I'd drop the
Windows altogether, and on my last two laptops, I did exactly that -- just
wiped the partition and made it all ext4.
I use Frutti Loops (FL) STudio for music sequencing and other things. It is a
Windows build htat Image-Line (the maker) sells. I run it over WINE 32bit that
is built on top of my Slackware workstation on an AMD Opteron. It is amazing
to see it and the plugins work flawlessly. So there may be a WINE-way for you
too.

Image-Lines _official_ port of FL Studio to Macintosh is to buy Crossover from
Codeweavers (by hwy 280 and Univ Ave in St Paul, MN) and run it there. Wow!
Iznogoud
2018-08-10 16:36:04 UTC
Permalink
Post by Mike Miller
Yep. It worked. I had a MOK enrollment thingy to deal with, but my
guesses were correct enough and after reboot I had WiFi. Thank goodness
that is over! ;-)
Thanks everyone for the tips. Also, thanks to the many people who ask
questions and post answers on Linux internet forms.
I do not know if I am more disappointed in you for having to reboot to get
the wifi working, or that you did not go old school and grab the Windows driver
DLL of the hardware and compile a module with ndiswrapper. Man, those were the
days!
Mike Miller
2018-08-11 19:41:28 UTC
Permalink
Post by Iznogoud
Post by Mike Miller
Yep. It worked. I had a MOK enrollment thingy to deal with, but my
guesses were correct enough and after reboot I had WiFi. Thank
goodness that is over! ;-)
Thanks everyone for the tips. Also, thanks to the many people who ask
questions and post answers on Linux internet forms.
I do not know if I am more disappointed in you for having to reboot to
get the wifi working, or that you did not go old school and grab the
Windows driver DLL of the hardware and compile a module with
ndiswrapper. Man, those were the days!
Ha! I'm quite happy not knowing how to do any of those things. ;-)

Back in the day ... I would hire someone to do it!

Now it's easy enough that I can do it myself. But you're right, I
probably could have restarted networking to get it done, but this laptop
takes 20 seconds to reboot!! It would take me longer than that to
remember the correct command for restarting networking -- I'm all about
efficiency.

Mike
gregrwm
2018-08-10 00:20:21 UTC
Permalink
Post by gregrwm
that is what i meant, tho on second thought apt-get may still want the
network to check the metadata, and i'm not sure --no-download will help,
tho you may as well try. the help.ubuntu.com topic "Installing packages
without an Internet connection" makes it look a bit harder. i suppose you
still might be able to just fool apt-get by copying in the metadata too,
and running it before the metadata expires.
"the metadata" may well include everything in both /var/cache/apt and
/var/lib/apt (and i'd definitely save what's already there on your fresh
install before plunking in the content from the networked box).
--
this concludes test 42 of big bang inflation dynamics. in the advent of an
actual universe, further instructions will be provided.
000000000000000000000042
Loading...