The Ubuntu filesystem became read-only and I can’t boot into it anymore

This has occurred twice now, in Ubuntu 18.04 and Ubuntu 19.04, I ran both alongside windows 10 on Dual Boot.

I had Ubuntu 18.04, I was moving data to my external hard drive and a file couldn’t be moved, when I cancelled it I noticed that all my folders on Ubuntu have become read-only, I change the permissions of my home folder and it was fixed. But after a reboot, I couldn’t boot into Ubuntu anymore. It was in the bios but I got an error while booting into it.

I used a live boot on usb with Ubuntu 19.04 and tried to fix it (I was told the reason might be an update from windows or because of fast startup so I stopped both, but it happened again) and it didn’t work so I just installed Ubuntu 19.04 instead since I was told the reason might be that my system is corrupt.

And now after a day of using Ubuntu 19.04, the same problem has occurred again, what can I do to fix it? I thought about formatting my external hard drive, but if that fails I’d lose all my data for no reason, so I thought I should ask first.

Internet only works for a minute or two then won’t work anymore

After a minute or so, the wifi stops working as in, it is still connected to the wifi but there is no data being transferred. This started happening when I upgraded the kernel to 4.17 (from 4.15) and it won’t even register my usb adapter when i run 4.17 but will only work for a minute or so. If I log into windows on the same system with the same wifi adapter everything works good. I have confirmed that this is not a problem with my general wifi because it works when I boot into windows on the same machine, and it also works on my laptop which is also running Ubuntu. Before this happened, it has been working with no hiccups for 5 months since I switched over on this pc.

I followed these commands to install my driver back when:

sudo git clone https://github.com/gnab/rtl8812au.git sudo cp -r rtl8812au  /usr/src/rtl8812au-4.2.2 sudo dkms add -m rtl8812au -v 4.2.2 sudo dkms build -m rtl8812au -v 4.2.2 sudo dkms install -m rtl8812au -v 4.2.2 

lsusb

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 0bda:a811 Realtek Semiconductor Corp.  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 145f:01c1 Trust  Bus 001 Device 002: ID 0c45:5104 Microdia  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

ifconfig

enp33s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         ether 30:9c:23:03:94:d2  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 0  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  enx000f004aa319: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet6 2600:1700:16e0:6d90:1522:cd74:5f8a:6dc3  prefixlen 64  scopeid 0x0<global>         inet6 2600:1700:16e0:6d90:be9b:318:b16d:dfcf  prefixlen 64  scopeid 0x0<global>         inet6 fe80::ae05:cd57:188b:30dd  prefixlen 64  scopeid 0x20<link>         ether 00:0f:00:4a:a3:19  txqueuelen 1000  (Ethernet)         RX packets 10399  bytes 13031066 (13.0 MB)         RX errors 0  dropped 1816  overruns 0  frame 0         TX packets 5708  bytes 760985 (760.9 KB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 1000  (Local Loopback)         RX packets 1011  bytes 93331 (93.3 KB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 1011  bytes 93331 (93.3 KB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 

sudo lshw -C network

  *-network                         description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.                                   physical id: 0                                                            bus info: pci@0000:21:00.0                                                logical name: enp33s0                                                     version: 15                                                               serial: 30:9c:23:03:94:d2                                                 size: 10Mbit/s                                                            capacity: 1Gbit/s                                                         width: 64 bits                                                            clock: 33MHz                                                              capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII speed=10Mbit/s                                     resources: irq:35 ioport:f000(size=256) memory:fe604000-fe604fff memory:fe600000-fe603fff   *-network                                                                      description: Wireless interface                                           physical id: 1                                                            bus info: usb@3:1                                                         logical name: enx000f004aa319                                             serial: 00:0f:00:4a:a3:19                                                 capabilities: ethernet physical wireless                                                                                                               configuration: broadcast=yes driver=rtl8812au multicast=yes wireless=IEEE 802.11bgn          

Peripherals does not work anymore on Ubuntu after a remote session

I have got a big trouble. First windows and Ubuntu are in different computers in my case. I did this installation with xrdp. I did connect by Windows. It worked. Some things didn’t act as I expected, like when on Windows remote I ask to launch a terminal, it opened in my Ubuntu session and not in my Windows remote. So I closed the session on Ubuntu, and tried again to launch a terminal on Windows remote. It was unsuccessful. So I opened my Ubuntu session just to see if the terminal appeard on here again. And here it started to totally bug. The screen changed configuration, as if it was on a smaller screen, the wallpaper was widen. And the keyboard and mouse didn’t not work anymore. I did a reboot it did not worked. Actually I can access the Bios, so I do not have a issue with my devices theirselves. That’s clearly with Ubuntu it does not work, and I cannot open my session anymore because keyboard and mouse are inactive.

Notes: I still can access with Windows remote. It clearly shows the peripherals like my external hard disk are not available, which is weird. Well, I can access to some things if needed to find a solution. I have access to the files system for instance. But not to terminal.

GNOME To Do doesn’t sync with Google calendar anymore

I’ve been using the GNOME To Do app on Ubuntu for a while now on several machines, and it worked without much effort.

However, recently I noticed that changes are not synced anymore. If I make a change in google calendar (add or move a task), it does not get added or moved in the To Do app. Vice versa: when I add or move a task to a later date in the To Do app, it does not update in google calendar. Also: when I reboot, the changes made in the To Do app appear to be gone.

I’ve tried looking for a manual update button in the app, but couldn’t find it.

Anyone have any clues what might cause this?

percona-server-server-5.7 not available anymore?

I followed the APT installation instruction here https://www.percona.com/doc/percona-server/5.7/installation/apt_repo.html

but it seems not working anymore with this error message

root@server# apt-get install percona-server-server-5.7 Reading package lists... Done Building dependency tree Reading state information... Done Package percona-server-server-5.7 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:   percona-xtradb-cluster-server-5.7:i386 percona-xtradb-cluster-server-5.7 

Anyone facing the same issue? is percona-xtradb-cluster-server-5.7 the same with percona-server-server-5.7

hostapd not working anymore

I had a working hostapd file and a functioning wifi hotspot (device is busybox, iMX6 board). While the hotspot was up and running, I was doing manual routing connected to the device via ssh (I’m able to connect this device via another device’s access point, I first connect to the access point using my PC and then ssh into the aforementioned device). However, during my last command, ssh got stuck, hence I decided to power cycle.

After the power cycle, the previous commands (which used to work everytime, even after power cycles) does not work anymore. Here is how I normally would setup the hotspot.

First I would create a virtual interface from wlan0, which is active on startup.

iw dev wlan0 interface add wlan0_ap2 type managed addr 12:34:56:78:ab:ce 

wlan0 interface is also what allows me to ssh into this device. wlan0 is connected to wlan0-ap of another board. My PC is also connected to wlan0-ap network. After ssh’ing into the device, I would start hostapd config like so:

hostapd -dd /etc/hostapd_build_ap.conf 

After that, hotstop would be detectable and connectable by external devices. I do not normally setup a dhcp server, static IP is okay for me.

Here is the hostapd_build_ap.conf file:

interface=wlan0_ap2 #bridge=br0 ssid=myhotspot driver=nl80211 country_code=US hw_mode=g channel=10 max_num_sta=5 wpa=2 auth_algs=1 wpa_passphrase=ABABABABAB wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP 

After certain routings are done via “route add …”

I would normally be able to use both devices as access points connected to each other. Yet, after my last routing, like said, ssh got inresponsive and I had to power cycle. (There is no other way of accessing the device at the moment)

Now, when I try to start hostapd, I get this:

random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd_build_ap.conf rfkill: Cannot open RFKILL control device nl80211: RFKILL status not available nl80211: TDLS supported nl80211: TDLS external setup nl80211: Supported cipher 00-0f-ac:1 nl80211: Supported cipher 00-0f-ac:5 nl80211: Supported cipher 00-0f-ac:2 nl80211: Supported cipher 00-0f-ac:4 nl80211: Supported cipher 00-0f-ac:10 nl80211: Supported cipher 00-0f-ac:8 nl80211: Supported cipher 00-0f-ac:9 nl80211: Supported cipher 00-0f-ac:6 nl80211: Supported cipher 00-0f-ac:13 nl80211: Supported cipher 00-0f-ac:11 nl80211: Supported cipher 00-0f-ac:12 nl80211: Using driver-based off-channel TX nl80211: Use separate P2P group interface (driver advertised support) nl80211: interface wlan0_ap2 in phy phy0 nl80211: Set mode ifindex 4 iftype 3 (AP) nl80211: Setup AP(wlan0_ap2) - device_ap_sme=0 use_monitor=0 nl80211: Subscribe to mgmt frames with AP handle 0x57d950 nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x57d950 match= nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x57d950 match= nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x57d950 match= nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x57d950 match= nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x57d950 match= nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x57d950 match= nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x57d950 match= nl80211: Add own interface ifindex 4 nl80211: if_indices[16]: 4 phy: phy0 BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits) wlan0_ap2: interface state UNINITIALIZED->COUNTRY_UPDATE Previous country code 98, new country code US  Continue interface setup after channel list update ctrl_iface not configured! random: Got 20/20 bytes from /dev/random nl80211: Event message available nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0_ap2 nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0_ap2(12:34:56:78:ab:ce) A1=ff:ff:ff:ff:ff:ff A2=bc:a9:20:47:0d:ee nl80211: MLME event frame - hexdump(len=130): 40 00 00 00 ff ff ff ff ff ff bc a9 20 47 0d ee ff ff ff ff ff ff d0 6d 00 04 41 52 4f 58 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 0b 2d 1a 21 40 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00 08 84 00 00 00 40 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 0e 00 00 dd 09 00 10 18 02 01 00 10 00 00 nl80211: Frame event nl80211: RX frame sa=bc:a9:20:47:0d:ee freq=2462 ssi_signal=-43 fc=0x40 seq_ctrl=0x6dd0 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=130 nl80211: Event message available nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0_ap2 nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0_ap2(12:34:56:78:ab:ce) A1=ff:ff:ff:ff:ff:ff A2=bc:a9:20:47:0d:ee nl80211: MLME event frame - hexdump(len=130): 40 00 00 00 ff ff ff ff ff ff bc a9 20 47 0d ee ff ff ff ff ff ff f0 6d 00 04 41 52 4f 58 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 0b 2d 1a 21 40 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00 08 84 00 00 00 40 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 0e 00 00 dd 09 00 10 18 02 01 00 10 00 00 nl80211: Frame event nl80211: RX frame sa=bc:a9:20:47:0d:ee freq=2462 ssi_signal=-43 fc=0x40 seq_ctrl=0x6df0 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=130 nl80211: Event message available nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0_ap2 nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0_ap2(12:34:56:78:ab:ce) A1=ff:ff:ff:ff:ff:ff A2=bc:a9:20:47:0d:ee nl80211: MLME event frame - hexdump(len=130): 40 00 00 00 ff ff ff ff ff ff bc a9 20 47 0d ee ff ff ff ff ff ff 00 6e 00 04 41 52 4f 58 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 0b 2d 1a 21 40 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00 08 84 00 00 00 40 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 0e 00 00 dd 09 00 10 18 02 01 00 10 00 00 nl80211: Frame event nl80211: RX frame sa=bc:a9:20:47:0d:ee freq=2462 ssi_signal=-37 fc=0x40 seq_ctrl=0x6e00 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=130 nl80211: Event message available nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0_ap2 nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0_ap2(12:34:56:78:ab:ce) A1=ff:ff:ff:ff:ff:ff A2=bc:a9:20:47:0d:ee nl80211: MLME event frame - hexdump(len=130): 40 00 00 00 ff ff ff ff ff ff bc a9 20 47 0d ee ff ff ff ff ff ff 50 6e 00 04 41 52 4f 58 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 0b 2d 1a 21 40 17 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00 08 84 00 00 00 40 6b 07 0f ff ff ff ff ff ff dd 0b 00 17 f2 0a 00 01 04 00 00 00 00 dd 08 00 50 f2 08 00 0e 00 00 dd 09 00 10 18 02 01 00 10 00 00 nl80211: Frame event nl80211: RX frame sa=bc:a9:20:47:0d:ee freq=2462 ssi_signal=-41 fc=0x40 seq_ctrl=0x6e50 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=130 Channel list update timeout - try to continue anyway nl80211: Regulatory information - country=98 nl80211: 2402-2482 @ 40 MHz 20 mBm nl80211: 5170-5250 @ 80 MHz 23 mBm nl80211: 5250-5330 @ 80 MHz 23 mBm (DFS) nl80211: 5735-5835 @ 80 MHz 30 mBm nl80211: Added 802.11b mode based on 802.11g information Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm Completing interface initialization Mode: IEEE 802.11g  Channel: 10  Frequency: 2457 MHz DFS 0 channels required radar detection nl80211: Set freq 2457 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2457 MHz, cf2=0 MHz)   * freq=2457   * vht_enabled=0   * ht_enabled=0 RATE[0] rate=10 flags=0x1 RATE[1] rate=20 flags=0x1 RATE[2] rate=55 flags=0x1 RATE[3] rate=110 flags=0x1 RATE[4] rate=60 flags=0x0 RATE[5] rate=90 flags=0x0 RATE[6] rate=120 flags=0x0 RATE[7] rate=180 flags=0x0 RATE[8] rate=240 flags=0x0 RATE[9] rate=360 flags=0x0 RATE[10] rate=480 flags=0x0 RATE[11] rate=540 flags=0x0 hostapd_setup_bss(hapd=0x57cf48 (wlan0_ap2), first=1) wlan0_ap2: Flushing old station entries nl80211: flush -> DEL_STATION wlan0_ap2 (all) wlan0_ap2: Deauthenticate all stations nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3 nl80211: send_mlme -> send_frame nl80211: send_frame - Use bss->freq=2457 nl80211: send_frame -> send_frame_cmd nl80211: CMD_FRAME freq=2457 wait=0 no_cck=0 no_ack=0 offchanok=0 CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 12 34 56 78 ab ce 12 34 56 78 ab ce 00 00 02 00 nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2457 wait=0) wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 Using interface wlan0_ap2 with hwaddr 12:34:56:78:ab:ce and ssid "myhotspot" Deriving WPA PSK based on passphrase SSID - hexdump_ascii(len=9):      6d 79 68 6f 74 73 70 6f 74                        myhotspot        PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Get randomness: len=32 entropy=108 GMK - hexdump(len=32): [REMOVED] Get randomness: len=32 entropy=76 Key Counter - hexdump(len=32): [REMOVED] WPA: Delay group state machine start until Beacon frames have been configured nl80211: Set beacon (beacon_set=0) nl80211: Beacon head - hexdump(len=60): 80 00 00 00 ff ff ff ff ff ff 12 34 56 78 ab ce 12 34 56 78 ab ce 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 09 6d 79 68 6f 74 73 70 6f 74 01 08 82 84 8b 96 0c 12 18 24 03 01 0a nl80211: Beacon tail - hexdump(len=41): 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 7f 08 00 00 00 00 00 00 00 40 nl80211: ifindex=4 nl80211: beacon_int=100 nl80211: dtim_period=2 nl80211: ssid - hexdump_ascii(len=9):      6d 79 68 6f 74 73 70 6f 74                        myhotspot          * beacon_int=100 nl80211: hidden SSID not in use nl80211: privacy=1 nl80211: auth_algs=0x1 nl80211: wpa_version=0x2 nl80211: key_mgmt_suites=0x2 nl80211: pairwise_ciphers=0x18 nl80211: group_cipher=0x10 nl80211: SMPS mode - off nl80211: beacon_ies - hexdump(len=10): 7f 08 00 00 00 00 00 00 00 40 nl80211: proberesp_ies - hexdump(len=10): 7f 08 00 00 00 00 00 00 00 40 nl80211: assocresp_ies - hexdump(len=10): 7f 08 00 00 00 00 00 00 00 40 nl80211: Beacon set failed: -16 (Device or resource busy) Failed to set beacon parameters wlan0_ap2: Flushing old station entries nl80211: flush -> DEL_STATION wlan0_ap2 (all) wlan0_ap2: Deauthenticate all stations nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3 nl80211: send_mlme -> send_frame nl80211: send_frame - Use bss->freq=2457 nl80211: send_frame -> send_frame_cmd nl80211: CMD_FRAME freq=2457 wait=0 no_cck=0 no_ack=0 offchanok=0 CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 12 34 56 78 ab ce 12 34 56 78 ab ce 00 00 03 00 nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2457 wait=0) wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0_ap2) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 hostapd_free_hapd_data(wlan0_ap2) Interface initialization failed wlan0_ap2: interface state COUNTRY_UPDATE->DISABLED wlan0_ap2: AP-DISABLED  hostapd_interface_deinit_free(0x57c308) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0x57c308) wlan0_ap2: interface state DISABLED->DISABLED hostapd_bss_deinit: deinit bss wlan0_ap2 wlan0_ap2: Deauthenticate all stations nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3 nl80211: send_mlme -> send_frame nl80211: send_frame - Use bss->freq=2457 nl80211: send_frame -> send_frame_cmd nl80211: CMD_FRAME freq=2457 wait=0 no_cck=0 no_ack=0 offchanok=0 CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 12 34 56 78 ab ce 12 34 56 78 ab ce 00 00 03 00 nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2457 wait=0) wlan0_ap2: AP-DISABLED  hostapd_cleanup(hapd=0x57cf48 (wlan0_ap2)) hostapd_free_hapd_data: Interface wlan0_ap2 wasn't started hostapd_interface_deinit_free: driver=0x977b0 drv_priv=0x57d818 -> hapd_deinit nl80211: deinit ifname=wlan0_ap2 disabled_11b_rates=0 nl80211: Remove monitor interface: refcount=0 nl80211: Remove beacon (ifindex=4) netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP) nl80211: Set mode ifindex 4 iftype 2 (STATION) nl80211: Teardown AP(wlan0_ap2) - device_ap_sme=0 use_monitor=0 nl80211: Unsubscribe mgmt frames handle 0x88df51d9 (AP teardown) hostapd_interface_free(0x57c308) hostapd_interface_free: free hapd 0x57cf48 hostapd_cleanup_iface(0x57c308) hostapd_cleanup_iface_partial(0x57c308) hostapd_cleanup_iface: free iface=0x57c308 

Could it be that hostapd got corrupted during power cycle? What could be the cause of this?

Does the problem start here?

nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2457 wait=0) 

Moto G3 (android marshmallow) not detecting SD card anymore (solution?)

About a month ago the Moto G (3rdGen) of my wife was not able to recognize the SD-card 32GB Trancend premium 400x (which was formatted as adoptable storage) anymore. On this card were very important pictures and movies for us (of our new born baby). As of a certain Android version the adoptable storage is also encrypted and reading it on a PC or other phone is not possible without the encryption key. Since the phone was also not rooted it was also not possible to get the encryption key from the /data/…something directory… (see https://nelenkov.blogspot.ch/2015/06/decrypting-android-m-adopted-storage.html). So I almost gave up hope…

I bought the exact same type SD-card, also 32GB, only about a year later. Hoping that I would be able to make an exact clone of the card and I would be able to start some experiments with it without the risk of destroying something on the original card and losing all the data. When I mounted the original card under Linux it shows two partitions 17MB and about 31GB. Cloning the card with some Linux command line tools didn’t gave me the same result. Next thing I tried was cloning it using HDDrawCopy, first write the entire card to an image on my harddrive. When I copied the data to my new 32GB card I noticed that the new card did not have the same capacity of the image file (image was 32.22GB, new card shows capacity of 31.11GB) so hmmmm that trick doesn’t work… Luckily I also happen to have a 64GB SDcard (same type) which should have enough space for this test. So using HDDrawCopy I wrote the image to this card. Checked under Linux if I see the same partition as with the original card and this happens to be (of course it also shows about 32GB of free space not partitioned).

So I thought lets see if the Moto shows the same error with my new card in the phone and that I made an image on which I can start to try to hack the encryption off(now or in the future). To my surprise the Moto shows immediately that the transcend 32GB volume is mounted! I went to the gallery of the phone and IT SHOWS OUR PICTURES AND MOVIES again!!!

So in short when this happens buy a larger volume SD-Card (to make sure that there are enough data-block available). Use HDDrawCopy to make a bit-wise clone/image of the original card. Write the image to your new card and check if it can be read by your phone.

Never do the following or your data will be lost:

  • Format the card
  • Set your phone back to factory default (destroys your encryption key)
  • Make the phone to forget/unmount the storage location (also destroys encryption key)
  • upgrade to a newer version of Android (or any other major system update).

(of course make sure to make backups or cloud syncs to prevent this situation at all)

I hope this can help someone out there who might ended up in the same situation.

Windows Server 2019 OpenSSH SFTP Server Won’t Authenticate Users Anymore (Connection Reset)

I am running Microsoft Windows Server 2019 Datacenter Version 10.0.17763 Build 17763 on Azure and I had SFTP working just fine until a recent update and reboot on Windows seems to have clobbered this working install of OpenSSH. Now when attempting to SFTP from a client machine, all I get is,

Connection reset by xxx.xxx.xxx.xxx port 22

Connection closed

What could be wrong? Has anyone else experienced this and solved it?

Here’s my sshd_config file, which was working:

# This is the sshd server system-wide configuration file.  See # sshd_config(5) for more information.  # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented.  Uncommented options override the # default value.  #Port 22 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress ::  #HostKey __PROGRAMDATA__/ssh/ssh_host_rsa_key #HostKey __PROGRAMDATA__/ssh/ssh_host_dsa_key #HostKey __PROGRAMDATA__/ssh/ssh_host_ecdsa_key #HostKey __PROGRAMDATA__/ssh/ssh_host_ed25519_key  # Ciphers and keying #RekeyLimit default none  # Logging #SyslogFacility AUTH #LogLevel INFO  # Authentication:  #LoginGraceTime 2m #PermitRootLogin prohibit-password #StrictModes yes #MaxAuthTries 6 #MaxSessions 10  #PubkeyAuthentication yes  # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 # but this is overridden so installations will only check .ssh/authorized_keys AuthorizedKeysFile  .ssh/authorized_keys  #AuthorizedPrincipalsFile none  # For this to work you will also need host keys in %programData%/ssh/ssh_known_hosts #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for # HostbasedAuthentication #IgnoreUserKnownHosts no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes  # To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes #PermitEmptyPasswords no  #AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no #PermitTTY yes #PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes #UseLogin no #PermitUserEnvironment no #ClientAliveInterval 0 #ClientAliveCountMax 3 #UseDNS no #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none #VersionAddendum none  # no default banner path Banner F:\SFTP-Welcome.txt #Banner /SFTP-Welcome.txt  # override default of no subsystems Subsystem   sftp    sftp-server.exe  # Example of overriding settings on a per-user basis #Match User anoncvs #   AllowTcpForwarding no #   PermitTTY no #   ForceCommand cvs server  #Match Group administrators #       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys  #DenyGroups company\vendors company\auditors #AllowGroups company\administrators  Match Group vendors    ChrootDirectory F:\Vendors    #ChrootDirectory F:\Vendors\%u    #ChrootDirectory %h    ForceCommand internal-sftp    X11Forwarding no    AllowTcpForwarding no  # no default banner path #Banner F:\Vendors\SFTP-Welcome.txt #Banner /SFTP-Welcome.txt 

destroy object once it won’t be used anymore in flyweight pattern

I want to use flyweight pattern to return the same instance of my object each time.

public class ThingFactory {   private static final HashMap<UUID, Thing> things = new HashMap<>();    public static Thing getThing(UUID id) {     Thing thing = things.get(id);      if (thing == null) {       thing = new Thing(id);       things.put(id, thing);     }      return thing;   } } 

This approach has the drawback that things will contain a reference to each Thing object, even if the object will not be needed any more. So the garbage collector cannot automatically identify and destroy those objects.

How can I destroy the stored reference though when I know there are no other references to it anymore?