[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SD Memory Card (was The Raspberry Pi that Took a Day Off.)



There's always one more question that nobody mentions and none of
the articles one finds on the topic don't touch.  When looking at
the man page for resize2fs in debian, it talks about the -b
option to turn on "the 64 bit feature."
__________

       When shrinking the size of the partition, make  sure
       you do not make it smaller than the new size of the ext2 filesystem!

       The  -b	and  -s  options enable and disable the 64bit feature, respect-
       tively.	The resize2fs program will, of course, take care  of  resizing
       the  block  group  descriptors  and moving other data blocks out of the
       way, as needed.	It is not possible to resize the filesystem concurrent
       with changing the 64bit status.
__________

	Do I need this since the Pi runs an ARM processor which
would make the command

   #sudo resize2fs -b /dev/loop0p2 6.3g

or is it the same command without the -b flag?

	I have determined that the 28.9 gb SSD card is 10% full
with the debian installation and the files I want in my login
directory.  I found a 7.3 gb SSD card that has probably never
been used that came with the first Raspberry Pi I bought around
2012 or so, going for a 32-gb card instead.  If I shrink the
Linux partition to 6.3 gb which is what the small card had
available, I should have it about 40 or 50% full.  I can then
safely dd it on to a larger card any time I want to do so and
then use resize2fs to expand the Linux partition after it is
installed.

	What I did so far was to mount the 27-gb partition on
/mnt through /dev/loop0 and edit /mnt/etc/hostname to reflect the
host name for the system being rebuilt.  The edit changes the
image which is really neat.  All that is left is to shrink it
down to 6.3 gb and it should be ready to dd on to the 7.3 gb card
which should be bootable on it's own but which I will use to seed
a new 28-gb system that can be customized after it is running.

	Many of the raspbian distributions have a #1 partition
that is a small fat32 lba partition for Windows users to be able
to activate debian from Windows.  Is this even necessary once one
is using unix tools on the disk?

	Thanks to all the good advice from everyone.  I am seeing
the end of this project and have learned some new  useful tricks
that are good to know.

Martin


Reply to: