Has anyone seen this before? I have no logs.
Here’s what happened I had a USB disk connected to my osmc for months. The osmc was on a raspberry pi 3 if that matters and it was running fine. Then yesterday upon reboot, I get:
Waiting for root filesystem device /dev/sda1 <— This is fine
— After about a minute ----
FATAL ERROR: Could not find root filesystem device /dev/sda1 …
So then I take my USB drive from my pi and connect it to my computer and it seems fine.
Connect it back up to my pi and same thing.
OK, so I think it may be the SD card. So I reformat the SD card and not wanting to reformat the original USB drive, I use a new one, that installs osmc ok. I plug in the original disk, I didn’t power off and I can’t see it with fdisk. Nothing even in dmesg! So I plug in a new usb disk, and that is recognized.
Has anyone seen anything like this? To recap the original USB is no longer visible by the raspberry pi, but is visible when I plug it into my laptop.
Yes it gives me the waiting for root FS so I thought the SD card was fine. but I redid the SD card anyway.
But no I didn’t put root on the SD card. I guess I could’ve tried doing that from my computer.
Is your laptop running a flavor of linux? Since the USB drive should be EXT4 formatted, it won’t show properly on a Windows system.
If you are running linux, make sure that you are doing a safe disconnect before removing the drive. You may want to try running a fsck on the USB drive from the laptop, then put it back in the Pi.
What does your /boot/cmdline.txt file look like? Have you added any new USB drives lately? If you have, try removing them (or did you have several USB drives before, device names may change, even with the same drives).
Another question I should ask, is this drive self powered, or powered via USB? If so, it’s possible that the drive has aged and is drawing more current, or that the Pi’s power supply is aging and failing to supply current.
The only thing I can think of now is the USB Hub. Possibly it’s failing.
Maybe try connecting the drive directly to the Pi (and in /boot/config.txt set max_usb_current=1 if not already done). See if that helps. Or, if you have another USB hub, try that one.
And, what else is connected to the USB hub? Just the drive?
If you don’t have another hub handy, just try setting max_usb_current and try connect the drive to the Pi. If that works, then you know that the hub is the problem.
It almost certainly has to be a hardware problem - are you sure the drive is getting enough power when connected to the Pi and is spinning up correctly ?
Here is the code that checks for the presence of the drive and prints the error that you are getting:
It uses two methods to try to find the root partition - blkid, so that booting via UUID match is possible (root=UUID=23234afs867fa8e6) and as a fall back it also checks for the presence of the device node directly - /dev/sda1 in your case.
So the fact that not even a device node is being created for the partition means that either the partition table can’t be read, or the device is not being detected by the kernel at all.
If you connect a keyboard you do have access to a very limited shell when boot fails - what do you get from:
ls -al /dev/sd*
If you see /dev/sda but not /dev/sda1 then the partition table can’t be read. If you do not even see /dev/sda then the drive hardware is not being detected.
You should also be able to look at dmesg with:
dmesg | more
This should give some idea of whether the drive hardware is being detected at all and what’s going on. You could try saving dmesg to a file on the fat partition of the SD card like this: (not tested)
mount /mnt /dev/mmcblk0p1
dmesg >/mnt/dmesg.log
sync
Then upload it to paste.osmc.io and paste the link here.
Did you try booting with the hard drive being the only USB device plugged into the hub ?
DBMandrake when I said I had no logs, it’s because I can’t get any logs, because osmc does not come up.
1st time drive did not come up. (though I did hear it spin up)
2nd time with new osmc drive added original drive, no messages, device was not added.
no /dev/sd? other than a and a1 from the new drive.
I just swapped hubs and the drive still didn’t come up. either as the solo drive or as an added drive. So it probably is the drive. I still can see it when I connect it to my laptop.
Did you try booting with the hard drive being the only USB device plugged into the hub ?
yes.
This drive was working up till the day before yesterday, Sunday.
Yes but I just explained to you step by step how its possible to get a copy of dmesg after “FATAL ERROR: Could not find root filesystem device /dev/sda1 …”. Because there is a small rescue shell built into the initramfs in the kernel which will drop to a basic command line.
Yes but I just explained to you step by step how its possible to get a
copy of dmesg after “FATAL ERROR: Could not find root filesystem device
/dev/sda1 …”. Because there is a small rescue shell built into the
initramfs in the kernel which will drop to a basic command line.
I still haven’t figured out exactly why this happened, I suspect it has something to do with the USB connection to the hub. or as others have said my disk is aging and taking more power now. I connected my drive to yet another hub and it worked. but my logitech unify did not work with that hub. So the solution I came up with is ugly but it works. I have my old hub with my unify. and my new hub with my hd connected. The upshot of all this is now I have more usb ports than I can shake a stick at.
Possibly of interest:
In the last 6 months I’ve had 3 sets of hardware interfacing HDDs to usb change in a manner which rendered them useless for certain purposes. Usually I could find hardware which could read the drive, but had to change it because it was only Windows which could read them.
Derek