Problems booting after install to SD Card

  • For some reason I can't install to 64, 128, or 256GB SD Cards, but when I tried to use a 32GB card it worked fine.
    With the larger cards, the install goes fine, but on boot I get the error:


    Quote

    Attempting Boot From USB DriveKey (C:)
    error: attempt to read or write outside of disk 'hd0'


    Entering rescue mode...
    grub rescue>

    I tried the guide https://askubuntu.com/a/1088738, but I get an error every time when I get to the "ls /boot" command.
    I also tried with a USB to SD Card adapter and got the same error as above.


    Any ideas? Is there a known limitation with the size of SD card used in OMV or Debian?

  • Why use a larger SD card? As for the error at the prompt grub rescue> try grub-update hit enter and reboot basically it can't find a boot device, and this error: attempt to read or write outside of disk 'hd0' is usually related to h'ware raid devices.

  • On my previous install I noticed OMV was storing certain things on the boot partition. I moved Docker images to another physical volume, but assumed there would be other things I couldn't move that would accumulate over time. The system has 24GB of RAM, so a 32GB card was the smallest I could get to work initially. Smaller cards didn't leave enough space for the Linux Swap partition. Apparently that is always the same size as the system RAM.


    Tried typing grub-update at the grub rescue> prompt and got the error Unknown command 'grub-update'.
    Elsewhere I saw that people use the syntax update-grub but that gave the same error.


    Oh that's interesting. This system does have onboard HW RAID, but I'm not using it. Also I thought it was only for the SAS connected drives. Maybe the SD Card is managed as part of the same system?

  • You probably do not need a swap partition. My OMV box has 16GB of RAM and runs on a 16GB SSD with no swap. It has never been a problem.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • You disable and delete the swap partition after the install and optionally grow the primary partition to fill the disk.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • prompt and got the error Unknown command 'grub-update'.

    Sorry I knew it was one or the other :) but @gderf is right you wouldn't need a swap.


    This system does have onboard HW RAID, but I'm not using it.

    Best guess it's still attempting to boot from the hw raid hence the error, depending on the machine in the bios you can set the raid option to sata, ide legacy, ahci depends on the bios, but some require the raid to be flashed to IT mode this 'turns into' a sata controller.
    When you say your not using it I take you're still using the 'caddies' if so it's running off a backplane, that all the drives plug into that backplane then has a single connection to the m'board. This is typical of HP and Dell machines

  • You disable and delete the swap partition after the install and optionally grow the primary partition to fill the disk.

    How do you do that?



    Sorry I knew it was one or the other but @gderf is right you wouldn't need a swap.

    Is there another command I can try? Both grub-update and update-grub gave the error. I'd still prefer to use the 256GB card I bought. Don't have much other use for it.



    Best guess it's still attempting to boot from the hw raid hence the error, depending on the machine in the bios you can set the raid option to sata, ide legacy, ahci depends on the bios, but some require the raid to be flashed to IT mode this 'turns into' a sata controller.
    When you say your not using it I take you're still using the 'caddies' if so it's running off a backplane, that all the drives plug into that backplane then has a single connection to the m'board. This is typical of HP and Dell machines

    Sorry I should have said I've disabled the on-board raid controller. AFAIK, there isn't an IT mode available for that controller, the P410i. I bought a PCI-E add-on card that supports IT mode. But it's giving issues acting as the boot device, so that's what lead me down the path of trying to use the motherboard's SD slot.
    That's correct. It's an HP server. I run a SAS cable from the backplane port to the SAS add-on card. And I have an external SAS enclosure I'm going to use for a SnapRAID array that's going to be the main storage pool.


    The weird thing here is that the 32GB SD card works fine, and anything larger that I've tried (64GB or higher) gives the attempt to read or write error. So weird that it's size dependant.

  • How do you do that?


    Easiest way is to boot a live CD or USB linux disk and use the gparted program to disable and delete the swap partition and grow the primary partition.


    But before doing this I would disable swap with the swapoff command and run it a while to be sure you can go without swap.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

    Edited once, last by gderf ().

  • That's what is throwing the hd0 error, the last thread I dealt with with a similar problem was to remove the backplane but use the caddies, but the OP had purchased sata controller card and connected each drive to the sata controller.


    If your new controller supports IT mode it may require flashing with firmware depends on the card.


    I have had 2 HP servers and I have turned off the raid in the bios, but I have only used 32Gb flash drives. I don't know, but what might be worth a try is to disconnect the backplane from the card and try an install to the 256Gb sd card. If it works and boots then re connect the card and reboot, if it boots then the problem is solved other then trying to get the new PCI-E flashed to IT mode.


    All this is guess work, but I always prefer to try options out at first.


  • But before doing this I would disable swap with the swapoff command and run it a while to be sure you can go without swap.

    I'm guessing I have to run this from the Debian command line. I'll give it a try. Will just having the system idle be enough of a test. I haven't set anything up on OMV yet, other than the basics.


    Sorry I've mis-explained. The backplane is for some SATA 2.5 inch SSD drives. Those 2 caddies are currently removed from the system. The backplane is connected to the SAS card, which is in IT mode already. The server's onboard raid controller is disabled in the BIOS. Also the SD Card reader isn't connected to the backplane, it's a card-slot soldered directly to the motherboard. Does that make sense?
    I will try physically removing the add-on SAS card to see if that helps. I'm not sure if there is a way to further disable the onboard RAID controller. It's currently not connected to anything, disabled in the BIOS, and the cache card is removed.

  • Also the SD Card reader isn't connected to the backplane, it's a card-slot soldered directly to the motherboard. Does that make sense?

    No it's not, but the hd0 error has something to do with the backplane, I'll see if I can find the thread where this came up but HP's can be an issue but not impossible to resolve.

  • I'm guessing I have to run this from the Debian command line. I'll give it a try. Will just having the system idle be enough of a test. I haven't set anything up on OMV yet, other than the basics.

    Yes, run swapoff from the command line. And no, just idling along would not be a valid test. Only operations that use up all the memory would trigger a swap, and if there is no swap available the machine would crash.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • No it's not, but the hd0 error has something to do with the backplane, I'll see if I can find the thread where this came up but HP's can be an issue but not impossible to resolve.

    I'm really confused! I thought the physical backplane was a 'dumb' interface. Just a physical connection to some sort of controller.
    Yes please do, this is so weird.
    I wonder if the SD reader is managed by the same chipset that would be in use by the motherboard's onboard SAS controller.



    Yes, run swapoff from the command line. And no, just idling along would not be a valid test. Only operations that use up all the memory would trigger a swap, and if there is no swap available the machine would crash.

    Can you think of something simple I could do to stress the system?

  • @gderf Can you think of any problem with using the 32GB card as is? The boot partition is 5.7GB. If I remember, the minimum install volume size for OMV is 4GB? So 1.7GB left over. Will that cause issues for logs, or any temp files that might accumulate?


    Also, wondering how you were able to install to an SSD the same size as your systems amount of RAM? When I try to use a smaller SD or Flash Drive, I get the error Failed to partition the selected disk. This probably happened because the selected disk or free space is too small to me automatically partitioned.
    When I first ran into this error the other week, I did some research and found people talking about the Linux Swap volume needing to be the same size as your system RAM.

  • I'm really confused! I thought the physical backplane was a 'dumb' interface. Just a physical connection to some sort of controller.

    Yes it is, all the drives in the cage plug into the backplane, the backplane then has a single cable running from it to the m'board or a sata controller.


    I've looked through my watched threads but I can't find the one that I'm looking for, basically the user removed the backplane, then used sata cables from each drive to the sata controller he had, this removed the HP raid from the setup.


    Your hd0 error suggests that your PCI-E card is not running in IT mode but in a raid configuration, (either that or there is another bios setting that is influencing the way the card behaves) as I'm not familiar with IT mode and it's setup others maybe able to help, what's the make, model of the card.

  • Last night I played around, and physically removed the PCI-E SAS controller from the system and completely removed the sas cable from the backplane/system. I still got the hd0 error!
    There aren't any sata power connectors on the mobo, so it would be a chore to go that route.


    With the user in the other thread using a sata controller, wouldn't that be like my setup with this HBA controller card? (Assuming it is working properly and is in IT mode)
    The card is an LSI 9207, and the server is an HP DL360 G7.

  • I still got the hd0 error!

    Then something in the bios is throwing this, is there a bios setting to enable ahci


    I'm going to tag @crashtest and @ryecoaaron one if not both have knowledge of that card, according to this you don't need to flash it but there must be some way to confirm it's actually running in IT mode -> that part is above my pay grade :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!