LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 07-30-2021, 12:21 AM   #1
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
4Mib Aligned Disk Geometry on SDcard?


Scripting the formatting of disks lead me to read the info page on parted, and it says this:
Quote:
Now, we will show how to partition a low-end flash device
("low-end", as of 2011/2012). For such devices, you should use
4MiB-aligned partitions(1). This command creates a tiny
place-holder partition at the beginning, and then uses all
remaining space to create the partition you'll actually use:

$ parted -s /dev/sdX -- mklabel msdos \
mkpart primary fat32 64s 4MiB \
mkpart primary fat32 4MiB -1s

Note the use of '--', to prevent the following '-1s' last-sector
indicator from being interpreted as an invalid command-line option.
The above creates two empty partitions. The first is unaligned and
tiny, with length less than 4MiB. The second partition starts
precisely at the 4MiB mark and extends to the end of the device.
So that was 10 years ago. Is this still relevant for low end flash devices of 2021? It seems like many arm and arm64 devices have capability to boot from low end flash devices.

But when I look at partition tables (like this one) on various images that I can burn to microSD to boot pinebook pro off of, none have this "placeholder partition". sndwvs slarm64 image has a single partition, type 8300, that starts at 32768, is gpt, and says "partitions will be aligned on 2048-sector boundaries"... Does just starting at 64 or 32768 already have this 4MiB alignment. (dos it just have to be divisible by 4?)

Last edited by slac-in-the-box; 07-30-2021 at 12:36 AM.
 
Old 07-30-2021, 09:37 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,153

Rep: Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265
There is a lot of stuff in fdisk and parted that are holdovers from long ago. Check the specs on your card. If it has "wear leveling" (which it will) you can likely ignore the old garbage. Modern flash endurance is frequently better than rotating disk and has no special alignment restrictions.
 
1 members found this post helpful.
Old 07-30-2021, 04:35 PM   #3
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780

Original Poster
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
Originally Posted by smallpond View Post
you can likely ignore the old garbage.
Fantastic! PNY: They say they do static and dynamic wear leveling on all their NAND flash memory... so I assume that includes their cheap microSD cards. And I want the same script to do its thing even if it was another brand of memory, so I'm glad this wear leveling is standard feature now, and thanks for cluing me into it, so I can check wear leveling specs next time I shop for memory.
 
  


Reply

Tags
flash, geometry, parted, partition, sdcard



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting ext4 sdcard to work like a FAT32 sdcard Brusca.lyfe Linux - Newbie 8 03-26-2021 10:20 AM
current sdcard installs try to mount nonexistatnt sdcard justwantin Slackware - ARM 4 02-09-2021 02:15 AM
Getting frame buffer geometry to match monitor geometry Skaperen Linux - Desktop 0 03-13-2011 03:27 PM
-geometry <geometry> reitzell Linux - Newbie 2 09-10-2005 12:13 PM
Is there a way to make KDE keep icons allway's aligned to grid? Starch Linux - Newbie 2 01-29-2005 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration