hi
i tried to install driver for wi-fi doungle and sank in troubles )
Firstly, i remount the file system to be able to write (as it read-only): sudo umount -o rw,remount /
After that tried to sudo apt-get update but no success as no space left on root partition.
So i move to raspi-config to resize the partition table (extend it) - but no result with error - nothing to extend
Secondly, i tried df -h and found out the partition table:
And tried to resize following the man here - https://raspberrypi.stackexchange.com/q ... -partition
But after delete partitions and reboot - stereopi went to endless reboot ((
How to resize in SLP image ?
apt-get update SLP image trouble
-
- Posts: 215
- Joined: Tue May 21, 2019 12:33 pm
- Location: France
Re: apt-get update SLP image trouble
On a Linux desktop with sd card reader, I used gparted with success. If you change the partition table with fdisk, you say where to search for new data but without moving the data themselves, hence the inability to boot.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras
Re: apt-get update SLP image trouble
hmm..i followed steb-by-step instruction. it said i have to resize partition table after reboot.stereomaton wrote: ↑Mon Jul 06, 2020 6:38 pmOn a Linux desktop with sd card reader, I used gparted with success. If you change the partition table with fdisk, you say where to search for new data but without moving the data themselves, hence the inability to boot.
as to gparted - cant install it - no space left on root partition.
- Realizator
- Site Admin
- Posts: 900
- Joined: Tue Apr 16, 2019 9:23 am
- Contact:
Re: apt-get update SLP image trouble
Hi Zoldaten,
This partition feature has been discussed on our forum
To say briefly, after each boot SLP try to fond FAT32 partition, and if it is not existing - try to create it, using all free space... after it's 2Gb of ext4, i.e. 3932160 in our case. And does a reboot after that. So if you extend partition, this autoformat feature will feel itself bad.
This logic can be found in a file /opt/StereoPi/run.sh, rows 16-32. So if you will comment this code (or modify it for your needs), you will avoid rebooting and get right the thing you need.
UPD> As for the apt-get update (and upgrade) - this is not good idea, as after this procedure a lot of internal dependencies can be broken (like Nginx settings, PHP version and so on). Do it carefully please
This partition feature has been discussed on our forum
To say briefly, after each boot SLP try to fond FAT32 partition, and if it is not existing - try to create it, using all free space... after it's 2Gb of ext4, i.e. 3932160 in our case. And does a reboot after that. So if you extend partition, this autoformat feature will feel itself bad.
This logic can be found in a file /opt/StereoPi/run.sh, rows 16-32. So if you will comment this code (or modify it for your needs), you will avoid rebooting and get right the thing you need.
UPD> As for the apt-get update (and upgrade) - this is not good idea, as after this procedure a lot of internal dependencies can be broken (like Nginx settings, PHP version and so on). Do it carefully please
Eugene a.k.a. Realizator
-
- Posts: 215
- Joined: Tue May 21, 2019 12:33 pm
- Location: France
Re: apt-get update SLP image trouble
My answer was perhaps too laconic.
fdisk is a low level utility that modifies the partition table. You can work on such low level, but with extra caution and by knowing how the system works.
The step-by-step tutorial on your link (that I did not see at first read) is okay-ish, except that it destroys all partitions after the second one, which is not really a problem in the context of the question (a swap partition is somewhat optional). But this flaw is problematic with SLP because, as said by realizator, it tries to recreate a FAT partition at boot if it does not exist, but at a position which is not compatible with your new mapping.
You can probably resize with similar method at low level, but you should add a FAT partition (and perhaps format it, I do not remember exactly) to avoid the related script to trigger.
Alternatively on a desktop, you can use gparted (on a native Linux installation or with a liveUSB/liveCD) which is designed to resize partitions and handles various situations linked to this task. There still exist situations not suitable for it because they rely on partitions not being resized, but otherwise it is a great tool. Concerning SLP, the gparted method works because the requirement is the FAT partition to exist, which gparted keeps (and actually moves with content) if you do not ask it to remove.
Hope my answer is clearer now.
fdisk is a low level utility that modifies the partition table. You can work on such low level, but with extra caution and by knowing how the system works.
The step-by-step tutorial on your link (that I did not see at first read) is okay-ish, except that it destroys all partitions after the second one, which is not really a problem in the context of the question (a swap partition is somewhat optional). But this flaw is problematic with SLP because, as said by realizator, it tries to recreate a FAT partition at boot if it does not exist, but at a position which is not compatible with your new mapping.
You can probably resize with similar method at low level, but you should add a FAT partition (and perhaps format it, I do not remember exactly) to avoid the related script to trigger.
Alternatively on a desktop, you can use gparted (on a native Linux installation or with a liveUSB/liveCD) which is designed to resize partitions and handles various situations linked to this task. There still exist situations not suitable for it because they rely on partitions not being resized, but otherwise it is a great tool. Concerning SLP, the gparted method works because the requirement is the FAT partition to exist, which gparted keeps (and actually moves with content) if you do not ask it to remove.
Hope my answer is clearer now.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras
Re: apt-get update SLP image trouble
This solved the issue! But i stack with next step.This logic can be found in a file /opt/StereoPi/run.sh, rows 16-32. So if you will comment this code (or modify it for your needs), you will avoid rebooting and get right the thing you need.
Trying to install sudo apt install raspberrypi-bootloader raspberrypi-kernel leads me to errors: read-only filesystem o_O
But i`ve already remount the filesytem as rw! Why i go this way ? Because i went that way when install drivers for my usb dongle on openCV image that worked (see my comment https://github.com/gnab/rtl8812au/issues/147)
upd.
i remounted /boot with sudo mount -o rw,remount /boot and successfully updated bootloader and kernel but...
stereopi again starts boot endless...
perhaps something additional to comment in run.sh ?
- Realizator
- Site Admin
- Posts: 900
- Joined: Tue Apr 16, 2019 9:23 am
- Contact:
Re: apt-get update SLP image trouble
Zoldaten, I just planned to suggest you unlock BOOT, but you find this by yourself!
As for the reboot - as you mentioned, run.sh is the main file we start to run. So you can simplify it (by commenting) and find the reason for your reboots. All reboots we used have some special reason (like implementing updated partitions info). I hope you are having one of these "planned" reboots, but not a crash with updated kernel and bootloader... What is the last message you can see?
I'd recommend you to turn off wallpaper (line 42, we show stereopi_bg2.jpg before receiving the video), so you can see console output.
You can also turn off the video intro if it covers your console output. Just comment video start row at /opt/intro/intro.sh
As for the reboot - as you mentioned, run.sh is the main file we start to run. So you can simplify it (by commenting) and find the reason for your reboots. All reboots we used have some special reason (like implementing updated partitions info). I hope you are having one of these "planned" reboots, but not a crash with updated kernel and bootloader... What is the last message you can see?
I'd recommend you to turn off wallpaper (line 42, we show stereopi_bg2.jpg before receiving the video), so you can see console output.
You can also turn off the video intro if it covers your console output. Just comment video start row at /opt/intro/intro.sh
Eugene a.k.a. Realizator
Re: apt-get update SLP image trouble
yep, i get it working !
https://aliexpress.ru/item/32950017313.html
`ve followed this way:
in /opt/Stereopi
run.sh - comment strings 16-23
sudo mount -o rw,remount /
sudo mount -o rw,remount /boot
*resize the partition as there`s no space left to install anything
sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo apt-get install raspberrypi-kernel-headers
*sudo apt-get upgrade
reboot
sudo cp /lib/modules/$(uname -r)/build/arch/arm/Makefile /lib/modules/$(uname -r)/build/arch/arm/Makefile.$(date +%Y%m%d%H%M)
sudo sed -i 's/-msoft-float//' /lib/modules/$(uname -r)/build/arch/arm/Makefile
sudo ln -s /lib/modules/$(uname -r)/build/arch/arm /lib/modules/$(uname -r)/build/arch/armv7l
git clone https://github.com/whitebatman2/rtl8821CU
cd rtl8821CU
sudo apt install bc
nano Makefile
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
CONFIG_PLATFORM_ARM_RPI3 = n
make
make install
modprobe 8821cu
but as far as i went i did sudo apt-get upgrade and ...broke something. Cameras`re working (red lights flash on them) but no web-interface ))
Because of update i think.
Tried to start script run.sh in /opt/Stereopi but it gives back: May be something in config.conf should be change or in run.sh ?
As i use this dogle `ve followed this way:
in /opt/Stereopi
run.sh - comment strings 16-23
sudo mount -o rw,remount /
sudo mount -o rw,remount /boot
*resize the partition as there`s no space left to install anything
sudo apt-get update && sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo apt-get install raspberrypi-kernel-headers
*sudo apt-get upgrade
reboot
sudo cp /lib/modules/$(uname -r)/build/arch/arm/Makefile /lib/modules/$(uname -r)/build/arch/arm/Makefile.$(date +%Y%m%d%H%M)
sudo sed -i 's/-msoft-float//' /lib/modules/$(uname -r)/build/arch/arm/Makefile
sudo ln -s /lib/modules/$(uname -r)/build/arch/arm /lib/modules/$(uname -r)/build/arch/armv7l
git clone https://github.com/whitebatman2/rtl8821CU
cd rtl8821CU
sudo apt install bc
nano Makefile
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
CONFIG_PLATFORM_ARM_RPI3 = n
make
make install
modprobe 8821cu
but as far as i went i did sudo apt-get upgrade and ...broke something. Cameras`re working (red lights flash on them) but no web-interface ))
Because of update i think.
Tried to start script run.sh in /opt/Stereopi but it gives back: May be something in config.conf should be change or in run.sh ?
- Realizator
- Site Admin
- Posts: 900
- Joined: Tue Apr 16, 2019 9:23 am
- Contact:
Re: apt-get update SLP image trouble
Zoldaten, apt-get upgrade is a bad thing, as I mentioned
At least you can see the error stage - "Starting local network connection on Wlan0". Try to look in run.sh and find the workflow we use.
Some tips:
In run.sh we are starting wlan manager:
this file includes "wlan.lib.php"
"wlan.lib.php" has LAN_stop and LAN_run functions.
Looks like your "Set power management" caused by row 164, i.e.:
Also please take a look at row 178:
If you have updated driver, may be you need to put it here.
At least you can see the error stage - "Starting local network connection on Wlan0". Try to look in run.sh and find the workflow we use.
Some tips:
In run.sh we are starting wlan manager:
Code: Select all
./scripts/wlan-switch.php &
"wlan.lib.php" has LAN_stop and LAN_run functions.
Looks like your "Set power management" caused by row 164, i.e.:
Code: Select all
shell_exec("sudo iwconfig $iface power off");
Code: Select all
shell_exec('sudo wpa_supplicant -B -i ' . $iface . ' -D nl80211,wext -c /run/' . $iface . '.conf');
Eugene a.k.a. Realizator