Simply cannot start the HDD installation

I’ve tried different flash drives, I’ve tried preparing the flash drive with the windows installer and using dd on linux and I always get the same result - the black screen prompt to remove the flash drive and unplug the ATV for 10 seconds. I do that twice and after that I get the “?” screen. It always wipes the flash drive at that point as no partitions get listed anymore. Sometimes it takes a little more than two poweroffs but no other progress. When doing a USB install it always finishes and boots successfully. I tried to dd the live usb installation to the HDD but it refuses to boot. I’ve tried several different versions and redownloaded the images many times - no luck. I’m getting desperate at this point.

What exactly do you do “twice”?

Please provide a detailed step by step example of what you are doing.

I get to the “Please remove USB drive and poweroff the ATV for 10 sec” black terminal screen and I do as asked but after I switch it on again it gives me the same message. I do that twice (power on the ATV, get to the black screen with the message, unplug, power off, wait 10 secs) and then after the 2nd time the flash drive magically gets its partition table or something wiped and I have to write the image to it again.

Is the ATV1 powered off before you initially insert the USB stick at the begining ?

It sounds like your HDD isn’t being detected for some reason.

Yeah, I always insert the USB drive while the ATV is off, only tried to plug it while its on once. The HDD gets listed when I type lsblk on a live USB install and I can write to it.

Try check on the usb stick and HDD for an installer log.
I suspect there won’t be one, but it’s worth a shot.

Worst case, there is a way to start the install via command line, but it requires the ability to edit the boot files on the stick with Linux, and run netcat on a computer connected to the same network as the ATV1.
By doing so, you should be able to get some log output.

Check for a Log first.
If that doesn’t work, and you are comfortable with editing some files on the HFS+ partition and running netcat… we can try that.

Where on the USB drive should I be looking for a log? And also your idea with running netcat would only give us more information on what is wrong with the installation, not start the installation itself? Currently I dont have the ATV with me so I cant do much but gather info. Btw, is it normal that when I dd the finished working USB installation onto the internal drive it doesnt boot? I thought the ATV cant tell the difference between a USB drive and the internal disk when it comes to booting?

The log should be on root of the drive.
If I remember correctly, it’s called installer.log

Using netcat via a special debug option kernel flag allows you to manually launch the installation, upon which it will output info at each stage of the installation as it progresses.

Simply dding the USB installation to the HDD won’t work automatically. If you did that, both the boot.plist and fstab would need to be edited to point to the correct partitions. If you don’t edit them, then the system will be looking at the wrong, or non existent partitions.

So can’t I simply edit the boot.plist and fstab to point to the correct partiotions and then dd it onto the HDD? Any guide/help on editing the boot.plist file (location, syntax, etc.)

You could, but that won’t help us figure out why your system won’t install normally.

Stay tuned.
Just to make sure I don’t lead you wrong, I’m doing a test of netcat with a fresh install.
I’ll also post details on what you need to edit to get a DDed version running on the HDD.

Thank you!

ADVANCED USERS ONLY !!!

Extra Equipment needed:

  • Computer connected to your network, running Linux (or OSX)
    (A bootable Linux “Live” would work for this)
  • Experience with running commands via Command Line/Terminal

How to debug installer problem via netcat:

  1. Create the usb stick configured for HDD Installation
  2. Safely eject the USB stick (this critical since a unclean filesystem won’t allow the install to complete)
  3. Using Linux, as root user or using sudo edit the com.apple.Boot.plist and add debugip=xx.xx.xx.xx using the ip address of the computer you are using for debugging.

(Make make sure you cleanly unmount installer the stick at all times !)

Example of com.apple.boot.plist for HDD install. Using a computer on the same network, at 192.168.65.101 to run netcat for debugging:

`<?xml version="1.0" encoding="UTF-8"?>

Background Color 0 Boot Fail Logo Boot Logo BootLogo.png Kernel Flags console=tty1 root=/dev/ram0 quiet init=/init loglevel=2 osmcdev=atv video=vesafb intel_idle.max_cstate=1 processor.max_cstate=2 nohpet debugip= 192.168.65.101 atvinst Kernel mach_kernel `
  1. Launch a netcat shell LINUX: netcat -lvp 9999 OSX: nc -l 9999
    (Advanced users can also use ncat on OSX if they have it installed)

Example of terminal command and resulting output using ncat. Netcat output on Linux would be similar, but not 100% the same

`laptop ~ $ ncat -lvp 9999
Ncat: Version 7.00 ( https://nmap.org/ncat )
Ncat: Listening on :::9999
Ncat: Listening on 0.0.0.0:9999

  1. With the ATV1 powered off, and connected to your network with an ethernet cable, insert the USB stick, and power up the ATV1

  2. The ATV1 should get an IP address via DHCP, and then establish a netcat connection to your computer.

Example output from ncat… (netcat will be slightly different, and nc will display no info at all when it connects)

Ncat: Connection from 192.168.65.104.
Ncat: Connection from 192.168.65.104:56392

Important note:
On OSX you won’t get any notice that it connected, because the v option doesn’t work.
All you can do is wait until the ATV has booted, gets an IP address, and tries to connect to your PC.

  1. On your computer in netcat shell, run the the command /usr/bin/qt_target_installer -qws

  2. The OSMC installer should start, and log it’s activity to your command line.

  3. Cut and paste the output into a support thread.

Continuing the discussion from Simply cannot start the HDD installation:

So, OSMC installed and booted but when I remove the flash drive it fails to boot and shows the missing drive icon. I prepared the flash drive using gunzip + dd on linux from the HDD install image, then I edited the boot.plist as told. Here is the netcat output:

connect to [192.168.1.6] from (UNKNOWN) [192.168.1.13] 35146
/usr/bin/qt_target_installer -qws
“Sat Feb 20 17:58:13 2016” “Starting OSMC installer”
Qt for Embedded Linux 4.8.6 does not support tool windows with frames.
This behavior will change in a later release. To ensure compatibility with
future versions, use (Qt::Tool | Qt::FramelessWindowHint).
“Sat Feb 20 17:58:17 2016” “Detecting device we are running on”
“Sat Feb 20 17:58:17 2016” “Mounting boot filesystem”
“Sat Feb 20 17:58:17 2016” “Trying to mount to MNT_BOOT (/mnt/boot)”
“Sat Feb 20 17:58:17 2016” “Using device->boot: /dev/sdb1 and FS: hfsplus”
“Sat Feb 20 17:58:17 2016” “No preseed file was found”
“Sat Feb 20 17:58:17 2016” “Creating root partition”
“Sat Feb 20 17:58:17 2016” “From a root partition of /dev/sdb2, I have deduced a base device of /dev/sdb”
“Sat Feb 20 17:58:17 2016” “Determined 256 MB as end of first partition”
“Sat Feb 20 17:58:17 2016” “Calling mkpart for device: /dev/sdb and fs: ext4 with start 258M and end 100%”
“Sat Feb 20 17:58:20 2016” “Calling fmtpart for partition /dev/sdb2 and fstype ext4”
“Sat Feb 20 17:58:26 2016” "Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=2 blocks, Stripe width=1024 blocks
108416 inodes, 432896 blocks
21644 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=444596224
14 block groups
32768 blocks per group, 32768 fragments per group
7744 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

"
“Sat Feb 20 17:58:26 2016” “Mounting root”
“Sat Feb 20 17:58:26 2016” “Trying to mount to MNT_ROOT (/mnt/root)”
“Sat Feb 20 17:58:26 2016” “Using device->root: /dev/sdb2”
“Sat Feb 20 17:58:26 2016” “Extracting files to root filesystem”
“Sat Feb 20 17:58:26 2016” “Starting extract progress…”
“Sat Feb 20 18:03:16 2016” “Extraction of root filesystem completed”
“Sat Feb 20 18:03:16 2016” “Configuring bootloader”
QTimer::singleShot: Invalid slot specification
“Sat Feb 20 18:03:16 2016” “Configuring bootloader: moving /boot to appropriate boot partition”
mv: can’t rename ‘/mnt/boot/preseed.cfg’: No such file or directory
mv: can’t rename ‘/tmp/preseed.cfg’: No such file or directory
QTimer::singleShot: Invalid slot specification
“Sat Feb 20 18:03:18 2016” “Configuring boot cmdline”
QTimer::singleShot: Invalid slot specification
“Sat Feb 20 18:03:18 2016” “Configuring /etc/fstab”
QTimer::singleShot: Invalid slot specification
“Sat Feb 20 18:03:18 2016” “Successful installation. Dumping log and rebooting system”
QTimer::singleShot: Invalid slot specification
/usr/sbin/reboot
myuser has logged off pts/2 from :0.

That installer output looks normal.

For some reason Linux it’s not finding the HDD, which is sda, at the beginning of the process, and uses sdb instead,

You said the HDD can be accessed via a Linux stick and it’s ok and functional ?

Very strange.

Looks like the most expedient way to get you up and running is to dd the image to the HDD and edit the config files.

I double check what the current config is and post it… stay tuned.

If you simply DD a Working USB install that has completed it’s installation, onto the HDD:

Note: sdb is the usb stick sda is the internal HDD

  1. the file /boot/com.apple.Boot.plist on the HDD would need to changed edited so that it points to the correct partition: root=/dev/sda2

Here’s what com.apple.Boot.plist should looks like on a running ATV1 HDD install:

`<?xml version=“1.0” encoding=“UTF-8”>

