Attached USB Drive, block booting from

rhett7660

macrumors G5
Original poster
Jan 9, 2008
12,262
2,277
Sunny, Southern California
Hello,

I have a Mac Mini that I use as a Plex server that doubles as the wifes photos machine. Attached to it are two USB drives that i use to back up her folders and photos. However, if I keep the USB drives attached to it and say we lose power, the Mac will try and boot from the USB hard drives. How do I prevent the Mac from booting from it? I want to block the Mac from seeing the external HD's on boot. Is this even possible?

Thanks
 

CoastalOR

macrumors 68020
Jan 19, 2015
2,486
907
Oregon, USA
Set the Mini internal drive as the startup drive in the System Preferences>Startup Disk. The mini will first look at the Startup Disk preference and only look at other disks for startup if the preferred disk is not available.
 

rhett7660

macrumors G5
Original poster
Jan 9, 2008
12,262
2,277
Sunny, Southern California
Set the Mini internal drive as the startup drive in the System Preferences>Startup Disk. The mini will first look at the Startup Disk preference and only look at other disks for startup if the preferred disk is not available.
Thank you. I checked the "startup disk" area and the only disk that is showing is the Mac OS X disk. However, I just test it, and when I rebooted the Mini, it showed the flashing file folder with the question mark in it. Shut it down, unplugged the USB drive, and it booted right up.

See screen shot of "startup disk" area.
 

Attachments

CoastalOR

macrumors 68020
Jan 19, 2015
2,486
907
Oregon, USA
Thank you. I checked the "startup disk" area and the only disk that is showing is the Mac OS X disk. However, I just test it, and when I rebooted the Mini, it showed the flashing file folder with the question mark in it. Shut it down, unplugged the USB drive, and it booted right up.
The flashing file folder with a question mark is an indication of not finding a valid, blessed, startup system.
I'm sorry, but i don't know your system, so I need some additional information for my clarification.

Is "Mac OS X disk" your internal Mini disk or one of your external USB disks?
Have you checked your Mini disk with Disk Utility>First Aid?
What year is your Mini? What is the internal Mini drive (HDD, Fusion, SSD), size, and how full?
 

Fishrrman

macrumors P6
Feb 20, 2009
17,398
5,635
OP wrote:
"I want to block the Mac from seeing the external HD's on boot. Is this even possible?"

I don't think that's possible.
If they're connected to the USB ports, the Mac is going to "see" the connection upon a reboot. It is what it is.

Having said that...

What I'd try:
(no promises this will work, but I don't believe it can hurt anything)

Download the 10.13.6 "combo updater" from here:
https://support.apple.com/kb/DL1970?viewlocale=en_US&locale=en_US

Then, "apply it against" the existing OS install.
It may run, or it may not (telling you that you're already up-to-date).

If it DOES run, it may clear up the problem.
Even if it doesn't (and we won't know that until you try it), it almost certainly won't damage anything.
 

chown33

Moderator
Staff member
Aug 9, 2009
8,429
4,435
Pale blue comma
The relevant command-line tool is called 'bless'. I'm pretty sure it's part of a normal OS install.

In addition to altering info about the startup disk, it can output info for the current disk.
Code:
bless --info
Copy and paste into a Terminal window. Press the RETURN key. Copy and paste (drag to select in the Terminal window, then ⌘C) the output, and post it here.

You can read its builtin help with:
Code:
bless -help
Command man page:
https://ss64.com/osx/bless.html
 
  • Like
Reactions: hobowankenobi

rhett7660

macrumors G5
Original poster
Jan 9, 2008
12,262
2,277
Sunny, Southern California
The flashing file folder with a question mark is an indication of not finding a valid, blessed, startup system.
I'm sorry, but i don't know your system, so I need some additional information for my clarification.

Is "Mac OS X disk" your internal Mini disk or one of your external USB disks?
Have you checked your Mini disk with Disk Utility>First Aid?
What year is your Mini? What is the internal Mini drive (HDD, Fusion, SSD), size, and how full?
Mac OS X Disk is internal
Checked and it showed no errors
Year: 2011 MM with a solid state drive (239.85gb) that has 160.02 gb of free space APFS formatted.

The relevant command-line tool is called 'bless'. I'm pretty sure it's part of a normal OS install.

In addition to altering info about the startup disk, it can output info for the current disk.
Code:
bless --info
Copy and paste into a Terminal window. Press the RETURN key. Copy and paste (drag to select in the Terminal window, then ⌘C) the output, and post it here.
Here is the result:

MacMini:~ XXXXXXXX$ bless --info
/sbin/mount returned non-0 exit status
Couldn't mount preboot volume /dev/disk1s2
This is an APFS volume. The preboot volume in its container
cannot be accessed. Try mounting the preboot volume (/dev/disk1s2)
or running as root.


bash-3.2$ bless --info
/sbin/mount returned non-0 exit status
Couldn't mount preboot volume /dev/disk1s2
This is an APFS volume. The preboot volume in its container
cannot be accessed. Try mounting the preboot volume (/dev/disk1s2)
or running as root.
bash-3.2$


I tried running in root also, gave me the same result.
 
Last edited:

chown33

Moderator
Staff member
Aug 9, 2009
8,429
4,435
Pale blue comma
...
bash-3.2$ bless --info
/sbin/mount returned non-0 exit status
Couldn't mount preboot volume /dev/disk1s2
This is an APFS volume. The preboot volume in its container
cannot be accessed. Try mounting the preboot volume (/dev/disk1s2)
or running as root.
bash-3.2$

I tried running in root also, gave me the same result.
Those results seem like a clue that something is wrong with the current setting of the Startup Disk. Unfortunately, I don't have a lot of other ideas for how to fix it.

One is if you have another bootable disk, specifically an external disk, try mounting it and then choosing it in System Preferences > Startup Disk. Then close the panel so the settings are saved (simply clicking the disk icon doesn't save the setting). Then run the command again and see if there are any differences. I would expect at least the preboot volume path to change, but I'm not 100% sure of that. If it does change, then do a Restart to see if it works. If it does restart from the external, then open Sys Prefs > Startup Disk and choose the original internal disk.

I also think it's slightly odd that the disk is disk1 and not disk0, but that may be an artifact of APFS. Since I don't have an APFS system here, I can't look into that.

You might provide some useful info for others with this command line:
Code:
diskutil list ; mount
That's actually two commands on one line, separated by a semi-colon. The output will be from both commands.


One other suggestion: get an UPS for the server and its USB disks. This should greatly reduce the rate of "say we lose power" events. It's more an avoidance strategy than a solution, but a server without an UPS is a bad idea anyway.

I picked up a second one of these a few weeks ago:
https://www.amazon.com/gp/product/B01FWAZEIU/
 
  • Like
Reactions: rhett7660

rhett7660

macrumors G5
Original poster
Jan 9, 2008
12,262
2,277
Sunny, Southern California
@chown33

Here is the return of the above command...

bash-3.2$ diskutil list ; mount
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *240.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 239.8 GB disk0s2

/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +239.8 GB disk1
Physical Store disk0s2
1: APFS Volume Mac OS X 79.2 GB disk1s1
2: APFS Volume Preboot 19.5 MB disk1s2
3: APFS Volume Recovery 512.0 MB disk1s3
4: APFS Volume VM 20.5 KB disk1s4

/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Photo2 127.7 GB disk2s2

/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *2.0 TB disk3
1: Apple_HFS Photos 2.0 TB disk3s1

/dev/disk1s1 on / (apfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk1s4 on /private/var/vm (apfs, local, noexec, journaled, noatime, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
/dev/disk2s2 on /Volumes/Photo2 (hfs, local, nodev, nosuid, journaled, noowners)
//xxxxxxxx@MediaMaster_01/iTunesMaster on /Volumes/iTunesMaster (smbfs, nodev, nosuid, mounted by xxxxxxxx)
//xxxxxxxx@MediaMaster_01/TV%20Shows on /Volumes/TV Shows (smbfs, nodev, nosuid, mounted by xxxxxxxx)
//xxxxxxxx@MediaMaster_01/Movies on /Volumes/Movies (smbfs, nodev, nosuid, mounted by xxxxxxxx)
//xxxxxxxx@MediaMaster_01/Documents on /Volumes/Documents (smbfs, nodev, nosuid, mounted by xxxxxxxx)
//xxxxxxxx@MediaMaster_01/Music on /Volumes/Music (smbfs, nodev, nosuid, mounted by xxxxxxxx)
//xxxxxxxx@MediaMaster_01._smb._tcp.local/Books on /Volumes/Books (smbfs, nodev, nosuid, mounted by xxxxxxxx)

/dev/disk3s1 on /Volumes/Photos (hfs, local, nodev, nosuid, journaled, noowners)
[doublepost=1554155310][/doublepost]I also added two UPS to purchase for next payday. Going to put one on the MacMini and one for my NAS box.

Going to do a back up and do the installer method also. See if that helps.
 

chown33

Moderator
Staff member
Aug 9, 2009
8,429
4,435
Pale blue comma
If it were me, my next step would be to make a good backup (or 2) and then run the full 10.13.6 installer app.
This seems like a good idea to me.

The way I'd do it:
I'd run the installer on the backup (replica) rather than the original. Then I'd set it as the Startup Disk, restart, then run the 'bless --info' command and see what it says.

If it manages to mount the preboot volume and show something sensible, that's when I'd run the installer on the original internal disk. If it works, then you can ignore the replica you made and used briefly. If it doesn't work, then wipe the internal and copy the replica to it. Either way, I'd keep the replica on a shelf until I was satisfied nothing odd was going to happen on the internal.

@chown33

Here is the return of the above command...

bash-3.2$ diskutil list ; mount
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *240.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 239.8 GB disk0s2

/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +239.8 GB disk1
Physical Store disk0s2
1: APFS Volume Mac OS X 79.2 GB disk1s1
2: APFS Volume Preboot 19.5 MB disk1s2
3: APFS Volume Recovery 512.0 MB disk1s3
4: APFS Volume VM 20.5 KB disk1s4
That's close enough to what I was vaguely remembering that I'm going to say it looks normal to me. APFS runs from a container, and so it ends up with its own distinct /dev/diskN entry and subsequenct slices (partitions).

However, the inability to mount the preboot partition suggests there's something wrong with that part. The goal of a reinstall is to recreate the contents of those supporting partitions without breaking the "Mac OS X" partition.
 

rhett7660

macrumors G5
Original poster
Jan 9, 2008
12,262
2,277
Sunny, Southern California
This seems like a good idea to me.

The way I'd do it:
I'd run the installer on the backup (replica) rather than the original. Then I'd set it as the Startup Disk, restart, then run the 'bless --info' command and see what it says.

If it manages to mount the preboot volume and show something sensible, that's when I'd run the installer on the original internal disk. If it works, then you can ignore the replica you made and used briefly. If it doesn't work, then wipe the internal and copy the replica to it. Either way, I'd keep the replica on a shelf until I was satisfied nothing odd was going to happen on the internal.


That's close enough to what I was vaguely remembering that I'm going to say it looks normal to me. APFS runs from a container, and so it ends up with its own distinct /dev/diskN entry and subsequenct slices (partitions).

However, the inability to mount the preboot partition suggests there's something wrong with that part. The goal of a reinstall is to recreate the contents of those supporting partitions without breaking the "Mac OS X" partition.
Perfect...

Thank you both!
 
  • Like
Reactions: CoastalOR