LTolledo
Posts: 2124
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 8:57 am

blacktek wrote: What do you mean for "USB device with a NOOBS installed Raspbian" ?
NOOBS is an OS installer, not an operating system derivative.

the statement meant:
Installing Raspbian (in your case Raspbian Lite) to a USB device (thumdrive, HDD, or SSD) using NOOBS installer

follow the procedure in the link below (for installing to SSD)
https://www.raspberrypi.org/documentati ... /README.md
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 9:14 am

ok tnx

So if NOOBS is an installer what problem it causes with boot? at the end the OS is the same, right? (just to understand) :)

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

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 11:02 am

blacktek wrote:
Thu Nov 15, 2018 9:14 am
ok tnx

So if NOOBS is an installer what problem it causes with boot? at the end the OS is the same, right? (just to understand) :)
NOOBS acts as a boot loader to start Raspbian, but it doesn't get get upgraded when you update Raspbian, so it gets out of date over time.

For example, when the new Pi 3B+ was released earlier this year, those who had image installed Raspbian Stretch could just use their older Pi to upgrade to the latest version with the new kernel and firmware (sudo apt update && sudo apt full-upgrade -y). That didn't work with NOOBS installed Raspbian. With NOOBS you had to upgrade Raspbian, and then manually download the new NOOBS, extract it and copy it to the card.

NOOBS also has a more complicated partition scheme, which is more of a headache to configure and troubleshoot in special use cases (like USB boot). It can be made to work with USB boot, but it's just simpler to install Raspbian directly from an image.

And then there's the large chunk of space NOOBS reserves for itself that you can't use...

The main advantage of NOOBS is the recovery mode that will let you reinstall Raspbian from the Pi itself (no need to pull the card and re-image it with another computer). While I can see how that may be an advantage for some, I feel NOOBS causes more problems than it solves, especially now that we have Etcher, which makes writing images easy and nearly fool-proof.
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?

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 11:14 am

thank you HawaiianPi for your extensive explanation :)

so at the end you suggest to get rid of NOOBS and install Stretch from scratch, right?

it will require a long to reinstall all the softwares, crontabs, packages, php, mysql, apache, configurations, mqtt, .... :(:(:(

I use the raspi as the core of my house to control heat pump, termoregulation, ventilation and many other things. As I heavily use the DB (Mysql) I would just have a more reliable storage solution. SD cards don't last too much

LTolledo
Posts: 2124
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 11:33 am

blacktek wrote: it will require a long to reinstall all the softwares, crontabs, packages, php, mysql, apache, configurations, mqtt, .... :(:(

I use the raspi as the core of my house to control heat pump, termoregulation, ventilation and many other things. As I heavily use the DB (Mysql) I would just have a more reliable storage solution. SD cards don't last too much
because of your current predicament the "export out of NOOBS" might be better than a fresh install and re-install of all packages/apps and its configurations.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 11:38 am

ok now I got it and understand what you meant.

I'll do this

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 5:24 pm

I've read again the guide you provided here https://www.makeuseof.com/tag/make-rasp ... -boot-usb/

I think that in this guide there is something risky that could not work perfectly, and is the rsync step:
sudo rsync -ax --progress / /boot /mnt/target

This rsync will run on the live filesystem, this is usually not recommended. It would be better to start the raspi in runlevel 0 (if possible like with normal distro) and run the rsync from a readonly partition.

What do you think?

LTolledo
Posts: 2124
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 10:05 pm

I've used the procedure at least 3 times without any problems if followed properly. One of the result is with this RPi3B+ that am currently using to write to this forum. This system was originally a NOOBS installed Raspbian Jessie with Pixel, upgraded to Raspbian Stretch with Desktop.

Back then I too had uncertainties that that procedure might not work on a live system. As a precaution I first made a backup image of the original microSD (made 2 backups actually)

on every try, I followed the procedure step by step, reading each step twice and confirming the command line input twice before pressing [ENTER] button. Also compare the terminal output from the guide.

at one time I inadvertently skipped a step in the make directory part, realized it on the rsync part. reformatted the target drive and restarted again.
and it went well afterwards.

gaining confidence on the procedure, I've exported all my NOOBS installed raspbians to "clean image" raspbian. MicroSD to USB thumbdrive or microSD to microSD (in USB to microSD adaptor)

After doing the steps, I've never made a new install using the NOOBS installer ever again, as all my new installs were done using image install via Etcher.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 15, 2018 10:34 pm

all the steps are fine. Only the rsync is dangerous because could create some inconsitencies. Eg if you've mysql updating the index files while rsync is running those files on the live system will be corrupted (just an example).

The only way to "reliable" copy OS files is to have them readonly and copy them when they are not modified. I think it's quite obvious.

Of course on normal boards without very active services the problems are not many. I just write this to not give false hopes that the procedure is correct and reliable. It can work if the file copied are not modified during the copy ;)

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Wed Nov 21, 2018 4:25 pm

today I received the new SSD (a Crucial MX500) and the SD image was not booting from there too.

After I copied a plain raspberry stretch image (witout NOOBS) it worked. So the problem 99% is noobs.
As soon as I can I'll try to extract out the image from NOOBS following the instructions

Is there a quick way to boot the raspi in runlevel 0 in order to make filecopy using a RO filesystem?

Is it possible to copy the files from windows too and I run rsync from cygwin? so the FS is not mounted.

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 22, 2018 3:45 pm

after exporting out the NOOBS everything works "quite" properly, but not 100% reliable

Very often the raspi boots and sometimes it hangs at rainbow screen (and sometimes before).

I tried adding rootdelay=5 to cmdline, but with no luck:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=5

is it possible that sometimes the external ssd boots with sdb instead of sda and in this case boot doesn't work?

I tried with no luck to set UUID or PARTUUID in cmdline and fstab, but with no luck; I wasn't able to boot at all.

pi@raspi:~ $ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=5

pi@raspi:~ $ cat /etc/fstab
proc /proc proc defaults 0 0
/dev/sda1 /boot vfat defaults 0 2
/dev/sda2 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that

pi@raspi:~ $ sudo blkid
/dev/sda1: LABEL="BOOT" UUID="527C-D2B3" TYPE="vfat" PARTUUID="43be32d2-01"
/dev/sda2: UUID="548ae2ae-e0cf-44a2-9f41-a9810db797b1" TYPE="ext4" PARTUUID="43be32d2-02"

on this forum I've read some topis about raspi not able to boot using UUID or PARTUUID. Do you have any idea? this ssd is a nightmare :(

not sure anyway that random hangs at boot are due to ssd changing /sdX

Tnx again

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

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 22, 2018 5:19 pm

blacktek wrote:
Thu Nov 22, 2018 3:45 pm
is it possible that sometimes the external ssd boots with sdb instead of sda and in this case boot doesn't work?
Yes, that's very possible (and even likely) if you have more than one USB storage device connected. Try it without any other USB drives.

I tried with no luck to set UUID or PARTUUID in cmdline and fstab, but with no luck; I wasn't able to boot at all.
Raspbian now uses PARTUUID by default, so it does work.

Try the following command.

Code: Select all

ls -l /dev/disk/by-partuuid
The output should look something like:

Code: Select all

lrwxrwxrwx 1 root root 10 Nov 18 18:40 a1b2c3d4-01 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 18 18:40 a1b2c3d4-02 -> ../../sda2
Note the -01 and -02 at the end of the PARTUUID.

The /etc/fstab file should look similar to this.

Code: Select all

proc                  /proc     proc    defaults          0       0
PARTUUID=a1b2c3d4-01  /boot     vfat    defaults          0       2
PARTUUID=a1b2c3d4-02  /         ext4    defaults,noatime  0       1
And cmdline.txt should point to the root filesystem on the -02 partition (root=PARTUUID=a1b2c3d4-02).


If you still have trouble, bring me up to date. What is your current hardware configuration?
  • Pi model?
  • Power supply model and specs?
  • USB-SATA adapter model?
  • SSD model?
  • Any other USB devices, other than the SSD?
  • Are you using Raspbian Stretch (or is it an older version like Jessie/Wheezy)?
  • And is it the Lite or Desktop version?
  • Also, have you fully updated it (sudo apt update && sudo apt full-upgrade -y)?
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?

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Fri Nov 23, 2018 8:16 am

HawaiianPi wrote:
Thu Nov 22, 2018 5:19 pm
blacktek wrote:
Thu Nov 22, 2018 3:45 pm
is it possible that sometimes the external ssd boots with sdb instead of sda and in this case boot doesn't work?
Yes, that's very possible (and even likely) if you have more than one USB storage device connected. Try it without any other USB drives.
I was trying with just 1 usb device
I tried with no luck to set UUID or PARTUUID in cmdline and fstab, but with no luck; I wasn't able to boot at all.
Raspbian now uses PARTUUID by default, so it does work.

Try the following command.

Code: Select all

ls -l /dev/disk/by-partuuid
The output should look something like:

Code: Select all

lrwxrwxrwx 1 root root 10 Nov 18 18:40 a1b2c3d4-01 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 18 18:40 a1b2c3d4-02 -> ../../sda2
Note the -01 and -02 at the end of the PARTUUID.

The /etc/fstab file should look similar to this.

Code: Select all

proc                  /proc     proc    defaults          0       0
PARTUUID=a1b2c3d4-01  /boot     vfat    defaults          0       2
PARTUUID=a1b2c3d4-02  /         ext4    defaults,noatime  0       1
And cmdline.txt should point to the root filesystem on the -02 partition (root=PARTUUID=a1b2c3d4-02).
this is exactly what I did. Both with UUID and PARTUUID

On another forum I read that PARTUUID was deprecated and better to use UUID :O

Many times when I was doing such tests the boot was hanging here:

[ 4.349177] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.357408] sda: sda1 sda2
[ 4.365528] sd 0:0:0:0: [sda] Attached SCSI disk
<<<<<<< HANGING >>>>>>>>>
[ 6.393052] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts:(null)

But probably some of the tests failed due to the other issue below.
If you still have trouble, bring me up to date. What is your current hardware configuration?
  • Pi model?
  • Power supply model and specs?
  • USB-SATA adapter model?
  • SSD model?
  • Any other USB devices, other than the SSD?
  • Are you using Raspbian Stretch (or is it an older version like Jessie/Wheezy)?
  • And is it the Lite or Desktop version?
  • Also, have you fully updated it (sudo apt update && sudo apt full-upgrade -y)?
- raspberry Pi3b
- power supply Vilros 2A
- ssd adapter: https://www.inateck.com/it/inateck-ua10 ... apter.html
- none at the moment
- I'm using raspbian Jessie Lite (no desktop) - os: Linux raspi 4.14.82-v7+ #1165
- I updated with rpi-update
with "sudo apt update" I get:
75 packages can be upgraded. Run 'apt list --upgradable' to see them.
while with "sudo apt-get update" it says everything is updated, why?

Not done the full upgrade because I remember something was not working properly on latest sw (perhaps some issues with mosquitto websockets)

Now at the last attempt I see that it hanged at the rainbow screen and the green led is flashing quickly 7 times (it should mean kernel.img not found).

It seems that if in cmdline.txt I put rootdelay=2 instead of rootdelay=5 works a little better, it fails far less.

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Fri Nov 23, 2018 9:47 am

now performed a full upgrade too, but nothing changed :/ I still have some random hangs

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

Re: Unable to Boot RPI 3B from SSD disk

Sun Nov 25, 2018 8:42 am

The rpi-update command installs the (possibly buggy and unstable) testing branch firmware.

Try it with one of the latest Raspbian Stretch images: https://www.raspberrypi.org/downloads/raspbian/

Write the image directly to your USB drive with Etcher from the .zip download (do not extract the image).
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?

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Sun Nov 25, 2018 8:55 am

installing new os from scratch is not an option because in this case I would have to reinstall tons of software and packages :(

I did rpi-update just because recommended on many software; now I understand that this is not the best option.

isn't there a way to debub why sometimes it's not booting? (quite random). Sometimes 10 reboots in a row work with no problems.

Is there a way to upgrade from Jessie to stretch without restarting from scratch? (not possible with CentOS I've on other (real) servers)

Tnx

k-pi
Posts: 930
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: Unable to Boot RPI 3B from SSD disk

Sun Nov 25, 2018 3:19 pm

The usual proceedure on (pure) Debian is
apt-get update
apt-get upgrade
apt-get dist-upgrade
(Raspbian is based on Debian.)

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Sun Nov 25, 2018 5:35 pm

not needed the extra steps I read here?
https://linuxconfig.org/raspbian-gnu-li ... -stretch-9

Anyway before upgrading is there another way to debug why every once in a while my raspi hangs at boot?

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Mon Nov 26, 2018 8:06 am

nothing happens with simply dist-upgrade:

pi@raspi:~ $ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
pix-icons pix-plym-splash pixel-wallpaper
Use 'apt-get autoremove' to remove them.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Should I follow the guide I posted before?

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Mon Nov 26, 2018 9:30 am

upgraded now to stretch

pi@raspi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspi:~ $
pi@raspi:~ $
pi@raspi:~ $
pi@raspi:~ $
pi@raspi:~ $ uname -a
Linux raspi 4.14.82-v7+ #1165 SMP Wed Nov 21 16:42:28 GMT 2018 armv7l GNU/Linux

let me do 20/30 reboots to see if it works now.

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Mon Nov 26, 2018 9:41 am

just now a boot failed now with Stretch too :(

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Thu Nov 29, 2018 7:11 am

Hi, no help/suggestions on how to debug this issue? :cry:

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Fri Nov 30, 2018 10:36 pm

this random boot problem could be caused by sata / usb controller?

Until I don't solve this issue I can't use in production. In case of failed boot is there any log I can see somewhere? I don't think as it's before partition mount, right?

I see many other people (eg https://github.com/raspberrypi/firmware/issues/968) have random problems with reboots from usb

any help is really appreciated

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Tue Dec 04, 2018 8:20 am

Hello,
this morning I've tried replacing the 2A power supply with a Vilros 3A power supply, but nothing changed.
Sometimes it hangs before the rainbow screem (so bootloader non loaded), sometimes after and sometimes work (most of the time it works).

The sata adapter has asm1153E on board, it should be a reliable chipset. With the previous ssd (a SUNDISK) problems were the same; now I'm using a Crucial MX500.

Do you have any idea on how to debug this? would a serial console help? (I don't have one)

blacktek
Posts: 68
Joined: Wed Jul 06, 2016 9:36 am

Re: Unable to Boot RPI 3B from SSD disk

Mon Dec 10, 2018 10:34 pm

no ideas? is this a firmware bug?

Return to “Advanced users”