Boot problems (due to "faulty" usb-stick?)

Hii all, :wave:

My system is Linux LIte 6.2. which used to work just fine (until now?)

In my desktop computer there are 3 USB-sticks constantly plugged in. Normally the PC would boot fine this way. Today however - after boot - when I arrived at the login screen the PC wouldn´t go on the normal way but instead rebooted (or logged out and and in again). :frowning_face:

After trying a few more times I finally could log in but I had difficulties using the mouse and keyboard. The PC wouldn´t accept all of the inputs. :slightly_frowning_face:

E.g. the mouse wheel worked (after a while) but not any input from the keyboard.

I took a closer look at the desktop and realized that one of the three USB-sticks had no icon there, although this used to be the case.

I am not quite sure but I suspect the USB-stick to be the culprit. :thinking:

So I first detached it from the PC and then inserted it into another USB port.
Suddenly it was recognized by the system and the icon was correctly placed on the desktop. :smiley:

So I shut down the computer and did a fresh (cold) start. Now it booted perfectly and I had no problem using the mouse and keyboard. :+1:

My uptime is 2 h 20 m at the moment and I haven´t encountered any difficulties yet during this session.

Now I was able to look at the log files…

… to see whether there were any error messages I looked at “/var/log/syslog” and located the USB-stick in question and found this entry:

usb 1-1.2.4.2: device descriptor read/64, error -71

This message was followed by these ones:

reset high-speed USB device number 8 using ehci-pci 
device not accepting address 8, error -71
"OOM killer enabled
Restarting tasks

Doing some research (also with the help of ChatGPT) I found this explanation for the first entry:

The error message “usb 1-1.2.4.2: device descriptor read/64, error -71” that you found in the syslog indicates a problem with the USB device descriptor.

The device descriptor is a data structure that describes the USB device to the host operating system, and an error in this descriptor can cause the USB device
to be unrecognized or malfunction.

In this case, the error code -71 indicates a timeout error, which means that the USB device failed to respond to the
host’s request for the device descriptor within the expected time limit.
This could be caused by a hardware problem with the USB device,
such as a faulty cable or connector, or a software issue with the device driver or the operating system.

What do you think :question: Could it be that the USB-stick in question caused such massive problems during boot and after login :question:

Thanks in advance and many greetings
Rosika :slightly_smiling_face:

Hi @Rosika ,
It may be

  • faulty usb stick
  • faulty usb port
  • just a bad connection… loose or corroded. You said it was permanently plugged

So try putting it back in the original usb port. If ok it was a bad connection

Regards
Neville

3 Likes

I agree with Nev. Maybe just removing and reinserting the USB stick will polish the connector so it makes a good connection.

You might want to be sure you have a good backup for the USB sticks and a spare one to substitute just in case. Good luck.

3 Likes

Hi again, :wave:

thanks a lot to all of you for your replies. :heart:

First of all I want to tell you about a good thing: today my PC booted without any difficulties. :relieved:
The USB-stick in question is now placed in another usb-port and even with it plugged in the PC started in its usual way.

I immediately took a look at my desktop and saw the USB-stick had its icon placed on it - as would be the usual case.

Also: No problems with keyboard input and the mouse has all its functions again.

Then I took a look at the log messages regarding the boot sequence and compared them to yesterday´s output:

usb [...]: device descriptor read/64, error -71
reset high-speed USB device number 8 using ehci-pci 
device not accepting address 8, error -71
OOM killer enabled
Restarting tasks

Neither of them were present.
So it looks much better today. :blush:

@nevj :

thanks for the suggestions:

Right. I´d bet it´s this one.
I haven´t touched the stick in years. The corroded part might be it, due to higher than normal humidity perhaps.

I´ll try that. For now, however, I´m pleased it works when I put into another usb-port. :wink:

@pdecker :

Thanks. That might resolve the problem.

Yes, that´s good andvice indeed.

Fortunately I made a habit of backing up all 3 usb-sticks (grsync) once a month.
It´s part of my monthly clonezilla backup routine.
I.e.: clonezilla disk-backup for the external HDD (all 3 partitions) and grsync for the three sticks.

@all:

Well, despite (hopefully) being able to help other people to some degree (mainly friends and acquaintances) with their computer problems and keeping a cool head about it it seems to quite another thing if one is affected him- or herself. :slightly_frowning_face:

Not being able to boot my system yesterday for several times in a row I panicked to a certain degree, that I have to admit.

There are things I shouldn´t have done (in retrospect).

  • tried to restore the system to a former state ( snapshot with timeshift)
    which didn´t work as I couldn´t punch in anything with my keyboard

  • booted into a live system (Linux Mint) with ventoy . It booted (2nd or 3rd attempt) and I didn´t need the keyboard for it. Mouse worked and I could restore the PC to a former state.

  • but now I lost all of my updates since then

  • also lost diodon clipboard manager, calendar and mailutils which I had installed the day before.

At first I suspected diodon to be the culprit as this was brandnew to me. But I guess it had nothing to do with my problem. It must have been the usb stick.

Still: I cannot quite understand how an attached usb stick (faulty or otherwise corrupted) has the ability to prevent a correct boot sequence and even after a successful boot still has the force to make the keyboard and mouse not work properly… :thinking: .

Well, I think I get the OOM part…

[the] message suggests that the system has run out of memory and has activated the Out-Of-Memory killer to terminate processes and free up memory.

Oh well, at least I´ve learnt something new. :blush:

Many thanks to all of you and many greetings from Rosika. :slightly_smiling_face:

I’d suggest that the issue is with the USB port and not the stick since the stick works as expected when connected to another port (the stick working correctly when connected to a different port eliminates the stick as the source of the issue). If you plug the stick back into the original port, and it works as expected, then the issue was corrosion, not the port or stick and if the trouble returns, then I’d suspect the port is the source of the issue.

Ernie

2 Likes

Hi Rosika,

Did you not have a swap partition? Or at least a swap file?
Or are you saying it ran out of swap space, as well as physical memory? That would be unusual.

It could not be out of memory while booting from a usb drive?
You may have 2 problems

Regards
Neville

1 Like

Hi all, :wave:

@ernie :

Thanks for providing your views on the matter.

I think it must have been a case of bad connection.
Ever since I plugged the stick into another port boot works fine and I don´t get those messages (my post #1) any more.

What I did now - just to check - was putting another USB-stick (my ventoy stick) into the “problematic” port.
It seems to work fine. I checked the log files with lnav and found no errors or warning messages (see below).

Thanks for your post, Ernie. :slightly_smiling_face:

@nevj :

and

I guess that must have been the issue.

Right, I made a swapfile right after installing Linux Lite, but it´s not available at boot time.
I haven´t included it in fstab yet. I activate it manually after the system has booted with:
sudo swapon /swapfile.
So at boot time it´s just my 4 GB RAM which is available.

I hope not.
In fact I very much hope I have no problems now. :blush: .

Well, I was just wondering why a shaky USB-connection (referring to that stick) could prevent boot, as the stick theoretically has nothing to do with the boot itself.
But it seems this is the case… :thinking:

At any rate , here are the logs from attaching the ventoy stick to the port in question

They seem alright, I guess.

│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.122363] usb 1-1.2.4.2: new high-speed USB device number 15 using ehci-pci                                                               │
│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.236348] usb 1-1.2.4.2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00                                             ┤
│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.236357] usb 1-1.2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0                                                         │
│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.236361] usb 1-1.2.4.2: Product: USB DISK                                                                                                │
│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.236363] usb 1-1.2.4.2: Manufacturer: SMI Corporation                                                                                    │
│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.237496] usb-storage 1-1.2.4.2:1.0: USB Mass Storage device detected                                                                     │
│May 10 14:25:05 rosika-Lenovo-H520e kernel: [ 1158.239995] scsi host10: usb-storage 1-1.2.4.2:1.0                                                                                          │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.534573] scsi 10:0:0:0: Direct-Access     SMI      USB DISK         1100 PQ: 0 ANSI: 6                                                   │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.534956] sd 10:0:0:0: Attached scsi generic sg7 type 0                                                                                   │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.535649] sd 10:0:0:0: [sdg] 122880000 512-byte logical blocks: (62.9 GB/58.6 GiB)                                                        │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.536298] sd 10:0:0:0: [sdg] Write Protect is off                                                                                         │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.536305] sd 10:0:0:0: [sdg] Mode Sense: 43 00 00 00                                                                                      │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.537015] sd 10:0:0:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA                                        │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.548406]  sdg: sdg1 sdg2                                                                                                                 │
│May 10 14:25:07 rosika-Lenovo-H520e kernel: [ 1159.557388] sd 10:0:0:0: [sdg] Attached SCSI removable disk                                                                                 │
│May 10 14:25:18 rosika-Lenovo-H520e udisksd[820]: Mounted /dev/sdg1 at /media/rosika/ventoy on behalf of uid 1000

Thanks to you all and many greetings from Rosika :slightly_smiling_face:

That should be sufficient ram to get it booted.

1 Like

When your computer boots up, one of the things it does is to enumerate all the devices present (video adapters, hard drives, etc.). The devices that are enumerated includes any USB drives that are connected, so if a USB drive’s connection is hampered with corrosion, it may be recognized as present while remaining inaccessible (a few, but not all the pins are making contact), so the bootup process essentially gets stuck trying to enumerate the faultily connected drive so it appears to have locked up.

I hope I have made all this clear enough to be useful,

Ernie

1 Like

Hi Ernie, :wave:

ah, now I understand.

Thanks so much for this wonderful explanation. :heart:

Well, I guess it all makes sense now.

That was surely the case.

Well, I just perormed a new start (cold start) of the system with the usb-stick in question attached (in another port) and also the ventoy stick attached in the original port.
So there was even one further usb-stick attached.

The cold start went well and there were no issues in the logs.
At present I´m in the habit of checking it after each start:

 journalctl -b > veränderlich3.txt; and echo "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN" >> veränderlich3.txt; and sudo dmesg -T >> veränderlich3.txt; and cat veränderlich3.txt | grep -i -E 'reset high-speed USB device number | device not accepting address | OOM killer enabled | Restarting tasks'
rosika@rosika-Lenovo-H520e ~ [0|1]>

No suspicious entries to be found. :wink:

So at present it looks quite good.

Thanks again four your kind help, Ernie.

Many greetings.
Rosika :slightly_smiling_face:

Hi @Rosika,

More then once, a USB stick or USB disk has prevented my PC from booting. It is rare, but it does happen. Sounds like your problem has been solved. :grinning:

Have a nice day,
Howard

1 Like

Hi Howard, :wave:

thanks for letting me know. :heart:
It´s really good to know and gives me some reassurance concerning the matter.

Many greetings
Rosika :slightly_smiling_face:

Hi all, :wave:

curious thing: exactly one month later I ran into a similar problem with booting today. :slightly_frowning_face:

My main PC wouldn´t boot again. Once more it got stuck during the boot process - and again I had the usb-stick in question attached to the PC during boot.

Hmm… I guess it´s time to replace the stick after all… :neutral_face:

Well, like I said: the PC wouldn´t boot but there was still some text written to the monitor as I set
GRUB_CMDLINE_LINUX_DEFAULT="noplymouth"
in /etc/default/grub.
Otherwise I think I wouldn´t have had any clue of what was going on. :thinking:

At some point the rolling text got stuck. The only clue word my eye would catch was
“kernel panic”…

So I switched off the PC by using the hardware on/off button, removed the stick and switched it on again.

Now the boot procedure went well without any hiccups and I got a running system again. :blush:

After that I inserted the stick again and it was mounted immediately and I have access to its contents.

Although the stick this time was occupying another usb-port I ran into similar difficulties as I did one month ago. This would point to the stick itself rather than anything else, I guess.

Therefore a new stick seems to be called for.

Just an additional question:

As my initial boot attempt failed today I assume there aren´t any logs referring to the incident, right :question:

I already looked at journalctl, dmesg and syslog, neither of them covered the incident, of course.

Thanks all and many greetings from Rosika :slightly_smiling_face:

Hi Rosika,
If it gets to kernel panic, it has finished with the initramfs, and is trying to run the kernel. One of the most common causes of kernel panic is not being able to find the root filesystem. If that is the case, it has nowhere to write logfiles.

So, yes, you may not get any logs.

I think your diagnosis is correct. Get a new usb3 stick. You will enjoy the speed difference

Regards
Neville

1 Like

Hi Neville, :wave:

thanks for your feedback. :heart:

Good to know. Now I´ve learnt something new again. :blush:

And "not being able to find the root filesystem" is caused by the “faulty” usb-stick again :question:
Once again I´m amazed at what such little things can do… :thinking:

Thanks for the confirmation.

Right. Most of the currently available usb-sticks tend to be usb.3, I guess.
In my case usb.2 would do as well, as my PC only has usb.2 ports available.

Thanks so much, Neville.

Cheers from Rosika :slightly_smiling_face:

1 Like

BTW:

Yesterday evening when I was closing the current session the PC took much longer performing its shutdown process. I looked at the logs but couldn´t find anything peculiar pointing towards this fact…
Hmm… I wonder whether this would already have
been caused by the usb-stick as well… :question:

fsck
Sometimes Linux does a fsck on shutdown.
I dont know what triggers it, may be a regular thing, may be when some filesystem problem is detected.

1 Like

Ah, I see.

that might be pointing to the usb-stick.

I just checked for fsck entries in var/log/syslog. At the time of shutdown, however, there weren´t any of those entries to be found.

Never mind. It surely has to be the usb-stick…

Thanks so much for the clarification, Neville.

BTW:

I miss your old signet-picture. :neutral_face:

If you want to get your old one back: go to

  • profile
  • preferences
  • profile_picture
  • “edit” it with pencil symbol. Your old one should be there to select.

Don´t know why this is. I myself had to do it twice already.

Many greetings from Rosika :slightly_smiling_face:

Thank you Rosika.
I will edit it.
I was so irritated by that I made a topic asking why
Regards
Neville

1 Like

You´re welcome, Neville :heart:

I was irritated myself.
And curiously enough I already changed it once and after a while it was replaced by the new one again. :thinking:

So I had to do the procedure twice.

The phenomenon only started to occur after the login procedure had been changed.

Cheers from Rosika :slightly_smiling_face: