Unable to setup noobs custom os

I’d like to setup a custom noobs, but I’m not able to complete the process.

Setting up with NOOBS 1.4

cd /
sudo tar -cvpf root.tar /* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/* --exclude=media/*
cd /boot
sudo tar -cvpf ~/boot.tar

Then on my computer

xz -9 -e root.tar
xz -9 -e boot.tar

Following the instructions for “Custom OS”
NOOBS: How to create a custom OS

The install fails @90% or 95%

sed /tmp/1/cmdline.txt not found

Researching a bit more it looks like incompatibility with the “partition_setup.sh” script.
The script works for raspian and retropi, but not with OSMC.

Any suggestions how to setup the “partition_setup.sh”?

My reason is to have the ability to switch between RetroPi and OSMC (and maybe RaspPlex) without the need to change cards :slight_smile:

OSMC is in NOOBS. Just insert the network cable. Is there a reason you are not using the OSMC release in NOOBS?

FYI, my partition setup is in:

S

1 Like

Thanks Sam,
My reasoning is so that I don’t have to start from scratch and it’s easy to pass to family/friends who have limited knowledge.

Also nice to meet you. I actually found your github after I posted and played with the script. Using the script verbatim and modifying your script (both version) I was able to pass and complete an install and then… 4 blinking green lights.

http://elinux.org/R-Pi_Troubleshooting#Green_LED_blinks_in_a_specific_pattern

4 flashes: start.elf not launched

On my computer I check the partition of the sd card and it crc matches. Comparing the noobs OSMC partitions that is created and they look similar except for the size with my custom osmc being larger; which would make sense.

So, I’m thinking I must be doing something wrong when I tar the root and boot directories.

I see. You’re trying to customise OSMC?

You are getting the flashes because I suspect you have not modified config.txt. Adding

start_x=1

should fix your problem. I add a few more options in config.txt at build time here. I understand you’re not using my build script, but I’d suggest you copy the appropriate config.txt settings (either for Pi1 or Pi2):

Sam

Yes, exactly a custom OSMC.

I’m a little embarrassed. I didn’t look at the config.txt and I also did not know/understand that noobs replaced the config.txt with it’s template. Thanks for pointing that out.

I edited the config.txt and removed the template lines; using the Pi2 config - still 4 flashes of green.
[I rebooted and rechecked that the file was modified]

    gpu_mem_1024=320
    hdmi_ignore_cec_init=1
    disable_overscan=1
    start_x=1 
    disable_splash=1

As a side note looking at the OSMC NOOBS config.txt

" disable_overscan=1 " won’t take effect as the noobs template injects disable_overscan=0 at the bottom

config.txt

    gpu_mem_1024=256
    hdmi_ignore_cec_init=1
    disable_overscan=1
    start_x=1 
    disable_splash=1
    
    #NOOBS Auto Generated
    overscan_left=24
    overscan_right=24
    overscan_top=16
    overscan_bottom=16
    disable_overscan=0

What’s on your /boot partition?

It will if this gets merged (hopefully):

Sam

/boot

LICENCE.broadcom
System.map-3.18.13-1-osmc
bcm2709-rpi-2-b.dtb
bootcode.bin
cmdline.txt
config-3.18.13-1-osmc
config.txt
dtb-3.18.13-1-osmc
fixup_x.dat
install.log
kernel.img
overlays
start_x.elf
vmlinuz-3.18.13-1-osmc

Hazar! I now have a custom OSMC os for NOOBS.

Manually “dd” /boot ofcourse worked, but that not ideal.

I spent a couple of days building a VM so I can log the process. Also I spent a good deal of time reading the NOOB doc - IMO there are a lot of gaps (maybe intentional…).

NOOBS 1.4.1 sometimes uses the contents from “root.tar.xz” - cmdline.txt and mounts the partition when it shouldn’t. I might go back and see why.

Partial Solution: remove the cmdline.txt from the custom package

  • further testing I can’t replicate the issue all the time and the other variable is it could be the SD card (I have 5 of the same manufacturer ADATA 16GB UHS-I)

TL;DR
Remove the cmdline.txt from your custom package if you get 4 green light blinks

I better write a quick how to so there is no confusion what I did:

Custom NOOBS OSMC

NOOBS: How to create a custom OS

(1) clean up the directory (optional, but it will make the image smaller)
http://kodi.wiki/view/Texture_Cache_Maintenance_utility

Backup root filesystem

cd /
sudo tar -cvpf root.tar /* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/* --exclude=boot/*

Backup boot file system

cd /boot
sudo tar -cvpf ~/boot.tar

Read / Modify the script from OSMC

*pay attention to partition_setup.sh

Check “boot.tar” and “root.tar”. Just check and make sure it looks like what you back up.

Download the files “root.tar” and “boot.tar” on another unix/linux flavour or windows system that has at least 2GB of memory and xz compression.

xz -9 -e root.tar
xz -9 -e boot.tar

Quick Troubleshoot:

  • 4 green lights blinking:
    Check the config.txt (reboot and press shift key when presented)

  • If it’s missing manually copy it back in

  • Still 4 green lights blinking
    Remove the file cmdline.txt from boot.tar.xz and try a new install

  • sed /tmp/1/cmdline.txt not found
    partition_setup.sh is wrong. recheck (look at OSMC for reference)