procount / pinn

An enhanced Operating System installer for the Raspberry Pi
1.14k stars 123 forks source link

Can someone wiser tell me why my os won't install #723

Closed alreadyconfused closed 3 months ago

alreadyconfused commented 1 year ago

I can tell that there's a lot going wrong here but don't really know where to start. Here's the log file output that i got from savelog :

DEBUG
=====
Keyboard found: "/dev/input/event0" 
3.8.6 
Board revision is  10494163 
Found recovery.rfs at "mmcblk0p1" 
PINN drive: "/dev/mmcblk0" 
mount: /dev/mmcblk0 is already mounted or /mnt busy
Simulate OK 
CecListener thread started 
Looking for  "/mnt/cec_keys.json" 
CecListener done initializing 
Loading Mappings mappings from  ":/cec_keys.json" 
New =  mainwindow ,  Main Menu 
setWindow  "mainwindow" 
setMenu  "Main Menu" 
Starting dbus 
Starting dhcpcd 
Default language is  "en" 
Default keyboard layout is  "gb" 
Default display mode is  "0" 
Error opening file: "/settings/installed_os.json" 
Number of bootables =  0 
New drive selected: "mmcblk0" 
cp: can't stat '/mnt/os/RaspiOS_Full_armhf/terms': No such file or directory
rm: can't remove '/tmp/progress': No such file or directory
partition map: QMap((1, PartitionInfo(0x20df678) ) ( 2 ,  PartitionInfo(0x207df60) ) ( 5 ,  PartitionInfo(0x2119cc0) ) ( 6 ,  PartitionInfo(0x203d198) ) ( 7 ,  PartitionInfo(0x214f5e0) ) )  
New partition table: 
"2048,1927640,0E
1929688,29186600,E
0,0
0,0
1933312,65534,L
1998848,524286,0c
2523136,28593152,83
" 
sfdisk done, output: "/sbin/sfdisk: Checking that no-one is using this disk right now ...
/sbin/sfdisk: OK
/sbin/sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
/sbin/sfdisk: Warning: partition 1 does not end at a cylinder boundary
/sbin/sfdisk: Warning: partition 2 does not start at a cylinder boundary
/sbin/sfdisk: Warning: partition 5 does not end at a cylinder boundary
/sbin/sfdisk: Warning: partition [6] does not start at a cylinder boundary
/sbin/sfdisk: Warning: partition 6 does not end at a cylinder boundary
/sbin/sfdisk: Warning: partition [7] does not start at a cylinder boundary
/sbin/sfdisk: Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.

Disk /dev/mmcblk0: 486192 cylinders, 4 heads, 16 sectors/track
Old situation:
Units: sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/mmcblk0p1          2048   1929687    1927640   e  W95 FAT16 (LBA)
/dev/mmcblk0p2       1929688  31116287   29186600   5  Extended
/dev/mmcblk0p3             0         -          0   0  Empty
/dev/mmcblk0p4             0         -          0   0  Empty
/dev/mmcblk0p5       1933312   1998845      65534  83  Linux
/dev/mmcblk0p6       1998848   2523133     524286   c  W95 FAT32 (LBA)
/dev/mmcblk0p7       2523136  31116287   28593152  83  Linux
New situation:
Units: sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/mmcblk0p1          2048   1929687    1927640   e  W95 FAT16 (LBA)
/dev/mmcblk0p2       1929688  31116287   29186600   5  Extended
/dev/mmcblk0p3             0         -          0   0  Empty
/dev/mmcblk0p4             0         -          0   0  Empty
/dev/mmcblk0p5       1933312   1998845      65534  83  Linux
/dev/mmcblk0p6       1998848   2523133     524286   c  W95 FAT32 (LBA)
/dev/mmcblk0p7       2523136  31116287   28593152  83  Linux
Successfully wrote the new partition table

/sbin/sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Re-reading the partition table ...

" 
3+0 records in
3+0 records out
3+0 records in
3+0 records out
Processing OS: "Videolooper" 
"/sbin/findfs LABEL=boot" 
 "/sbin/findfs: unable to resolve 'LABEL=boot'
" 

Executing: "/sbin/mkfs.fat -n boot -F 32 /dev/mmcblk0p6" 
Executing: "sh -o pipefail -c "cat '/mnt/os/RaspiOS_Full_armhf/boot.tar.xz' | tee /tmp/fifo | xz -dcT 0 | bsdtar -xf - -C /mnt2  --no-same-owner  | sha512sum /tmp/fifo > /tmp/sha1.out.txt"" 
"xz: (stdin): File format not recognized
" 
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p7,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
Error opening file: "/settings/installed_os.json" 
Number of bootables =  0 

INSTALLED_OS.JSON
=================

SETTINGS/OS
===========
/settings/os/Videolooper/

/settings/os/Videolooper//OS.JSON
===============
{
    "name": "Videolooper",
    "password": "av",
    "release_date": "2022-04-04",
    "supported_models": [
        "Pi Model",
        "Pi 2",
        "Pi Zero",
        "Pi 3",
        "Pi Compute Module 3",
        "Pi 4"
    ],
    "username": "pi",
    "version": "Buster"
}

/settings/os/Videolooper//PARTITION_SETUP.SH
==========================
#!/bin/sh
#supports_backup in PINN

set -ex

# shellcheck disable=SC2154
if [ -z "$part1" ] || [ -z "$part2" ]; then
  printf "Error: missing environment variable part1 or part2\n" 1>&2
  exit 1
fi

mkdir -p /tmp/1 /tmp/2

mount "$part1" /tmp/1
mount "$part2" /tmp/2

sed /tmp/1/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* / |${part2}  / |"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* /boot |${part1}  /boot |"

# shellcheck disable=SC2154
if [ -z "$restore" ]; then
  if [ -f /mnt/ssh ]; then
    cp /mnt/ssh /tmp/1/
  fi

  if [ -f /mnt/ssh.txt ]; then
    cp /mnt/ssh.txt /tmp/1/
  fi

  if [ -f /settings/wpa_supplicant.conf ]; then
    cp /settings/wpa_supplicant.conf /tmp/1/
  fi

  if ! grep -q resize /proc/cmdline; then
    if ! grep -q splash /tmp/1/cmdline.txt; then
      sed -i "s| quiet||g" /tmp/1/cmdline.txt
    fi
    sed -i 's| init=/usr/lib/raspi-config/init_resize.sh||' /tmp/1/cmdline.txt
  else
    sed -i '1 s|.*|& sdhci.debug_quirks2=4|' /tmp/1/cmdline.txt
  fi
fi

umount /tmp/1
umount /tmp/2

MOUNTS
======
/dev/ram0 on / type squashfs (ro,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=451596k,nr_inodes=112899,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/mmcblk0p1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p5 on /settings type ext4 (rw,relatime)

Disk /dev/ram0: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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: 32 MiB, 33554432 bytes, 65536 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/mmcblk0: 14.9 GiB, 15931539456 bytes, 31116288 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: dos
Disk identifier: 0x67ed0df0

Device         Boot   Start      End  Sectors   Size Id Type
/dev/mmcblk0p1         2048  1929687  1927640 941.2M  e W95 FAT16 (LBA)
/dev/mmcblk0p2      1929688 31116287 29186600  13.9G  5 Extended
/dev/mmcblk0p5      1933312  1998845    65534    32M 83 Linux
/dev/mmcblk0p6      1998848  2523133   524286   256M  c W95 FAT32 (LBA)
/dev/mmcblk0p7      2523136 31116287 28593152  13.6G 83 Linux

MEDIA
=====
alreadyconfused commented 1 year ago

Just to clarify: i copied the RaspiOS_Full_armhf folder from NOOBS and then replaced the boot and root files with my custom configured legacy rpi lite os files and changed the .json files a bit. Probably not the most intuitive thing to do

alreadyconfused commented 1 year ago

Also when looking at the original tar.xz files from NOOBS' RaspiOS_Full_armhf folder, all the directories and files inside the .xz files are at the root. When i imaged my os' sd card, then used the tar command in ubuntu to make the tar.xz files, it showed that all the necessary files and directories were in the root of the file, but when opening the same files in windows with winrar, the uncompressed tar file was inside the root of the tar.xz file. So do all the necessary files and directories need to be in the root of the tar.xz file, and if so how do i exactly do that?

procount commented 1 year ago

If you have a customised RaspioOS LITE OS, would it make more sense to start off with a NOOBS RaspiOS LITE installation?

You might want to consider renaming it's folder from "Raspios Full...." to "VideoLooper" to distinguish it and to be consistent with the rest of the naming.

Executing: "sh -o pipefail -c "cat '/mnt/os/RaspiOS_Full_armhf/boot.tar.xz' | tee /tmp/fifo | xz -dcT 0 | bsdtar -xf - -C /mnt2 --no-same-owner | sha512sum /tmp/fifo > /tmp/sha1.out.txt"" "xz: (stdin): File format not recognized "

There seems to be some issues with your tar.xz files. have you followed the instructions/tutorials I provided in the README_PINN.md and on the Wiki? You probably need to install the prescribed bsdtar version

lurch commented 1 year ago

when opening the same files in windows with winrar, the uncompressed tar file was inside the root of the tar.xz file

I think that's just a quirk of some Windows compression software - they're not used to the "double wrapper" commonly used by Linux archives, so they show a .tar file "inside" the .xz file, when that's not really the case (depending on how you look at things!).