How do I browse the root file system if I want to mount a SSD?

Hi I bought this quite snazzy PI case with a mSATA adapter How to Install Raspberry Pi 4 +X857/X862/X872 Storage board+X735 power mgnt board+X857-C1 case? - YouTube . Specifically I bought this drive: https://www.amazon.co.uk/gp/product/B08439XGY1/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Now the fact that the size of the drive may seem like overkill to some aside, I set about following these instructions to change the boot order to boot from USB first, as the supplied adapter that came with the case is essentially a USB SATA adapter.

As the guide states, after formatting a microSD card with the new bootloader, the screen does indeed flash green. (I have an old screen attached with HDMI). So that part seems successful.

I then formatted the mSATA drive and installed Home Assistant OS on it, using Raspberry PI imager, which all went smoothly, then installed the drive in the case and, put the lid on and secured the whole thing together, as per the guide for the case above.

Then I booted and waited (I waited longer than normal as I assume it was looking for external volumes) and then - nada. It didn’t find any bootable external media. (By this point I of course had removed the microSD bootloader/changer to allow it to boot directly from SSD.

So my first question is, what’s the deal? I’m pretty sure I followed all the guides to the letter. My second question is that assuming no one can give a definitive answer, is there a way to browse the file system by booting from microSD and use standard Linux commands to try to find and mount the SSD drive and at least see if the system can physically mount and see the drive?

I tried all the usual linux commands, such as fdisk -l (which shows absolutely nothing, sfdisk (non functional at all) cfdisk (same) and several other common Linux commands, all to no avail as the majority of these utilities appear to simply be missing in this OS?

I get that the developers are trying to provide a simplified experience for users, but stripping out essential tools that can be used to troubleshoot these kinds of issues seems a bit much really?

I don’t mind getting down and dirty with the Linux cl, as even though it’s been many years since I did this, I accept that if you want to get anything meaningful done with Linux, it comes with the territory.

I tried installing some of these utilities with apt-get, but of course apt doesn’t work either. So is there a way first that I can install the prerequisite tools I need just to see if the full system is actually working or not? Can a Linux file system see my SSD? Is it active and if so, are there some other steps I can take to get things fully up and running?

I tried mount as in sudo mount /dev/sda1 /mnt just to have a blind stab at finding and mounting the drive to see if it could be physically mounted (of course next would be sda2 and so on), but this just gave me an error message stating that the device could not be mounted and then asks “are you root”?

So even to mount the drive I need to be root? So my final question is how do I get to be root so I can mount an external drive?

Any insights anyone can offer would be much appreciated.

As for the size of the drive, I figured I would find a use for it, maybe as a NAS, or a media server or FTP, all of which seems possible with Home Assistant OS.

It does, as does fdisk -l. But not if you are going in through one of the ssh addons. If you installed one of the ssh addons and are going in that way then none of those commands work because you’re in a docker container. You can’t do all the things you would normally do on a linux machine because you’re actually in an alpine container with a very limited set of functionality.

To do the kinds of things you want to do you need to either connect your Pi to a monitor and keyboard and sit in front of it or follow this guide to set up SSH access to the host.

Can you also link the guide you followed to get this set up? That might help to figure out what went wrong in case there’s an issue with the guide or something outdated.

I am confused. You say haos doesn’t start, then you say it doesn’t have the normal linux commands. Doesn’t make sense.

1 Like

It does make sense if you read it fully. :slightly_smiling_face: No the SSD doesn’t start. But I can boot from micoSD and interrogate the system in this way, to see what is working and what isn’t. I’m erring on the possibility of a dead SSD expansion board. (Given that I have just watched a video with a guy who complained that this had happened to him.)

I followed this guide: How to Boot Raspberry Pi 4 / 400 From a USB SSD or Flash Drive | Tom's Hardware

Why not boot the SD with debian or rapsberry pi OS then?

1 Like

I already have, since as you said, this is probably the only way to have a good poke around. But for now I’ve borrowed a monitor and am awaiting delivery of a keyboard and mouse. But my stong suspicions are of a dead expansion board. Which sucks, given that it’s probably pot luck if you’ll get a good board or not.

Let’s do it in the proper order:

  • Boot from SD with a plain linux
  • Plug your SSD
  • dmesg

The output will tell if your SSD is even recognized.

Yup, if you want to poke around HASS OS then leave a microSD wtih RaspiOS in the slot. Power off, pull the USB bridge adapter, power on, push in the USB bridge adapter, mount the SSD partitions and poke around to your heart’s content.

I use this method (ancient 2GB microSD) to enable i2c (for the Argon One M2 Case Fan utiltiy) and disable the radios in /boot/config.txt. Saves me from having to open the case or dragging a laptop to my home network rack.

Ok. Fwiw this guide looks pretty good and takes it through the imager to the HAOS parts (also recently updated so that’s good). Not sure there’s anything in there you haven’t already tried but figured I’d share.

I will caveat this saying I have not gone through these steps myself so I can’t vouch for them personally. I did have a pi4 booting from SSD over USB but it was an unsupported supervised install on raspbian and I switched to an HA Blue like a year and a half ago so I never had to try this.

So it found the drive. Now what do you suggest?



> [    1.998347]     HOME=/
> [    1.998356]     TERM=linux
> [    2.028323] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
> [    2.049458] usb 2-2: New USB device found, idVendor=174c, idProduct=0857, bcdDevice= 1.00
> [    2.049482] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
> [    2.049495] usb 2-2: Product: X857
> [    2.049507] usb 2-2: Manufacturer: SupTronics
> [    2.049520] usb 2-2: SerialNumber: 202007000080
> [    2.063908] scsi host0: uas
> [    2.065406] scsi 0:0:0:0: Direct-Access     SSD 1TB                   0    PQ: 0 ANSI: 6
> [    2.067795] sd 0:0:0:0: [sda] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB)
> [    2.067995] sd 0:0:0:0: [sda] Write Protect is off
> [    2.068012] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
> [    2.068369] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [    2.069133] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
> [    2.089593]  sda: sda1 sda2
> [    2.092882] sd 0:0:0:0: [sda] Attached SCSI disk
> [    2.199799] usb 1-1.3: new high-speed USB device number 3 using xhci_hcd
> [    2.345689] usb 1-1.3: New USB device found, idVendor=174c, idProduct=1153, bcdDevice= 0.01
> [    2.345716] usb 1-1.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
> [    2.345740] usb 1-1.3: Product: AS2115
> [    2.345763] usb 1-1.3: Manufacturer: ASMedia
> [    2.345779] usb 1-1.3: SerialNumber: 00000000000000000000
> [    2.348143] usb-storage 1-1.3:1.0: USB Mass Storage device detected
> [    2.348955] scsi host1: usb-storage 1-1.3:1.0

My instinct is now that I have a desktop it o be an idea to run the install again from my desktop using Balena Etcher as per the official guide. But it’s been about 12 years since I messed around with Linux, so I’m not at all sure how to get Etcher installed on my desktop? I tried just downloading the binary - but of course, this being Linux that didn’t work. What method should I use to do this?

At least you know the expansion board is not the issue.
Try to mount both partitions and see if they contains what they are supposed to contain.

First one is vfat and contains the /boot
Second one is ext4 (I guess) and contains all the rest.

Well that’s just weird. I used Raspberry PI Imager from here to format the SSD and install Home Assistant on it: Raspberry Pi OS – Raspberry Pi

It all went smoothly, but now CF disk is reporting it as a single partition formatted in Apple File System? (For Reference I formatted the SSD on a recent Apple laptop. I didn’t make a mistake. I followed this guide to the letter: How to Boot Raspberry Pi 4 / 400 From a USB SSD or Flash Drive | Tom's Hardware and as I said, everything reported as being successful.

But now it seems that the reason I can’t boot the SSD is because Raspberry PI Imager formatted it as an Apple File System drive?

I think I would like to try again using Balena Etcher. I’ve found a guide that says it can let you install it on Raspberry PI OS, but I’m not sure how old it is or if it’ll work.

The advantage if it does work is that this case doesn’t lend itself to simple disassembly, so it would be just like setting up a dual boot on any other desktop.

OK I followed this guide to instal Balena Etcher on l Raspbian: Balena Etcher on Raspberry Pi! - Hackster.io

But of course it doesn’t work. After unzipping the supplier Etcher version, I’m unable to do anything with it. It could be a permissions issue as I can’t even move the folder it’s in, without running into permissions issues.

I probably need to make the resulting binary executable. But as I said, it’s been over 12 years since I last used Linux and I’ve forgotten how to do that? Also should I run it by just double clicking on the binary, or do I need to run it from the cl somehow? (Again my memory doesn’t serve me well in this regard.)

Well it turns out that it’s just too much hassle to get Etcher to work on Raspbian. But I was able to install Raspberry PI Imager normally through Apt. This time cfdisk reports a much more interesting partition table on the SSD. A total of no less than 7 partitions, while leaving the vast majority of the SSD free (about 900 odd GB). But here’s the thing. I want to dual boot the SSD between Home Assistant and Raspbian. Is it safe to format the remainder of the SSD with a copy of Raspbian Using Raspberry PI imager? Will I get a dual boot entry in my bootloader if I do this? Or is there something else I need to do? I have become a little fond of Raspbian and would like to use it to brush up on my Linux skills.

I got it running. It was totally non obvious, as even after Running Raspberry PI Imager on Raspbian, the damn thing still wouldn’t boot. So I installed GParted and used this to look at the partition structure. Upon doing this I noticed that the latest version of Raspberry PI imager does not set a boot flag on the Home Assistant boot partition. So I set a boot flag on the boot partition and bingo! I can now boot Home Assistant from the internal SSD. :slight_smile: So it seems I still remember some stuff from all those years ago. :slight_smile:

But as I said previously I would like to dual boot with Raspbian if possible. Does anyone know how to make this work? Currently it’s non-working, as I have Raspbian on my SD card and Home Assistant on my SSD, but there is no boot up display showing me a list of bootable partitions to boot from? It just goes straight to SSD.

Thanks.