<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>church1e&#039;s blog</title>
<subtitle>A repository of information technology questions and answers</subtitle>
<link href="https://churchill.ddns.me.uk/feed" rel="self" />
<id>https://churchill.ddns.me.uk/feed</id>
<updated>2026-05-07T14:05:07+01:00</updated>
<entry>
<title type="html">External devices now mount under /run/media/${USER}/{volID}</title>
<content type="html">&lt;p&gt;Since upgrading one of my systems to Ubuntu 26.04 I now find that when I plug in any USB device it no longer mounts the device under &lt;strong&gt;/media/&lt;em&gt;{volID}&lt;/em&gt;&lt;/strong&gt; but now mounts them under &lt;strong&gt;/run/media/${USER}/&lt;em&gt;{volID}&lt;/em&gt;&lt;/strong&gt; mountpoint.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;From what I understand, &lt;strong&gt;udisks2&lt;/strong&gt; mounts partitions/disks to &lt;em&gt;/run/media/$USER&lt;/em&gt; by default. This change is a security enhancement to keep mount points private and secure for each logged-in user. Basically mounting under &lt;em&gt;/run/media/$USER&lt;/em&gt; ensures other users on the same machine cannot see or read your private USB files.&lt;/p&gt;
&lt;p&gt;However, for me I heavely write scripts with hard codings which make me rely on devices being mounted under the old &lt;em&gt;/media&lt;/em&gt; regime.&lt;/p&gt;
&lt;p&gt;Yes, I know I could simply update my many scripts/projects and adjust configuration files to point to the new mountpoint (that is a task for another day) but for now I need a quick solution to use the old method.&lt;/p&gt;
&lt;p&gt;After a little research and testing various configurations, I come up with the following that works for me.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As root (or super-user) create a new udev rules file:
&lt;pre&gt;root@ubunutu26# &lt;strong&gt;vi /etc/udev/rules.d/99-media-mount-point.rules&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Add the following line to your new file:
&lt;pre&gt;ENV{ID_FS_USAGE}==&quot;filesystem|other|crypto&quot;, ENV{UDISKS_FILESYSTEM_SHARED}=&quot;1&quot;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Get &lt;strong&gt;systemd-udevd&lt;/strong&gt; to reload the rules files:
&lt;pre&gt;root@ubuntu26# &lt;strong&gt;udevadm control --reload&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Reloading the udev rules does not apply changes to any already mounted external devices. The new configuration will only be applied to new events.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content>
<link href="https://churchill.ddns.me.uk/post/external-devices-mount-as-run-media-user-volid/" />
<id>https://churchill.ddns.me.uk/post/external-devices-mount-as-run-media-user-volid/</id>
<updated>2026-05-07T14:05:07+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">History management in APT</title>
<content type="html">&lt;p&gt;I previously wrote an article (&lt;a target=_blank href=&quot;/post/viewing-apt-history/&quot;&gt;Viewing APT History&lt;/a&gt;) about a function I wrote to be able to view APT package manager history. As of today that function has become obsolete with changes in Update 25.10 which introduced a history function within the APT package manager, and futher enhancements in Ubuntu 26.04 make this a formidable step forward.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;APT now provides an interface for viewing and manipulating it&#039;s command history. These changes introduces five new sub-commands&lt;/p&gt;
&lt;pre&gt;ubuntu26$ &lt;strong&gt;apt --help&lt;/strong&gt;
[...]
  history-list - show list of history
  history-info - show info on specific transactions
  history-redo - redo transactions
  history-undo - undo transactions
  history-rollback - rollback transactions
[...]&lt;/pre&gt;
&lt;p&gt;These sub-commands are designed to parse APT&#039;s log files natively, without requiring external scripts or third-party tools. In practice, this means users will be able to check when a package was installed, upgraded, or removed, along with the corresponding transaction details.&lt;/p&gt;
&lt;p&gt;Below are some examples of this new functionality.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;history-list&lt;/strong&gt; &amp;mdash; Show list of history&lt;/h4&gt;
&lt;pre&gt;ubuntu26$ &lt;strong&gt;apt history-list&lt;/strong&gt;
ID   Command line             Date and Time          Action    Changes

