Boot from SD card: where is DISK=/dev/sdX?

36 views
Skip to first unread message

not you

unread,
Dec 31, 2017, 4:50:57 PM12/31/17
to BeagleBoard
I am following this guide to create an bootable SD card:
https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-LinuxKernel

I am stuck at mkfs.ext4 <= 1.42:
for: DISK=/dev/mmcblk0  <<--- Do I include this 'for:' in the command or no?  The terminal on my Ubuntu is complaining that no 'for' command can be found.
for: DISK=/dev/sdX      <<--- Where is this sdX drive?  lsblk does not show any of that name.

Please help.  Thank you so much.

Robert Nelson

unread,
Dec 31, 2017, 4:57:27 PM12/31/17
to Beagle Board, nguyen....@gmail.com
Replace the "X" with what would be valid for your drive..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Stuart Longland

unread,
Dec 31, 2017, 5:07:54 PM12/31/17
to beagl...@googlegroups.com
On 31/12/17 18:36, not you wrote:
> I am stuck at *mkfs.ext4 <= 1.42*:
> |for||: DISK=/dev/mmcblk0  <<--- |Do I include this 'for:' in the
> command or no?  The terminal on my Ubuntu is complaining that no 'for'
> command can be found.
> ||for||: DISK=/dev/sdX|||      <<--- |Where is this sdX drive?  lsblk
> does not show any of that name.

It's a script meant to be interpreted by the human, not the computer.
You didn't blindly copy and paste the "As the version of U-Boot needed
for this target CAN NOT correctly handle reading files with these newer
ext4 options." did you?

To translate:

- If you set DISK=/dev/mmcblk0 (or similar); use the command:
sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}p1

- Otherwise, if you set DISK=/dev/sdX (where X is one or more
arbitrary letters); then use this command instead:
sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}1
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
...it's backed up on a tape somewhere.

Stuart Longland

unread,
Dec 31, 2017, 5:10:34 PM12/31/17
to beagl...@googlegroups.com
On 01/01/18 08:07, Stuart Longland wrote:
> On 31/12/17 18:36, not you wrote:
>> I am stuck at *mkfs.ext4 <= 1.42*:
>> |for||: DISK=/dev/mmcblk0  <<--- |Do I include this 'for:' in the
>> command or no?  The terminal on my Ubuntu is complaining that no 'for'
>> command can be found.
>> ||for||: DISK=/dev/sdX|||      <<--- |Where is this sdX drive?  lsblk
>> does not show any of that name.
>
> It's a script meant to be interpreted by the human, not the computer.
> You didn't blindly copy and paste the "As the version of U-Boot needed
> for this target CAN NOT correctly handle reading files with these newer
> ext4 options." did you?
>
> To translate:
>
> - If you set DISK=/dev/mmcblk0 (or similar); use the command:
> sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}p1
>
> - Otherwise, if you set DISK=/dev/sdX (where X is one or more
> arbitrary letters); then use this command instead:
> sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}1

Thinking about this, the following would be the copy-and-paste shell
equivalent (note; I have not tested this):

case "${DISK}" in
/dev/mmcblk*)
sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}p1
;;
/dev/sd*)
sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}1
;;
esac

That might be worth putting on the wiki… not sure who has access.

not you

unread,
Jan 1, 2018, 4:00:11 AM1/1/18
to BeagleBoard
Thank you, everyone.  That was helpful.
Reply all
Reply to author
Forward
0 new messages