WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17  (Read 285 times)

Offline MrPorcine

  • Jr. Member
  • **
  • Posts: 69
I have a large USB drive attached when piCore 17 boots. It eventually shows up as /dev/sda1. This is a fresh install of piCore64-17.0 on a Pi4. What happens during boot if I have the USB drive attached is as follows:
--I get the command prompt quickly
--several seconds later I see what looks like a the output of ls on /sys/devices/platform/scb. It's a lot of lines, I can't see where it starts as it's scrolled off the screen.
--Only after this finishes do I see sda1 added to fstab.

This is part of a picture frame. Normally I start X and feh as the last line in bootlocal.sh. The timing during boot appears to be: 1)command prompt, 2)whatever in the boot process that produces the file tree dump on the terminal, and finally 3) the last line in bootlocal.sh is run. It's about 6 seconds between 1) and 3).

If I don't have the drive attached during boot, all is well. If I then attach it, all works as it's supposed to. No extra stuff on the terminal.

Any ideas on what is going on?

Just to be clear, X and feh work perfectly once the USB drive is recognized by the kernel.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15917
Re: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17
« Reply #1 on: December 03, 2026, 12:31:16 PM »
You could use the waitusb boot code to delay things until the drive is recognized.

Offline MrPorcine

  • Jr. Member
  • **
  • Posts: 69
Re: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17
« Reply #2 on: December 03, 2026, 12:54:02 PM »
You could use the waitusb boot code to delay things until the drive is recognized.
YES, this works. waitusb=2 at the end of the command line works great. Thanks!

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1654
Re: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17
« Reply #3 on: December 04, 2026, 09:32:38 AM »
2 is a reasonable number.  But do a couple of cold boots to test out.  Might need to add a second or two for reliability.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 13047
Re: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17
« Reply #4 on: December 04, 2026, 05:14:49 PM »
Hi MrPorcine
From the FAQ:
Quote
This is most helpful when using pendrives on different machines and you want to "anchor" your Tiny Core boot codes to a specific device.

To find the UUID of a device use the command blkid
blkid -s UUID /dev/sda1

You can mount devices by UUID with the mount command, e.g,
# mount -U 4773-DFE2

The UUID tends to be long, so best to cut and paste into your menu.lst boot options.

You can now specify the device to be used by UUID as follows:
tce=UUID=4773-DFE2 home=UUID=4773-DFE2 opt=UUID=4773-DFE2 restore=UUID=4773-DFE2

Typically this is helpful when using pendrives, be sure to add the waitusb=5 option.

Advanced users may add a specific device to wait for, with the time limit being the maximum time to wait:
waitusb=30:LABEL=tinycore
waitusb=30:UUID=4773-DFE2

So by using:
Code: [Select]
waitusb=30:UUID=(user ID for your device)it would continue as soon as the device is ready. Doing
it this way is the fastest option.

Offline MrPorcine

  • Jr. Member
  • **
  • Posts: 69
Re: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17
« Reply #5 on: December 04, 2026, 08:40:32 PM »
Thanks for the tip. I am used to lsblk, which is not available. Nice to know about blkid.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 13047
Re: Can I blacklist a drive so it won't show up in fstab on boot? piCore 17
« Reply #6 on: December 04, 2026, 09:16:06 PM »
Hi MrPorcine
lsblk is available in util-linux.tcz.