Topic: Setting up new hard drive


I installed a new hard drive in my Novena, and I'm trying to get it to boot. Since it's a new drive, the PARTUUID is different. I believe that means I need to recompile the u-boot SPL with an updated PARTUUID compiled in, and then install u-boot and that new SPL on the new drive. Is that correct?

Because I can't boot my Novena at the moment, I'm cross compiling from my x86_64 machine running Ubuntu 15.10.

I installed cross-compiling tools:

$ sudo apt-get install gcc-arm-linux-gnueabihf

And I get these results from trying to compile u-boot-novena:

$ make novena_config
$ make CROSS_COMPILE=arm-linux-gnueabihf-
scripts/kconfig/conf --silentoldconfig Kconfig
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  GEN     include/
In file included from include/linux/compiler.h:54:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from /home/jsha/u-boot-novena/arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:113,
                 from include/image.h:19,
                 from /home/jsha/u-boot-novena/include/common.h:87:
include/linux/compiler-gcc.h:114:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
/home/jsha/u-boot-novena/scripts/Makefile.autoconf:64: recipe for target 'include/' failed
make[2]: *** [include/] Error 1
/home/jsha/u-boot-novena/Makefile:464: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

Note: I also tried booting into recovery mode and hitting Ctrl-C to get a uboot command line, but I think my USB keyboard is not recognized so early in the boot process, and I don't have a serial cable handy.


2 (edited by chris4795 2015-11-01 09:43:48)

Re: Setting up new hard drive


I was able to change out my hard drive without recompiling U-boot. If I recall correctly, there is a way to change the PARTUUID.

Unfortunately I cannot be of more help, I did it several months ago. For some reason flashing the spl file to the beginning of the hard drive seems like what I had to do?

Re: Setting up new hard drive

Yes, I think all I need is the SPL. But is there any way to generate a new SPL without compiling u-boot?

So far I've made progress by mounting a copy of my old filesystem on the Novena in recovery mode and chrooting into it to do the compile. We'll see how this goes!

4 (edited by chris4795 2015-11-01 10:28:56)

Re: Setting up new hard drive

I know there is a way to do it without having to compile anythong, unfortunately I do not remember how I did it. Perhaps check an older image and see if it has it?

The u-boot-novena package might have it.

I'm sorry that isn't of much help, but that's about all I can remember.

Re: Setting up new hard drive

Try following this!

Re: Setting up new hard drive

In include/configs/novena.h ( … ena.h#L293), I found a reference to a uEnv.txt that seems like it would contain plaintext u-boot instructions. I tried creating one on the /boot partition of the SD card containing:

rootdev PARTUUID=<the PARTUUID for my new drive's root partition>

But no joy: on next boot, progress still ends with "Waiting for root device."

Re: Setting up new hard drive

I was able to resolve this by modifying the PARTUUID to match what the existing bootloader expected, per instructions at … ootloader.

Re: Setting up new hard drive

You've changed the documentation from modifying the disk identifier to changing the partition's UUID.  It sounds like your disk is partitioned using GPT not DOS.  While it's interesting that it works, the original instructions were for DOS partition tables.

The U-Boot SPL must get loaded from byte 1024, which unfortunately conflicts with the GPT structures.  Therefore, if someone were to enable direct-to-SSD booting, the disk would need to be partitioned using DOS and not using GPT.  Because of this, we put a DOS MBR on our SSDs rather than GPT.