Welcome to the Tiny Core Linux Wiki at tinycorelinux.net!

This page was most recently tested on Core 4.7.6

Basic Form

The form of this bootcode is as follows

 waitusb=X

When used, the system will pause during the boot process for X seconds before finishing the start-up process. The use of this boot code allows slow devices to finish initializing before the system finds itself in need of them.

LABEL Version

There are two other versions of this boot code that are very useful. The first one is as follows

 waitusb=X:LABEL=xx

This version waits for X seconds, scanning the system a couple times a second for a partition with a label that equals xx. When the X seconds have passed OR when the partition specified has been found, the system will stop waiting and will continue the booting process. Don't know what the LABEL of your partition is? Simply launch a terminal, type “blkid | grep DEV” where DEV is the name of the drive that you would like to wait for. Note that your partition may not have the LABEL set. It is possible to give it one, but the method depends on the format of your partition.

Change the label of a ext* partition

Install e2fsprogs.tcz :

 tce-load -wil e2fsprogs.tcz

Then set the label of a partition that is formatted with the ext2, ext3, or ext4 partition. For example, let us say that I want to change the label of /mnt/sda2. The proper command will look something like this.

 e2label /dev/sda2 "mylabeledpartition"
NTFS

There are very few instances where you would want to wait on a ntfs partition, but here are the instructions anyway.
Install ntfsprogs.tcz

 tce-load -iwl ntfsprogs.tcz

Change the label of your partition

 ntfslabel DEVICE LABEL

Where DEVICE is the ntfs partition that you want to label, and where LABEL is the label you want to use. Example:

 ntfslabel /dev/sda1 old_files
Change the label of a FAT* partition

Install mtools.tcz and glibc_gconv.tcz:

 tce-load -wil mtools.tcz
 tce-load -wil glibc_gconv.tcz   

You can then change the label of a FAT partition like this:

 mlabel -i /dev/X ::mylabel

Where X is the name of the drive (e.g. sdb1) and where mylabel is the label you want to give your device (e.g. “shared_partition”). mlabel can be a little annoying to work with and may ask you to add a line to its configuration file. This file can be named /etc/mtools.config or ~/.mtoolsrc For best results simply make /etc/mtools.config and ~/.mtoolsrc identical.

OTHER

FIXME

UUID Version

Here is the second version:

 waitusb=X:UUID=xx 

This version waits for X seconds, scanning the system a couple times a second for a device with a UUID that equals xx. When the X seconds have passed OR when the device specified has been found, the system will stop waiting and will continue the booting process. You can find the UUID of your device you can follow the same procedure as you do for finding the LABEL of a partition. It is possible for some drives to be lacking a UUID; however, setting it is even more mentally challenging than setting the LABEL.
FIXME: tell how to set the UUID of a partions

Advantages of the Different Forms

Using the basic form is a quick fix and might allow the system to slow down for devices other than hard drives and usb drives.
LABELs are short and human-readable; however, since they are user defined, there is a possibility that your system might have two drives with the same label. This isn't a serious issue, but lets say you have two devices sda1 and sdb1. They both have the label “CORE”. sda1 starts very quickly, while sdb1 starts very slowly. Unfortunately, the device that you want to wait for is sdb1. If you use the bootcode “waitusb=20:LABEL=CORE” then the system will wait until sda1 starts and will boot before sdb1 has time to get going.
Technically speaking, using UUID doesn't eliminate that risk entirely; however, since UUIDs are longer and usually contain a large variety of characters, the theoretical probability of two devices in a given system having the same UUID is drastically lowered. On the downside, UUIDs are not at all readable and copying them by hand is quite nasty, so if your setup requires you to type in your boot codes upon every boot, then the UUID version is not for you.

Print/export
QR Code
QR Code wiki:waitusb (generated for current page)