Background Color 0 Boot Logo BootLogo.png Kernel Flags console=tty1 root=/dev/sda2 rootfstype=ext4 rootwait quiet video=vesafb intel_idle.max_cstate=1 processor.max_cstate=2 nohpet vga16fb.modeset=0 osmcdev=atv Kernel mach_kernel `
  1. the file /etc/fstab on the HDD would also need to be edited so that it is:

/dev/sda1 /boot hfsplus defaults,noatime 0 0 /dev/sda2 / ext4 defaults,noatime 0 0

  1. the resulting root sda2 partition would be the same SIZE as the USB stick. You’d likely want to resize it and it’s filesystem, to fill the HDD.

Will this install work? The one that I posted the log output of? Just dd onto the HDD, fix the fstab and boot.plist, resize the ext4 partition and it will work? If so, thank you very much for your help, I am only wondering why I am having that exact problem, which is quite unlike the one all the other people that had failing HDD installations had.

I’m not 100% sure actually.
The log does say it completed… But…
You say you used an HDD installer image, yet for some reason it couldn’t find the HDD and installed to sdb instead, which is an external drive/stick.

It can’t hurt things if you try. All it would do is wipe the internal HDD.
But, if you have been able to create a functional USB install, I’d try dd that instead.

It’s really weird that the installer can’t find the HDD drive. and yet you said if you boot with a normal Linux stick it can see the internal HDD ?

Maybe the HDD is showing up with a non standard device name.

I’d be curious to see what the following commands show when you boot with a normal bootable Linux stick.
cat /proc/partitions
fdisk -l
mount

cat /proc/partitions 
major minor  #blocks  name

   1        0       4096 ram0
   1        1       4096 ram1
   1        2       4096 ram2
   1        3       4096 ram3
   1        4       4096 ram4
   1        5       4096 ram5
   1        6       4096 ram6
   1        7       4096 ram7
   1        8       4096 ram8
   1        9       4096 ram9
   1       10       4096 ram10
   1       11       4096 ram11
   1       12       4096 ram12
   1       13       4096 ram13
   1       14       4096 ram14
   1       15       4096 ram15
   8        0   39070080 sda
   8       16    1984512 sdb
   8       17     249980 sdb1
   8       18    1731584 sdb2

fdisk -l

Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 37.3 GiB, 40007761920 bytes, 78140160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 1.9 GiB, 2032140288 bytes, 3969024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F8137A36-05F0-4341-B31E-C2DF607299CC

Device      Start     End Sectors   Size Type
/dev/sdb1      40  500000  499961 244.1M Apple TV recovery
/dev/sdb2  503808 3966975 3463168   1.7G Microsoft basic data

/dev/sdb2 on / type ext4 (rw,noatime,stripe=1024,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=122340k,nr_inodes=30585,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /boot type hfsplus (ro,noatime,umask=22,uid=0,gid=0,nls=utf8)
sysfs on /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=24512k,mode=700,uid=1000,gid=1000)

IT WOOOOOOORKED! YAAAAY INFINITE HAPPINESS! THANK YOU VERY VERY MUCH, MAN! I dd’d the usb onto the HDD, edited some files, resized the partition and fs and it’s running just the way I want it atm. So, many thanks to you, Spinner, for all your help (definitely wouldn’t have done it without you) and thanks to the amazing OSMC dev team (and Sam in particular) for still supporting the Apple TV.

Awesome. :slight_smile:

No problem. Glad I could help.

Though, I still wonder why the installer wasn’t detecting the internal drive.
No big deal though. Your system was the only one that seemed to have the problem.