Hello all,
Question #1 :
At some point I noticed that my RPi 3, used as a YouTube viewer, sometimes seemed to freeze and also responding very slowly (20-30 sec) when I, using the "Windows" key, call the system menu to shut down. After than it sometimes responded almost as slowly to present me with the shutdown confirmation dialog.
I'm /assuming/ that it has something to do with the micro-SD cards performance degrading, perhaps because of having to swap blocks around to egalize wear-and-tear. Could someone confirm this or, if this is not the case, tell me what is going on ?
Question #2:
I attempted to make a DD copy of the micro-SD card to another (to check if
it was the card or perhaps the installed software), but that failed because the newer, also 16 GB card, was 20 MB smaller than the other origional card (rather unexpected I might say). :-\
Is there a way to tell a micro-SD card that its a bit smaller than it actually is, so that the installed image (NOOBS 3.2.1) will be smaller and a DD of it will always fit on a new card ?
R.Wieser <address@not.available> wrote:
Is there a way to tell a micro-SD card that its a bit smaller than it
actually is, so that the installed image (NOOBS 3.2.1) will be smaller and a >> DD of it will always fit on a new card ?
I don't think that's the right approach. You'd probably be better
off by making the partitions stop some safe distance from the end,
then using the "count" option to dd (which is multiplied by the
"bs" setting) to limit the length of data read or written.
This describes how to check the condition using mmc-utils, if
the Micro SD card supports it (and you can understand what
it says): https://developer.toradex.com/knowledge-base/emmc-linux#Configuration_and_Monitoring
I don't think that's the right approach. You'd probably be
better off by making the partitions stop some safe distance
from the end,
Or if you want to be able to downgrade SD card size more....
freely, you could try using fsarchiver instead of dd.
That means you have to create the partitions again before
restoring the archive to a new SD card.
It can restore to differently sized partitions, but you have
to archive individual partitions instead of the whole disk.
dd is pretty safe as it will stop when it gets to the end of the source or destination.
Put the SD card in another Linux machine and use gparted resize the last partition so there is enough space after it to allow it fir on another
card.
It is possible to resize the last root partition and then shrink the
extended partition, but it's more involved.
As ever the recommendation is try out different OS's on a NOOBs card, but once you've decided which one(s) you want to use, put them on a dedicated
SD card with a simple partition layout, and avoid a lot of grief.
Kev,
This describes how to check the condition using mmc-utils, if
the Micro SD card supports it (and you can understand what
it says):
https://developer.toradex.com/knowledge-base/emmc-linux#Configuration_and_Monitoring
Thank you. I was hoping for something like that.
I don't think that's the right approach. You'd probably be
better off by making the partitions stop some safe distance
from the end,
As mentioned, I'm using a NOOBS image. AFAIK I've got zero control over which, and with which sizes it creates the partitions (it will just fill out all available space).
Besides, DD doesn't care about partitions, so I don't think that that solution will solve much of anything - unless I could somehow tell DD to
stop where the last partition ends ...
Hence my idea to make the NOOBS installation think the micro-SD card is >actually smaller than it is ...
Do you have a bit more info about that ? I would not mind having the NOOBS >pre-boot "press shift to reinstall" stuff removed.
On Thu, 30 Sep 2021 13:54:46 +0200, "R.Wieser" <address@not.available> declaimed the following:
formatHence my idea to make the NOOBS installation think the micro-SD card is >>actually smaller than it is ...I don't think the Raspberry-Pi foundation even distributes NOOBS
any more. The closest is the "Raspberry-Pi Imager" -- which runs on Windows/Macs (and strangely, listed for Ubuntu even though R-Pi OS iscard --
based on Debian).
As I understand it, this program does a network download of the selected OS and writes just it to an SD card. One does not have the
NOOBS overhead of having a couple of different OS on the card (along
with the network install OS). {the imager installer is just 20MB for
Windows machines -- so it obviously can not contain a 3GB OS image
itself}
[Trimmed]
C:\Users\Wulfraed>dir e:\MicroSupport\RPI3_4
Directory of e:\MicroSupport\RPI3_4
03/28/2021 06:28 PM 3,007,638,235 2021-03-04-raspios-buster-armhf-full.zip
06/23/2021 06:27 PM 3,005,999,855 2021-05-07-raspios-buster-armhf-full.zip
09/18/2021 12:29 PM 19,772,672 imager_1.6.2.exe
10/13/2020 03:09 PM 2,441,652,758 NOOBS_v3_5_0.zip
Do you have a bit more info about that ? I would not mind having the
NOOBS pre-boot "press shift to reinstall" stuff removed.
Not using an out-of-date NOOBS image might be an option... https://www.raspberrypi.org/software/operating-systems/
The last NOOBS image was 3.5.0, and I show a download date a year ago.
In the meantime, there have been at least TWO RaspiOS images made
available. (See above listing)
Still won't do anything for the partition size filling the SD
when different brands of cards may reserve different amounts of blocks
for bad-block remapping.
Druck,
dd is pretty safe as it will stop when it gets to the end of the source or >> destination.
:-) It would be rather safe if it would continue too. Its just that on reading you get large image files, and on writing you waste a lot of time with out anything to show for.
Also, it depends on your definition of "safe" : if it stops with writing because the target (micro-SD card) is smaller than the source (image file) than you stand a good chance of an unusable, or perhaps even crashing copy. :-|
Though in my case my DD program just told me that the target micro-SD card was to small to contain the source image file, and stopped. Rightly so.
Put the SD card in another Linux machine and use gparted resize the last
partition so there is enough space after it to allow it fir on another
card.
Yikes! And than just run a DD in a "just do it, ignore that its too big" mode ? That feels to me as if I'm just asking for trouble (see above) ...
Use the 'parted' command-line to format the new SD card with two
partitions:
- partition no 1: a 1 GB fat32 partition with its boot flag set
- partition no 2: an ext4 partition occupying the rest of the card
Use the 'dd' utility to copy /dev/mmcblk0p1 into the first partition and /dev/root into the second partition.
Now the RPi should boot from the new card.
You could make partition smaller.
Look at resize2fs
After that you could also make partition smaller in the partition table.
That way you will be able to copy from one card to another.
In case you want to "reserve" the end of the card... you can make dummy partition at the end. With some kind of "weird" type your pi would not
try to mount.
If you are manually creating new partitions as above, don't use dd, but
copy all the files with:-
rsync -axP /mnt/source/boot/ /mnt/dest/boot
rsync -axVAXP /mnt/source/root /mnt/dest/root
I don't think the Raspberry-Pi foundation even distributes NOOBS
format any more.
As I understand it, this program does a network download of
the selected OS and writes just it to an SD card.
Not using an out-of-date NOOBS image might be an option...
Still won't do anything for the partition size filling the SD card --
Use the 'parted' command-line to format the new SD card with two
partitions:
- partition no 1: a 1 GB fat32 partition with its boot flag set
- partition no 2: an ext4 partition occupying the rest of the card
Use the 'dd' utility to copy /dev/mmcblk0p1 into the first partition and /dev/root into the second partition.
Not if you have resized the partitions first with gparted as I advised.
Right this is turning in to another one of these troll threads where you
ask for advice, and then deliberately ignore / misinterpret it to cause a pointless argument.
Pack it in.
Martin,
Use the 'parted' command-line to format the new SD card with two
partitions:
- partition no 1: a 1 GB fat32 partition with its boot flag set
- partition no 2: an ext4 partition occupying the rest of the card
Use the 'dd' utility to copy /dev/mmcblk0p1 into the first partition and
/dev/root into the second partition.
Thanks, but I'm not sure I follow. Should I understand from this that
RPis 'dd' utility will automatically resize the source partition onto the target one ? Or is something else going on ?
I see no merit whatsoever in using DD on partitions - once you are at
the file/directory level, use rsync to copy files
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 418 |
Nodes: | 16 (2 / 14) |
Uptime: | 23:07:12 |
Calls: | 8,804 |
Calls today: | 2 |
Files: | 13,304 |
Messages: | 5,970,093 |