Sponsored Content
Full Discussion: Find Partition/Slice UUID
Operating Systems BSD Find Partition/Slice UUID Post 302941758 by AntumDeluge on Monday 20th of April 2015 11:53:00 PM
Old 04-21-2015
Thanks, I'll try that out.

--- Edit ---

Apparently, busybox does not have blkid on FreeBSD. I did find it though, in the Port/Package sysutils/e2fsprogs.

It's a bit different though. Executing the command blkid without any arguments doesn't print anything. I have to point it to a device or devices:
Code:
$ blkid /dev/ad*
/dev/ad4s1: LABEL="GRUB" UUID="a01cbff7-216d-49ab-87ac-5f3e2fa91859" TYPE="ext2" 
/dev/ad4s3: UUID="5BBEAFDF7079F5E8" LABEL="Windows" TYPE="ntfs" 
/dev/ad4s5: LABEL="Debian" UUID="f56b8de1-3937-d001-e063-88e13937d001" TYPE="ext4" 
/dev/ad4s6: LABEL="Shared" UUID="3a5ae84b-66c1-4c0b-a2d5-9546a20d7111" TYPE="ext2" 
/dev/ad4s7: UUID="9a4906bd-aae0-4226-a604-001db362121c" TYPE="swap" 
/dev/ad8s1: UUID="01CDAAC34C08EB50" LABEL="Data" TYPE="ntfs" 
/dev/ada0s1: LABEL="GRUB" UUID="a01cbff7-216d-49ab-87ac-5f3e2fa91859" TYPE="ext2" 
/dev/ada0s3: UUID="5BBEAFDF7079F5E8" LABEL="Windows" TYPE="ntfs" 
/dev/ada0s5: LABEL="Debian" UUID="f56b8de1-3937-d001-e063-88e13937d001" TYPE="ext4" 
/dev/ada0s6: LABEL="Shared" UUID="3a5ae84b-66c1-4c0b-a2d5-9546a20d7111" TYPE="ext2" 
/dev/ada0s7: UUID="9a4906bd-aae0-4226-a604-001db362121c" TYPE="swap" 
/dev/ada1s1: UUID="01CDAAC34C08EB50" LABEL="Data" TYPE="ntfs"


Last edited by AntumDeluge; 04-21-2015 at 01:17 AM.. Reason: Found answer
These 2 Users Gave Thanks to AntumDeluge For This Post:
 

9 More Discussions You Might Find Interesting

1. Solaris

Find a Fat32 partition under solaris 10 x86

Hello, I use Sun Solaris 10 under a x86 computer, and I want to mount a Fat32 partition who are stored in the same disk with the UFS filesystem. But, before mount this partition, I need to know is location in /dev/dsk Because there are a lot of file "c0t0d0" etc..., and I didn't find my... (4 Replies)
Discussion started by: willits
4 Replies

2. Solaris

mirroring the boot slice (slice 8) on x86

Hi there I am about to mirror a Solaris 10 x86 box (SunFire X4100) onto a secondary disk using svm (current system is one disk). My question is this, on X86 boxes there is a slice 8 defined as boot partition (and also a slice 9, dunno what its used for tho). Do I need to mirror this boot slice... (0 Replies)
Discussion started by: hcclnoodles
0 Replies

3. UNIX for Dummies Questions & Answers

slice & partition???

:confused: Hello, What is the difference between slice and partition on Solaris world? Regards (4 Replies)
Discussion started by: XNOR
4 Replies

4. Linux

How to give UUID to a swap partition?

Dear Folks Is there anyway to give a UUID to a swap partition? mkswap on CentOS 5 (util-linux-2.13-0.45.el5_1.1) appears to override this option ;-( # swapoff -a # mkswap -L swap1 /dev/sda3 Setting up swapspace version 1, size = 4293591 kB LABEL=swap1, no uuid And there's no... (3 Replies)
Discussion started by: Santi
3 Replies

5. UNIX for Advanced & Expert Users

Generate UUID for a host

Hello Experts, Is there a way to generate Universally Unique identifiers on all Unix flavours such as Solaris, RHELinux,Suse Linux, MacOS,HP UX etc? If i can get a system command or a system call or an algorithm/script/program to generate a unique identifier, it will be helpful. Thanks in... (1 Reply)
Discussion started by: GajendraSharma
1 Replies

6. UNIX for Dummies Questions & Answers

How to find the partition types in linux

How do we find the partition type in Linux? df -T will give me the mounted partition types like ufs, ext3 etc. How do I find out for say a newly added disk to the system? Please advise... Thanks (2 Replies)
Discussion started by: lubu
2 Replies

7. Ubuntu

How to find unallocated partition.

HI, I'm trying to find the unallocated space in console mode from my hard disk. I tried " df-hk and fdisk" commands, but either of the commands are not listing out the unallocated space. It's just listing the existing partition. please let me know how to list that and partition that in text mode. (3 Replies)
Discussion started by: Prabhu.Are
3 Replies

8. Solaris

Trouble creating a disk partition slice (EFI)

Hi all, I am using SPARC Solaris 11.1 with EFI labelled disks. I am new to ZFS file systems and slightly stuck when trying to create a partition (slice) on one of my LUNs. EFI labels use sectors and blocks and I am not sure how exactly it works. From here I can try and create a... (2 Replies)
Discussion started by: selectstar
2 Replies

9. Solaris

Find device ID for partition in Solaris 11?

I have a laptop I'm setting up to multi-boot between Win 7, Solaris 11, Ubuntu 14.04, and CentOS 7. I have a common FAT32 partition for all of them to save data to. I'm less familiar with Solaris and haven't used it in years, and am really struggling :-) 'format' says: AVAILABLE DISK... (5 Replies)
Discussion started by: jnojr
5 Replies
LIBBLKID(3)							Programmer's Manual						       LIBBLKID(3)

NAME
libblkid - block device identification library SYNOPSIS
#include <blkid.h> cc file.c -lblkid DESCRIPTION
The libblkid library is used to identify block devices (disks) as to their content (e.g. filesystem type) as well as extracting additional information such as filesystem labels/volume names, unique identifiers/serial numbers. A common use is to allow use of LABEL= and UUID= tags instead of hard-coding specific block device names into configuration files. The low-level part of the library also allows to extract infomation about partitions and block device topology. The high-level part of the library keeps information about block devices in a cache file /etc/blkid.tab and is verified to still be valid before being returned to the user (if the user has read permission on the raw block device, otherwise not). The cache file also allows unprivileged users (normally anyone other than root, or those not in the "disk" group) to locate devices by label/id. The standard loca- tion of the cache file can be overridden by the environment variable BLKID_FILE. In situations where one is getting information about a single known device, it does not impact performance whether the cache is used or not (unless you are not able to read the block device directly). The high-level part of the library supports two methods to evaluate LABEL/UUID. It reads information directly from a block device or read information from /dev/disk/by-* udev symlinks. The udev is preferred method by default. If you are dealing with multiple devices, use of the cache is highly recommended (even if empty) as devices will be scanned at most one time and the on-disk cache will be updated if possible. In some cases (modular kernels), block devices are not even visible until after they are accessed the first time, so it is critical that there is some way to locate these devices without enumerating only visible devices, so the use of the cache file is required in this situa- tion. CONFIGURATION FILE
The standard location of the /etc/blkid.conf config file can be overridden by the environment variable BLKID_CONF. The following options control the libblkid library: SEND_UEVENT=<yes|not> Sends uevent when /dev/disk/by-{label,uuid}/ symlink does not match with LABEL or UUID on the device. Default is "yes". CACHE_FILE=<path> Overrides the standard location of the cache file. This setting can be overridden by the environment variable BLKID_FILE. Default is /etc/blkid.tab. EVALUATE=<methods> Defines LABEL and UUID evaluation method(s). Currently, the libblkid library supports "udev" and "scan" methods. More than one meth- ods may be specified in a comma separated list. Default is "udev,scan". The "udev" method uses udev /dev/disk/by-* symlinks and the "scan" method scans all block devices from the /proc/partitions file. AUTHOR
libblkid was written by Andreas Dilger for the ext2 filesystem utilties, with input from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o. The low-level probing code was rewritten by Karel Zak. FILES
/etc/blkid.tab caches data extracted from each recognized block device /etc/blkid.conf configuration file AVAILABILITY
libblkid is part of the util-linux package since version 2.15 and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. COPYING
libblkid is available under the terms of the GNU Library General Public License (LGPL), version 2 (or at your discretion any later ver- sion). SEE ALSO
blkid(8) findfs(8) util-linux May 2009 LIBBLKID(3)
All times are GMT -4. The time now is 11:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy