WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Extension provides udev by-label?  (Read 1832 times)

Offline firestorm_v1

  • Newbie
  • *
  • Posts: 10
Extension provides udev by-label?
« on: April 24, 2012, 03:45:39 PM »
Hello:

I'm looking for the combination of extensions that provides the by-label designation in /dev/disk when the machine is booted or udevadm is triggered.  The idea is that a partition like /dev/sda2 with label "1-ROOT" can be referenced by /dev/disk/by-label/1-ROOT.  Currently the only directory in /dev is by-path which then references the PCI/SCSI path to the device starting with the location on the PCI bus.

I currently have the following modules loaded in my image (based off of MicroCore)

firmware-bnx2 (network card drivers)
bash
parted
tar
coreutils
wget
scsi
udisks
udev-lib

Any assistance would be greatly appreciated. If you need more information, please let me know and I will be more than happy to respond.

Thank you.


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Extension provides udev by-label?
« Reply #1 on: April 24, 2012, 05:36:49 PM »
Hi firestorm_v1
I'm not sure if this helps, but  blkid  will tell you a disks label and UUID.
blkid [h,s]*

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Extension provides udev by-label?
« Reply #2 on: April 24, 2012, 05:58:12 PM »
You can mount by label.
You don't need to know the device name.

Offline firestorm_v1

  • Newbie
  • *
  • Posts: 10
Re: Extension provides udev by-label?
« Reply #3 on: April 24, 2012, 08:43:40 PM »
The issue is I'm working on building an imaging platform from an "adopted" script.  The script that performs the imaging of a new server sets labels for each of the partitions then creates directories in /mnt, and then mounts the respective directories to install the bootloader and perform the imaging. 

In the "existing" NFS-root based platform, the /dev/disk/by-label is automatically populated and serves for a 1-to-1 mapping for mounting.  I was looking for a way for that I could replicate that functionality with TinyCore to make it a bit easier for me to recode the imaging script.