HPCguy
Posts: 53
Joined: Fri Oct 09, 2020 7:08 pm

Pi 4 usb-boot questions for RonR

Sun Oct 25, 2020 11:21 am

Hi,

I looked at the usb-boot.txt file and code included in RonR's usb-boot.zip archive, and I came away a bit unsure of exactly what usb-boot will be doing when I run it.

Background: I am brand new to the Raspberry Pi environment. I received an SD card with my Pi model 4B that has Noobs on it. I ran Noobs to set up an initial Operating system on my SD card, which works great. I want to keep the SD card just as it is.

As I understand it, the Noobs partition installed on the SD card is mucking up the USB boot capability on the Pi 4B when I try to use the "SD Card Copier" accessory that comes with the PI to create a USB bootable flash drive. That's why I'm hoping usb-boot can help.

Reading the usb-boot.txt description, two things are unclear to me:

(1) Will usb-boot modify my SD card in any way? I don't want a single bit to change on the SD card. My goal is just to make a bootable USB flash drive from the post-Noobs initialized OS that now resides on my SD card.

(2) Will Noobs be skipped in the copy process from the SD card to the bootable USB flash drive?
I'm hoping the usb-boot copy process removes any trace of Noobs from the newly created USB flash drive.

Can anyone clarify these two points, even better, RonR himself?

Thanks.

User avatar
hansotten
Posts: 357
Joined: Fri Jul 13, 2012 6:01 am
Contact: Website

Re: Pi 4 usb-boot questions for RonR

Sun Oct 25, 2020 11:46 am

Forget Noobs. Remove it, start with a fresh OS on CD.

usb-boot does its work, leaves some extras on the SD to make it possible to boot again from SD, read the description about that.
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with the 6502 cpu

RonR
Posts: 1681
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Pi 4 usb-boot questions for RonR

Sun Oct 25, 2020 7:57 pm

HPCguy wrote:
Sun Oct 25, 2020 11:21 am
I looked at the usb-boot.txt file and code included in RonR's usb-boot.zip archive, and I came away a bit unsure of exactly what usb-boot will be doing when I run it.

A read of the usb-boot script will reveal that it primarily performs the following operations:

1. If the answer to "Replicate BOOT/ROOT contents from ${ROOT_DEV} to ${USB_DEST}?" is 'Yes', two partitions are created on the destination USB device: a 256MB VFAT BOOT partition and an EXT4 partition using the remainder of the device. The answer to the "Partition Table Type" option determines whether an MBR or GPT partition table is used (GPT is required to use devices larger than 2TB). The Linux program 'rsync' is then used to copy the BOOT and ROOT contents of the running system to the destination USB device.

2. If the answer to "Use SD card to boot the USB device?" is 'Yes', the 'root=' element of /boot/cmdline.txt on the SD card is set to the PARTUUID of the destination USB device. This is the only change to the SD card.

3. The 'root=' element of /boot/cmdline.txt of the destination USB device is set to its PARTUUID. The '/' entry of /etc/fstab of the destination USB device is set to its PARTUUID. If the answer to "Use SD card to boot the USB device?" is 'No', the '/boot' entry of /etc/fstab of the destination USB device is set to its PARTUUID, otherwise, the '/boot' entry of /etc/fstab of the destination USB device is set to /dev/mmcblk0p1.
HPCguy wrote:
Sun Oct 25, 2020 11:21 am
Background: I am brand new to the Raspberry Pi environment. I received an SD card with my Pi model 4B that has Noobs on it. I ran Noobs to set up an initial Operating system on my SD card, which works great. I want to keep the SD card just as it is.

If the answer to "Use SD card to boot the USB device?" is 'No', the SD card will not be altered.
HPCguy wrote:
Sun Oct 25, 2020 11:21 am
(2) Will Noobs be skipped in the copy process from the SD card to the bootable USB flash drive?
I'm hoping the usb-boot copy process removes any trace of Noobs from the newly created USB flash drive.

usb-boot will replicate ONLY the RaspiOS partitions of the NOOBS installation running on the SD card. The resulting USB device will be as if you had installed from a RaspiOS image rather than NOOBS.

HPCguy
Posts: 53
Joined: Fri Oct 09, 2020 7:08 pm

Re: Pi 4 usb-boot questions for RonR

Mon Oct 26, 2020 1:54 am

Thanks! This is exactly the information I needed. I'll give it a shot later tonight.

Return to “General discussion”