• Pi 4 USB boot works with stick, doesn't work with drive

    From Chris Green@3:770/3 to All on Wed Dec 15 15:27:27 2021
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.

    So I tried creating an image on a USB stick (an 8Gb Kingston one) and
    that works perfectly OK.

    I've compared the contents of the USB stick and the USB drive and they
    look identical, they both mount without problems on the Pi when it's
    running from its SD card.

    When I try and boot from the USB disk I get the error code for "Kernel
    image not found".

    The only thing I can think may be happening is that the eeprom boot
    code isn't as 'clever' as the normal disk mounting code in the OS and,
    thus, for some reason can't mount and read from the USB disk but can
    mount and read the USB stick.

    However I'm a bit stuck now, I don't really want to go and buy another
    USB disk and find that doesn't work either.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Chris Green on Wed Dec 15 16:58:38 2021
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.


    I'm rather ignorant of Linux OS config. Why would you want to move the
    boot off SD. Move your apps off the SD, sure, it is quite nice to have a separation between apps and OS. Apps often do a lot of disk IO.

    I've always assumed the OS itself doesn't do a bunch of writing to the
    SD card. No swapping, maybe a few logfiles. (note to self) I should check.

    The apps themselves can be in docker containers and hence the OS needs
    very little config, The SD can easily be swapped in case of disaster.
    You can script up provisioning if you are really keen, or just have a
    git repo, with all the key files.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Chris Green on Wed Dec 15 16:41:03 2021
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.

    So I tried creating an image on a USB stick (an 8Gb Kingston one) and
    that works perfectly OK.

    I've compared the contents of the USB stick and the USB drive and they
    look identical, they both mount without problems on the Pi when it's
    running from its SD card.

    When I try and boot from the USB disk I get the error code for "Kernel
    image not found".

    The only thing I can think may be happening is that the eeprom boot
    code isn't as 'clever' as the normal disk mounting code in the OS and,
    thus, for some reason can't mount and read from the USB disk but can
    mount and read the USB stick.

    However I'm a bit stuck now, I don't really want to go and buy another
    USB disk and find that doesn't work either.

    How is the 500GB drive partitioned? And what format are its partitions?
    You need a small boot partition in FAT32 format and the rest can be an EXT4.

    You should then be able to rsync /boot from a working SD card to the
    boot partition and copy the rest of the card to the much larger ext4
    partition using rsync etc.


    --
    “Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong remedies.”
    ― Groucho Marx

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to The Natural Philosopher on Wed Dec 15 16:54:09 2021
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.

    So I tried creating an image on a USB stick (an 8Gb Kingston one) and
    that works perfectly OK.

    I've compared the contents of the USB stick and the USB drive and they
    look identical, they both mount without problems on the Pi when it's running from its SD card.

    When I try and boot from the USB disk I get the error code for "Kernel image not found".

    The only thing I can think may be happening is that the eeprom boot
    code isn't as 'clever' as the normal disk mounting code in the OS and, thus, for some reason can't mount and read from the USB disk but can
    mount and read the USB stick.

    However I'm a bit stuck now, I don't really want to go and buy another
    USB disk and find that doesn't work either.

    How is the 500GB drive partitioned? And what format are its partitions?
    You need a small boot partition in FAT32 format and the rest can be an EXT4.

    It was created directly by copying the Pi distribution image to it,
    that creates it as above. I tried with dd directly and using
    rpi-imager, they both produced the same as far as I can see.


    You should then be able to rsync /boot from a working SD card to the
    boot partition and copy the rest of the card to the much larger ext4 partition using rsync etc.

    If I could get a brand new built by the default "how to make a Pi"
    process to work first then I might try the above to get 'my' files on
    it but at the moment I can't even get a pristine new Raspberry Pi
    image to boot.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From nelsonse48@gmail.com@3:770/3 to All on Wed Dec 15 09:11:10 2021
    Add rootdelay=5 to cmdline.txt on /boot partitions if it is not already there. This allows the HD time to spin up. Flash devices respond quick enough but physical drives need time to become active. $0.02
    --Steven

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Chris Green on Wed Dec 15 17:54:01 2021
    On 15/12/2021 16:54, Chris Green wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.

    So I tried creating an image on a USB stick (an 8Gb Kingston one) and
    that works perfectly OK.

    I've compared the contents of the USB stick and the USB drive and they
    look identical, they both mount without problems on the Pi when it's
    running from its SD card.

    When I try and boot from the USB disk I get the error code for "Kernel
    image not found".

    The only thing I can think may be happening is that the eeprom boot
    code isn't as 'clever' as the normal disk mounting code in the OS and,
    thus, for some reason can't mount and read from the USB disk but can
    mount and read the USB stick.

    However I'm a bit stuck now, I don't really want to go and buy another
    USB disk and find that doesn't work either.

    How is the 500GB drive partitioned? And what format are its partitions?
    You need a small boot partition in FAT32 format and the rest can be an EXT4. >>
    It was created directly by copying the Pi distribution image to it,
    that creates it as above. I tried with dd directly and using
    rpi-imager, they both produced the same as far as I can see.


    You should then be able to rsync /boot from a working SD card to the
    boot partition and copy the rest of the card to the much larger ext4
    partition using rsync etc.

    If I could get a brand new built by the default "how to make a Pi"
    process to work first then I might try the above to get 'my' files on
    it but at the moment I can't even get a pristine new Raspberry Pi
    image to boot.

    not even on an SD card?


    --
    Future generations will wonder in bemused amazement that the early
    twenty-first century’s developed world went into hysterical panic over a globally average temperature increase of a few tenths of a degree, and,
    on the basis of gross exaggerations of highly uncertain computer
    projections combined into implausible chains of inference, proceeded to contemplate a rollback of the industrial age.

    Richard Lindzen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Pancho on Wed Dec 15 17:29:51 2021
    Pancho <Pancho.Dontmaileme@outlook.com> wrote:
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.


    I'm rather ignorant of Linux OS config. Why would you want to move the
    boot off SD. Move your apps off the SD, sure, it is quite nice to have a separation between apps and OS. Apps often do a lot of disk IO.

    I've always assumed the OS itself doesn't do a bunch of writing to the
    SD card. No swapping, maybe a few logfiles. (note to self) I should check.

    The apps themselves can be in docker containers and hence the OS needs
    very little config, The SD can easily be swapped in case of disaster.
    You can script up provisioning if you are really keen, or just have a
    git repo, with all the key files.

    Yes, I could just boot off the SD /boot partition and then have
    everything on the spinning disk but that's a much messier (and
    actually more difficult to configure) way than just 'boot off the USB'.


    If the boot off the USB worked (well, it does from the stick) then
    it's just a matter of removing the SD card and putting a USB drive
    with the system image on it into the Pi and it "just works". Which it
    does with a USB stick, but not with a drive.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Folderol@3:770/3 to Chris Green on Wed Dec 15 17:57:47 2021
    On Wed, 15 Dec 2021 17:29:51 +0000
    Chris Green <cl@isbd.net> wrote:

    Pancho <Pancho.Dontmaileme@outlook.com> wrote:
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.


    I'm rather ignorant of Linux OS config. Why would you want to move the
    boot off SD. Move your apps off the SD, sure, it is quite nice to have a
    separation between apps and OS. Apps often do a lot of disk IO.

    I've always assumed the OS itself doesn't do a bunch of writing to the
    SD card. No swapping, maybe a few logfiles. (note to self) I should check. >>
    The apps themselves can be in docker containers and hence the OS needs
    very little config, The SD can easily be swapped in case of disaster.
    You can script up provisioning if you are really keen, or just have a
    git repo, with all the key files.

    Yes, I could just boot off the SD /boot partition and then have
    everything on the spinning disk but that's a much messier (and
    actually more difficult to configure) way than just 'boot off the USB'.


    If the boot off the USB worked (well, it does from the stick) then
    it's just a matter of removing the SD card and putting a USB drive
    with the system image on it into the Pi and it "just works". Which it
    does with a USB stick, but not with a drive.


    Just as a matter of interest have you tried it with an SSD drive?

    --
    Basic

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From nelsonse48@gmail.com@3:770/3 to All on Wed Dec 15 10:03:54 2021
    Power the HD using external power. Power up the rpi a few seconds after starting the drive. Does that work? I boot from SD with root on the USB HD so I needed the rootdelay to give the HD time to be ready.
    --Steven

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to nelso...@gmail.com on Wed Dec 15 17:26:41 2021
    nelso...@gmail.com <nelsonse48@gmail.com> wrote:
    Add rootdelay=5 to cmdline.txt on /boot partitions if it is not already there. This allows the HD time to spin up. Flash devices respond quick
    enough but physical drives need time to become active. $0.02

    How's that going to help? /boot is on the USB disk.

    This is replacing the SD card *completely* with a USB stick/disk.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Folderol on Wed Dec 15 19:10:20 2021
    Folderol <general@musically.me.uk> wrote:
    On Wed, 15 Dec 2021 17:29:51 +0000
    Chris Green <cl@isbd.net> wrote:

    Pancho <Pancho.Dontmaileme@outlook.com> wrote:
    On 15/12/2021 15:27, Chris Green wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.


    I'm rather ignorant of Linux OS config. Why would you want to move the
    boot off SD. Move your apps off the SD, sure, it is quite nice to have a >> separation between apps and OS. Apps often do a lot of disk IO.

    I've always assumed the OS itself doesn't do a bunch of writing to the
    SD card. No swapping, maybe a few logfiles. (note to self) I should check. >>
    The apps themselves can be in docker containers and hence the OS needs
    very little config, The SD can easily be swapped in case of disaster.
    You can script up provisioning if you are really keen, or just have a
    git repo, with all the key files.

    Yes, I could just boot off the SD /boot partition and then have
    everything on the spinning disk but that's a much messier (and
    actually more difficult to configure) way than just 'boot off the USB'.


    If the boot off the USB worked (well, it does from the stick) then
    it's just a matter of removing the SD card and putting a USB drive
    with the system image on it into the Pi and it "just works". Which it
    does with a USB stick, but not with a drive.


    Just as a matter of interest have you tried it with an SSD drive?

    No, because I don't have a spare one.

    If (as seems likely) it is a power problem then it's likely an SSD
    will fix the problem.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From bob prohaska@3:770/3 to Chris Green on Wed Dec 15 18:55:55 2021
    Chris Green <cl@isbd.net> wrote:
    Well now I'm really stumped.

    I'm trying to get my Pi 4 to boot from a (fairly small, 500Gb) hard
    disk. I've tried creating the image various ways (dd on Linux,
    rpi-imager, etc.) and nothing worked.

    So I tried creating an image on a USB stick (an 8Gb Kingston one) and
    that works perfectly OK.


    Mechanical disks "wake up" much slower than solid state devices. If
    you haven't tried it yet, put an empty file named timeout in the DOS
    paritions. Not sure it'll help, but it's a cheap experiment.

    Good luck,

    bob prohaska


    I've compared the contents of the USB stick and the USB drive and they
    look identical, they both mount without problems on the Pi when it's
    running from its SD card.

    When I try and boot from the USB disk I get the error code for "Kernel
    image not found".

    The only thing I can think may be happening is that the eeprom boot
    code isn't as 'clever' as the normal disk mounting code in the OS and,
    thus, for some reason can't mount and read from the USB disk but can
    mount and read the USB stick.

    However I'm a bit stuck now, I don't really want to go and buy another
    USB disk and find that doesn't work either.


    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to nelso...@gmail.com on Wed Dec 15 19:07:08 2021
    nelso...@gmail.com <nelsonse48@gmail.com> wrote:
    Power the HD using external power. Power up the rpi a few seconds after starting the drive. Does that work? I boot from SD with root on the USB
    HD so I needed the rootdelay to give the HD time to be ready.

    That *may* be the issue, at least I suspect it may be some sort of
    power issue. The trouble is that the 500Gb USB drive has a funny
    'micro USB 3.1' connector and the only cable I have goes straight to a
    USB-A connector so I can't supply power externally very easily.

    Connecting through a USB hub makes it work but that's only USB 2.

    Strangely, having found that via the hub works I tried the drive in
    one of the Pi's USB 2 connectors and *that worked* too!

    I have a possible 320Gb candidate drive and an external USB-3 box with
    separate power. I'll be trying that tomorrow.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From scott@alfter.diespammersdie.us@3:770/3 to Chris Green on Wed Dec 15 22:53:47 2021
    Chris Green <cl@isbd.net> wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    How is the 500GB drive partitioned? And what format are its partitions?
    You need a small boot partition in FAT32 format and the rest can be an EXT4. >>
    It was created directly by copying the Pi distribution image to it,
    that creates it as above. I tried with dd directly and using
    rpi-imager, they both produced the same as far as I can see.

    Did you update /etc/fstab and whatever disk configuration bits are in /boot? The Raspberry Pi's SD card slot is /dev/mmcblk0, but a hard drive connected over USB will be /dev/sda. Without the appropriate updates, the kernel
    won't find the root filesystem and will hang.

    --
    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Wed Dec 15 18:44:15 2021
    On Wed, 15 Dec 2021 19:07:08 +0000, Chris Green <cl@isbd.net> declaimed the following:



    Connecting through a USB hub makes it work but that's only USB 2.

    USB-3 hubs are available... The trick is to find one that doesn't revert all ports to the slowest device connected.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to Dennis Lee Bieber on Thu Dec 16 09:44:54 2021
    Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
    On Wed, 15 Dec 2021 19:07:08 +0000, Chris Green <cl@isbd.net> declaimed the following:



    Connecting through a USB hub makes it work but that's only USB 2.

    USB-3 hubs are available... The trick is to find one that doesn't revert all ports to the slowest device connected.

    But it all adds to the cost, I'm trying to do this 'on the cheap' (not
    that I'm really that skint but I just don't like spending money
    unnecessarily).

    In reality speed isn't a big issue so USB 2 is probably prefectly OK.
    It's sole function is being a NAS and the added USB boot drive isn't
    the backup drive so its speed is probably unimportant.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to scott@alfter.diespammersdie.us on Thu Dec 16 09:53:45 2021
    scott@alfter.diespammersdie.us wrote:
    Chris Green <cl@isbd.net> wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    How is the 500GB drive partitioned? And what format are its partitions?
    You need a small boot partition in FAT32 format and the rest can be an EXT4.

    It was created directly by copying the Pi distribution image to it,
    that creates it as above. I tried with dd directly and using
    rpi-imager, they both produced the same as far as I can see.

    Did you update /etc/fstab and whatever disk configuration bits are in /boot? The Raspberry Pi's SD card slot is /dev/mmcblk0, but a hard drive connected over USB will be /dev/sda. Without the appropriate updates, the kernel
    won't find the root filesystem and will hang.

    This is *booting* from the USB instead of from the SD, the installation
    process creates the appropriate /etc/fstab entries in the image (or at
    least configures the boot process so they are correct).

    As noted elsewhere I have now successfully booted from the USB drive
    (connected to a USB 2 connector instead of USB 3) with no SD card in
    the Pi 4. This is simply a standard Pi image written to the USB drive
    in the same way as one write an image to an SD card. No other
    configuration is required.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)