Clearly Akito I missed something the first two times around, so I looked to retrace my steps today.
-
I edit the GRUB menu, rewriting the linux entry from ro quiet splash $vt_handoff to rw init=/bin/bash -I then hit CTRL-X as recommended here. https://linuxconfig.org/how-to-reset-lost-root-password-on-ubuntu-18-04-bionic-beaver-linux note this brings me back to GRUB so I hit c for the command line.
-
Having achieved root@(none))/# I type free -h. It lists no swap memory
-
root@(none))/# swapon –show returns nothing.
-
fallocate -l 4G /swapfile
as per https://itsfoss.com/create-swap-file-linux/ it returns root@(none)/#
5.
chmod 600 /swapfile
which returns same as per ibid
-
mkswap /swapfile returns “
-
swapon /swapfile returns { 1014.650463}Adding 4194300k swap on /swapfile. Priority -2 extents: 29 across : 17500028k SSFS
-
swapon –show returns 1 FILE, SIZE 4G USED 0B PRIO -2 as per Ibd.
-
I back up the file sudo cp /etc/fstab /etc/fstab.back which returns root@(none)/# as per Ibd.
-
I enter the following command echo ‘/swapfile none swap sw 0 0’ | tee -a /etc/fstab (Identical to Ibd save that, as I cannot sudo on this command line, I omitted it.) This returns /swapfile none swap sw 0 0 and root@(none)/#
-
I press the power button, then press it again to start the boot process. Besides mentioning its booting into insecure mode all I get is the splash screen, little orange dots blinking away…
I presume by now you can tell I’m not master of the command line. This said I’m guessing I failed to actually reach my root, as no sudo was used. What did I miss?