The boot process from a USB-stick as described above is simplified.
See: 
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/README.md

Follow these steps:
1. Format a SD-card with fat32.
2. Write file bootcode.bin to the SD-card.
3. Write with program balenaEther the zip file of Raspbian Buster (aka 
Raspberry Pi OS (32-bit)) to the USB-stick.
4. To enable ssh, write an empty file with name 'ssh' to the root of the 
USB-stick.
5. Put both SD-card and USB-stick in the Raspberry PI 2 B (or PI B) slots.
Power up the RPi 2B

Done!



On Saturday, 4 April 2020 09:56:48 UTC-3, Luc Heijst wrote:
>
> I used to change the root=PARTUUID= setting in cmdline.txt of the (micro) 
> sd-card of RPI 1B and 2B models to the PARTUUID of the USB-disk.
> Then the RPI will run with root on the SDA parttion.
>
> When raspbian buster (or the latest version of stretch) is written with 
> balenaEtcher, both sd-card and usb-disk get the same PARTUUID. See below.
>
> blkid
> /dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="4BBD-D3E7" 
> TYPE="vfat" PARTUUID="738a4d67-01"
> /dev/mmcblk0p2: LABEL="rootfs" UUID="45e99191-771b-4e12-a526-0779148892cb" 
> TYPE="ext4" PARTUUID="738a4d67-02"
> /dev/sda1: LABEL_FATBOOT="boot" LABEL="boot" UUID="4BBD-D3E7" TYPE="vfat" 
> PARTUUID="738a4d67-01"
> /dev/sda2: LABEL="rootfs" UUID="45e99191-771b-4e12-a526-0779148892cb" 
> TYPE="ext4" PARTUUID="738a4d67-02"
> /dev/mmcblk0: PTUUID="738a4d67" PTTYPE="dos"
>
> With the set-ptuuid script downloaded from:
> https://www.raspberrypi.org/forums/viewtopic.php?t=253562 we can change 
> the PARTUUID of the USB-disk (or the sd-card).
> The script also changes the PARTUUID settings in cmdline.txt and other 
> files.
>
> Example
> =====
> Boot from the sd-card with the usb-disk connected
>
> Now change the PTUUID of the USB-disk
> ./set-ptuuid /dev/sda random
> Set PTUUID on /dev/sda to e4f3c2c9 (y/n)?
> PTUUID on /dev/sda is set to e4f3c2c9
>
> blkid
> /dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="4BBD-D3E7" 
> TYPE="vfat" PARTUUID="738a4d67-01"
> /dev/mmcblk0p2: LABEL="rootfs" UUID="45e99191-771b-4e12-a526-0779148892cb" 
> TYPE="ext4" PARTUUID="738a4d67-02"
> /dev/sda1: LABEL_FATBOOT="boot" LABEL="boot" UUID="4BBD-D3E7" TYPE="vfat" 
> PARTUUID="e4f3c2c9-01"
> /dev/sda2: LABEL="rootfs" UUID="45e99191-771b-4e12-a526-0779148892cb" 
> TYPE="ext4" PARTUUID="e4f3c2c9-02"
> /dev/mmcblk0: PTUUID="738a4d67" PTTYPE="dos"
>
> cat cmdline.txt
> console=serial0,115200 console=tty1 root=PARTUUID=e4f3c2c9-02 
> rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet 
> init=/usr/lib/raspi-config/init_resize.sh
>
> Now reboot the RPI with the sd-card and USB-disk still connected
> The RPI will now have it's root set to /dev/sda2
>
> cat /etcfstab
> proc            /proc           proc    defaults          0       0
> PARTUUID=e4f3c2c9-01  /boot           vfat    defaults          0       2
> PARTUUID=e4f3c2c9-02  /               ext4    defaults,noatime  0       1
> # a swapfile is not a swap partition, no line here
> #   use  dphys-swapfile swap[on|off]  for that
> =====
>
> Luc
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/9271e240-75bf-4e13-9150-50c9f443030a%40googlegroups.com.

Reply via email to