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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:waitusb [2013/01/07 11:39]
lverns [LABEL VERSION] added instructions for changing the label of a FAT* partition
wiki:waitusb [2013/05/13 19:23] (current)
lverns [LABEL Version] changed info about the location of the mtools config file
Line 1: Line 1:
 +**//This page was most recently tested on Core 4.7.6//**
 ====Basic Form==== ====Basic Form====
 The form of this bootcode is as follows The form of this bootcode is as follows
Line 8: Line 9:
 The first one is as follows The first one is as follows
    waitusb=X:LABEL=xx    waitusb=X:LABEL=xx
-This version waits for X seconds, scanning the system a couple times a second for a device with a label 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. +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 device 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 this will only display mounted partitions. Also note that your drive may not have the LABEL set. It is possible to give it one, but the method depends on the format of your partition.+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== ==Change the label of a ext* partition==
 Install e2fsprogs.tcz : Install e2fsprogs.tcz :
-   tce-load -wi 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. 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"    e2label /dev/sda2 "mylabeledpartition"
  
 ==NTFS== ==NTFS==
-FIXME+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== ==Change the label of a FAT* partition==
-Install mtools.tcz : +Install mtools.tcz and glibc_gconv.tcz: 
-   tce-load -wi mtools.tcz +   tce-load -wil mtools.tcz 
-You may also need glibc_gconv.tcz : +   tce-load -wil glibc_gconv.tcz   
-   tce-load -wi glibc_gconv.tcz+
 You can then change the label of a FAT partition like this: You can then change the label of a FAT partition like this:
    mlabel -i /dev/X ::mylabel    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"). 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").
-**mtools.tcz** can be a little gnarly to work with. If you need to create a configuration file, you are best off naming it /etc/mtools.config because ~/.mtoolsrc seems to be ignored.+**mlabel** can be a little annoying to work with and may ask you to add 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==  ==OTHER== 
Line 39: Line 45:
 ====Advantages of the Different Forms=== ====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.\\  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 lowered.+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. 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