WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Raspberry Pi persistence  (Read 1809 times)

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Raspberry Pi persistence
« on: June 28, 2024, 03:16:22 AM »
I'm trying to get my installation of PiCore64 14.1 to save anything, but nothing seems to work. I'm familiar with the workings on x86, but this is different. My install is on a USB drive, with the SD card being just to get the USB to boot. It boots up fine.

I've tried using the TC interface to set things up, but it doesn't stick. The boot partition is sda1, I've expanded sda2 to take the rest of the drive, and set the TCE folder to sda2. When installing an extension, it goes through acquiring it, but then says it fails at the end. If I look at the TCE location on sda2, the extensions are there, with the onboot.lst. Changing the ip address to be static doesn't persist either. I've used the backup tool to execute a backup before I reboot.

Something that's a bit strange is in the localboot.sh it has an entry to start ssh, but the path it refers to doesn't exist.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Raspberry Pi persistence
« Reply #1 on: June 28, 2024, 06:49:50 AM »
Your usb stick is likely recognized too late, try setting waitusb=8 on the command line.  Once working, look at dmesg for when the usb is found, and decrease the timr

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #2 on: June 28, 2024, 06:14:04 PM »
That's not making any difference. I think the issue is TCE isn't set anywhere. In the TC interface I set it with the app browser, but that's not getting written anywhere. I have both sda1 and sda2 mounted with the mount tool. Do I need to set TCE in the cmdline file, since there are no entries relating to it in there? Does it need the device ID or will dev/sda2 work?

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #3 on: June 28, 2024, 06:26:25 PM »
I just did a fresh install with the SD card, and that behaves as expected. It seems USB doesn't work properly. For instance SSH keys aren't generated on first boot. The second partition isn't mounted with TCE set to it.

So if I want to use a USB drive, do I create the system I want on the SD card then duplicate to the USB drive?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Raspberry Pi persistence
« Reply #4 on: June 28, 2024, 08:09:18 PM »
I run usb boot all the time, other that waitusb, it’s automatic.  I was guessing at 8 seconds, there are some really slow USB devices,  look at dmesg, to see when the kernel sees it.

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #5 on: June 28, 2024, 10:16:35 PM »
I tried 20 seconds, and same result. Dmesg seems to see it around 5 seconds. It looks like you can tell if it's a "live" system as to whether the tc@box prompt is coloured or grey. It's always grey with USB for me.

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #6 on: June 28, 2024, 10:19:04 PM »
Also, the aarch64 versions don't have the TC extension to get to the interface.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: Raspberry Pi persistence
« Reply #7 on: June 28, 2024, 10:30:40 PM »
Hi Hometheatre
TC.tcz  is a meta-extension. It is the equivalent of running:
Code: [Select]
tce-load -wi Xorg flwm_topside wbar aterm

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #8 on: June 29, 2024, 01:49:20 AM »
I've got a system setup on an SD card which does all the things I need. How to get that running on a USB drive?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Raspberry Pi persistence
« Reply #9 on: June 29, 2024, 08:05:43 AM »
Whatever drive contains the tce folder is used.  How are you creating the usb stick.

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #10 on: June 29, 2024, 04:44:49 PM »
I'm just flashing the piCore image to the USB drive, and booting that. I'm guessing I need to set the tce folder in the cmdlist.txt file. Would I also need to set opt and home?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Raspberry Pi persistence
« Reply #11 on: June 29, 2024, 04:49:18 PM »
No you dont.  Just burn the image, increase the waitusb value.   Then boot your device.

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #12 on: June 29, 2024, 05:25:15 PM »
That's what I've done. I have a 3B pi, and am using the SD card with the pi bootloader to get the USB to boot. I wonder if piCore sees there's an SD card and is trying to use it.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Raspberry Pi persistence
« Reply #13 on: June 29, 2024, 05:33:20 PM »
So you burned the same image to both sd and USB.   That will cause problems with auto detection.   Why just not use one or the other?

Offline Hometheatre

  • Newbie
  • *
  • Posts: 16
Re: Raspberry Pi persistence
« Reply #14 on: June 29, 2024, 06:09:20 PM »
No, I burnt the image to the USB, and have the pi bootloader on the SD. Without the pi bootloader the USB won't boot. If I had a 3B+ or higher I wouldn't need the pi bootloader.