whiteshepherd
Posts: 80
Joined: Thu Nov 03, 2011 7:59 pm

Pi0W not accepting SSD hard drive expanded partition?

Sat Nov 24, 2018 1:27 pm

I have a Raspberry Pi zero W and want to use it as a wireless server (to replace my original first gen Pi).

So for reliability over the standard SD card I bought a brand new Toshiba SSD 240GB drive which I have plugged into a sata to USB adapter to hold the root partition.

I have everything plugged into my powered USB hub which works fine. I booted Rasbian STRETCH off the sd card and it booted perfectly %100 off the SD card.

I copied the partitions over to the SSD and changed cmdline.txt on the boot partition on the SD card from "root=PARTUUID=7ee80803-02" to "root=/dev/sda2" and it boots perfectly off of the SSD hard drive letting me update and run all my programs.

I then shut down and plugged the SATA 2 USB into my up to date Ubuntu PC. Using gparted I expand the EXT4 file system to use the remaining free space (230+ GB). This works fine and there are no errors on the file system.

However when I plug the adapter back into my powered hub and plug it in the Pi Zero W will not boot at all. I can reflash the SSD to the original partition size and it boots again fine off the SSD using the Pi0W. But I cannot expand the file system without it locking. Is there something I am missing? I feel like I'm close to having my server done. But no luck yet. :(
Last edited by whiteshepherd on Sat Nov 24, 2018 5:20 pm, edited 1 time in total.

Ernst
Posts: 1333
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: SSD hard drive booting strange?

Sat Nov 24, 2018 2:11 pm

You must have done something very badly wrong to be able to boot a Pi0W using an HDD !

"USB boot is available on the Raspberry Pi 3 models only"

https://www.raspberrypi.org/documentati ... des/msd.md

@jamesh: This article may need an update because it mentions Pi3 and Pi3+ without "B" and "A".
The road to insanity is paved with static ip addresses

DirkS
Posts: 10348
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: SSD hard drive booting strange?

Sat Nov 24, 2018 2:21 pm

Ernst wrote:
Sat Nov 24, 2018 2:11 pm
You must have done something very badly wrong to be able to boot a Pi0W using an HDD !
If you read carefully (not easy since OP decided to use minimal formatting, resulting in some very dense text) you will see that OP boots from the SD card (boot partition is on the SD card). Only the root filesystem is on the SSD. Works on any Pi.

DirkS
Posts: 10348
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: SSD hard drive booting strange?

Sat Nov 24, 2018 2:26 pm

whiteshepherd wrote:
Sat Nov 24, 2018 1:27 pm
I then shut down and plug the SATA 2 USB into my up to date Ubuntu PC and using gparted I expand the EXT4 file system to use the remaining free space (230+ GB).
My guess is that the this changes the partition table in a way that the Pi doesn't like.
Can you post the tables before and after?
Use e.g. 'sudo fdisk -l drive-id' (where drive-id is the device name for your SSD like /dev/sda)

Ernst
Posts: 1333
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: SSD hard drive booting strange?

Sat Nov 24, 2018 3:42 pm

DirkS wrote:
Sat Nov 24, 2018 2:21 pm
Ernst wrote:
Sat Nov 24, 2018 2:11 pm
You must have done something very badly wrong to be able to boot a Pi0W using an HDD !
If you read carefully (not easy since OP decided to use minimal formatting, resulting in some very dense text) you will see that OP boots from the SD card (boot partition is on the SD card). Only the root filesystem is on the SSD. Works on any Pi.
Not only minimal formatting, the subject line does not make it better.
The road to insanity is paved with static ip addresses

whiteshepherd
Posts: 80
Joined: Thu Nov 03, 2011 7:59 pm

Re: SSD hard drive booting strange?

Sat Nov 24, 2018 5:29 pm

DirkS wrote:
Sat Nov 24, 2018 2:26 pm
whiteshepherd wrote:
Sat Nov 24, 2018 1:27 pm
I then shut down and plug the SATA 2 USB into my up to date Ubuntu PC and using gparted I expand the EXT4 file system to use the remaining free space (230+ GB).
My guess is that the this changes the partition table in a way that the Pi doesn't like.
Can you post the tables before and after?
Use e.g. 'sudo fdisk -l drive-id' (where drive-id is the device name for your SSD like /dev/sda)
I plugged in my SSD with adapter into my Ubuntu PC and typed your fdisk -l /dev/sdc (it's sda on the Pi).
Device Boot Start End Sectors Size Id Type
/dev/sdc1 8192 98045 89854 43,9M c W95 FAT32 (LBA)
/dev/sdc2 98304 468860927 468762624 223,5G 83 Linux

I also ran a ext4 check on the file system of /dev/sdc2 and got no errors.

Since people were complaining I also redid my original post to try and make it easier to read?

DirkS
Posts: 10348
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pi0W not accepting SSD hard drive expanded partition?

Sat Nov 24, 2018 6:24 pm

I actually would like to see the complete output. not just the last 2 lines...

User avatar
DarkPlatinum
Posts: 867
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website YouTube

Re: Pi0W not accepting SSD hard drive expanded partition?

Sat Nov 24, 2018 7:16 pm

Did you try expanding the fs in the raspi-config menu?
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): https://html.dynu.net

whiteshepherd
Posts: 80
Joined: Thu Nov 03, 2011 7:59 pm

Re: Pi0W not accepting SSD hard drive expanded partition?

Sat Nov 24, 2018 10:24 pm

raspi-config will not resize if it is not the sdcard.

I finally got it working!

First I noticed errors building on the USB 3 ports so I was using the USB 2 ports. No errors reported by the file system but no booting.

After trying all day different attempts and no success, I finally remade a bootable partition on the SSD and plugged it into my sata port on my motherboard bypassing the USB adapter all together.

I then used gparted and resized the rootfs partition on the SSD and then shut down. I reconnected the SSD to my sata to USB adapter and plugged it into my Pi0W. Success! It booted fine off the SSD. There may of been some problem partitioning with the USB adapter? But there were no errors when I did a check of the file system.

It works now so I plan to dd backup all partitions to prevent future headache!

User avatar
HawaiianPi
Posts: 5718
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi0W not accepting SSD hard drive expanded partition?

Sun Nov 25, 2018 7:59 am

You really did that the hard way. Have you not read the documentation on USB booting?

To USB boot a model that doesn't support direct USB booting you just need to put Raspbian on the USB drive and 1 file on the SD card.

  1. Write a Raspbian image to your USB drive using Etcher.
  2. Format an SD card with the FAT32 filesystem.
  3. Copy the bootcode.bin file from the "boot" partition of the USB drive to the SD card (you can also download it here: bootcode.bin).
  4. Insert the bootcode.bin only SD card into your Pi.
  5. Connect the Raspbian imaged USB drive.
  6. Power it up, and away she goes. :D

When done this way the auto-resize script works. The system will boot, resize and reboot (just like it would when booting from an SD card).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

whiteshepherd
Posts: 80
Joined: Thu Nov 03, 2011 7:59 pm

Re: Pi0W not accepting SSD hard drive expanded partition?

Wed Nov 28, 2018 9:25 am

I did try the bootcode.bin file first. However the Raspberry Pi0W failed to boot at all (not sure why).

User avatar
HawaiianPi
Posts: 5718
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi0W not accepting SSD hard drive expanded partition?

Wed Nov 28, 2018 10:22 am

whiteshepherd wrote:
Wed Nov 28, 2018 9:25 am
I did try the bootcode.bin file first. However the Raspberry Pi0W failed to boot at all (not sure why).
Odd, that works for me (just double checked it on my Pi Zero W).

Did you have more than one USB drive attached? Last time I played with this, bootcode.bin only attempted to boot the first drive it found, and with multiple USB drives there is no way to guarantee it will be your boot drive.

What else do you have attached to your USB hub?

Could also be compatibility, which USB-SATA adapter are you using?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Beginners”