Brad Q
Posts: 42
Joined: Mon Aug 12, 2019 12:10 am

Re: Running Raspbian from USB Devices : Made Easy

Thu Nov 07, 2019 10:41 pm

I suspect that this is something you have done that is not (at least directly) related to usb-boot. As I stated above my system behaves "normally". Everything is auto mounted that same as it was before the use of usb-boot.

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

Re: Running Raspbian from USB Devices : Made Easy

Fri Nov 08, 2019 4:38 am

LTolledo wrote:
Thu Nov 07, 2019 10:19 pm
Just to clarify:

The condition stated was observed on an RPi4B-4G with Raspbian Buster Full Desktop system after it was successfully transferred from microSD to USB-SSD using usb-boot. The system is running fine with the rootfs located on the USB-SSD.

prior to the change (still on native microSD boot), any USB device hot-plugged to RPi4B's vacant USB port is auto-mounted in /media/pi

after using usb-boot to transfer the system to USB-SSD, any USB drive hot-plugged to any USB port is not auto-mounted

however, any USB drive plugged to RPi4B's USB before bootup, the USB drive is always auto-mounted.


so...when running the usb-boot script, was there modification in the system setting that prevents a successfully transferred system from auto-mounting any hot-plugged drives?
if there is... would like to undo that setting myself, to re-enable hot-plugging on a successfully transferred system.
if none... will look at something else....

As previously stated, usb-boot isn't involved with auto-mounting in any way.

I just installed Raspbian Buster Full Desktop on an RPi4B-4G and verified that auto-mounting works perfectly running from the SD card. I then ran usb-boot to replicate the SD card to a USB device and rebooted. The USB device booted as expected and any USB drive hot-plugged to any USB port is auto-mounted as expected. Ejecting the USB drive and reinserting it auto-mounts it again.

I don't see a problem.

iznobe
Posts: 289
Joined: Sun Feb 05, 2017 4:14 pm
Location: Avignon , FRANCE

Re: Running Raspbian from USB Devices : Made Easy

Fri Nov 08, 2019 9:24 am

Hello ,

i notice that there is a minor error in your code , about line 101 :

Code: Select all

if [ -b /dev/mmcblk0 ]; then
  USESDC=TRUE
else
  USESDC=[b]FLASE[/b]
fi
i haven't read all :roll:

just one question , the reserved blocks on SSD drives does not all have same size , i'm right ?
so it is dangerous to do this like this ?
is it possible to install raspbian buster directly on the hard drive ?

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

Re: Running Raspbian from USB Devices : Made Easy

Fri Nov 08, 2019 6:43 pm

iznobe wrote:
Fri Nov 08, 2019 9:24 am
i notice that there is a minor error in your code , about line 101 :

Code: Select all

if [ -b /dev/mmcblk0 ]; then
  USESDC=TRUE
else
  USESDC=[b]FLASE[/b]
fi

That's definitely a typo, but it's of virtually no consequence. The only place USESDC is tested for being FALSE is to warn if the user has removed the SD card prior to running usb-boot on a non-RPi-3B+. I'll fix the typo, but it's nothing to be concerned about. Thanks for alerting me.
iznobe wrote:
Fri Nov 08, 2019 9:24 am
just one question , the reserved blocks on SSD drives does not all have same size , i'm right ?
so it is dangerous to do this like this ?
is it possible to install raspbian buster directly on the hard drive ?

I'm not sure what you're referring to, but no problems have been reported with SSD drives in the two years that usb-boot has been posted here. Any version of Raspbian can be written directly to any USB device and used with usb-boot.

LTolledo
Posts: 2163
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Running Raspbian from USB Devices : Made Easy

Wed Nov 13, 2019 9:53 am

RonR wrote:
Fri Nov 08, 2019 4:38 am
The USB device booted as expected and any USB drive hot-plugged to any USB port is auto-mounted as expected. Ejecting the USB drive and reinserting it auto-mounts it again.

I don't see a problem.
Just an update...
I've determined the cause of the auto-mount problem.... it seemed the "source" microSD installation prior to using usb-boot was the culprit. it too was not auto-mounting any drive hot-plugged to any USB port.
sorry for the mis-conception on my part :oops:

am rebuilding the setup, and confident will get same result as yours. :D

Thanks again!
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

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

Re: Running Raspbian from USB Devices : Made Easy

Thu Nov 14, 2019 6:54 am

I've attached a companion script named sdc-boot to the first post in this topic.

sdc-boot provides a convenient way to select which attached device will be booted.

Usage syntax is:

sdc-boot [ /dev/mmcblk0 | /dev/sdX | ptuuid=hhhhhhhh ]

/dev/mmcblk0 is the SD card

/dev/sdX is a USB device

ptuuid=hhhhhhhh is a USB device identified by its PTUUID

If no device is specified, the currently selected boot device will be displayed.

User avatar
kanitelka
Posts: 1
Joined: Thu Nov 14, 2019 11:05 am
Contact: Website

Re: Running Raspbian from USB Devices : Made Easy

Thu Nov 14, 2019 11:17 am

RonR thanks for the script. May be add in script? => NOTE: Do NOT use usb-boot on NOOBS

I did not understand about the directory /home the HankB wrote.

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

Re: Running Raspbian from USB Devices : Made Easy

Thu Nov 14, 2019 5:45 pm

kanitelka wrote:
Thu Nov 14, 2019 11:17 am
May be add in script? => NOTE: Do NOT use usb-boot on NOOBS

usb-boot originally did not support NOOBS. usb-boot was later enhanced to support NOOBS.
kanitelka wrote:
Thu Nov 14, 2019 11:17 am
I did not understand about the directory /home the HankB wrote.

HankB had a very non-standard environment where he had moved his /home directory to another drive.

arasuk
Posts: 3
Joined: Sat Nov 16, 2019 10:56 am
Location: Sydney, Australia

Re: Running Raspbian on USB Devices : Made Easy

Sun Nov 17, 2019 4:19 pm

RonR wrote:
Sat Dec 09, 2017 9:15 pm
GGEZ wrote:
Sat Dec 09, 2017 9:00 pm
This method screws up raspi-config. I had to take out the SD card and edit config.txt on my computer. Still not sure how to use raspi-config.
Your problem is not related to the usb-boot script provided in this topic.

raspi-config does not know how to resize Raspbian when it's running from a USB drive, regardess of the method used to put Raspbian on a USB drive.

The attached fix-rc archive (https://www.raspberrypi.org/forums/down ... p?id=19959) contains two solutions to this problem:

1. raspi-config-usb makes a temporary copy of raspi-config, patches it to work, runs the temporary copy, then deletes the temporary copy.

2. patch-rc copies raspi-config to raspi-config-original and patches raspi-config to work.
What to do with the files to boot. That is the mail problem.
If you can kindly elaborate, that would be fine.. My Raspbian is not booting.

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

Re: Running Raspbian on USB Devices : Made Easy

Sun Nov 17, 2019 7:45 pm

arasuk wrote:
Sun Nov 17, 2019 4:19 pm
RonR wrote:
Sat Dec 09, 2017 9:15 pm
GGEZ wrote:
Sat Dec 09, 2017 9:00 pm
This method screws up raspi-config. I had to take out the SD card and edit config.txt on my computer. Still not sure how to use raspi-config.
Your problem is not related to the usb-boot script provided in this topic.

raspi-config does not know how to resize Raspbian when it's running from a USB drive, regardess of the method used to put Raspbian on a USB drive.

The attached fix-rc archive (https://www.raspberrypi.org/forums/down ... p?id=19959) contains two solutions to this problem:

1. raspi-config-usb makes a temporary copy of raspi-config, patches it to work, runs the temporary copy, then deletes the temporary copy.

2. patch-rc copies raspi-config to raspi-config-original and patches raspi-config to work.
What to do with the files to boot. That is the mail problem.
If you can kindly elaborate, that would be fine.. My Raspbian is not booting.

The two-year old post you quoted has nothing to do with Raspbian not booting.

If you are having a problem with usb-boot, please describe the steps you are taking and what is occurring along the way.

If your problem is not related to usb-boot, please start a new topic.

Return to “Advanced users”