Linux Lite 8.0 RC1 has been released - Click here


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Kernel Installer Tweak
#21

(05-02-2017, 12:24 PM)Jerry link Wrote:  In your tests, did 4.11 download the firmware file too? Mine didn't (see attached)

Hmmm... I hadn't noticed that the firmware is just a suggested package. Irrespective it calls my attention that your logs don't show suggested at all while mine does:

Quote:Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libappindicator1 libgtksourceview2.0-0 libgtksourceview2.0-common
  python-appindicator python-enchant python-gtksourceview2
Use 'apt autoremove' to remove them.
Suggested packages:
  linux-firmware-image-4.11.0
The following NEW packages will be installed:
  linux-headers-linuxlite-4.11.0 linux-image-linuxlite-4.11.0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/79.4 MB of archives.
After this operation, 293 MB of additional disk space will be used.
Selecting previously unselected package linux-headers-linuxlite-4.11.0.
...

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#22

I can remove the Suggests section in the control file and repackage the kernels if you like?

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#23

Well, something has to be done about it... I thought it would have been easy enough by having it install suggested packages but for whatever reason it doesn't seem to install it when running from the tweak with apt-get install --install-suggests. We can have it install the firmware before the header and image:

Code:
...
else
    for selected_kernel in $KERNLIST
      do
        apt-get install linux-firmware-image-linuxlite-"$selected_kernel" -y 2>&1 | tee -a "$_LTLOGS"
        DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
         install linux-headers-linuxlite-"$selected_kernel" linux-image-linuxlite-"$selected_kernel" -y 2>&1 | tee -a "$_LTLOGS" |
        zenity --progress --window-icon="$run_icon" --width="340" --height="80" --title="$_APPNAME" --text="$_DL $selected_kernel, please standby..." --pulsate --no-cancel --auto-close 2>/dev/null
      done
...

Else, you move it out of suggested.

p.s.: we have to review kernel removal at some point to have it delete the firmware on removal.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#24

I removed the line: Suggests: linux-firmware-image-4.11.0 and it made no difference.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#25

(05-03-2017, 06:08 AM)Jerry link Wrote:  I removed the line: Suggests: linux-firmware-image-4.11.0 and it made no difference.

As far as I' concerned, a linux kernel requires the header and image. I don't think it will make a difference just by removing the suggests line. Either it is made a dependency (which I don't recommend) or we install it ahead as shown in the code I posted.


https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#26

The latter works for me :)

Sent from my Mobile phone using Tapatalk


Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#27

Please put back the firmware suggested kernel an let me test some more... I think I can make it happen.

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#28

I got it! It was an error in my code actually  ???

We were looking at 4.11.0 OR 4.12.0 when we should be doing AND instead of OR. I have improved the code by simply comparing to an array of options instead:

Code:
...
if [[ "$KERNLIST" =~ ^(4.11.0|4.12.0)$ ]]; then
...

The INSTALL result below:  :P

Code:
liteuser@LiteBox:~$ tail -f /tmp/ltlogs.log
The following NEW packages will be installed:
  linux-firmware-image-linuxlite-4.11.0 linux-headers-linuxlite-4.11.0
  linux-image-linuxlite-4.11.0
0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/80.5 MB of archives.
After this operation, 295 MB of additional disk space will be used.
Selecting previously unselected package linux-firmware-image-linuxlite-4.11.0.
(Reading database ... 234354 files and directories currently installed.)
Preparing to unpack .../linux-firmware-image-linuxlite-4.11.0_0010_amd64.deb ...
Unpacking linux-firmware-image-linuxlite-4.11.0 (0010) ...
Selecting previously unselected package linux-headers-linuxlite-4.11.0.
Preparing to unpack .../linux-headers-linuxlite-4.11.0_0010_amd64.deb ...
Unpacking linux-headers-linuxlite-4.11.0 (0010) ...
Selecting previously unselected package linux-image-linuxlite-4.11.0.
Preparing to unpack .../linux-image-linuxlite-4.11.0_0010_amd64.deb ...
Unpacking linux-image-linuxlite-4.11.0 (0010) ...
Setting up linux-firmware-image-linuxlite-4.11.0 (0010) ...
Setting up linux-headers-linuxlite-4.11.0 (0010) ...
Setting up linux-image-linuxlite-4.11.0 (0010) ...
update-initramfs: Generating /boot/initrd.img-4.11.0
Generating grub configuration file ...
Found background: /boot/grub_linux_lite.png
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found background image: /boot/grub_linux_lite.png
Found linux image: /boot/vmlinuz-4.11.0
Found initrd image: /boot/initrd.img-4.11.0
Found linux image: /boot/vmlinuz-4.7.0-linuxlite
Found initrd image: /boot/initrd.img-4.7.0-linuxlite
Found linux image: /boot/vmlinuz-4.4.0-77-generic
Found initrd image: /boot/initrd.img-4.4.0-77-generic
Found linux image: /boot/vmlinuz-4.4.0-75-generic
Found initrd image: /boot/initrd.img-4.4.0-75-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done


The REMOVAL result below ( Yeah, I have updated Kernel Removal also ) :) 

Code:
tail -f /tmp/ltlogs.log
Removing kernels: linux-firmware-image-linuxlite-4.11.0 linux-headers-linuxlite-4.11.0 linux-image-linuxlite-4.11.0
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  libappindicator1 libgtksourceview2.0-0 libgtksourceview2.0-common
  python-appindicator python-enchant python-gtksourceview2
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-firmware-image-linuxlite-4.11.0* linux-headers-linuxlite-4.11.0*
  linux-image-linuxlite-4.11.0*
0 upgraded, 0 newly installed, 3 to remove and 4 not upgraded.
After this operation, 295 MB disk space will be freed.
(Reading database ... 266143 files and directories currently installed.)
Removing linux-firmware-image-linuxlite-4.11.0 (0010) ...
Removing linux-headers-linuxlite-4.11.0 (0010) ...
Removing linux-image-linuxlite-4.11.0 (0010) ...
dkms: removing: virtualbox-guest 5.0.36 (4.11.0) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox-guest
Version: 5.0.36
Kernel:  4.11.0 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxguest.ko:
- Uninstallation
   - Deleting from: /lib/modules/4.11.0/updates/dkms/
- Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxsf.ko:
- Uninstallation
   - Deleting from: /lib/modules/4.11.0/updates/dkms/
- Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxvideo.ko:
- Uninstallation
   - Deleting from: /lib/modules/4.11.0/updates/dkms/
- Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.....

DKMS: uninstall completed.
update-initramfs: Deleting /boot/initrd.img-4.11.0
Generating grub configuration file ...
Found background: /boot/grub_linux_lite.png
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found background image: /boot/grub_linux_lite.png
Found linux image: /boot/vmlinuz-4.7.0-linuxlite
Found initrd image: /boot/initrd.img-4.7.0-linuxlite
Found linux image: /boot/vmlinuz-4.4.0-77-generic
Found initrd image: /boot/initrd.img-4.4.0-77-generic
Found linux image: /boot/vmlinuz-4.4.0-75-generic
Found initrd image: /boot/initrd.img-4.4.0-75-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Purging configuration files for linux-image-linuxlite-4.11.0 (0010) ...

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply
#29

Well done! Will look at this later today.

Sent from my Mobile phone using Tapatalk


Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#30

I have updated kernel removal to show firmware and sort in a more organized way. In the process I also added some checks to make sure headers and image are selected at the same time but I'm gong to remove those because I noticed that some image and image-extra do not have headers!

I have checked 3 installs and they all show the same behavior. So, it doesn't do any good to add those checks and prevent users from moving forward.

[Image: lTtbczQ.png]

You may ave noticed in the screenshot above that I also cleaned up the dialog text. I think this makes it cleaner and more readable while also removing clutter from the window.

I will push this commit to master once I hear your thoughts. The default dialog size is shown below:

[Image: IhZBWJN.png]

https://unlockforus.com

Sorry for seeming stupid and preferring Linux - I just don't know any better.

[Image: AGxgqJ6.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)