Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Old programmers never die, they just hit account block limit.


computers / comp.sys.raspberry-pi / Re: Limiting the capacity of SD cards for the pi

SubjectAuthor
* Limiting the capacity of SD cards for the piBob Latham
+* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|`* Re: Limiting the capacity of SD cards for the piBob Latham
| `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|  `* Re: Limiting the capacity of SD cards for the piBob Latham
|   `- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
+* Re: Limiting the capacity of SD cards for the piIan
|+- Re: Limiting the capacity of SD cards for the piBob Latham
|`* Re: Limiting the capacity of SD cards for the piBob Latham
| +* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |`* Re: Limiting the capacity of SD cards for the piBob Latham
| | +* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | |`* Re: Limiting the capacity of SD cards for the piBob Latham
| | | `* Re: Limiting the capacity of SD cards for the piIan
| | |  `* Re: Limiting the capacity of SD cards for the piBob Latham
| | |   `* Re: Limiting the capacity of SD cards for the piIan
| | |    `* Re: Limiting the capacity of SD cards for the piBob Latham
| | |     +* Re: Limiting the capacity of SD cards for the piIan
| | |     |+- Re: Limiting the capacity of SD cards for the piBob Latham
| | |     |`* Re: Limiting the capacity of SD cards for the pidruck
| | |     | `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | |     |  `* Re: Limiting the capacity of SD cards for the piChris Elvidge
| | |     |   +* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | |     |   |`* Re: Limiting the capacity of SD cards for the piRichard Harnden
| | |     |   | +* Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| | |     |   | |`- Re: Limiting the capacity of SD cards for the piMartin Gregorie
| | |     |   | `- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | |     |   `* Re: Limiting the capacity of SD cards for the piTauno Voipio
| | |     |    +- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | |     |    `- Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| | |     `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | |      +* Re: Limiting the capacity of SD cards for the piChris Elvidge
| | |      |`* Re: Limiting the capacity of SD cards for the piBob Latham
| | |      | `- Re: Limiting the capacity of SD cards for the piChris Elvidge
| | |      `- Re: Limiting the capacity of SD cards for the piBob Latham
| | `* Re: Limiting the capacity of SD cards for the piMartin Gregorie
| |  +* Re: Limiting the capacity of SD cards for the piBob Latham
| |  |+* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  ||+* Re: Limiting the capacity of SD cards for the piPancho
| |  |||+* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  ||||`* Re: Limiting the capacity of SD cards for the piPancho
| |  |||| +* Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| |  |||| |`* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  |||| | +* Re: Limiting the capacity of SD cards for the piChris Elvidge
| |  |||| | |`- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  |||| | `* Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| |  |||| |  `- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  |||| `- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  |||`- Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| |  ||`* Re: Limiting the capacity of SD cards for the piCharlie Gibbs
| |  || `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  ||  `* Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| |  ||   `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |  ||    `- Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| |  |`- Re: Limiting the capacity of SD cards for the piMartin Gregorie
| |  `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |   +- Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| |   +- Re: Limiting the capacity of SD cards for the piCharlie Gibbs
| |   `- Re: Limiting the capacity of SD cards for the piComputer Nerd Kev
| +* Re: Limiting the capacity of SD cards for the piMrtn
| |+- Re: Limiting the capacity of SD cards for the piIan
| |`* Re: Limiting the capacity of SD cards for the piBob Latham
| | `* Re: Limiting the capacity of SD cards for the piMrtn
| |  `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |   `- Re: Limiting the capacity of SD cards for the piCharlie Gibbs
| `* Re: Limiting the capacity of SD cards for the piBob Latham
|  +* Re: Limiting the capacity of SD cards for the piIan
|  |`* Re: Limiting the capacity of SD cards for the piBob Latham
|  | `* Re: Limiting the capacity of SD cards for the piIan
|  |  `* Re: Limiting the capacity of SD cards for the piBob Latham
|  |   `- Re: Limiting the capacity of SD cards for the piIan
|  +- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|  `- Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
+* Re: Limiting the capacity of SD cards for the piComputer Nerd Kev
|+* Re: Limiting the capacity of SD cards for the piR.Wieser
||`* Re: Limiting the capacity of SD cards for the piChris Elvidge
|| `* Re: Limiting the capacity of SD cards for the piR.Wieser
||  `* Re: Limiting the capacity of SD cards for the piChris Elvidge
||   `- Re: Limiting the capacity of SD cards for the piR.Wieser
|`* Re: Limiting the capacity of SD cards for the piBob Latham
| +* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| |`* Re: Limiting the capacity of SD cards for the piAhem A Rivet's Shot
| | +- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
| | `- Re: Limiting the capacity of SD cards for the piCharlie Gibbs
| `* Re: Limiting the capacity of SD cards for the piComputer Nerd Kev
|  +* Re: Limiting the capacity of SD cards for the piBob Latham
|  |+* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|  ||`* Re: Limiting the capacity of SD cards for the piBob Latham
|  || `- Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|  |`- Re: Limiting the capacity of SD cards for the piIan
|  `* Re: Limiting the capacity of SD cards for the pidruck
|   `* Re: Limiting the capacity of SD cards for the piBob Latham
|    +* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|    |`* Re: Limiting the capacity of SD cards for the piBob Latham
|    | +* Re: Limiting the capacity of SD cards for the piAndy Burns
|    | |`* Re: Limiting the capacity of SD cards for the piBob Latham
|    | | `* Re: Limiting the capacity of SD cards for the piMartin Gregorie
|    | |  `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|    | |   `- Re: Limiting the capacity of SD cards for the piMartin Gregorie
|    | `* Re: Limiting the capacity of SD cards for the piThe Natural Philosopher
|    |  `* Re: Limiting the capacity of SD cards for the piBob Latham
|    +* Re: Limiting the capacity of SD cards for the piAndy Burns
|    `* Re: Limiting the capacity of SD cards for the pidruck
+* Re: Limiting the capacity of SD cards for the piChris Elvidge
`* Re: Limiting the capacity of SD cards for the pi56g.1173

Pages:123456789
Limiting the capacity of SD cards for the pi

<5ae53c469cbob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7229&group=comp.sys.raspberry-pi#7229

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 09:58:13 +0100
Organization: None
Lines: 16
Message-ID: <5ae53c469cbob@sick-of-spam.invalid>
X-Trace: individual.net 0C5sU6rimr5jKTczQtzklwvb+m4IsBcbn9BATI1nxiOePdYbR4
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:zh7Icpk+eOUCPoUlW+Bm8LdFggs= sha256:wHizlReQgB5VZZ092nmIQmCrmsYbli7h9n/zjyaTYb8=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 08:58 UTC

Hi,

I build images for projects on 4GB cards so that I can save a
completed image without using too much disc space. My problem comes
when I try to burn a new card from the saved image. Often it will not
fit because there are small differences in the size of the cards.

Does anyone know of a way to reduce the capacity of an SD card so
that I can make a 4GB card maybe 3.5GB which would mean all cards
could easily manage it and reduce the size of the save image.

Thanks.

Bob.

Re: Limiting the capacity of SD cards for the pi

<ue6fs9$ad15$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7230&group=comp.sys.raspberry-pi#7230

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 10:11:36 +0100
Organization: A little, after lunch
Lines: 40
Message-ID: <ue6fs9$ad15$1@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 17 Sep 2023 09:11:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="315702974463422239a68aede622b53a";
logging-data="341029"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+83Xpx+Wm4Zbqk9LqAwuye+Y4V5RlqsX8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:a95UKYJLD9BCHg2dOrYZHxfNrkI=
Content-Language: en-GB
In-Reply-To: <5ae53c469cbob@sick-of-spam.invalid>
 by: The Natural Philosop - Sun, 17 Sep 2023 09:11 UTC

On 17/09/2023 09:58, Bob Latham wrote:
> Hi,
>
> I build images for projects on 4GB cards so that I can save a
> completed image without using too much disc space. My problem comes
> when I try to burn a new card from the saved image. Often it will not
> fit because there are small differences in the size of the cards.
>
> Does anyone know of a way to reduce the capacity of an SD card so
> that I can make a 4GB card maybe 3.5GB which would mean all cards
> could easily manage it and reduce the size of the save image.
>
>
https://superuser.com/questions/610819/how-to-resize-img-file-created-with-dd

has a long and detailed description of how to do this...

....basically 'parted' to shrink the partitions and 'truncate' to shrink
the dd'ed image.

I have no idea if this method works, as I have never tried it

Another method cited that again I have no experience of is Pishrink -
https://github.com/Drewsif/Pishrink

This looks at a cursory glance to be a script that automates the process.

Let me know if this works as I will need a similar script in due course

> Thanks.
>
> Bob.
>

--
"The great thing about Glasgow is that if there's a nuclear attack it'll
look exactly the same afterwards."

Billy Connolly

Re: Limiting the capacity of SD cards for the pi

<5ae541cb93bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7232&group=comp.sys.raspberry-pi#7232

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 10:58:30 +0100
Organization: None
Lines: 47
Message-ID: <5ae541cb93bob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid> <ue6fs9$ad15$1@dont-email.me>
X-Trace: individual.net yicPW0dzYICERrnDW/b/bwHN52kpYuc2VuGGKOticPh4rr4r1O
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:gPCYnrIyd0qqODrkdpQrKBwC9O0= sha256:Bi0HTeFZlgImXGgtDQ+2QxTQZ38UZsA5Rep7FhUmucI=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 09:58 UTC

In article <ue6fs9$ad15$1@dont-email.me>,
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 17/09/2023 09:58, Bob Latham wrote:

> > Does anyone know of a way to reduce the capacity of an SD card so
> > that I can make a 4GB card maybe 3.5GB which would mean all cards
> > could easily manage it and reduce the size of the save image.
> >

> https://superuser.com/questions/610819/how-to-resize-img-file-created-with-dd

> has a long and detailed description of how to do this...

> ...basically 'parted' to shrink the partitions and 'truncate' to
> shrink the dd'ed image.

> I have no idea if this method works, as I have never tried it

> Another method cited that again I have no experience of is
> Pishrink - https://github.com/Drewsif/Pishrink

> This looks at a cursory glance to be a script that automates the
> process.

> Let me know if this works as I will need a similar script in due
> course

Much appreciate your help, thanks.

Unfortunately, my knowledge is not great and both of those articles
very quickly went way passed my understanding.

I *think* they both assume I have a linux pc, I don't, I have a W10
PC.

For another project I recently looked at getting linux to run virtual
on my PC but again I quickly ran out of knowledge and couldn't do it.

Articles mostly assume far more knowledge than I have.

I was hoping to simply reduce the size of the SD card before it was
even formatted. Maybe that's not possible.

Thanks anyway.

Bob.

Re: Limiting the capacity of SD cards for the pi

<ue6jl8$aull$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7233&group=comp.sys.raspberry-pi#7233

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 11:16:08 +0100
Organization: A little, after lunch
Lines: 81
Message-ID: <ue6jl8$aull$1@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid> <ue6fs9$ad15$1@dont-email.me>
<5ae541cb93bob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 17 Sep 2023 10:16:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="315702974463422239a68aede622b53a";
logging-data="359093"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sKBjqtYp7qVduxzJ+zbnjdMjNLzdVOmQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:5rSSFDqdNKku9xxmczUSDrn3Qng=
Content-Language: en-GB
In-Reply-To: <5ae541cb93bob@sick-of-spam.invalid>
 by: The Natural Philosop - Sun, 17 Sep 2023 10:16 UTC

On 17/09/2023 10:58, Bob Latham wrote:
> In article <ue6fs9$ad15$1@dont-email.me>,
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> On 17/09/2023 09:58, Bob Latham wrote:
>
>>> Does anyone know of a way to reduce the capacity of an SD card so
>>> that I can make a 4GB card maybe 3.5GB which would mean all cards
>>> could easily manage it and reduce the size of the save image.
>>>
>
>> https://superuser.com/questions/610819/how-to-resize-img-file-created-with-dd
>
>> has a long and detailed description of how to do this...
>
>> ...basically 'parted' to shrink the partitions and 'truncate' to
>> shrink the dd'ed image.
>
>> I have no idea if this method works, as I have never tried it
>
>> Another method cited that again I have no experience of is
>> Pishrink - https://github.com/Drewsif/Pishrink
>
>> This looks at a cursory glance to be a script that automates the
>> process.
>
>> Let me know if this works as I will need a similar script in due
>> course
>
> Much appreciate your help, thanks.
>
> Unfortunately, my knowledge is not great and both of those articles
> very quickly went way passed my understanding.
>
> I *think* they both assume I have a linux pc, I don't, I have a W10
> PC.
>

Ah. I never thought of that. You could install Linux in a virtual machine.

> For another project I recently looked at getting linux to run virtual
> on my PC but again I quickly ran out of knowledge and couldn't do it.
>
Oh. Mm.
Its non trivial getting virtualBox set up if you are not especially
technical.

HOWEVER you should be able to get a live Linux working by installing it
on a DVD or USB stick and booting from that.

Or installing Linux on some old piece of hardware left over from the
Resurrection and the Roman Empire...

> Articles mostly assume far more knowledge than I have.
>

Tell me about it.

> I was hoping to simply reduce the size of the SD card before it was
> even formatted. Maybe that's not possible.
>
Well I don't think you can do THAT. What you need is an installation on
e.g. a 2GB card that can never exceed the size of the 4GB target.

Frankly why not bite the bullet and install 4GB images onto 8/16GB SD
cards as these are as cheap as 4GB these days?

> Thanks anyway.
>
> Bob.
>

--
I was brought up to believe that you should never give offence if you
can avoid it; the new culture tells us you should always take offence if
you can. There are now experts in the art of taking offence, indeed
whole academic subjects, such as 'gender studies', devoted to it.

Sir Roger Scruton

Re: Limiting the capacity of SD cards for the pi

<5ae54a0eacbob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7234&group=comp.sys.raspberry-pi#7234

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 12:28:45 +0100
Organization: None
Lines: 61
Message-ID: <5ae54a0eacbob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid> <ue6fs9$ad15$1@dont-email.me>
<5ae541cb93bob@sick-of-spam.invalid> <ue6jl8$aull$1@dont-email.me>
X-Trace: individual.net fyrSSXzBerN1HGEw+TDPrQ7PO/ivC0gvSB5aLC+iV/HS7X5l1A
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:HvKuaXiM1MP0kcZS66FwfP99wjk= sha256:SPoRVd/N1Yc9gXrlIoRvlQqRZgnU/4X6ibHmMN5LwG4=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 11:28 UTC

In article <ue6jl8$aull$1@dont-email.me>,
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 17/09/2023 10:58, Bob Latham wrote:
> > In article <ue6fs9$ad15$1@dont-email.me>,
> > The Natural Philosopher <tnp@invalid.invalid> wrote:
> >> On 17/09/2023 09:58, Bob Latham wrote:

> > I *think* they both assume I have a linux pc, I don't, I have a
> > W10 PC.

> Ah. I never thought of that. You could install Linux in a virtual
> machine.

> > For another project I recently looked at getting linux to run
> > virtual on my PC but again I quickly ran out of knowledge and
> > couldn't do it.
> >
> Oh. Mm. Its non trivial getting virtualBox set up if you are not
> especially technical.

> HOWEVER you should be able to get a live Linux working by
> installing it on a DVD or USB stick and booting from that.

Oh yes, I remember doing that many years ago, so it's still possible.
I might give that a go.

> Or installing Linux on some old piece of hardware left over from
> the Resurrection and the Roman Empire...

> > Articles mostly assume far more knowledge than I have.

> Tell me about it.

> > I was hoping to simply reduce the size of the SD card before it
> > was even formatted. Maybe that's not possible.
> >
> Well I don't think you can do THAT. What you need is an
> installation on e.g. a 2GB card that can never exceed the size of
> the 4GB target.

> Frankly why not bite the bullet and install 4GB images onto 8/16GB
> SD cards as these are as cheap as 4GB these days?

That's *exactly* what I am doing and then expanding to fill on the
16GB card.

I'm hitting the size problem only because I save a build in stages.
1) OS up and running.
2) OS + samba running.
3) Apache or mpd ... running
4) Pihole or MediaPlayer Running.

By doing that, if I'm testing beta versions of say media player then
I don't need to build from scratch.

But if when i'm building I don't use the smallest 4GB I have and
build something slightly bigger it will not go on a smaller 4GB card
later for the next test.

Bob.

Re: Limiting the capacity of SD cards for the pi

<slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7235&group=comp.sys.raspberry-pi#7235

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!jusme.eternal-september.org!.POSTED!not-for-mail
From: ${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com (Ian)
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 11:48:35 -0000 (UTC)
Organization: Wet Socks!
Lines: 131
Message-ID: <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
References: <5ae53c469cbob@sick-of-spam.invalid>
Injection-Date: Sun, 17 Sep 2023 11:48:35 -0000 (UTC)
Injection-Info: jusme.eternal-september.org; posting-host="3d0e28f4512684d81937e9b9a26c6eb4";
logging-data="392888"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QL5M8EXAtaIsMp+IPJmQE"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:RR86z61u0fChZJA1MR3EXEHW2Xw=
 by: Ian - Sun, 17 Sep 2023 11:48 UTC

On 2023-09-17, Bob Latham <bob@sick-of-spam.invalid> wrote:

> I build images for projects on 4GB cards so that I can save a
> completed image without using too much disc space. My problem comes
> when I try to burn a new card from the saved image. Often it will not
> fit because there are small differences in the size of the cards.
>
> Does anyone know of a way to reduce the capacity of an SD card so
> that I can make a 4GB card maybe 3.5GB which would mean all cards
> could easily manage it and reduce the size of the save image.

As it happens, I've just had to do that to reduce a 16GB image on a 32GB
SD card to < 8GB. I did it just using a Pi and a USB SDcard adapter, old
school style.

All as root on the Pi:

1. Clone the SD card you're trying to shrink (using dd, Win32DiskImager
or whatever you normally use to read/write SD card images), just
in case.

2. Insert the cloned SD card into the USB SDcard adapter connected to
a Pi. It should appear as /dev/sdc or somesuch (dmesg should show
it being picked up). I'll assume /dev/sdc for this.

3. Mount the OS partition (second one) on the local Pi:

# mkdir /mnt/x
# mount /dev/sd2 /mnt/x

4. Tar up the OS partition to the local Pi. Note this assumes there's
plenty of free space on the Pi filesystem!

# cd /mnt/x
# tar -czf ~/xxx.tar.gz .

5. Unmount the OS parition:

# cd
# umount /mnt/x

6. Use fdisk to delete and recreate the second partition (ONLY!) on
the SDC card:

# fdisk /dev/sdc

p ## shows current partiton table, mine looked like this:

Disk /dev/sdc: 29.7 GiB, 31914983424 bytes, 62333952 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: 0xd9b3f436

Device Boot Start End Sectors Size Id Type
/dev/sdc1 8192 532479 524288 256M c W95 FAT32 (LBA)
/dev/sdc2 532480 31116287 30583808 14.6G 83 Linux

(still in fdisk):

d ## Delete second partition
2

n
p
2
532480 ## original start sector of the second partition from above
+7G ## Or however big you want it to be
y ## Wipe filesystem signature

p ## Check it looks right:

Disk /dev/sdc: 29.7 GiB, 31914983424 bytes, 62333952 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: 0xd9b3f436

Device Boot Start End Sectors Size Id Type
/dev/sdc1 8192 532479 524288 256M c W95 FAT32 (LBA)
/dev/sdc2 532480 15212543 14680064 7G 83 Linux

w ## Do it

7. Create filesyetem in new partition:

# mkfs -t ext4 /dev/sdc2

8. Mount the new (empty) partition:

# mount /dev/sd2 /mnt/x

9. Restore the OS files into it:

# cd /mnt/x
# tar -xzf ~/xxx.tar.gz

10. Unmount it:

# cd
# umount /mnt/x

11. Now you can create an image file of the reduced boot and OS partitions
that can be written to a smaller SD card. To do this I have a short script
that computes the size in MB from the last sector field of the fdisk
output (messy but it seems to work). Again you'll need plenty of space
wherever you want to put the new image:

# last_sector=$(echo "p" | fdisk /dev/sdc | awk '/^\/dev\/sdc/ { print $3 }' | sort -n | tail -1)
# n_bytes="$(((last_sector+1)*512))"
# n_mb="$(((n_bytes-1)/1048576+1))"
# check="$((n_mb*1048576/512))"
# echo "Last sector: ${last_sector}, ${n_mb} MB, writing ${check} sectors..."

# dd if=/dev/sdc bs=1048576 count=${n_mb} | gzip > ~/newcard.img.gz

(E&OE)

Don't forget to delete the temporary tarfile.

--
Ian

"Tamahome!!!" - "Miaka!!!"

Re: Limiting the capacity of SD cards for the pi

<ue6p5u$btuq$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7236&group=comp.sys.raspberry-pi#7236

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 12:50:22 +0100
Organization: A little, after lunch
Lines: 80
Message-ID: <ue6p5u$btuq$3@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid> <ue6fs9$ad15$1@dont-email.me>
<5ae541cb93bob@sick-of-spam.invalid> <ue6jl8$aull$1@dont-email.me>
<5ae54a0eacbob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 17 Sep 2023 11:50:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="315702974463422239a68aede622b53a";
logging-data="391130"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BCdb2K7JKgv6Oq4jLjw3dqBTaxk6z8NE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:IqZuJr2OYNK4r53XvvCUJItLKBU=
Content-Language: en-GB
In-Reply-To: <5ae54a0eacbob@sick-of-spam.invalid>
 by: The Natural Philosop - Sun, 17 Sep 2023 11:50 UTC

On 17/09/2023 12:28, Bob Latham wrote:
> In article <ue6jl8$aull$1@dont-email.me>,
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> On 17/09/2023 10:58, Bob Latham wrote:
>>> In article <ue6fs9$ad15$1@dont-email.me>,
>>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>>> On 17/09/2023 09:58, Bob Latham wrote:
>
>>> I *think* they both assume I have a linux pc, I don't, I have a
>>> W10 PC.
>
>> Ah. I never thought of that. You could install Linux in a virtual
>> machine.
>
>>> For another project I recently looked at getting linux to run
>>> virtual on my PC but again I quickly ran out of knowledge and
>>> couldn't do it.
>>>
>> Oh. Mm. Its non trivial getting virtualBox set up if you are not
>> especially technical.
>
>> HOWEVER you should be able to get a live Linux working by
>> installing it on a DVD or USB stick and booting from that.
>
> Oh yes, I remember doing that many years ago, so it's still possible.
> I might give that a go.
>
>> Or installing Linux on some old piece of hardware left over from
>> the Resurrection and the Roman Empire...
>
>>> Articles mostly assume far more knowledge than I have.
>
>> Tell me about it.
>
>>> I was hoping to simply reduce the size of the SD card before it
>>> was even formatted. Maybe that's not possible.
>>>
>> Well I don't think you can do THAT. What you need is an
>> installation on e.g. a 2GB card that can never exceed the size of
>> the 4GB target.
>
>> Frankly why not bite the bullet and install 4GB images onto 8/16GB
>> SD cards as these are as cheap as 4GB these days?
>
> That's *exactly* what I am doing and then expanding to fill on the
> 16GB card.
>
> I'm hitting the size problem only because I save a build in stages.
> 1) OS up and running.
> 2) OS + samba running.
> 3) Apache or mpd ... running
> 4) Pihole or MediaPlayer Running.
>
> By doing that, if I'm testing beta versions of say media player then
> I don't need to build from scratch.
>
> But if when i'm building I don't use the smallest 4GB I have and
> build something slightly bigger it will not go on a smaller 4GB card
> later for the next test.
>
> Bob.
>
You could do what I have been half doing, and build a script that turns
a raw installation into my customised one.

--
If you tell a lie big enough and keep repeating it, people will
eventually come to believe it. The lie can be maintained only for such
time as the State can shield the people from the political, economic
and/or military consequences of the lie. It thus becomes vitally
important for the State to use all of its powers to repress dissent, for
the truth is the mortal enemy of the lie, and thus by extension, the
truth is the greatest enemy of the State.

Joseph Goebbels

Re: Limiting the capacity of SD cards for the pi

<5ae551ed63bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7237&group=comp.sys.raspberry-pi#7237

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 13:54:42 +0100
Organization: None
Lines: 13
Message-ID: <5ae551ed63bob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid> <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
X-Trace: individual.net 0gLiUjRljyk2HQMtXobwnwWW+RwX/PoVnxPbwcCuLiDH2z6p55
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:fGNEYkz7AYwC8zVannpwjafNYGA= sha256:8o5VtDzK07oiH7CAz/jRhTdyVPvqNPIw3q6JTkuZFv8=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 12:54 UTC

In article
<slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
Ian
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:

> As it happens, I've just had to do that to reduce a 16GB image on a
> 32GB SD card to < 8GB. I did it just using a Pi and a USB SDcard
> adapter, old school style.

Thanks Ian that's very interesting. I'll look at this after the race.

Bob.

Re: Limiting the capacity of SD cards for the pi

<5ae5599655bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7238&group=comp.sys.raspberry-pi#7238

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!nntp.comgw.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 15:18:22 +0100
Organization: None
Lines: 30
Message-ID: <5ae5599655bob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid> <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
X-Trace: individual.net 5TCIUvgpZ1VcWOPebmXmogRfpR+VcgohuirsfneJWHBtqIWor1
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:J7b9t3gtigY3CYsBEKZ68RsMKKk= sha256:nLJGiWCF4ejhKiILbLUd3fJQecqdkshC83rJwCUKhH8=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 14:18 UTC

In article
<slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
Ian
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:

> 1. Clone the SD card you're trying to shrink (using dd,
> Win32DiskImager or whatever you normally use to read/write SD
> card images), just in case.

Yes. Done.

> 2. Insert the cloned SD card into the USB SDcard adapter connected
> to a Pi.

Yes.

> It should appear as /dev/sdc or somesuch (dmesg should
> show it being picked up).

So sorry, I've no idea how I would see that? I was logged in to the
pi via putty before I plugged the device in but nothing appeared.

I'm only using a headless light version of the pios, is that my
problem or is it just ignorance?

Thanks.

Bob.

Re: Limiting the capacity of SD cards for the pi

<ue7352$dmc3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7239&group=comp.sys.raspberry-pi#7239

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 15:40:33 +0100
Organization: A little, after lunch
Lines: 91
Message-ID: <ue7352$dmc3$1@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid>
<slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
<5ae5599655bob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Sep 2023 14:40:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="315702974463422239a68aede622b53a";
logging-data="448899"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rJDtOaK1bqiHJ3o/MUGZMt8aswEBLWkc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:Jvg9C3jkyrQzCfKWOANVv31UI7s=
In-Reply-To: <5ae5599655bob@sick-of-spam.invalid>
Content-Language: en-GB
 by: The Natural Philosop - Sun, 17 Sep 2023 14:40 UTC

On 17/09/2023 15:18, Bob Latham wrote:
> In article
> <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
> Ian
> <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
>
>> 1. Clone the SD card you're trying to shrink (using dd,
>> Win32DiskImager or whatever you normally use to read/write SD
>> card images), just in case.
>
> Yes. Done.
>
>> 2. Insert the cloned SD card into the USB SDcard adapter connected
>> to a Pi.
>
> Yes.

That is a second SD card adapter plugged into the Pis USB port

>
>> It should appear as /dev/sdc or somesuch (dmesg should
>> show it being picked up).
>
> So sorry, I've no idea how I would see that? I was logged in to the
> pi via putty before I plugged the device in but nothing appeared.
>
OK, 'sudo mount' would show what it was and where it was..

> I'm only using a headless light version of the pios, is that my
> problem or is it just ignorance?
>
Just ignorance, but its not hard to get there.

In linux all disks systems look like *files* in the directory /dev/
The dir command in linux is 'ls' so :

'ls /dev' should show your disk in there somewhere
The SD card you are running on will be /dev/mmcblk0 and its two partitions
/dev/mmcblk0p1 and /dev/mmcblk0p2. These will be 'mounted' on /boot,
and /

mount | grep mm

is a command uou cvan use to see where they are mounted - the '| grep
mm' means 'select only lines from the output containing 'mm'
e.g.

$mount | grep mm
/dev/mmcblk0p2 on / type ext4 (rw,noatime)
/dev/mmcblk0p1 on /boot type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

Now if you plug another SD card into the system via a USB SD card reader
that should be automatically mounted somewhere.

My guess would be in a media subdirectory of your home directory.

so

$mount | grep media
should tell you what it is called.

In Linux it is conventional that the whole disk will be files as
/dev/something, and partitions on it will be
/dev/somethinga or
/dev/somethingb or
/dev/somethingp1

etc...

These are all the *device names*you will need in order to manipulate the
partitions and the raw SD card

>
> Thanks.
>
> Bob.
>

--
“A leader is best When people barely know he exists. Of a good leader,
who talks little,When his work is done, his aim fulfilled,They will say,
“We did this ourselves.”

― Lao Tzu, Tao Te Ching

Re: Limiting the capacity of SD cards for the pi

<87wmwoc0zu.fsf@no-email.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7240&group=comp.sys.raspberry-pi#7240

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mrtn@no-email.invalid (Mrtn)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 16:45:09 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <87wmwoc0zu.fsf@no-email.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
<5ae5599655bob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="400ad1fb9c9636a3320a04c2dc1c667d";
logging-data="447349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CKZp3LHBYtU9h630ntbT4"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:iJF3QIfm30cKfeXTZt9uVCHamfQ=
sha1:1NRez7gsqVMGG6S9wAzAYIg2DKg=
 by: Mrtn - Sun, 17 Sep 2023 14:45 UTC

Bob Latham <bob@sick-of-spam.invalid> writes:

> In article
> <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
> Ian
> <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
<cut>
>> It should appear as /dev/sdc or somesuch (dmesg should
>> show it being picked up).
>
> So sorry, I've no idea how I would see that? I was logged in to the
> pi via putty before I plugged the device in but nothing appeared.

In putty try typing:
dmesg
(and hit enter)
or
sudo dmesg
(and hit enter)
if you're not logged in as root.

Re: Limiting the capacity of SD cards for the pi

<slrnuge4v5.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7244&group=comp.sys.raspberry-pi#7244

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!jusme.eternal-september.org!.POSTED!not-for-mail
From: ${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com (Ian)
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 14:57:41 -0000 (UTC)
Organization: Wet Socks!
Lines: 50
Message-ID: <slrnuge4v5.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
References: <5ae53c469cbob@sick-of-spam.invalid>
<slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
<5ae5599655bob@sick-of-spam.invalid> <87wmwoc0zu.fsf@no-email.invalid>
Injection-Date: Sun, 17 Sep 2023 14:57:41 -0000 (UTC)
Injection-Info: jusme.eternal-september.org; posting-host="3d0e28f4512684d81937e9b9a26c6eb4";
logging-data="452118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uFiszftpxtDlPZivPx1YB"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:FSrJG2wVmQUn7H086PYsxeibVnM=
 by: Ian - Sun, 17 Sep 2023 14:57 UTC

On 2023-09-17, Mrtn <mrtn@no-email.invalid> wrote:
> Bob Latham <bob@sick-of-spam.invalid> writes:
>
>> In article
>> <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
>> Ian
>> <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
><cut>
>>> It should appear as /dev/sdc or somesuch (dmesg should
>>> show it being picked up).
>>
>> So sorry, I've no idea how I would see that? I was logged in to the
>> pi via putty before I plugged the device in but nothing appeared.
>
> In putty try typing:
> dmesg
> (and hit enter)
> or
> sudo dmesg
> (and hit enter)
> if you're not logged in as root.

Yes, that's about it. I see this from dmesg after the SD card is inserted:

[ 4259.125974] usb-storage 1-1.1.3:1.0: USB Mass Storage device detected
[ 4259.127272] scsi host0: usb-storage 1-1.1.3:1.0
[ 4260.181673] scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 9325 PQ: 0 ANSI: 0
[ 4260.183483] scsi 0:0:0:1: Direct-Access Generic STORAGE DEVICE 9325 PQ: 0 ANSI: 0
[ 4260.185400] scsi 0:0:0:2: Direct-Access Generic STORAGE DEVICE 9325 PQ: 0 ANSI: 0
[ 4260.187328] scsi 0:0:0:3: Direct-Access Generic STORAGE DEVICE 9325 PQ: 0 ANSI: 0
[ 4260.223150] sd 0:0:0:2: [sdc] Attached SCSI removable disk
[ 4260.224466] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 4260.227173] sd 0:0:0:3: [sdd] Attached SCSI removable disk
[ 4260.232037] sd 0:0:0:1: [sdb] Attached SCSI removable disk
[ 4346.699670] sd 0:0:0:2: [sdc] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
[ 4346.707646] sdc: sdc1 sdc2
[ 4346.720048] sdc: sdc1 sdc2

If you're running any kind of desktop environment that may get in the way and mount the SD
card in odd places, though if you're running a minimal system that shouldn't be an issue.

All the commands are standard Linux ones, so should be present.

I suggest you do "sudo bash" if you're not logging in as root, makes things simpler :)

--
Ian

"Tamahome!!!" - "Miaka!!!"

Re: Limiting the capacity of SD cards for the pi

<5ae55f08eebob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7246&group=comp.sys.raspberry-pi#7246

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 16:17:53 +0100
Organization: None
Lines: 135
Message-ID: <5ae55f08eebob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
X-Trace: individual.net 2aFIDrwE0jlgkkW8mmXwYwGBTesasS0z0/rJhd+Pg9XbfOUL9D
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:sbVLukn886G0xmrw19ZyN1CQlAw= sha256:T4lrYrk+1kKsiSDqQvMa1NkZ1akfEhfeDxWVxFu3Di4=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 15:17 UTC

In article <ue7352$dmc3$1@dont-email.me>,
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 17/09/2023 15:18, Bob Latham wrote:
> > In article
> > <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
> > Ian
> > <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
> >
> >> 1. Clone the SD card you're trying to shrink (using dd,
> >> Win32DiskImager or whatever you normally use to read/write
> >> SD card images), just in case.
> >
> > Yes. Done.
> >
> >> 2. Insert the cloned SD card into the USB SDcard adapter
> >> connected to a Pi.
> >
> > Yes.

> That is a second SD card adapter plugged into the Pis USB port

Yes it is.

> >> It should appear as /dev/sdc or somesuch (dmesg should show
> >> it being picked up).
> >
> > So sorry, I've no idea how I would see that? I was logged in to
> > the pi via putty before I plugged the device in but nothing
> > appeared.
> >
> OK, 'sudo mount' would show what it was and where it was..

sudo mount gives me a half a page of text no meaning to me.

But after some googling I did find the command :

lsblk

That shows this...

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 3.6G 0 disk
+-sda1 8:1 1 256M 0 part
+-sda2 8:2 1 3.4G 0 part
mmcblk0 179:0 0 14.8G 0 disk
+-mmcblk0p1 179:1 0 256M 0 part /boot
+-mmcblk0p2 179:2 0 14.6G 0 part /

Despite one website telling me that sda would be the machines hard
disc I worked out that it wasn't. sda is the sd inserted via usb.
mmcblk0 is the harddrive.

So I tried to go a bit further...

mkdir /mnt/x
gave Permission denied.
sudo mkdir /mnt/x
sudo mount /dev/sda2 /mnt/x
cd /mnt/x
all the above seemed to work.

tar -czf ~/xxx.tar.gz
gave
Cowardly refusing to create an empty archive.
I thought maybe I was supposed to substitute some items in that
command.

> > I'm only using a headless light version of the pios, is that my
> > problem or is it just ignorance?
> >
> Just ignorance, but its not hard to get there.

Thanks for the help it is appreciated.

> In linux all disks systems look like *files* in the directory /dev/
> The dir command in linux is 'ls' so :

> 'ls /dev' should show your disk in there somewhere The SD card you
> are running on will be /dev/mmcblk0 and its two partitions
> /dev/mmcblk0p1 and /dev/mmcblk0p2.

That looks correct.

> These will be 'mounted' on /boot, and /

> mount | grep mm

> is a command uou cvan use to see where they are mounted - the '|
> grep mm' means 'select only lines from the output containing 'mm'
> e.g.

That's clever: :-)

> $mount | grep mm /dev/mmcblk0p2 on / type ext4 (rw,noatime)
> /dev/mmcblk0p1 on /boot type vfat
> (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

> Now if you plug another SD card into the system via a USB SD card
> reader that should be automatically mounted somewhere.

> My guess would be in a media subdirectory of your home directory.

> so

> $mount | grep media should tell you what it is called.

That doesn't come back with anything, no error, nothing.

> In Linux it is conventional that the whole disk will be files as
> /dev/something, and partitions on it will be /dev/somethinga or
> /dev/somethingb or /dev/somethingp1

> etc...

> These are all the *device names*you will need in order to
> manipulate the partitions and the raw SD card

Thanks for that, I'm learning, slowly.

I think the usb device sd is /dev/sda with the main partition
/dev/sda2 does that sound correct?

> >
> > Thanks.
> >
> > Bob.
> >

Re: Limiting the capacity of SD cards for the pi

<5ae55f9b95bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7247&group=comp.sys.raspberry-pi#7247

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 16:24:08 +0100
Organization: None
Lines: 32
Message-ID: <5ae55f9b95bob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <87wmwoc0zu.fsf@no-email.invalid>
X-Trace: individual.net aCDRPYHJvndPWNoH+NVOsA5ZwR+wTdFSUFTriMKJAz1KQj3U61
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:6/h6O9rxAF6sUKhwAf3dkuzLYN8= sha256:0I89TEjNwjNJXFcPm04rvt5JIFr8/N2vaJUwiG6lNpA=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 15:24 UTC

In article <87wmwoc0zu.fsf@no-email.invalid>,
Mrtn <mrtn@no-email.invalid> wrote:
> Bob Latham <bob@sick-of-spam.invalid> writes:

> > In article
> > <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
> > Ian
> > <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
> <cut>
> >> It should appear as /dev/sdc or somesuch (dmesg should
> >> show it being picked up).
> >
> > So sorry, I've no idea how I would see that? I was logged in to the
> > pi via putty before I plugged the device in but nothing appeared.

> In putty try typing:
> dmesg
> (and hit enter)
> or
> sudo dmesg
> (and hit enter)
> if you're not logged in as root.

Interesting.

That gave me a huge list of text but I'm not sure where that helps me.

Thanks for the suggestion.

Bob.

Re: Limiting the capacity of SD cards for the pi

<ue7717$e079$7@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7248&group=comp.sys.raspberry-pi#7248

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 16:46:47 +0100
Organization: A little, after lunch
Lines: 149
Message-ID: <ue7717$e079$7@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 17 Sep 2023 15:46:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="315702974463422239a68aede622b53a";
logging-data="458985"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Np4JFWTnmkwhsOYrtKIoGlQSx2C6CsSI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:FIC2TcteZNszdzjmYkUCewpFngY=
Content-Language: en-GB
In-Reply-To: <5ae55f08eebob@sick-of-spam.invalid>
 by: The Natural Philosop - Sun, 17 Sep 2023 15:46 UTC

On 17/09/2023 16:17, Bob Latham wrote:
> In article <ue7352$dmc3$1@dont-email.me>,
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> On 17/09/2023 15:18, Bob Latham wrote:
>>> In article
>>> <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
>>> Ian
>>> <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
>>>
>>>> 1. Clone the SD card you're trying to shrink (using dd,
>>>> Win32DiskImager or whatever you normally use to read/write
>>>> SD card images), just in case.
>>>
>>> Yes. Done.
>>>
>>>> 2. Insert the cloned SD card into the USB SDcard adapter
>>>> connected to a Pi.
>>>
>>> Yes.
>
>> That is a second SD card adapter plugged into the Pis USB port
>
> Yes it is.
>
>
>>>> It should appear as /dev/sdc or somesuch (dmesg should show
>>>> it being picked up).
>>>
>>> So sorry, I've no idea how I would see that? I was logged in to
>>> the pi via putty before I plugged the device in but nothing
>>> appeared.
>>>
>> OK, 'sudo mount' would show what it was and where it was..
>
> sudo mount gives me a half a page of text no meaning to me.
>
> But after some googling I did find the command :
>
> lsblk
>
> That shows this...
>
> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
> sda 8:0 1 3.6G 0 disk
> +-sda1 8:1 1 256M 0 part
> +-sda2 8:2 1 3.4G 0 part
> mmcblk0 179:0 0 14.8G 0 disk
> +-mmcblk0p1 179:1 0 256M 0 part /boot
> +-mmcblk0p2 179:2 0 14.6G 0 part /
>
> Despite one website telling me that sda would be the machines hard
> disc I worked out that it wasn't. sda is the sd inserted via usb.
> mmcblk0 is the harddrive.
>

This is a Pi. It likes to be different

> So I tried to go a bit further...
>
> mkdir /mnt/x
> gave Permission denied.
> sudo mkdir /mnt/x
> sudo mount /dev/sda2 /mnt/x
> cd /mnt/x
> all the above seemed to work.
>
> tar -czf ~/xxx.tar.gz
> gave
> Cowardly refusing to create an empty archive.
>
> I thought maybe I was supposed to substitute some items in that
> command.
>
yes.

man tar will tell you te tar commands,.

I think what you want is tar cfz <directory> <output file>

But a GUI has mane me lazy and I cant remember

>
>>> I'm only using a headless light version of the pios, is that my
>>> problem or is it just ignorance?
>>>
>> Just ignorance, but its not hard to get there.
>
> Thanks for the help it is appreciated.
>
>
>> In linux all disks systems look like *files* in the directory /dev/
>> The dir command in linux is 'ls' so :
>
>> 'ls /dev' should show your disk in there somewhere The SD card you
>> are running on will be /dev/mmcblk0 and its two partitions
>> /dev/mmcblk0p1 and /dev/mmcblk0p2.
>
> That looks correct.
>
>> These will be 'mounted' on /boot, and /
>
>> mount | grep mm
>
>> is a command uou cvan use to see where they are mounted - the '|
>> grep mm' means 'select only lines from the output containing 'mm'
>> e.g.
>
> That's clever: :-)
>
>> $mount | grep mm /dev/mmcblk0p2 on / type ext4 (rw,noatime)
>> /dev/mmcblk0p1 on /boot type vfat
>> (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
>
>> Now if you plug another SD card into the system via a USB SD card
>> reader that should be automatically mounted somewhere.
>
>> My guess would be in a media subdirectory of your home directory.
>
>> so
>
>> $mount | grep media should tell you what it is called.
>
> That doesn't come back with anything, no error, nothing.
>
So its miunted somwheer else.
>> In Linux it is conventional that the whole disk will be files as
>> /dev/something, and partitions on it will be /dev/somethinga or
>> /dev/somethingb or /dev/somethingp1
>
>> etc...
>
>> These are all the *device names*you will need in order to
>> manipulate the partitions and the raw SD card
>
> Thanks for that, I'm learning, slowly.
>
> I think the usb device sd is /dev/sda with the main partition
> /dev/sda2 does that sound correct?

Yes. If its a PI card /dev/sda1 will be the thing that ends up as /boot
- which is a msdos partioned thing. VFAT I think

"mount | grep sda" will tell you where they ended up.

--
Climate is what you expect but weather is what you get.
Mark Twain

Re: Limiting the capacity of SD cards for the pi

<5ae5653ec8bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7249&group=comp.sys.raspberry-pi#7249

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 17:25:43 +0100
Organization: None
Lines: 35
Message-ID: <5ae5653ec8bob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid> <ue7717$e079$7@dont-email.me>
X-Trace: individual.net /ds/rejNFeECG/GvR6i2xQHCLHHLJyDZ3wElWPJ0tD9VFa0Uc7
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:/HninptG+kjs8A35hXa8m/XjFlw= sha256:s1eExTU+E3g528ml38apCSaXBInk0DraQZYaT78RFdI=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 16:25 UTC

In article <ue7717$e079$7@dont-email.me>,
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 17/09/2023 16:17, Bob Latham wrote:
> > In article <ue7352$dmc3$1@dont-email.me>,
> > The Natural Philosopher <tnp@invalid.invalid> wrote:
> >> On 17/09/2023 15:18, Bob Latham wrote:

> > tar -czf ~/xxx.tar.gz
> > gave
> > Cowardly refusing to create an empty archive.
> >
> > I thought maybe I was supposed to substitute some items in that
> > command.

> yes.

> man tar will tell you te tar commands,.

> I think what you want is tar cfz <directory> <output file>

> But a GUI has mane me lazy and I cant remember

Well I've looked at and read man tar and downloaded the full manual.
At the moment it is a long way passed me making sense of it so I'm
stumped for now.

Thanks everyone for your help.

Cheers,

Bob.

Re: Limiting the capacity of SD cards for the pi

<slrnugebvm.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7250&group=comp.sys.raspberry-pi#7250

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!jusme.eternal-september.org!.POSTED!not-for-mail
From: ${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com (Ian)
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 16:57:26 -0000 (UTC)
Organization: Wet Socks!
Lines: 19
Message-ID: <slrnugebvm.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid> <ue7717$e079$7@dont-email.me>
<5ae5653ec8bob@sick-of-spam.invalid>
Injection-Date: Sun, 17 Sep 2023 16:57:26 -0000 (UTC)
Injection-Info: jusme.eternal-september.org; posting-host="3d0e28f4512684d81937e9b9a26c6eb4";
logging-data="497860"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EL4HE2zyqFYQseC0Jm+vA"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:GhY+FoJewCW36FWjAwKvXSPlrQk=
 by: Ian - Sun, 17 Sep 2023 16:57 UTC

On 2023-09-17, Bob Latham <bob@sick-of-spam.invalid> wrote:

>> > tar -czf ~/xxx.tar.gz
>> > gave
>> > Cowardly refusing to create an empty archive.
>> >
>> > I thought maybe I was supposed to substitute some items in that
>> > command.

Nothing needs substituting, you're just missing the "." as the final parameter:

> # tar -czf ~/xxx.tar.gz .

(That says what to put in the tarball, "." means the current directory)

--
Ian

"Tamahome!!!" - "Miaka!!!"

Re: Limiting the capacity of SD cards for the pi

<87sf7cbu7k.fsf@no-email.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7251&group=comp.sys.raspberry-pi#7251

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mrtn@no-email.invalid (Mrtn)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 19:11:43 +0200
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <87sf7cbu7k.fsf@no-email.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <87wmwoc0zu.fsf@no-email.invalid>
<5ae55f9b95bob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="400ad1fb9c9636a3320a04c2dc1c667d";
logging-data="501020"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WdNFNxXGRybeN3d4I8kuZ"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:7646I8U3UX68uhvFccbXFtE9o5E=
sha1:eQbRFSBCSs77uCwl6am+QA6NLG8=
 by: Mrtn - Sun, 17 Sep 2023 17:11 UTC

Bob Latham <bob@sick-of-spam.invalid> writes:

> In article <87wmwoc0zu.fsf@no-email.invalid>,
> Mrtn <mrtn@no-email.invalid> wrote:
>> Bob Latham <bob@sick-of-spam.invalid> writes:
>
>> > In article
>> > <slrnugdpsj.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
>> > Ian
>> > <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
>> > wrote:
>> <cut>
>> >> It should appear as /dev/sdc or somesuch (dmesg should
>> >> show it being picked up).
>> >
>> > So sorry, I've no idea how I would see that? I was logged in to the
>> > pi via putty before I plugged the device in but nothing appeared.
>
>> In putty try typing:
>> dmesg
<cut>
>
> That gave me a huge list of text but I'm not sure where that helps me.

You already solved the problem, so it is no longer useful. You already
discovered that your USB device is /dev/sda.

However, as someone already hinted before me, typing dmesg in putty
should tell you that, if you type it just after inserting the USB in the
port.

Since the horse already left the stable, you can put all this in the
afterburner.

Re: Limiting the capacity of SD cards for the pi

<5ae569ba7ebob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7252&group=comp.sys.raspberry-pi#7252

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 18:14:41 +0100
Organization: None
Lines: 20
Message-ID: <5ae569ba7ebob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid> <ue7717$e079$7@dont-email.me>
<5ae5653ec8bob@sick-of-spam.invalid> <slrnugebvm.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
X-Trace: individual.net rYKf3cRdFL/one9K2jTgVQnH9Uhf9nHXv6jk5ZqaF7HzygMeR4
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:KxUTkmSMMm8uP8DMWeU0GNSR/5A= sha256:55YXpUE5UqD2wOAuBX1Sf0q8Ah4RG2dzxy/ziF62T7E=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 17:14 UTC

In article
<slrnugebvm.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
Ian
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:

> Nothing needs substituting, you're just missing the "." as the
> final parameter:

> > # tar -czf ~/xxx.tar.gz .

> (That says what to put in the tarball, "." means the current
> directory)

Thanks Ian, I would never have worked that out myself.

I'll have another go tomorrow.

Bob,

Re: Limiting the capacity of SD cards for the pi

<slrnugegu8.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7254&group=comp.sys.raspberry-pi#7254

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!jusme.eternal-september.org!.POSTED!not-for-mail
From: ${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com (Ian)
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 18:22:00 -0000 (UTC)
Organization: Wet Socks!
Lines: 14
Message-ID: <slrnugegu8.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid> <ue7717$e079$7@dont-email.me>
<5ae5653ec8bob@sick-of-spam.invalid>
<slrnugebvm.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
<5ae569ba7ebob@sick-of-spam.invalid>
Injection-Date: Sun, 17 Sep 2023 18:22:00 -0000 (UTC)
Injection-Info: jusme.eternal-september.org; posting-host="3d0e28f4512684d81937e9b9a26c6eb4";
logging-data="523774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++qogl0mv2f/snfiVbELHR"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:NSDHYLvJWMX70qzgtqBIaouZoB0=
 by: Ian - Sun, 17 Sep 2023 18:22 UTC

On 2023-09-17, Bob Latham <bob@sick-of-spam.invalid> wrote:

> I'll have another go tomorrow.

Good luck!

Be sure to do it all from a root shell, not via individual sudo
calls btw, some of the commands need to be in the same shell as
previous ones, and sudo breaks that.

--
Ian

"Tamahome!!!" - "Miaka!!!"

Re: Limiting the capacity of SD cards for the pi

<5ae5792215bob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7255&group=comp.sys.raspberry-pi#7255

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 21:02:56 +0100
Organization: None
Lines: 19
Message-ID: <5ae5792215bob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid> <ue7717$e079$7@dont-email.me>
<5ae5653ec8bob@sick-of-spam.invalid>
<5ae569ba7ebob@sick-of-spam.invalid> <slrnugegu8.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>
X-Trace: individual.net 9CpkxGhkMbgJQJtrC9J5uQxDnazRlNDcHib89/AXcB2909ljcR
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:m/p2gp65Ip3SOg6dVgWkPJplsho= sha256:u+ysMjE79YtXzEOTk9cM7rhUSH/vyMq3hCL/2T738ck=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Sun, 17 Sep 2023 20:02 UTC

In article
<slrnugegu8.vum.${send-direct-email-to-news1021-at-jusme-dot-com-if@vm46.home.jusme.com>,
Ian
<${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
> On 2023-09-17, Bob Latham <bob@sick-of-spam.invalid> wrote:

> > I'll have another go tomorrow.

> Good luck!

> Be sure to do it all from a root shell, not via individual sudo
> calls btw, some of the commands need to be in the same shell as
> previous ones, and sudo breaks that.

Oh dear. I have zero understanding of that. I'm not going to manage
this am I?

Bob.

Re: Limiting the capacity of SD cards for the pi

<ue8042$il0u$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7257&group=comp.sys.raspberry-pi#7257

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: martin@mydomain.invalid (Martin Gregorie)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Sun, 17 Sep 2023 22:54:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ue8042$il0u$1@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Sep 2023 22:54:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6043fb578de8b4efddda52a3c604b734";
logging-data="611358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Dr9m65gSubeRwSlBqC0dgXkNQ5Jr+RN8="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:ZIMiZ0erK4zJZ+B0DhC932VgfpI=
 by: Martin Gregorie - Sun, 17 Sep 2023 22:54 UTC

Now you know how to mount a disk, you need to know how to find Linux
commands that can help you do what you want to do with the RPi. For the
rest of this info to work, you need to know how to login as the default
user AND how to log in as root:

1 the 'man name' command shows you a page (which can be very long) that
tells you what 'name' does and how to use it, Name can be anything
from a command to a Linux system call or function.

2 the "apropos 'text' command shows you a list of commands whose manual
pages have 'text' in their first line of their manual pages.

3 Using the 'apropos' and 'man' commands is the fastest way I know of of
finding a standard issue Linux program that will do what you need it to
do and finding out how to use it,

4 If you like reading books rather than screens, consider getting a copy
of "UNIX in a Nutshell" or "Linux in a Nutshell" - both are concise
references to the way UNIX/Linux works and how to use it.

There's also "Unix Systems Programming for SVR4" which, although quite
old now, is still a useful guide to writing programs and applications
in C.

Re: Limiting the capacity of SD cards for the pi

<650786bd@news.ausics.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7258&group=comp.sys.raspberry-pi#7258

  copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <650786bd@news.ausics.net>
From: not@telling.you.invalid (Computer Nerd Kev)
Subject: Re: Limiting the capacity of SD cards for the pi
Newsgroups: comp.sys.raspberry-pi
References: <5ae53c469cbob@sick-of-spam.invalid>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 18 Sep 2023 09:07:41 +1000
Organization: Ausics - https://ausics.net
Lines: 32
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Sun, 17 Sep 2023 23:07 UTC

Bob Latham <bob@sick-of-spam.invalid> wrote:
> Hi,
>
> I build images for projects on 4GB cards so that I can save a
> completed image without using too much disc space. My problem comes
> when I try to burn a new card from the saved image. Often it will not
> fit because there are small differences in the size of the cards.
>
> Does anyone know of a way to reduce the capacity of an SD card so
> that I can make a 4GB card maybe 3.5GB which would mean all cards
> could easily manage it and reduce the size of the save image.

Using Tar as suggested is one option. If you still want to use raw
image files where the partitioning is already done for you, then
what I've done for that is create a blank disk image file of the
size I want (using dd reading from /dev/zero), then partition that
and copy over the system files before writing that image to a real
SD card.

I've also had success with simply creating a partition table with
blank space at the end of an SD card. If you just copy over as much
data as will fit on the smaller SD card, it should still work if
the partitions had all ended before the space ran out. Resizing
the last partition on the existing card should work too (make a
backup first). But doing the work on a file instead of a real card
is probably safer and less confusing. Faster too, especially if
you create it in /tmp so the write operations all happen in RAM,
provided you have enough.

--
__ __
#_ < |\| |< _#

Re: Limiting the capacity of SD cards for the pi

<ue8rhf$180lr$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7259&group=comp.sys.raspberry-pi#7259

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Mon, 18 Sep 2023 08:42:41 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <ue8rhf$180lr$1@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid> <650786bd@news.ausics.net>
Injection-Date: Mon, 18 Sep 2023 06:42:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="57b1d1d35d4dd06fb4e552b12a6d4d43";
logging-data="1311419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EZGKDVgW8XNravvpX/G51l5fmz59p20ZF1PyW2bQnpg=="
Cancel-Lock: sha1:3e5hOaSHjRtQpAAxBMKim87fxWE=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
 by: R.Wieser - Mon, 18 Sep 2023 06:42 UTC

Computer Nerd Kev (and others),

> I've also had success with simply creating a partition table
> with blank space at the end of an SD card.

I've got the same problem as the OP, and also thought of the above as the
simpelest solution to the problem.

Question : I'm using an OS image (bullseye, bullseye lite) as can be
downloaded here :

https://www.raspberrypi.com/software/operating-systems/

Is there a possibility to edit it in such a way that it will automatically
reserve some space (dummy partition or otherwise) at the end of the SD card
?

Regards,
Rudy Wieser

Re: Limiting the capacity of SD cards for the pi

<5ae5b9eedabob@sick-of-spam.invalid>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7260&group=comp.sys.raspberry-pi#7260

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bob@sick-of-spam.invalid (Bob Latham)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Mon, 18 Sep 2023 08:50:44 +0100
Organization: None
Lines: 41
Message-ID: <5ae5b9eedabob@sick-of-spam.invalid>
References: <5ae53c469cbob@sick-of-spam.invalid>
<5ae5599655bob@sick-of-spam.invalid> <ue7352$dmc3$1@dont-email.me>
<5ae55f08eebob@sick-of-spam.invalid> <ue8042$il0u$1@dont-email.me>
X-Trace: individual.net uweZQZQ3ICdaQVLsTKn5SwntOX25qOyiUKjTNCBHyZSQQD7zL+
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:k+Cc6r4G9NgfDbEvZPDRwFpivLk= sha256:iN0STI8n8ZHzoMCAY+YN1H+R6b9SElTf5M5raa/rgrM=
X-No-Archive: Yes
User-Agent: NewsHound/v1.53-32 RC1
 by: Bob Latham - Mon, 18 Sep 2023 07:50 UTC

In article <ue8042$il0u$1@dont-email.me>,
Martin Gregorie <martin@mydomain.invalid> wrote:
> Now you know how to mount a disk, you need to know how to find
> Linux commands that can help you do what you want to do with the
> RPi. For the rest of this info to work, you need to know how to
> login as the default user AND how to log in as root:

> 1 the 'man name' command shows you a page (which can be very long)
> that tells you what 'name' does and how to use it, Name can be
> anything from a command to a Linux system call or function.

> 2 the "apropos 'text' command shows you a list of commands whose
> manual pages have 'text' in their first line of their manual
> pages.

> 3 Using the 'apropos' and 'man' commands is the fastest way I know
> of of finding a standard issue Linux program that will do what
> you need it to do and finding out how to use it,

> 4 If you like reading books rather than screens, consider getting a
> copy of "UNIX in a Nutshell" or "Linux in a Nutshell" - both are
> concise references to the way UNIX/Linux works and how to use it.

> There's also "Unix Systems Programming for SVR4" which, although
> quite old now, is still a useful guide to writing programs and
> applications in C.

Thank you for that information. Scary stuff. I've done what I've done
so far by googling for answers and a little experimenting. I'm
neither clever nor an academic.

I wanted to learn how to write code for tcpip comms for another
platform, I was advised to get a book called "Unix Network
Programming". It's a thick book and cost a lot of money. I got to
about page 3 before I was out of my depth and beyond rescue. That's
why I have not got any linux books.

Thanks again.

Bob.

Pages:123456789
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor