[raspberry-vi] Re: Larger memory cards, a request

  • From: Mike Ray <mike@xxxxxxxxxxxxxxx>
  • To: raspberry-vi@xxxxxxxxxxxxx
  • Date: Wed, 08 Jan 2014 23:44:27 +0000

Hello Mo.  I have realised I can specify that I want the units in 
sectors anyway so I don't need this now.

I can get the size of the device in sectors and the logical and physical 
sector size and calculate the position just before the end of the device 
using those values.

What I don't know is the difference between logical and physical, and 
whether they ever deviate from each other and from 512 bytes.

Mike

On 08/01/2014 23:27, Mobeen Iqbal wrote:
> hello mike. If noone else responds, i can hopefully get you the output
> from a 32GB card by friday. I should hopefully have 1 tomorrow or friday
> so as soon as i have it i'll write an image and let you know assuming
> noone else replies. does that tablet you bought not have a larger card
> in it?
>
> Mo.
>
> On 08/01/2014 22:13, Mike Ray wrote:
>> Hello list,
>>
>> I don't have any SD cards bigger than 8GB.
>>
>> I need to get a sample of the 'parted' output for larger cards.
>>
>> This is because I want to write a new version of the expand-rootfs
>> script which expands the file-system to within 10 megabytes of the end
>> of the card but not right up to it.
>>
>> On my 8GB cards this is the output of:
>>
>> parted -s -m /dev/sdc -- print
>>
>> BYT;
>> /dev/sdc:7960MB:scsi:512:512:msdos:Multiple Card Reader:;
>> 1:1049kB:95.4MB:94.4MB:fat16::lba;
>> 2:95.4MB:1878MB:1783MB:::;
>> 5:96.5MB:1878MB:1782MB:ext4::;
>>
>> (the -m switch produces machine parseable output).
>>
>> I need particularly to know if, for larger cards, does the second field
>> of the second line read differently. Does it show 'GB' instead of 'MB'.
>> On the above it is:
>>
>> 7960MB
>>
>> The reason for this is that when the root file-system is expanded to the
>> very end of a card, backing up the card to a .img file and then writing
>> it back to a card sometimes does not correctly reproduce the far
>> boundary of the file-system and backups become useless.
>>
>> I need to parse the output above with Perl and calculate where to end
>> the file-system expansion.
>>
>> So if somebody has, for example a 32GB card, can they please paste the
>> output of 'parted -m' in an email.
>>
>> Thanks.
>>
>> Mike
>>
>>
> ===========================================================
> The raspberry-vi mailing list
> Archives: //www.freelists.org/archives/raspberry-vi
> Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
> -----------------------------------------------------------
> Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
> Foundation.
>
> This list is not affiliated to the Raspberry Pi Foundation and the views and 
> attitudes expressed by the subscribers to this list do not reflect those of 
> the Foundation.
>
> Mike Ray, list creator, January 2013
>


-- 
Michael A. Ray
Analyst/Programmer
Witley, Surrey, South-east UK

I KEEP six honest serving-men, They taught me all I know. Their names are What 
and Why and When and How and Where and Who.
-- Rudyard Kipling (paraphrased)

Interested in accessibility on the Raspberry Pi?
Visit: http://www.raspberryvi.org/

 From where you can join our mailing list for visually-impaired Pi hackers

=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: