[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: INSTALL.arm64: use larger blocks in dd example
From:       Stuart Henderson <stu () spacehopper ! org>
Date:       2017-02-27 20:26:04
Message-ID: 20170227202604.GD56693 () symphytum ! spacehopper ! org
[Download RAW message or body]

On 2017/02/28 00:30, Jonathan Gray wrote:
> On Mon, Feb 27, 2017 at 10:50:35AM +0000, Stuart Henderson wrote:
> > On 2017/02/27 21:37, Jonathan Gray wrote:
> > > On Mon, Feb 27, 2017 at 09:54:33AM +0000, Stuart Henderson wrote:
> > > > Using the current example (512-byte blocks):
> > > > 18874368 bytes transferred in 113.823 secs (165821 bytes/sec)
> > > > 
> > > > Using bs=1m like we suggest in "Creating a bootable USB key using a
> > > > Un*x-like system":
> > > > 18874368 bytes transferred in 2.894 secs (6521502 bytes/sec)
> > > > 
> > > > OK to change it?
> > > 
> > > You've missed armv7 here.  The concern is that conv=sync would need
> > > to be added in some cases unless the device is switched to a non-raw one.
> > 
> > Ah - so in that case should conv=sync be added to m4.common as well?
> > 
> > I've not run into any problems without conv=sync and I've written quite a
> > few SD cards/USB this way, but I was probably just lucky..
> > 
> 
> I suspect the miniroots you've used have all been created with a multiple
> of 1MB.  I believe this came up in the context of dd'ing u-boot
> files where this wasn't the case.
> 
> kettenis preferred switching to non-raw devices rather than using conv=sync
> for that.
> 

So something like this? Or does it need a call to sync(8) as well
if we're not using the raw devices?

Index: m4.common
===================================================================
RCS file: /cvs/src/distrib/notes/m4.common,v
retrieving revision 1.123
diff -u -p -r1.123 m4.common
--- m4.common	18 Oct 2016 09:22:05 -0000	1.123
+++ m4.common	27 Feb 2017 20:15:00 -0000
@@ -949,7 +949,7 @@ define({:-OpenBSDXferUSBFromUNIX-:},
 
 	Next, use the dd(1) utility to copy the file to the USB storage device.
 	The command would likely be, under OpenBSD:
-		dd if=miniroot{:--:}OSrev.fs of=/dev/rsdNc bs=1m
+		dd if=miniroot{:--:}OSrev.fs of=/dev/sdNc bs=1m
 
 	where N is the device number.  You can find the correct device number
 	by checking dmesg(8) when inserting the media.
Index: arm64/prep
===================================================================
RCS file: /cvs/src/distrib/notes/arm64/prep,v
retrieving revision 1.4
diff -u -p -r1.4 prep
--- arm64/prep	27 Feb 2017 10:15:11 -0000	1.4
+++ arm64/prep	27 Feb 2017 20:15:00 -0000
@@ -26,7 +26,7 @@ Booting from an SD card:
   
   Use the dd(1) utility to copy the miniroot to the hard drive.
   The command would likely be, under OpenBSD:
-  	dd if=miniroot{:--:}OSrev.fs of=/dev/rsd1c bs=1m
+  	dd if=miniroot{:--:}OSrev.fs of=/dev/sd1c bs=1m
   
   When you have connected the serial to you computer, a command such
   as "cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device)
@@ -56,7 +56,7 @@ Install on systems without a supported m
   To do so first install the u-boot-aarch64 and dtb packages.  Write the
   provided miniroot image to an SD card:
 
- 	dd if=miniroot{:--:}OSrev.fs of=/dev/rsdXc bs=1m
+ 	dd if=miniroot{:--:}OSrev.fs of=/dev/sdXc bs=1m
 
   Add a board specific DTB file:
 
Index: armv7/prep
===================================================================
RCS file: /cvs/src/distrib/notes/armv7/prep,v
retrieving revision 1.12
diff -u -p -r1.12 prep
--- armv7/prep	19 Jan 2017 06:22:56 -0000	1.12
+++ armv7/prep	27 Feb 2017 20:15:00 -0000
@@ -26,7 +26,7 @@ Booting from an SD card:
   
   Use the dd(1) utility to copy the miniroot to the hard drive.
   The command would likely be, under OpenBSD:
-  	dd if=miniroot-beagle-{:--:}OSrev.fs of=/dev/rsd1c
+  	dd if=miniroot-beagle-{:--:}OSrev.fs of=/dev/sd1c bs=1m
   
   When you have connected the BeagleBoard to you computer, a command such
   as "cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device)
@@ -61,7 +61,7 @@ Install on systems without a supported m
   To do so first install the u-boot-arm and dtb packages.  Write one of the
   provided miniroot images to an SD card:
 
- 	dd if=miniroot-beagle-{:--:}OSrev.fs of=/dev/rsdXc
+ 	dd if=miniroot-beagle-{:--:}OSrev.fs of=/dev/sdXc bs=1m
 
   Add a board specific DTB file:
 
Index: octeon/prep
===================================================================
RCS file: /cvs/src/distrib/notes/octeon/prep,v
retrieving revision 1.5
diff -u -p -r1.5 prep
--- octeon/prep	2 Aug 2015 09:54:29 -0000	1.5
+++ octeon/prep	27 Feb 2017 20:15:00 -0000
@@ -24,7 +24,7 @@ Booting from a CF card or USB:
   Use the dd(1) utility to copy the miniroot to the hard drive.
   The command would likely be, under OpenBSD:
 
-  	dd if=miniroot{:--:}OSrev.fs of=/dev/rsd1c
+  	dd if=miniroot{:--:}OSrev.fs of=/dev/sd1c bs=1m
 
   Now load the ramdisk kernel using either of the following commands depending
   on the medium used. For USB:
Index: socppc/prep
===================================================================
RCS file: /cvs/src/distrib/notes/socppc/prep,v
retrieving revision 1.11
diff -u -p -r1.11 prep
--- socppc/prep	28 Feb 2014 00:47:14 -0000	1.11
+++ socppc/prep	27 Feb 2017 20:15:00 -0000
@@ -162,8 +162,8 @@ RouterBOARD RB600A setup:
 
 	Use the dd(1) utility to copy the miniroot to CompactFlash.
 	The command would likely be, under OpenBSD:
-		dd if=miniroot{:--:}OSrev.fs of=/dev/rsd1c
-	Replace ``rsd1c'' with the appropriate device name for the raw device
+		dd if=miniroot{:--:}OSrev.fs of=/dev/sd1c bs=1m
+	Replace ``sd1c'' with the appropriate device name for the device
 	on the system used to do the copy.
 
 	You will need to configure your RouterBOARD to boot from CompactFlash.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic