<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>www.bernatchez.net - troubleshoot</title><link href="https://www.bernatchez.net/lang-version.en/" rel="alternate"/><link href="https://www.bernatchez.net/lang-version.en/feeds/troubleshoot.atom.xml" rel="self"/><id>https://www.bernatchez.net/lang-version.en/</id><updated>2026-04-05T22:51:49+00:00</updated><entry><title>Obscure Pelican Compilation Warning</title><link href="https://www.bernatchez.net/lang-version.en/pelican-warning-en.html" rel="alternate"/><published>2026-04-05T22:51:49+00:00</published><updated>2026-04-05T22:51:49+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2026-04-05:/lang-version.en/pelican-warning-en.html</id><summary type="html">&lt;p class="first last"&gt;Obscure Pelican Compilation warning&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Obscure Warning Message&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;While performing a pelican compilation - &amp;quot;make html&amp;quot; - I got a warning which took me
a long time to track down, like the one below.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nf"&gt;WARNING  There are 2 original (not translated) items with slug &amp;quot;commonslugname&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;         &lt;/span&gt;.../content/somedir/somename-fr.rst
&lt;span class="w"&gt;         &lt;/span&gt;.../content/somedir/somename-en.rst
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This type of warning usually means you forgot to change the :lang: attibute
from en to es or to fr in the translated versions of the same .rst file.&lt;/p&gt;
&lt;p&gt;This time, I checked the :lang: attributes on both files and they were correct.
Everything else I looked at also seemed perfect.&lt;/p&gt;
&lt;p&gt;It took me a long time to figure out, that the difference that was
throwing off the compiler was that I had attibutes &amp;quot;:status: hidden&amp;quot;
in both the -en, and the -fr, but not in the -es version.&lt;/p&gt;
&lt;p&gt;So if you are making an article &amp;quot;hidden&amp;quot; be sure you do so in all translations.&lt;/p&gt;
</content><category term="troubleshoot"/><category term="pelican"/><category term="site"/><category term="generation"/><category term="obscure"/><category term="compile"/><category term="warning"/></entry><entry><title>Data Rescue</title><link href="https://www.bernatchez.net/lang-version.en/datarescue-en.html" rel="alternate"/><published>2025-10-29T16:57:39+00:00</published><updated>2025-10-29T16:57:39+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-29:/lang-version.en/datarescue-en.html</id><summary type="html">&lt;p class="first last"&gt;How I recovered my data from an unaccessible partition&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I ran into trouble when I attempted to upgrade my laptop from ubuntu
18.04 to 20.04.  My relesease_upgrade from Ubuntu 18.04 to Ubuntu
20.04 got hung up, so after waiting quite some time I decided to break
out of the upgrade script.&lt;/p&gt;
&lt;p&gt;I looked around and version 20.04 seemed well installed and working
properly.&lt;/p&gt;
&lt;p&gt;I hoped that the version would just work now, So I rebooted without
taking any precautions.&lt;/p&gt;
&lt;p&gt;The ubuntu boot sequence got hung up but I managed to use a rescue
option in the Grub menu that booted an old archived partition of
ubuntu16.04 that I happened to have on the drive.&lt;/p&gt;
&lt;p&gt;I blindly assumed that my issue was merely which partition was set to
active.  So I changed that and rebooted and it made matters worse.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;uhoh&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
error: no such partition.
Entering rescue mode...  grub rescue&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Now nothing booted.&lt;/p&gt;
&lt;p&gt;Doh!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What to do?&lt;/strong&gt;&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Look around.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;grub&lt;span class="w"&gt; &lt;/span&gt;rescue&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;ls
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(hd0) (hd0,msdos3) (hd0,msdos2)(hd0,msdos1)
&lt;/pre&gt;
&lt;p&gt;Those are (device,partition) references.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;hd0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(hd0): Filesystem is unknown.
&lt;/pre&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;hd0,msdos2&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(hd0,msdos2): Filesystem is ext2.
&lt;/pre&gt;
&lt;p&gt;Note It guessed ext2, but actually it is ext4.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;hd0,msdos2&lt;span class="o"&gt;)&lt;/span&gt;/home
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
./ ../ ubuntu/ pierre/
&lt;/pre&gt;
&lt;p&gt;That is the partition I &lt;strong&gt;wanted&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;hd0,msdos1&lt;span class="o"&gt;)&lt;/span&gt;/home
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
./ ../ dev/ sysadmin/
&lt;/pre&gt;
&lt;p&gt;The partition that &lt;strong&gt;worked&lt;/strong&gt;, now I want it back working.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ubuntu live USB to the rescue.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Follow this article:  &lt;a class="reference external" href="https://www.bernatchez.net/lang-version.en/liverescue-en.html"&gt;Ubuntu Live Rescue&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ok Now we are back with booting the relic partition.
Now this time &lt;strong&gt;Preserve Critical Info First&lt;/strong&gt;&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;strong&gt;${HOME}/jnut&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I maintain a subdirectory on my computer where I put essential
files that are important to me. Files that I need to preserve from
one incarnation of a workstation to another. Among other things,
it contains my latest password database. I preserve this on
USB flash drive.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Project sources which were being maintained on the faulty partition.&lt;/p&gt;
&lt;p&gt;These projects are under revision control, off the workstation.
We still need to preserve the information of where they are and
how to access their git repostitory..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Anything else that needs preserving that is not already preserved on jnut.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;To accomplish the preservation of the above I recursively copied
&amp;quot;/mnt/ubuntu20.04/home/ubuntu/jnut&amp;quot; to USB flash drive.&lt;/p&gt;
&lt;p&gt;I copied all the information for 2 and 3 above to a sub-directory
&amp;quot;ship_toUSB&amp;quot; and I will also replicate that onto the flash
drive. The file &amp;quot;ship_toUSB/billomaterials.txt&amp;quot; indicates what the
directoy contains.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;ship_toUSB/billomaterials.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Bill of materials
=================

allsources.txt          List of project directories on the faulty partition.
billomaterials.txt      This file.
listrepos               Bash script to list repos existing on guanabana and give you a few tips.
mangobiche16_04.zip     Some old jpeg images I want to keep for personal reasons.
skeleton.kdbx           Transition password database.
venv.pdf                Doc helps with virtual environements.
vwrapper.pdf            Same as above.
venvlist                List of virtual environments under ubuntu on the faulty partition.
reqs/                   Contains requirements files corresponding to each item in venvlist.

Personal Reading lists:

  Norm-BookList-2021.docx.rtf
  Norm-BookList-2022.docx.rtf
&lt;/pre&gt;
&lt;p&gt;Among those files two of them are informative enough to list them in this document.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;ship_toUSB/allsources.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
# Our project sources make use of git repositories.
# for repos at gituser&amp;#64;guanabana.bernatchez.net you need the ssh private key: id_guanabana_admin
#     then git push/pull etc will work properly
# for repos at git&amp;#64;github.com:pierrebernatchez/ you need the key: mangobiche_github,
#
# Note: You can find both private keys in &amp;quot;jnut/private_pack/&amp;quot;
# and their passwords in the password database that holds them &amp;quot;jnut/pierreKeepass.kdbx&amp;quot;
# and also in &amp;quot;ship_toUSB/skeleton.kdbx&amp;quot;
#
# Working copies of these sources existed on the now faulty partition
# in these directories.
#
# from /home/ubuntu/collab:
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/wait_ssh.git
    url = git&amp;#64;github.com:pierrebernatchez/handyhelper.git
    url = git&amp;#64;github.com:promotionefx/animbboard.git
    url = git&amp;#64;github.com:pierrebernatchez/latexhelper.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/peripherals.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/restdocs.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/metarepos.git
    url = git&amp;#64;github.com:pierrebernatchez/mathsansmystere.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/personalnotes.git
    url = git&amp;#64;github.com:pierrebernatchez/msmsite.git
# from /home/ubuntu/repos:
    url = git&amp;#64;github.com:pierrebernatchez/srcgif.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/srctemplate.git
    url = git&amp;#64;github.com:pierrebernatchez/minifirewall.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/ubuntuprereq.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/bernatchez_staticweb.git
    url = git&amp;#64;github.com:pierrebernatchez/srcgeek.git
    url = git&amp;#64;github.com:pierrebernatchez/srcdrawhead.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/ogopogo_staticweb.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/geekutils.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/bboards.git
    url = gituser&amp;#64;guanabana.bernatchez.net:/home/gituser/repos/cssbootstrap.git
&lt;/pre&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;ship_toUSB/venvlist
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
#
# List of virtual python environment directories that existed under
# the home/ubuntu/ directory on the faulty partition.
# I am not sure which if any were still relevant, nor which projects
# assumed which virtual environment.  But just in case, I have
# captured each one's context with a 'pip freeze' so that any one of
# these can presumably be resored for use with any any of the projects.
#
# The list indicates each environment's saved requirements context file.
#
devpi_venv             reqs/devpi_venv_requirements.txt
django_venv            reqs/django_venv_requirements.txt
latexhelper_venv       reqs/latexhelper_venv_requirements.txt
mathsansmystere_venv   reqs/mathsansmystere_venv_requirements.txt
msm_site_venv          reqs/msm_site_venv_requirements.txt
msmsite_venv           reqs/msmsite_venv_requirements.txt
restdocs_venv          reqs/restdocs_venv_requirements.txt
&lt;/pre&gt;
&lt;p&gt;When I was ready to copy the files to the USB flash drive I ran into another issue.
This resolved it.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://www.bernatchez.net/lang-version.en/usbissue-en.html"&gt;USB drive issue&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Epilog&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now this important data is backed up to USB flash drive I feel more
adventurous.&lt;/p&gt;
&lt;p&gt;I have decided to correct my 20.04 partition by simply re-using the
partition space to install a recent version of UBUNTU onto it from
scratch.&lt;/p&gt;
&lt;p&gt;But first just as an added fallback precaution, I plan to deep copy
everything under /home/ubuntu onto the old 16.04 partition.&lt;/p&gt;
</content><category term="troubleshoot"/><category term="ubuntu"/><category term="rescue"/><category term="data"/><category term="boot"/><category term="partition"/><category term="disk"/><category term="how to"/></entry><entry><title>Ubuntu Live Rescue</title><link href="https://www.bernatchez.net/lang-version.en/liverescue-en.html" rel="alternate"/><published>2025-10-29T15:22:02+00:00</published><updated>2025-10-29T15:22:02+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-29:/lang-version.en/liverescue-en.html</id><summary type="html">&lt;p class="first last"&gt;How to get booting working again after an issue happened.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;How I Managed to return to booting from an old partition when I had
changed the active boot partition using 'testdisk' and got myself into
trouble.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create/Fix Grub 2 boot&lt;/strong&gt;&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Boot from Ubuntu Live USB&lt;/p&gt;
&lt;p&gt;Choose 'try ubuntu'.
Boot Normal mode
Without persistence
Open a terminal window.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Detect Partition to install GRUB&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;fdisk&lt;span class="w"&gt; &lt;/span&gt;-l
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x5f540829

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 156205055 156203008 74.5G 83 Linux
/dev/sda2 * 156205056 968665087 812460032 387.4G 83 Linux
/dev/sda3 968665088 976771071 8105984 3.9G 82 Linux swap / Solaris
&lt;/pre&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
/dev/sda1 is the one that we can still boot from.
/dev/sda2 is the one I made active (causing the problem)
&lt;/pre&gt;
&lt;ol class="arabic simple" start="3"&gt;
&lt;li&gt;Mount Partition(s)&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mount&lt;span class="w"&gt; &lt;/span&gt;/dev/sda1&lt;span class="w"&gt; &lt;/span&gt;/mnt
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
Now point /dev and a few others to locations on the partition so grub uses those.&lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;i&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/dev&lt;span class="w"&gt; &lt;/span&gt;/dev/pts&lt;span class="w"&gt; &lt;/span&gt;/proc&lt;span class="w"&gt; &lt;/span&gt;/sys&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mount&lt;span class="w"&gt; &lt;/span&gt;-B&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/mnt&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic simple" start="4"&gt;
&lt;li&gt;Maskerade as though ''/mnt' were now ''/''&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;chroot&lt;span class="w"&gt; &lt;/span&gt;/mnt
&lt;span class="c1"&gt;# You can get back to the main root with &amp;lt;ctrl&amp;gt;d&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic simple" start="5"&gt;
&lt;li&gt;install grub&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;grub-install&lt;span class="w"&gt; &lt;/span&gt;--recheck&lt;span class="w"&gt; &lt;/span&gt;/dev/sda
&lt;span class="c1"&gt;# The recheck checks/rebuilds the partition map grub uses.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic simple" start="6"&gt;
&lt;li&gt;update grub&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;update-grub
&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic simple" start="7"&gt;
&lt;li&gt;unmount partitions&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;i&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/sys&lt;span class="w"&gt; &lt;/span&gt;/proc&lt;span class="w"&gt; &lt;/span&gt;/dev/pts&lt;span class="w"&gt; &lt;/span&gt;/dev&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;umount&lt;span class="w"&gt; &lt;/span&gt;/mnt&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;

sudo&lt;span class="w"&gt; &lt;/span&gt;umount&lt;span class="w"&gt; &lt;/span&gt;/mnt
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class="arabic" start="8"&gt;
&lt;li&gt;&lt;p class="first"&gt;reboot computer&lt;/p&gt;
&lt;p&gt;The steps above corrected my problem, but I still had to choose a
grub recovery option to boot properly.&lt;/p&gt;
&lt;p&gt;This is because the active partition is still set to the one that
does not work. We need to switch the active partition.&lt;/p&gt;
&lt;p&gt;To do that, I booted up using grub recovery option.&lt;/p&gt;
&lt;p&gt;I Then logged into the Ubuntu 16.04 partition and used the GUI app called &lt;strong&gt;disks&lt;/strong&gt; .
I edited the (wrong) active partition to turn off &amp;quot;bootable&amp;quot;,
then edited the correct partition to turn it on.&lt;/p&gt;
&lt;p&gt;After that reboot brought up the working partition hands free.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This Note is all but copied from the link where I learned how to do
this stuff:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://steemit.com/utopian-io/&amp;#64;roj/how-to-install-or-repair-grub-2-with-ubuntu-live-cd-flash"&gt;How To install/repair GRUB with Ubuntu Live CD/Flash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://www.digitalocean.com/community/tutorials/how-to-install-testdisk-on-linux-and-recover-deleted-files"&gt;testdisk&lt;/a&gt;
is a popular tool to recover data from faulty partitions.&lt;/p&gt;
&lt;p&gt;But Since our partitions were pretty well intact, we did not need it
in this case.&lt;/p&gt;
</content><category term="troubleshoot"/><category term="ubuntu"/><category term="rescue"/><category term="boot"/><category term="partition"/><category term="disk"/><category term="how to"/></entry><entry><title>Automount Partition</title><link href="https://www.bernatchez.net/lang-version.en/automount-en.html" rel="alternate"/><published>2025-10-28T22:01:19+00:00</published><updated>2025-10-28T22:01:19+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-28:/lang-version.en/automount-en.html</id><summary type="html">&lt;p class="first last"&gt;how to automatically mount one of your partitions&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After booting up using an alternate partition I need to be able to
access the partition that contains my latest files and information.&lt;/p&gt;
&lt;p&gt;Since I don't want to have to mount manually each time I boot up I
need to make an entry for the given partition in the &amp;quot;/etc/fstab&amp;quot; file
so that it mounts automatically upon boot up.&lt;/p&gt;
&lt;p&gt;Make a directory where we will mount the partition.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;/mnt/ubuntu20.04
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is in my /etc/fstab:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
#
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt;   &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;       &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;

UUID=f90fb201-6ba5-4bff-aad0-a127d20e1a63 /               ext4    errors=remount-ro 0       1
UUID=e9c9590f-c1f9-49f0-a83f-820c64728433 none            swap    sw                0       0
&lt;/pre&gt;
&lt;p&gt;We want to append a line there for our as yet unmounted partition.&lt;/p&gt;
&lt;p&gt;One that looks like this:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
UUID=nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn /mnt/ubuntu20.04 ext4 errors=remount-ro 0 1
&lt;/pre&gt;
&lt;p&gt;Find out the information we need.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;fdisk&lt;span class="w"&gt; &lt;/span&gt;-l
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x5f540829

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 156205055 156203008 74.5G 83 Linux
/dev/sda2 156205056 968665087 812460032 387.4G 83 Linux
/dev/sda3 968665088 976771071 8105984 3.9G 82 Linux swap / Solaris
&lt;/pre&gt;
&lt;p&gt;We can see that the partition we want is the one at /dev/sda2.
Discover the UUID of the partition we want to mount&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;blkid
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
/dev/sda1: UUID=&amp;quot;f90fb201-6ba5-4bff-aad0-a127d20e1a63&amp;quot; TYPE=&amp;quot;ext4&amp;quot; PARTUUID=&amp;quot;5f540829-01&amp;quot;
/dev/sda2: UUID=&amp;quot;8219c564-8865-44c8-a691-15faa4d3db4f&amp;quot; TYPE=&amp;quot;ext4&amp;quot; PARTUUID=&amp;quot;5f540829-02&amp;quot;
/dev/sda3: UUID=&amp;quot;e9c9590f-c1f9-49f0-a83f-820c64728433&amp;quot; TYPE=&amp;quot;swap&amp;quot; PARTUUID=&amp;quot;5f540829-03&amp;quot;
/dev/loop0: TYPE=&amp;quot;squashfs&amp;quot;
/dev/loop1: TYPE=&amp;quot;squashfs&amp;quot;
/dev/loop2: TYPE=&amp;quot;squashfs&amp;quot;
/dev/loop3: TYPE=&amp;quot;squashfs&amp;quot;
/dev/loop4: TYPE=&amp;quot;squashfs&amp;quot;
/dev/loop5: TYPE=&amp;quot;squashfs&amp;quot;
&lt;/pre&gt;
&lt;p&gt;So the line we need to append to /etc/fstab is this:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
UUID=&amp;quot;8219c564-8865-44c8-a691-15faa4d3db4f&amp;quot; /mnt/ubuntu20.04 ext4 errors=remount-ro 0 1
&lt;/pre&gt;
&lt;p&gt;Append a comment line then our automount line to /etc/fstab.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beware&lt;/strong&gt; here, we are modifying an important file, don't damage the file and cause a boot up issue.
Use &lt;strong&gt;your&lt;/strong&gt; UUID not the one in echo example below.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;# Appended Automount partition at /mnt/ubuntu20.04&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;tee&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;/etc/fstab&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;UUID=8219c564-8865-44c8-a691-15faa4d3db4f /mnt/ubuntu20.04 ext4 errors=remount-ro 0 1&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;tee&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;/etc/fstab
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Double check:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;/etc/fstab

&lt;span class="c1"&gt;# /etc/fstab: static file system information.&lt;/span&gt;
&lt;span class="c1"&gt;# Use &amp;#39;blkid&amp;#39; to print the universally unique identifier for a&lt;/span&gt;
&lt;span class="c1"&gt;# device; this may be used with UUID= as a more robust way to name devices&lt;/span&gt;
&lt;span class="c1"&gt;# that works even if disks are added and removed. See fstab(5).&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# / was on /dev/sdb1 during installation&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
UUID=f90fb201-6ba5-4bff-aad0-a127d20e1a63 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb5 during installation
UUID=e9c9590f-c1f9-49f0-a83f-820c64728433 none swap sw 0 0
# Appended Automount partition at /mnt/ubuntu20.04
UUID=8219c564-8865-44c8-a691-15faa4d3db4f /mnt/ubuntu20.04 ext4 errors=remount-ro 0 1
&lt;/pre&gt;
&lt;p&gt;Retrigger mounts.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mount&lt;span class="w"&gt; &lt;/span&gt;-a
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;OK Job is done.
Make sure your mounts are ok before rebooting.&lt;/p&gt;
</content><category term="troubleshoot"/><category term="disk"/><category term="partition"/><category term="id"/><category term="mount"/><category term="ext4"/></entry><entry><title>Issues with Flameshot utility ubuntu 24.04</title><link href="https://www.bernatchez.net/lang-version.en/flameshot-en.html" rel="alternate"/><published>2025-10-28T18:11:40+00:00</published><updated>2025-10-28T18:11:40+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-28:/lang-version.en/flameshot-en.html</id><summary type="html">&lt;p class="first last"&gt;Fixing Flameshot misbehaviour under ubuntu 24.04&lt;/p&gt;
</summary><content type="html">&lt;p&gt;In my opintion the best screenshot utility availabe under ubuntu is flameshot.&lt;/p&gt;
&lt;p&gt;To install:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;flameshot
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;But under ubuntu 24.04 there is a problem with the installed package.&lt;/p&gt;
&lt;p&gt;When you try to take a screenshot you get this message:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Flameshot Error
Unable to capture screen
&lt;/pre&gt;
&lt;p&gt;The problem is that the package assumes XORG rather than wayland, for
its interaction with the display.  So one needs to get it to assume
wayland instead.&lt;/p&gt;
&lt;p&gt;Some people have been using an autostart script which invokes
flameshot with the correct parameter.  The consequence
is a flameshot mini-icon which when used behaves correctly.&lt;/p&gt;
&lt;p&gt;To get that you just need to create an autostart desktop here:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.config/autostart/flameshot-custom.desktop
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;With these contents:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;Desktop&lt;span class="w"&gt; &lt;/span&gt;Entry&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="nv"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Application
&lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Flameshot&lt;span class="w"&gt; &lt;/span&gt;wayland&lt;span class="w"&gt; &lt;/span&gt;fixed
&lt;span class="nv"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sh&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;QT_QPA_PLATFORM=wayland flameshot&amp;quot;&lt;/span&gt;
X-GNOME-Autostart-enabled&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;But I prefer to use a keyboard shortcut rather such a mini icon to
get my screenshots.&lt;/p&gt;
&lt;p&gt;You set that up by using the settings app to add a shortcut:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
settings-&amp;gt;keyboard-&amp;gt;view and customize shortcuts-&amp;gt;custom shortcuts-&amp;gt;+
&lt;/pre&gt;
&lt;p&gt;Name: Flameshot&lt;/p&gt;
&lt;p&gt;Command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sh&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;QT_QPA_PLATFORM=wayland flameshot gui&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Shortcut: You choose the key you want.&lt;/p&gt;
&lt;p&gt;I like to use printscreen.&lt;/p&gt;
&lt;p&gt;On my system printscreen is &amp;lt;fn&amp;gt;&amp;lt;right-shift&amp;gt;&lt;/p&gt;
&lt;p&gt;Using that overrides the default screenshot which also uses printscreen.&lt;/p&gt;
</content><category term="troubleshoot"/><category term="GUI"/><category term="wayland"/><category term="xorg"/><category term="screenshot"/><category term="flameshot"/><category term="GDM"/></entry><entry><title>Loading pre-existing SSH key to seahorse</title><link href="https://www.bernatchez.net/lang-version.en/seahorsessh-en.html" rel="alternate"/><published>2025-10-27T17:32:31+00:00</published><updated>2025-10-27T17:32:31+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-27:/lang-version.en/seahorsessh-en.html</id><summary type="html">&lt;p class="first last"&gt;How does one load an existing ssh keypair to seahorse?&lt;/p&gt;
</summary><content type="html">&lt;p&gt;I have been accustomed to just using ssh-add by hand whenever I access
remote ssh sites.&lt;/p&gt;
&lt;p&gt;But now that I want to start fully utilizing PGP keys for email
privacy too, I felt I should use one comprehensive tool to manage all
the keys I am using.&lt;/p&gt;
&lt;p&gt;I tried using the &amp;quot;passwords and keys&amp;quot; (seahorse) user interface to
add an existing SSH keypair, but there was no way to do that in the
user interface, you can only add by generating new keys.&lt;/p&gt;
&lt;p&gt;However it turns out that seahorse keeps in touch with ssh agent keys.&lt;/p&gt;
&lt;p&gt;So all you need to do is to load your key into the agent and seahorse
will take it in.&lt;/p&gt;
&lt;p&gt;For the sake of keeping things in order copy the pair to .ssh/&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cp&lt;span class="w"&gt; &lt;/span&gt;pathto/my_sshkey*&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.ssh/
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Load the key&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ssh-add&lt;span class="w"&gt; &lt;/span&gt;.ssh/my_sshkey
&lt;span class="c1"&gt;## you need to supply the passphrase for the private key&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make sure it got loaded&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ssh-add&lt;span class="w"&gt; &lt;/span&gt;-L
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now if you run seahorse you find it is there.&lt;/p&gt;
</content><category term="troubleshoot"/><category term="ssh"/><category term="seahorse"/><category term="keys"/><category term="key management"/></entry><entry><title>SSH connection refused</title><link href="https://www.bernatchez.net/lang-version.en/sshrefused-en.html" rel="alternate"/><published>2025-10-27T15:52:30+00:00</published><updated>2025-10-27T15:52:30+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-27:/lang-version.en/sshrefused-en.html</id><summary type="html">&lt;p class="first last"&gt;A conflict with  &amp;quot;passwords and keys&amp;quot; under Ubuntu 24.04 leads to &amp;quot;connection refused&amp;quot;.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;On my recently installed Ubuntu 24.04 laptop.&lt;/p&gt;
&lt;p&gt;When I attempted to ssh into my git server my ssh connection was refused.&lt;/p&gt;
&lt;p&gt;I checked for all the usual errors and the problem persisted.&lt;/p&gt;
&lt;p&gt;This version of ubuntu uses a key management tool called &amp;quot;passwords and keys&amp;quot;.&lt;/p&gt;
&lt;p&gt;To get that to play well with my keys, the course of least resistance
was to remember that it likes to find ssh keys in ${HOME}/.ssh/ and it
likes to find both private and private key files in there.&lt;/p&gt;
&lt;p&gt;When I conform to that restriction ssh behaves correctly with my github account repository.&lt;/p&gt;
&lt;p&gt;This shows any such keys in its list.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ssh-add&lt;span class="w"&gt; &lt;/span&gt;-l
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;However trying to connect to my own repo server still
yielded: &lt;strong&gt;connection refused &amp;quot;public key&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The measure that fixed that issue was to add two lines to the file: /etc/ssh/ssh_config.&lt;/p&gt;
&lt;p&gt;Immediately below the &amp;quot;Host *&amp;quot; line.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Host&lt;span class="w"&gt; &lt;/span&gt;*
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;PubkeyAcceptedKeyTypes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;+ssh-rsa
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;HostKeyAlgorithms&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;+ssh-rsa
&lt;/pre&gt;&lt;/div&gt;
</content><category term="troubleshoot"/><category term="ssh"/><category term="connection refused"/><category term="configuration"/><category term="keys"/></entry><entry><title>USB mount error with exfat file system</title><link href="https://www.bernatchez.net/lang-version.en/usbissue-en.html" rel="alternate"/><published>2025-10-26T13:56:13+00:00</published><updated>2025-10-26T13:56:13+00:00</updated><author><name>Pierre Bernatchez</name></author><id>tag:www.bernatchez.net,2025-10-26:/lang-version.en/usbissue-en.html</id><summary type="html">&lt;p class="first last"&gt;Correct an issue with exfat usb thumb drives&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;mount error: unknown filesystem type 'exfat'&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When I inserted a USB flash drive it seemed to mount properly, but
when I tried to browse there I got the the above message.&lt;/p&gt;
&lt;p&gt;To fix the problem I had to install the appropriate exfat software:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;update
sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;exfat-fuse&lt;span class="w"&gt; &lt;/span&gt;exfat-utils
&lt;/pre&gt;&lt;/div&gt;
</content><category term="troubleshoot"/><category term="USB"/><category term="drive"/><category term="error"/><category term="exfat"/></entry></feed>