0    install hp2xx            2026-04-23  17:00:00   Install   1
1    upgrade                  2026-04-23  18:15:00   Upgrade   11
2    build-dep .              2026-04-24  18:30:00   Install   4&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;history-info&lt;/strong&gt; &amp;mdash; Show info on specific transactions&lt;/h4&gt;
&lt;pre&gt;ubuntu26$ &lt;strong&gt;apt history-info 0&lt;/strong&gt;
Transaction ID: 0
Start time: 2026-04-23  17:00:00
End time: 2026-04-23  17:00:05
Requested by: church1e (1000)
Command line: apt install hp2xx
Packages changed:
    Install hp2xx:amd64 (3.4.4-12build4)&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;history-undo&lt;/strong&gt; &amp;mdash; Undo transactions&lt;/h4&gt;
&lt;pre&gt;ubuntu26$ &lt;strong&gt;sudo apt history-undo 0&lt;/strong&gt;
REMOVING:
  &lt;span style=&quot;color:red;&quot;&gt;hp2xx&lt;/span&gt;

Summary:
  Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 0
  Freed space: 591 kB

Continue? [Y/n]&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;history-redo&lt;/strong&gt; &amp;mdash; Redo transactions&lt;/h4&gt;
&lt;pre&gt;ubuntu26$ &lt;strong&gt;sudo apt history-redo 0&lt;/strong&gt;
hp2xx is already the newest version (3.4.4-12build4).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;history-rollback&lt;/strong&gt; &amp;mdash; Rollback transactions&lt;/h4&gt;
&lt;pre&gt;ubuntu26$ &lt;strong&gt;sudo apt history-rollback 1&lt;/strong&gt;
REMOVING:
libtext-unidecode-perl  tex-common  texinfo  texinfo-lib

Summary:
  Upgrading: 0, Installing: 0, Removing: 4, Not Upgrading: 0
  Freed space: 8119 kB
&lt;/pre&gt;
&lt;p&gt;To summerise, we&#039;ll no longer need to rely on commands like &lt;strong&gt;dpkg -l | grep &amp;lt;pkg-name&amp;gt;&lt;/strong&gt; to find out if a package is already installed or sift through endless &lt;strong&gt;dpkg&lt;/strong&gt; (/var/log/dpkg.log*) and &lt;strong&gt;apt&lt;/strong&gt; (/var/log/apt/history.log.*.gz) log files to figure out when a change happened.&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/history-management-in-apt/" />
<id>https://churchill.ddns.me.uk/post/history-management-in-apt/</id>
<updated>2026-04-24T13:30:05+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">&quot;upgrades have been deferred due to phasing&quot;</title>
<content type="html">&lt;p&gt;If you are using Ubuntu 24.04, you are likely to come across the following message while updating your system in the terminal:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;The following upgrades have been deferred due to phasing&lt;/strong&gt;&lt;/pre&gt;
&lt;!-- pagebreak --&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;martin@church1e$ &lt;strong&gt;sudo apt update &amp;&amp; sudo apt upgrade -y&lt;/strong&gt;
[sudo] password for martin:
Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu noble InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run &#039;apt list --upgradable&#039; to see them.
Fetched 89.7 kB in 21s (4,340 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
&lt;strong style=&quot;color:red&quot;&gt;The following upgrades have been deferred due to phasing:&lt;/strong&gt;
  dmsetup libdevmapper1.02.1
0 to upgrade, 0 to newly install, 0 to remove and 2 not to upgrade.&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;DON&#039;T PANIC&lt;/strong&gt; ... It&#039;s not an error it&#039;s just a message that informs you that the package(s) in question have an update but it&#039;ll be rolled out in phases. In other words, if the upgraded package(s) causes regression, the updates are rolled back to lessen any greater impact.&lt;/p&gt;
&lt;p&gt;Thinking out loud, I&#039;m sure this is a reworded version of the message that was seen in previous versions of Ubuntu&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;following packages have been kept back&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;You could try running the update process again in a few days to see if the package(s) have been updated.&lt;/p&gt;
</content>
<link href="https://churchill.ddns.me.uk/post/upgrades-have-been-deferred-due-to-phasing-in-ubuntu-24-04/" />
<id>https://churchill.ddns.me.uk/post/upgrades-have-been-deferred-due-to-phasing-in-ubuntu-24-04/</id>
<updated>2024-05-10T11:23:25+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">Supressing the Ubuntu Pro messages when updating with apt</title>
<content type="html">&lt;p&gt;Whilst performing routine updates, I&#039;ve noticed the following notifications beginning to appear:&lt;/p&gt;
&lt;pre&gt;ubuntu22$ &lt;strong&gt;sudo apt upgrade&lt;/strong&gt;
[...]
Get more security updates through Ubuntu Pro with &#039;esm-apps&#039; enabled:
[...]&lt;/pre&gt;
&lt;p&gt;Whilst this message is informational only it still an annoyance.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;I&#039;m well aware that Ubuntu now provides expanded security mainteance (esm) updates for packages in the main/universe repositories throught it&#039;s &quot;Ubuntu Pro&quot; service.&lt;/p&gt;
&lt;p&gt;Therefore, we have two options to get rid of the &quot;esm-apps&quot; prompt by:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Either enabling Unable Pro security updates, or&lt;/li&gt;
&lt;li&gt;Skip the esm-apps updates and disable the service.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The file &lt;strong&gt;/etc/apt/apt.conf.d/20apt-esm-hook.conf&lt;/strong&gt; appears to be responsible for injecting these messages into apt and can apparently be safely removed without doing any harm.&lt;/p&gt;
&lt;p&gt;For me option 1 above was not viable, so whilst exploring option 2 I&#039;ve arrived at the following solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disable both the &lt;strong&gt;apt-news&lt;/strong&gt; and &lt;strong&gt;esm-cache&lt;/strong&gt; services:
&lt;pre&gt;ubuntu22$ &lt;strong&gt;sudo systemctl disable --now apt-news.service esm-cache.service&lt;/strong&gt;
ubuntu22$ &lt;strong&gt;sudo systemctl mask apt-news.service esm-cache.service&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Rename the &lt;strong&gt;20apt-esm-hook.conf&lt;/strong&gt; apt config file:
&lt;pre&gt;ubuntu22$ &lt;strong&gt;sudo mv /etc/apt/apt.conf.d/20apt-esm-hook.conf{,.disabled}&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;</content>
<link href="https://churchill.ddns.me.uk/post/supressing-ubuntu-pro-messages-when-updating-with-apt/" />
<id>https://churchill.ddns.me.uk/post/supressing-ubuntu-pro-messages-when-updating-with-apt/</id>
<updated>2024-04-15T11:58:26+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">Rebooting Windows with a scheduled task</title>
<content type="html">&lt;p&gt;Creating a scheduled task to reboot your Windows machine once a week or nightly may help avoid issues such as high CPU or ram, frozen applications, or older hardware that could benefit from frequent reboots.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;h4&gt;Creating the scheduled task&lt;/h4&gt;
&lt;ol&gt;
   &lt;li&gt;Logon to the machine with an account with admin rights&lt;/li&gt;
   &lt;li&gt;Open &lt;strong&gt;Task Schedular&lt;/strong&gt; &amp;rarr; &lt;strong&gt;Action&lt;/strong&gt; &amp;rarr; &lt;strong&gt;Create Task&lt;/strong&gt;&lt;/li&gt;
   &lt;ol type=&quot;I&quot;&gt;
      &lt;li&gt;In the GENERAL tab: &lt;img src=&quot;http://churchill.ddns.me.uk/media/windows/scheduled-reboot-1.png&quot; alt=&quot;Scheduled reboot GENERAL tab&quot; /&gt;
      &lt;ol type=&quot;a&quot;&gt;
         &lt;li&gt;Name: &lt;strong&gt;Reboot Server Nightly&lt;/strong&gt; (or name it whatever you want)&lt;/li&gt;
         &lt;li&gt;Author: &lt;strong&gt;Administrator&lt;/strong&gt;&lt;/li&gt;
         &lt;li&gt;Description: &lt;strong&gt;Reboot Server Nightly at #pm&lt;/strong&gt;&lt;/li&gt;
         &lt;li&gt;Security Options:&lt;ol type=&quot;i&quot;&gt;
         &lt;li&gt;Select: &lt;strong&gt;Run whether user is logged on or not&lt;/strong&gt;&lt;/li&gt;
         &lt;li&gt;Seelct: &lt;strong&gt;Run with highest privileges&lt;/strong&gt;&lt;/li&gt;
      &lt;/ol&gt;&lt;/li&gt;
   &lt;/ol&gt;&lt;/li&gt;
   &lt;li&gt;In the TRIGGERS tab: &lt;img src=&quot;http://churchill.ddns.me.uk/media/windows/scheduled-reboot-2.png&quot; alt=&quot;Scheduled reboot TRIGGERS tab&quot; /&gt;
   &lt;ol type=&quot;a&quot;&gt;
      &lt;li&gt;In Settings, select &lt;strong&gt;Daily&lt;/strong&gt;, and enter the desired start date/time.&lt;/li&gt;
      &lt;li&gt;In Advanced Settings, make sure &lt;strong&gt;Enabled&lt;/strong&gt; is slected at the bottom.&lt;/li&gt;
   &lt;/ol&gt;&lt;/li&gt;
   &lt;li&gt;In the ACTIONS tab: &lt;img src=&quot;http://churchill.ddns.me.uk/media/windows/scheduled-reboot-3.png&quot; alt=&quot;Scheduled reboot ACTIONS tab&quot; /&gt;
   &lt;ol type=&quot;a&quot;&gt;
      &lt;li&gt;Action: &lt;strong&gt;Start a program&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;In &quot;Program/script&quot; field, enter &lt;strong&gt;c:\Windows\System32\shutdown.exe&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;In &quot;Add arguments (optional)&quot; field, enter &lt;strong&gt;/r&lt;/strong&gt;&lt;/li&gt;
   &lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;If you want to see the last time the server was rebooted, you can use the &lt;strong&gt;systeminfo&lt;/strong&gt; command. For example:
&lt;pre&gt;&lt;strong&gt;systeminfo | find /i &quot;Boot Time&quot;&lt;/strong&gt;
System Boot Time:              07/06/2022, 22:00:00&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;WARNING:&lt;/strong&gt; The scheduled task will reboot the machine even with active users using the system &amp;mdash; users will get message on their desktop saying &amp;quot;you will be signed out automatically&amp;quot;&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/rebooting-windows-with-a-scheduled-task/" />
<id>https://churchill.ddns.me.uk/post/rebooting-windows-with-a-scheduled-task/</id>
<updated>2022-06-08T08:54:45+01:00</updated>
<category term="Windows"/>
</entry>
<entry>
<title type="html">Unable to open FTP links in Mozilla Firefox 89</title>
<content type="html">&lt;p&gt;A strange issue today after an update for the Mozilla Firefox web browser. I can no longer access FTP sites which is a problem for me and some of my customers who require access to certain FTP sites to download updates and patches, etc.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;After a quick search around the web I found an article whereby Mozilla announced that Mozilla&#039;s Firefox web browser will no longers support the FTP protocol from Firefox 90 onwards. Hmmm! this is strange as I am current running Mozilla Firefox version 89.0.2 so should not be affected by this upcoming change - but I am!!&lt;/p&gt;
&lt;p&gt;A little further digging around the web and we find that Mozilla published a deprecation timeline on the organization&#039;s Addons blog. According to the information published there, FTP support will be turned off by default in Firefox 88 but not removed until Firefox 90 -- So that explains it!&lt;/p&gt;
&lt;h4&gt;What happens when I access an FTP link?&lt;/h4&gt;
&lt;p&gt;Firefox displays a prompt when a user attempts to load an FTP address. Installed FTP programs are displayed in the list, but if there are none available you are advised to install an FTP client and make it the default FTP handler in your Firefox browser.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://churchill.ddns.me.uk/media/misc/firefox-ftp-dialog.png&quot; alt=&quot;Firefox ftp APP chooser dialog&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;Opening FTP link in Firefox 88/89&lt;/h4&gt;
&lt;p&gt;As the FTP code has not been removed from Firefox versions 88 and 89, we can simply change the preferences to restore FTP support in these browsers:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://churchill.ddns.me.uk/media/misc/firefox-enable-ftp.png&quot; alt=&quot;Firefox ENABLED ftp&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enter &lt;strong&gt;about:config&lt;/strong&gt; in the Firefox address bar.&lt;/li&gt;
&lt;li&gt;Confirm that you will be careful.&lt;/li&gt;
&lt;li&gt;Search for &lt;strong&gt;network.ftp.enabled&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the value to &lt;strong&gt;true&lt;/strong&gt; by double-clicking on the line, or with a &lt;code&gt;left-click&lt;/code&gt; on the toggle icon.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Firefox will again open ftp resources&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This will continue to work until Mozilla Firefox browser version 90, as FTP code will be disabled completely in that release.&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/unable-to-open-ftp-links-in-mozilla-firefox-89/" />
<id>https://churchill.ddns.me.uk/post/unable-to-open-ftp-links-in-mozilla-firefox-89/</id>
<updated>2021-04-22T10:11:29+01:00</updated>
<category term="Misc"/>
</entry>
<entry>
<title type="html">IP essentials</title>
<content type="html">&lt;p&gt;In later releases of the Linux OS, &lt;code&gt;ip&lt;/code&gt; has replaced the older &lt;code&gt;ifconfig&lt;/code&gt; to configure network interfaces. In this article we&#039;ll provide essential examples using both these commands.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;h4&gt;Add IP address&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:&lt;br /&gt;
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; &amp;lt;ip-address&amp;gt; netmask &amp;lt;netmask-addr&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:&lt;br /&gt;
&lt;pre&gt;ip addr add &amp;lt;ip-address&amp;gt;/&amp;lt;netmask&amp;gt; dev &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example to add address 10.10.10.10 with netmask 24 to device eth0&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 10.10.10.10 netmask 255.255.255.0&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip addr add 10.10.10.10/24 dev eth0&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Remove IP address&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:&lt;br /&gt;
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; &amp;lt;ip-address&amp;gt; 0.0.0.0&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:&lt;br /&gt;
&lt;pre&gt;ip addr del &amp;lt;ip-address&amp;gt;/&amp;lt;netmask&amp;gt; dev &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 0.0.0.0&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip addr del 10.10.10.10/24 dev eth0&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Down an interface&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; down&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip link set &amp;lt;interface&amp;gt; down&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 down&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip link set eth0 down&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Up an interface&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; up&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip link set &amp;lt;interface&amp;gt; up&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 up&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip link set eth0 up&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Enable Promiscious mode&lt;/h4&gt;
&lt;p&gt;Promiscuous mode is a network setting that lets a network interface card (NIC) capture and process all data packets on a network segment, not just those addressed to it, effectively allowing a device to &quot;listen&quot; to all traffic passing by.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; promisc&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip link set &amp;lt;interface&amp;gt; promisc on&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 promisc&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip link set eth0 promisc on&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Show device&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip addr show dev &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;ifconfig eth0&lt;/strong&gt;
linux@host% &lt;strong&gt;ip addr show dev eth0&lt;/strong&gt;&lt;/pre&gt;</content>
<link href="https://churchill.ddns.me.uk/post/ip-essentials/" />
<id>https://churchill.ddns.me.uk/post/ip-essentials/</id>
<updated>2021-01-02T20:58:47+00:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">How to convert VM disk from qcow2 to raw format</title>
<content type="html">&lt;p&gt;&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;This article provides a 5 step process to convert an existing virtual machine disks format from &lt;em&gt;qcow2&lt;/em&gt; to &lt;em&gt;raw&lt;/em&gt; format.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This article assumes to have existing Virtual Machines (VMs) in order to following these steps!&lt;/p&gt;
&lt;ol&gt;&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Backup current virtual machine config&lt;/strong&gt;
&lt;pre&gt;virsh dumpxml vm-name &amp;gt; vm-name.xml&lt;/pre&gt;
replace &lt;strong&gt;vm-name&lt;/strong&gt; with your virtual machine name. In this example, we will use the virtual machine &#039;&lt;em&gt;alpha&lt;/em&gt;&#039;:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh dumpxml alpha &amp;gt; ~/alpha.xml&lt;/strong&gt;&lt;/pre&gt;
If you are unsure or just want to double check the virtual machine name, you can find this information by running the following command:
&lt;pre&gt;virsh list --all&lt;/pre&gt;
for example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh list --all&lt;/strong&gt;
 Id   Name          State
------------------------------
 1    alpha         running
 2    bravo         running
 4    charlie       running
 5    echo          running
 12   foxtrot       paused
 -    golf          shut off
 -    vmtest        shut off&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find the path of the exisiting disk image&lt;/strong&gt;
&lt;pre&gt;virsh dumpxml vm-name | grep file&lt;/pre&gt;
in our example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh dumpxml alpha | grep file&lt;/strong&gt;
  &amp;lt;disk type=&#039;file&#039; device=&#039;disk&#039;&amp;gt;
    &amp;lt;source file=&#039;/var/lib/libvert/images/alpha/tmplEzSU838.qcow2&#039;/&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
from the about output, we can confirm that our disk image is named &#039;&lt;em&gt;/var/lib/libvert/images/alpha/tmplEzSU838.qcow2&lt;/em&gt;&#039;&lt;/br&gt;&lt;/br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Convert the disk image&lt;/strong&gt;
&lt;pre&gt;qemu-img convert &amp;lt;image-name&amp;gt;.qcow2 &amp;lt;image-name&amp;gt;.raw&lt;/pre&gt;
in our example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;qemu-img convert /var/lib/libvert/images/alpha/tmplEzSU838.qcow2 \
                  /var/lib/libvert/images/alpha/tmplEzSU838.raw&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Edit the VM config&lt;/strong&gt;
&lt;pre&gt;virsh edit &amp;lt;vm-name&amp;gt;&lt;/pre&gt;
then find the &lt;strong&gt;driver&lt;/strong&gt; and &lt;strong&gt;source&lt;/strong&gt; lines:
&lt;pre&gt;   &amp;lt;disk type=&#039;file&#039; device=&#039;disk&#039;&amp;gt;
      &amp;lt;driver name=&#039;qemu&#039; type=&#039;&lt;mark&gt;qcow2&lt;/mark&gt;&#039;/&amp;gt;
      &amp;lt;source file=&#039;/var/lib/libvert/images/alpha/tmplEzSU838.&lt;mark&gt;qcow2&lt;/mark&gt;&#039;/&amp;gt;
      &amp;lt;target dev=&#039;vda&#039; bus=&#039;virtio&#039;/&amp;gt;
      &amp;lt;address type=&#039;pci&#039; domain=&#039;0x0001&#039; bus=&#039;0x00&#039; slot=&#039;0x04&#039; function=&#039;0x0&#039;/&amp;gt;
   &amp;lt;/disk&amp;gt;&lt;/pre&gt;
replace &lt;strong&gt;qcow2&lt;/strong&gt; with &lt;strong&gt;raw&lt;/strong&gt; in the highlighted places. The changes should look something like:
&lt;pre&gt;&amp;lt;disk type=&#039;file&#039; device=&#039;disk&#039;&amp;gt;
      &amp;lt;driver name=&#039;qemu&#039; type=&#039;&lt;strong&gt;raw&lt;/strong&gt;&#039;/&amp;gt;
      &amp;lt;source file=&#039;/var/lib/libvert/images/alpha/tmplEzSU838.&lt;strong&gt;raw&lt;/strong&gt;&#039;/&amp;gt;
      &amp;lt;target dev=&#039;vda&#039; bus=&#039;virtio&#039;/&amp;gt;
      &amp;lt;address type=&#039;pci&#039; domain=&#039;0x0001&#039; bus=&#039;0x00&#039; slot=&#039;0x04&#039; function=&#039;0x0&#039;/&amp;gt;
    &amp;lt;/disk&amp;gt;&lt;/pre&gt;
save changes and exit the editor.&lt;/br&gt;&lt;/br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start the VM&lt;/strong&gt;
&lt;pre&gt;virsh start vm-name&lt;/pre&gt;
in our example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh start alpha&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;</content>
<link href="https://churchill.ddns.me.uk/post/how-to-convert-vm-disk-from-qcow2-to-raw-format/" />
<id>https://churchill.ddns.me.uk/post/how-to-convert-vm-disk-from-qcow2-to-raw-format/</id>
<updated>2020-12-18T09:15:30+00:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">Viewing APT History</title>
<content type="html">&lt;p&gt;Currently the only method of viewing history from the &lt;strong&gt;apt-get install&lt;/strong&gt; command is to review the &lt;strong&gt;dpkg&lt;/strong&gt; logs (/var/log/dpkg.log*) and the &lt;strong&gt;apt&lt;/strong&gt; logs (/var/log/apt/history.log.*.gz)&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;Whilst this maybe useful, if you don&#039;t know what you&#039;re looking for it could look like a mess.&lt;/p&gt;
&lt;p&gt;To make it easier for me to interegate the logs I wrote a little function to make my life easier :-)&lt;/p&gt;
&lt;p&gt;Usage:&lt;/p&gt;
&lt;pre&gt;apt-history [ install | upgrade | remove | rollback ]&lt;/pre&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;List which packages installed:
&lt;pre&gt;ubuntu$ &lt;strong&gt;apt-history install&lt;/strong&gt;&lt;/pre&gt;
When a specific package installed:
&lt;pre&gt;ubuntu$ &lt;strong&gt;apt-history install | grep &amp;lt;pkg-name&amp;gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Where packages where upgraded or removed:
&lt;pre&gt;ubuntu$ &lt;strong&gt;apt-history upgrade&lt;/strong&gt;
ubuntu$ &lt;strong&gt;apt-history remove&lt;/strong&gt;&lt;/pre&gt;
When a specific package was upgraded/removed:
&lt;pre&gt;ubuntu$ &lt;strong&gt;apt-history upgrade | grep &amp;lt;pkg-name&amp;gt;&lt;/strong&gt;
ubuntu$ &lt;strong&gt;apt-history remove | grep &amp;lt;pkg-name&amp;gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Which packages have been rolled back:
&lt;pre&gt;ubuntu$ &lt;strong&gt;apt-history rollback&lt;/strong&gt;&lt;/pre&gt;
Which specific package has been rolled back:
&lt;pre&gt;ubuntu$ &lt;strong&gt;apt-history rollback | grep &amp;lt;pkg-name&amp;gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And finally here is my crude function. Yes I could refine it and make it more resilient but it works for me :-)&lt;/p&gt;
&lt;pre&gt;function apt-history(){

      case &quot;$1&quot; in
        install)
              grep &#039;install &#039; /var/log/dpkg.log.1
              grep &#039;install &#039; /var/log/dpkg.log
              ;;
        upgrade|remove)
              grep $1 /var/log/dpkg.log.1
              grep $1 /var/log/dpkg.log
              ;;
        rollback)
              grep upgrade /var/log/dpkg.log.1 | \
                  grep &quot;$2&quot; -A10000000 | \
                  grep &quot;$3&quot; -B10000000 | \
                  awk &#039;{print $4&quot;=&quot;$5}&#039;
              grep upgrade /var/log/dpkg.log | \
                  grep &quot;$2&quot; -A10000000 | \
                  grep &quot;$3&quot; -B10000000 | \
                  awk &#039;{print $4&quot;=&quot;$5}&#039;
              ;;
        *)
              cat /var/log/dpkg.log.
              cat /var/log/dpkg.log
              ;;
      esac
}
&lt;/pre&gt;</content>
<link href="https://churchill.ddns.me.uk/post/viewing-apt-history/" />
<id>https://churchill.ddns.me.uk/post/viewing-apt-history/</id>
<updated>2020-10-06T21:26:56+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">How to refresh Apps on your Sky Q box</title>
<content type="html">&lt;p&gt;Have you ever got into the state were your TV apps are missing from the Apps or Sidebar sections of your Sky Q box, or your Apps (ie: Prime, Netflix, Spotify, YouTube) freezes, or even get a blank screen 15-30 seconds after starting your app?&lt;/p&gt;
&lt;p&gt;If so, follow these simple steps to resolve the problem!&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press the &lt;strong&gt;Home&lt;/strong&gt; button on your Sky Q remote&lt;/li&gt;
&lt;li&gt;Highlight &lt;strong&gt;Settings&lt;/strong&gt; on the left-hand menu &lt;span style=&quot;color: red;&quot;&gt;&amp;mdash; &lt;strong&gt;DO NOT PRESS SELECT&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;On your remote press &lt;kbd&gt;0&lt;/kbd&gt; &lt;kbd&gt;0&lt;/kbd&gt; &lt;kbd&gt;1&lt;/kbd&gt;, then press &lt;kbd&gt;Select&lt;/kbd&gt; to access the Installer menu.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Apps&lt;/strong&gt;, and highlight &lt;strong&gt;Refresh&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Refresh all Apps on this box&lt;/strong&gt;. You&#039;ll then see the message:
&lt;pre&gt;&lt;strong&gt;Your apps are being refreshed&lt;/strong&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Dismiss&lt;/strong&gt; to return to normal viewing.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If after you&#039;ve performed an App refresh and you still have an issue &amp;mdash; Contact Sky for support.&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/how-to-refresh-sky-q-apps/" />
<id>https://churchill.ddns.me.uk/post/how-to-refresh-sky-q-apps/</id>
<updated>2020-08-07T19:23:01+01:00</updated>
<category term="Misc"/>
</entry>
</feed>