External disk with the pi 4, anyone

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm having a hard time finding the information I want , so I ask here:

Has anyone had success using an external disk with the pi 4, and  
preferably booting from it.

The other option I thought about was to put some other version of Linux  
on it, ubuntu?, but using etcher in linux doesn't do it, as it's an iso.

Thanks

Re: External disk with the pi 4, anyone
On 07/11/2019 12:52, RobH wrote:
Quoted text here. Click to load it

Not a Pi4 but I have Pi3+s booting from SD card (holding only the /boot  
partition) and 128/256Gb SSD (mSATA in mSATA to USB3 adapter) as root.  
Quite easy if you follow the instructions.
I never had much luck booting directly from the USB SSD, hence the above  
arrangement.


--  

Chris Elvidge, England

Enal disk wik with the pi 4, anyone
Hello Chris!

Thursday November 07 2019 13:10, you wrote to RobH:

 > On 07/11/2019 12:52, RobH wrote:
 >> I'm having a hard time finding the information I want , so I ask
 >> here:
 >>
 >> Has anyone had success using an external disk with the pi 4, and
 >> preferably booting from it.
 >>
 >> The other option I thought about was to put some other version of
 >> Linux on it, ubuntu?, but using etcher in linux doesn't do it, as
 >> it's an iso.
 >>
 >> Thanks

 > Not a Pi4 but I have Pi3+s booting from SD card (holding only the
 > /boot partition) and 128/256Gb SSD (mSATA in mSATA to USB3 adapter) as
 > root. Quite easy if you follow the instructions. I never had much luck
 > booting directly from the USB SSD, hence the above arrangement.

 > --
 > Chris Elvidge, England


I use a 3B+ sitting in a x830 box and card with a 1TB dasd .
The drive has the Rasbian installed and it powers up, boots to the the USB  
drive.

Every thing works - so far but I do not run it daily just as a when as I use a  
server system for day to day
development and other activities such as BBS, FTP, SQL, Apache, IBM m/f server  
or services.
This hold a lot of dasd unit giving over 10+ TB storage all in 16GB Ram with a  
modular PSU so it is light on
power needs but a Pi is a heck of a lot less :)

Did want to get a Pi4 but will not fit into the current X830 case so will wait  
until a revised X830 combo
comes out.



Vince


Re: Enal disk wik with the pi 4, anyone
On 07/11/2019 00:56, Vince Coen wrote:
Quoted text here. Click to load it
Thnks, and are there any simple instructions for doing that for a simple  
lad like me.

Re: Enal disk wik with the pi 4, anyone
On 07/11/2019 15:44, RobH wrote:
Quoted text here. Click to load it

Install Raspbian (other OSs are available) onto SD card as usual. Update  
as necessary.
Format external drive. Include a swap partition, root partition plus any  
extra ones required.

Make a note of UUID/PARTUUID of the new root (and swap if used)  
partition. (see "man blkid"). Mount the new root partition on (say) /mnt  
and then
rsync -avx / /mnt to get the OS onto the usb drive.

You now need to change the cmdline.txt file on the SD card boot  
partition to add to the root= parameter. Make a copy before you edit  
this file. Should look something like this:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1  
root=PARTUUID=5cf6b9c2-9894-cd47-933e-ad3840ae4e5c rootfstype=btrfs  
elevator=deadline fsck.repair=yes rootwait quiet splash  
plymouth.ignore-serial-consoles net.ifnames=0 biosdevname=0  
usbhid.mousepoll=0

Note the PARTUUID is the one you remember from your note above. (You can  
use the UUID instead, though; root=UUID=uuidfromabove). net.ifnames=0  
and biosdevname=0 makes the ethernet and wireless ports revert to eth0  
and wlan0. usbhid.mousepoll=0 compensates for a USB mouse on my system.
Commands in cmdline.txt must be all one line, and only on one line.  
Remove any blank lines in the file.

Now edit /etc/fstab on the NEW root partition (/mnt/).
If there is an entry for /dev/mmcblk0p2 on /, change the /dev/mmcblk0p2  
to UUID=theuuidfromabove. If not OK, it'll find it from the cmdline.txt  
file.
Put a new entry:
/dev/mmcbl0p2 /mnt/oldroot ext4 noauto,defaults 0 0
(and remember to make directory /mnt/oldroot AFTER unmounting the new  
root partition). This will stop your old root being mounted at boot.  
(You can still mount it with mounr /mnt/oldroot, if necessary.)

Add an entry for swap if using a partition.

umount /mnt; mkdir /mnt/oldroot

Reboot and keep your fingers crossed.

I don't think I've left anything out!!

If it fails, take out the SD card and revert the cmdline.txt file in  
another computer. It's on a vfat partition so a Windows PC can read it, too.
Put it back and reboot. Check all the above. If it still fails, note the  
errors and come back.

Good luck

--  

Chris Elvidge, England

Re: Enal disk wik with the pi 4, anyone
On 07/11/2019 16:36, Chris Elvidge wrote:
Quoted text here. Click to load it












Quoted text here. Click to load it


Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it


Quoted text here. Click to load it

I've made a root partition, as  well as a swap partition on a spinning  
160Gb disk.

This is my present cmdline.txt file before any changes, and it looks a  
bit different than new or changed line. Does it matter.

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1  
root=PARTUUID=4eae5394-02 rootfstype=ext4 elevator=deadline  
fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles


Re: Enal disk wik with the pi 4, anyone
On 08/11/2019 20:13, RobH wrote:
Quoted text here. Click to load it

The root=PARTUUID= bit refers to the second partition on your SD card.  
Use blkid to find the PARTUUID or UUID of what will become the root  
partition on the HDD. Change 4eae5394-02 to whatever you found from the  
blkid command. If you have no PARTUUID on the HDD, use the UUID and  
change root=PARTUUID= to root=UUID=
net.ifnames=0 and biosdevname=0 are only needed if you want to refer to  
your network interfaces as eth0 and wlan0
usbhid.mousepoll=0 compensates for a mouse connected over a wireless USB  
connection (dongle). A bluetooth mouse doesn't need it. Wired USB mouse  
may or may not. If you get lag, try it.


--  

Chris Elvidge, England

Edisk wik wik with the pi 4, anyone
Hello RobH!

Thursday November 07 2019 15:44, you wrote to me:

 > On 07/11/2019 00:56, Vince Coen wrote:
 >> Hello Chris!
 >>
 >> Thursday November 07 2019 13:10, you wrote to RobH:
 >>
 >>   > On 07/11/2019 12:52, RobH wrote:
 >>   >> I'm having a hard time finding the information I want , so I
 >> ask
 >>   >> here:
 >>   >>
 >>   >> Has anyone had success using an external disk with the pi 4,
 >> and
 >>   >> preferably booting from it.
 >>   >>
 >>   >> The other option I thought about was to put some other version
 >> of
 >>   >> Linux on it, ubuntu?, but using etcher in linux doesn't do it,
 >> as
 >>   >> it's an iso.
 >>   >>
 >>   >> Thanks
 >>
 >>   > Not a Pi4 but I have Pi3+s booting from SD card (holding only
 >> the
 >>   > /boot partition) and 128/256Gb SSD (mSATA in mSATA to USB3
 >> adapter) as
 >>   > root. Quite easy if you follow the instructions. I never had
 >> much luck
 >>   > booting directly from the USB SSD, hence the above arrangement.
 >>
 >>   > --
 >>   > Chris Elvidge, England
 >>
 >>
 >> I use a 3B+ sitting in a x830 box and card with a 1TB dasd .
 >> The drive has the Rasbian installed and it powers up, boots to the
 >> the USB drive.
 >>
 >> Every thing works - so far but I do not run it daily just as a when
 >> as I use a server system for day to day development and other
 >> activities such as BBS, FTP, SQL, Apache, IBM m/f server or
 >> services. This hold a lot of dasd unit giving over 10+ TB storage
 >> all in 16GB Ram with a modular PSU so it is light on power needs but
 >> a Pi is a heck of a lot less :)
 >>
 >> Did want to get a Pi4 but will not fit into the current X830 case so
 >> will wait until a revised X830 combo comes out.
 >>
 >>
 >>
 >> Vince
 >>
 > Thnks, and are there any simple instructions for doing that for a
 > simple lad like me.

Using the x830 it is simply a matter for using the s/w Ercher (spelling ? )  
with the USB DASD loaded to copy
over the iso Rasp image to the drive as I did not find an easy solution for  
copying the SD card to the
drive.

Once done then remove the SD card and turn on - it will boot to the USB drive  
which is quicker than using a
SD card and more realiable.

That said another poster has said that there is a problem with the bootloader  
in the pi 4 that does not allow
this at the moment and here is the details of the current state of play with  
it (Bootloader EEPROM) :


-!-   From url  
https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware/release-notes.md
  TODAY.

Raspberry Pi4 bootloader EEPROM release notes
2019-10-17 - rpi-eeprom-update + recovery.bin

* New beta recovery.bin which can update the VLI EEPROM before
  start.elf is loaded. This is the recommended and default method
  because no USB devices will be in use at this stage.
* Extend the USE_FLASHROM configuration to use the vl805 tool
  to program the VL805 directly.
* Generate SHA256 checksums in .sig files for the bootloader and
  and VL805 images. This is required by the new recovery.bin to
  guard against corrupted files being flashed to the EEPROM(s).
* Various variable renames to distinguish between the bootloader
  and the VL805 images.

2019-10-16 - Git 18472066 (BETA)

    Ignore trailing characters when parsing in PXE boot menu option.
    Improve error handling with unformatted sd-cards.

2019-10-08 - Git 26dd3686c (BETA)

    TFTP now uses RFC2348 blksize option to get 1024 byte blocks if the server  
supports it.
    Fix DHCP handling of SI_ADDR
    TFTP_PREFIX and TFTP_PREFIX_STR options for mac-address or string literal  
prefix.
    Improved support for standard capacity and SDv1 cards.

2019-09-25 - Git 4d9824321 (BETA)

    Increase TFTP timeout to 30s as default & bootconf.txt
    Fix intermittent boot freeze/slowdown issue after loading start.elf
    Don't load start.elf during network boot if start4.elf exists but the  
download times out.

2019-09-23 - Git c67e8bb3 (BETA)

    Add support for network boot
    Configurable ordering for boot modes (BOOT_ORDER and SD/NET_BOOT retries)

2019-09-10 - Git f626c772

    Configure ethernet RGMII pins at power on. This is a minor change which  
which may improve reliability of
ethernet for some users.

2019-09-05 - Git d8189ed4 - (BETA)

    Update SDRAM setup to reduce power consumption.

2019-07-15 - Git 514670a2

    Turn green LED activity off on halt.
    Pad embedded config file with spaces for easier editing by end users.
    Halt now behaves the same as earlier Pi models to improve power behavior  
at halt for HATs.
    WAKE_ON_GPIO now defaults to 1 in the EEPROM config file.
    POWER_OFF_ON_HALT setting added defaulting to zero. Set this to 1 to  
restore the behavior where 'sudo
halt' powers off all PMIC output.
    If WAKE_ON_GPIO=1 then POWER_OFF_ON_HALT is ignored.
    Load start4db.elf / fixup4db.dat in preference to start_db.elf /  
fixup_db.dat on Pi4.
    Embed BUILD_TIMESTAMP in the EEPROM image to assist version checking.

2019-05-10 - Git d2402c53 (RC2.1)

    First production version.
-!-

Look like I will wait some what longer for this to be fixed before I consider  
getting the newer Pi as in 5
months not a lot has happened on this front.


Vince


Re: Enal disk wik with the pi 4, anyone
Vince Coen wrote:

Quoted text here. Click to load it

Yes, but last I checked, the 4B was waiting for a firmware upgrade to  
let it boot from something *other* than an SD card

<https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md

Re: Enal disk wik with the pi 4, anyone
On 07/11/2019 16:04, Andy Burns wrote:
Quoted text here. Click to load it

Interesting if it's all been done already!

The thing about a firmware update is that it could be a crib into
getting hold of the instruction set architecture of the video processor.


Re: Enal disk wik with the pi 4, anyone
On 07/11/2019 16:04, Andy Burns wrote:
Quoted text here. Click to load it

 From my searches, back in July , it couldn't be done with a pi 4, but  
in October, there's a youtube video showing how to add a ssd for a NAS  
drive on the Pi 4, but no actual instuctions for getting it to either  
boot or work. The person doing the video is using OpenMediaVault for the  
NAS storage, which is not what I want.

Re: Enal disk wik with the pi 4, anyone
RobH wrote:

Quoted text here. Click to load it

Accessing a USB drive is one thing, booting from it is something else, I  
assume the page I linked to will be updated when it's possible.

Edisk wik wik with the pi 4, anyone
Hello Andy!

Thursday November 07 2019 16:04, you wrote to me:

 > Vince Coen wrote:

 >> I use a 3B+ sitting in a x830 box and card with a 1TB dasd .
 >> The drive has the Rasbian installed and it powers up, boots to the
 >> the USB drive.

 > Yes, but last I checked, the 4B was waiting for a firmware upgrade to
 > let it boot from something *other* than an SD card

 > <https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmo
 > des/msd.md>


See my previous post to RobH.

Vince


Re: Enal disk wik with the pi 4, anyone
Quoted text here. Click to load it

I do not quite see the advantage of booting from USB harddisk.
I like the SDcard, if it ever fails (so far after years none have on any of my raspies),
then I have backup images of the cards on a PC harddisk.
I make backup images of the cards after every major change.
If a card was to fail then just write a new card, put it in the Pi, works again.
FYI I have dropped a harddisk, big data loss.
I have dropped several SDcards, no problem ;-)


Also booting from SDcard is faster?



Re: Enal disk wik with the pi 4, anyone
On 08/11/2019 08:38, Jan Panteltje wrote:
Quoted text here. Click to load it

USB drives are far faster, and more reliable.

If you haven't had an SD card fail, you really aren't using the Pi very  
much.

---druck


Re: Enal disk wik with the pi 4, anyone
Quoted text here. Click to load it

Most certainly not on my old Pies, USB there sucks.
USB connectors suck big time and the Linux kernel gets confused by multiple re-connects
and renumbers the devices so nothing works anymore, then finally runs out of device numbers,
USB3 on my new Pi4 seems fast, at least it can keep up with my typing speed,
the old Pies could not.
No kidding.





Quoted text here. Click to load it

That is silly
One is on 24/7 since it came out (PI2), the other about 8/7.
Both extensively use GPIO with hardware I designed, run totally modified
software versions that I wrote.
And all are regularly connected via SSH to my laptop or main PC
and get modifications almost every week if not every day.
The 24/7 on one also logs loads of data to SDcard.

Look at his project, on 24/7:
 http://panteltje.com/panteltje/xgpspc/index.html

On 8/7:
 http://panteltje.com/panteltje/raspberry_pi_FDS132_matrix_display_driver/index.html
  
This one is on every now and then when I need it:
 http://panteltje.com/panteltje/raspberry_pi_dvb-s_transmitter/
  
NONE of the cards have failed, and were just run of the mill SDcards.

My net connection at this moment is a 4G stick in an other Raspberry Pi2 that is used as router.
It never fails.
And I do not always treat those things nicely, power off / on sequences etc.

Again it is the player, NOT the instrument
If you screw up card after card you are doing something wrong.
'
My just new Pi4 with a 4TB harddisk hanging from it boots also from SDcard.
It is taking over much of the other things like security that needs to run 24/7,
satellite recording (movies) etc etc, work in progress.
Just had it 3 weeks OK?

So what can you show us?


Re: External disk with the pi 4, anyone

Quoted text here. Click to load it


- but I, with an SSD and RPi3B+, via a mSATA to USB adapter, simply  
'burnt' the SSD with UbuntuMATE as if it were an SD card, and it all works  
without the card installed. /With/ the card installed, the beast boots  
from the card with the SSD still plugged in.


--  
Mark J
From RISCOS 5.27 on a BeagleBoard-xM and Raspberry Pi2B
We've slightly trimmed the long signature. Click to see the full one.
Re: External disk with the pi 4, anyone
On 08/11/2019 09:07, Mark J wrote:
Quoted text here. Click to load it

An unrelated question:
How did you get Ubuntu mate installed, as In tried and it didn't work.
I downloaded the tar.gz file, then extracted the img file and the tried  
to burn it to an sd card with etcher. Etcher complained that it was not  
a bootable image. I tried again by clicking on the tar.gz file and Discs  
came up and said something about doing a restore. I selected the sdcard  
and clicked restore, but after inserting the sdcard into the pi, it  
didn't boot up.

Re: External disk with the pi 4, anyone
On 08/11/2019 10:29, RobH wrote:
Quoted text here. Click to load it

As I said above, I've never got this to work. Seems (from some reading)  
some USB devices don't work easily. I gave up and used the SD card to  
boot, USB to run.

Quoted text here. Click to load it

Use dd to get the image onto the USB device on a Linux box.

dd if=imagefile of=/dev/sd? bs=4M status=progress

Windows: see here  
https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
I haven't tried this!!
YMMV


--  

Chris Elvidge, England

Re: External disk with the pi 4, anyone
On 08/11/2019 11:03, Chris Elvidge wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it

Thanks for that, but although the img appears to be booting, as the  
green led is flashing on the pi4, there is no video, aaargh!

What have I missed.

Site Timeline