Wednesday, September 30, 2015

Ubuntu bridge configuration

brctl in bridge-utils
1
#aptitude install bridge-utils

1
#brctl addbr br0
- creating a bridge interface

1
#ip addr show
- display the enumeration of ethernet devices

1
#brctl addif br0 eth0 eth1
- add eth0 and eth1 to bridge br0

The equivalent configuration in /etc/network/interfaces
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 # This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).

 # The loopback network interface
 auto lo br0
 iface lo inet loopback

 # Set up interfaces manually, avoiding conflicts with, e.g., network manager
 iface eth0 inet manual

 iface eth1 inet manual

 # Bridge setup
 iface br0 inet dhcp
        bridge_ports eth0 eth1

1
#ifup br0
- bring up the bridge

It is possible to set a static IP for a bridge in /etc/network/interfaces
1
2
3
4
5
6
 iface br0 inet static
        bridge_ports eth0 eth1
        address 192.168.1.2
        broadcast 192.168.1.255
        netmask 255.255.255.0
        gateway 192.168.1.1

Bridge configuration variables are in
/etc/sysctl.conf
/etc/sysctl.d/bridge_local.conf

procps init script will loading the configurations.  For newer Debian releases, procps needs to be started in /etc/rc.local
1
2
# Load kernel variables from /etc/sysctl.d
/etc/init.d/procps restart

Setup link layer filtering rules
Need package ebtables

For supporting link aggregation (LACP), ifenslave is the required package.

references:
https://wiki.debian.org/BridgeNetworkConnections
http://wiki.libvirt.org/page/Networking
https://help.ubuntu.com/community/NetworkConnectionBridge
https://help.ubuntu.com/community/Ntop

Tuesday, September 29, 2015

Linux Kernel Source in Eclipse CDT

https://wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source
The steps are good for Eclipse Luna.

1 Download and install Eclipse plus the CDT.
2 Configure and build your kernel to define CONFIG_* and generate autoconf.h. This can be done before or after downloading and installing Eclipse.
3 Ensure that you have the right kernel source (e.g. make sure you are on the right git branch). If you check out another branch later, that's ok, but you will need to re-index the source, and that takes about 20 minutes.
4 Start up Eclipse.
5 Click File->New->C Project
6 Fill in a project name like my_kernel
7 Uncheck the Use default location box and type in the root directory of your kernel into the Location box.
8 In the Project type: pane, click the Makefile project and select Empty Project
9 On the right side, select Linux GCC
10 Click Advanced settings... and a Properties dialog will pop up.
11 Open the C/C++ General selection on the left.
12 Click on Preprocessor Include Paths
13 Select GNU C in the Languages list
14 Select CDT User Setting Entries in the Setting Entries list
15 Click on Add.... Choose Preprocessor Macros File from the top left dropdown, Project Path from the top right dropdown, and enter "include/generated/autoconf.h" into the File text box. (Note: For kernels older than 2.6.33, the location of autoconf.h is include/linux/autoconf.h)
16 Also add any other macros files you are using.
17 Click on Indexer
18 Checkmark the Enable project specific setttings box.
19 Uncheck Index source files not included in the build
20 Click on Paths and Symbols on the left.
21 Select the Includes tab and then select GNU C
22 Click Add...
23 Click Workspace... then select your kernel's include, and include/uapi directories
24 Do another Add, Workspace and add both arch/architecture/include, and arch/architecture/include/uapi directories. e.g., arch/powerpc/include and arch/powerpc/include/uapi (The UAPI directories are due to the kernel's user/kernel header split covered here in-detail)
25 Click the # Symbols tab
26 Click Add...
27 Set the name to __KERNEL__
28 Set the value to 1 and click OK
29 Click the Source Location tab
30 Click the plus sign next to your project name.
31 Select the Filter item and click Edit Filter...
32 Click Add Multiple... and then select all of the arch/* directories in your kernel source that will not be used (i.e. all the ones that are not for the architecture you are using)
33 Click OK and OK again to dismiss that dialog.
34 Under C/C++ General, select Preprocessor Include Paths, Macros etc.
35 Click the Providers tab and select CDT GCC Built-in Compiler Settings
36 Uncheck Use global provider shared between projects
37 Add -nostdinc to the Command to get compiler specs
38 Check Allocate console in the Console View so you can see that this is working
39 Click OK on the Properties dialog.
40 Click Finish on the C Project dialog.
41 The Project will index automatically.
42 On a platter drive indexing will take upwards of 20 minutes to complete, on a SSD indexing will take about 5 minutes to complete.

Notes:

1. Adding include and arch/architecture/include only gets you a couple of the common include paths. To fully index all of the kernel, you would have to add dozens of paths, unfortunately. For this reason, I advise against using PTP's remote indexing capability for the linux kernel, because what happens is that it will report thousands of errors in locating header files, and the process of reporting those errors over a possibly long-latency link, will cause the indexing to take many hours.
2 If you change any of your CONFIG_* settings, in order for Eclipse to recognize those changes, you may need to do a "build" from within Eclipse. Note, this does not mean to re-build the index; this means to build the kernel, by having Eclipse invoke make (this is normally bound to the Ctrl-B key in Eclipse). Eclipse should automatically detect changes to include/generated/autoconf.h, reread the compilation #defines it uses, and reindex.
3 The background color of "Quick Context View" will be dark if the Ambiance theme in Ubuntu is selected.
4 For some people, Eclipse may fail to index the kernel with a out of memory error. The fix seems to be to start eclipse with the arguments: eclipse -vmargs -Xmx650M

Corey Ashford cjashfor@us.ibm.com Updated by Adam Duskett Aduskett@gmail.com

Monday, September 28, 2015

Thursday, September 24, 2015

Saturday, September 19, 2015

做技术的你,如果别人找你创业,该怎么办?

作者:Bruce Dou
http://blog.eood.cn/about


由于技术背景的原因,每结交认识一位新朋友,无论是之前在国内还是先在在英国,都会跟我说:我有一个 business idea 你花时间帮我做出来,过几年我们都会成为亿万富翁。每当这时,我都笑笑,也不知道该如何回应。一般我会说我考虑一下,做一些市场调研。
直到发现这个商业计划书模板。这下好了,我可以说先给你个 BP 模板,你再仔细考虑一下。其实这不是在敷衍,假如真是不错的 BP ,会容易找到合作伙伴,也容易找到投资人。假如你也有一个 idea ,但是还处于想法阶段,这个商业计划书模板能够帮你理清思路。
这个一页 BP 模板简单实用,分几个部分:

1. 问题 (Problem)
项目解决什么问题?满足什么需求?

2. 一句话介绍 (Elevator pitch)
用一句话概括问题、受众、解决方案、创新点。

3. 解决方案 (Solution)
如何解决问题,给受众带来哪些价值。

4. 目标用户 (Audience)
用户是哪个人群?哪些人时重要用户?他们如何评价产品或者服务质量?

5. 渠道 (Channels)
如何接触目标用户?他们常常出现在哪里?他们如何找到你的产品?

6. 关键指标 (Key metrics)
如何测量决定某个用户有这个问题需要你的产品?

7. 创新点 (Differentiator)
你的解决方案的不同点和创新之处在哪?

8. 收入模式(Revenue)
你卖什么?卖多少钱?

9. 成本(Cost)
运营需要的成本和活动有哪些?除了你自身外还需要哪些资源?

10. 商业优势(Business Boosters)
你有哪些别人不具备的优势?比如社会关系、行业经验、特殊渠道。你的 idea 如何不被其他人复制?

11. 个人适合度 (Personal Fit)
这个商业模式适合你吗?你是否之后会失去兴趣?

自己想清楚如何回答这些问题,并且能够说服自己的话,估计就会是个比较靠谱的 Business Plan 了。另外,idea 其实并不是最重要,重要的是日复一日的精细执行。

Friday, September 18, 2015

Ubuntu KGDB

This is for 12.04 and I believe that this should work for 14.04.

Kernel build
Make sure .config contains
1
2
3
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y

GRUB
On this line:
1
linux /boot/vmlinux-4.1.3-XXXX root=UUID=XXXXX ro consoleblank=0

append at the end
1
kgdbwait kgdboc=ttyS2,115200

Serial Port
Check which serial port is available
1
dmesg | grep ttyS

Configure serial port
Install setserial
1
sudo apt-get install setserial

Check port configuration
1
sudo setserial -g /dev/ttyS3

Install minicom
1
sudo apt-get install minicom

Configure port
1
sudo minicom -s

After configuration choose "Exit" and started session.

Ctrl-A Z and then, choose "Hang up".

GDB
Fire up gdb
1
sudo gdb vmlinux

Connect serial port
1
2
3
4
5
6
7
(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyS3
Remote debugging using /dev/ttyS3
Ignoring packet error, continuing...
kgdb_breakpoint ()
    at /home/wre/work/OS/linux-4.1.3/kernel/debug/debug_core.c:1072
1072  wmb(); /* Sync point after breakpoint */

Set a break point
1
2
(gdb) b /home/nobody/work/OS/linux-4.1.3/drivers/base/core.c:1970
Breakpoint 1 at 0xc1556b68: file /home/nobody/work/OS/linux-4.1.3/drivers/base/core.c, line 1970.


Thursday, September 17, 2015

Bash File Test Operators

Copied from the following source...
http://tldp.org/LDP/abs/html/fto.html


Returns true if...
-e
file exists
-a
file exists
This is identical in effect to -e. It has been "deprecated," [1] and its use is discouraged.
-f
file is a regular file (not a directory or device file)
-s
file is not zero size
-d
file is a directory
-b
file is a block device
-c
file is a character device

device0="/dev/sda2"    # /   (root directory)
if [ -b "$device0" ]
then
  echo "$device0 is a block device."
fi

# /dev/sda2 is a block device.



device1="/dev/ttyS1"   # PCMCIA modem card.
if [ -c "$device1" ]
then
  echo "$device1 is a character device."
fi

# /dev/ttyS1 is a character device.
-p
file is a pipe

function show_input_type()
{
   [ -p /dev/fd/0 ] && echo PIPE || echo STDIN
}

show_input_type "Input"                           # STDIN
echo "Input" | show_input_type                    # PIPE

# This example courtesy of Carl Anderson.
-h
file is a symbolic link
-L
file is a symbolic link
-S
file is a socket
-t
file (descriptor) is associated with a terminal device
This test option may be used to check whether the stdin [ -t 0 ] or stdout [ -t 1 ] in a given script is a terminal.
-r
file has read permission (for the user running the test)
-w
file has write permission (for the user running the test)
-x
file has execute permission (for the user running the test)
-g
set-group-id (sgid) flag set on file or directory
If a directory has the sgid flag set, then a file created within that directory belongs to the group that owns the directory, not necessarily to the group of the user who created the file. This may be useful for a directory shared by a workgroup.
-u

set-user-id (suid) flag set on file
A binary owned by root with set-user-id flag set runs with root privileges, even when an ordinary user invokes it. [2] This is useful for executables (such as pppd and cdrecord) that need to access system hardware. Lacking the suid flag, these binaries could not be invoked by a non-root user.

       -rwsr-xr-t    1 root       178236 Oct  2  2000 /usr/sbin/pppd
       

A file with the suid flag set shows an s in its permissions.
-k
sticky bit set
Commonly known as the sticky bit, the save-text-mode flag is a special type of file permission. If a file has this flag set, that file will be kept in cache memory, for quicker access. [3] If set on a directory, it restricts write permission. Setting the sticky bit adds a t to the permissions on the file or directory listing. This restricts altering or deleting specific files in that directory to the owner of those files.

       drwxrwxrwt    7 root         1024 May 19 21:26 tmp/
       

If a user does not own a directory that has the sticky bit set, but has write permission in that directory, she can only delete those files that she owns in it. This keeps users from inadvertently overwriting or deleting each other's files in a publicly accessible directory, such as /tmp. (The owner of the directory or root can, of course, delete or rename files there.)
-O
you are owner of file
-G
group-id of file same as yours
-N
file modified since it was last read
f1 -nt f2
file f1 is newer than f2
f1 -ot f2
file f1 is older than f2
f1 -ef f2
files f1 and f2 are hard links to the same file
!
"not" -- reverses the sense of the tests above (returns true if condition absent).

Example 7-4. Testing for broken links

#!/bin/bash
# broken-link.sh
# Written by Lee bigelow <ligelowbee@yahoo.com>
# Used in ABS Guide with permission.

#  A pure shell script to find dead symlinks and output them quoted
#+ so they can be fed to xargs and dealt with :)
#+ eg. sh broken-link.sh /somedir /someotherdir|xargs rm
#
#  This, however, is a better method:
#
#  find "somedir" -type l -print0|\
#  xargs -r0 file|\
#  grep "broken symbolic"|
#  sed -e 's/^\|: *broken symbolic.*$/"/g'
#
#+ but that wouldn't be pure Bash, now would it.
#  Caution: beware the /proc file system and any circular links!
################################################################


#  If no args are passed to the script set directories-to-search 
#+ to current directory.  Otherwise set the directories-to-search 
#+ to the args passed.
######################

[ $# -eq 0 ] && directorys=`pwd` || directorys=$@


#  Setup the function linkchk to check the directory it is passed 
#+ for files that are links and don't exist, then print them quoted.
#  If one of the elements in the directory is a subdirectory then 
#+ send that subdirectory to the linkcheck function.
##########

linkchk () {
    for element in $1/*; do
      [ -h "$element" -a ! -e "$element" ] && echo \"$element\"
      [ -d "$element" ] && linkchk $element
    # Of course, '-h' tests for symbolic link, '-d' for directory.
    done
}

#  Send each arg that was passed to the script to the linkchk() function
#+ if it is a valid directoy.  If not, then print the error message
#+ and usage info.
##################
for directory in $directorys; do
    if [ -d $directory ]
 then linkchk $directory
 else 
     echo "$directory is not a directory"
     echo "Usage: $0 dir1 dir2 ..."
    fi
done

exit $?
Example 31-1, Example 11-8, Example 11-3, Example 31-3, and Example A-1 also illustrate uses of the file test operators.

Notes

[1]Per the 1913 edition of Webster's Dictionary:

Deprecate
...

To pray against, as an evil;
to seek to avert by prayer;
to desire the removal of;
to seek deliverance from;
to express deep regret for;
to disapprove of strongly.
[2]Be aware that suid binaries may open security holes. The suid flag has no effect on shell scripts.
[3]On Linux systems, the sticky bit is no longer used for files, only on directories.

Ubuntu boot and upstart

Ubuntu boot process

Upstart intro

Upstart events

Upstart Cookbook

Thursday, September 10, 2015

WebRTC related

http://www.webrtc.org/architecture
http://w3c.github.io/webrtc-pc/



Implementations

https://www.webrtc-experiment.com

http://webrtc.github.io/samples/

https://dvcs.w3.org/hg/audio/raw-file/tip/streams/StreamProcessing.html
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html

Capture
http://www.html5rocks.com/en/tutorials/getusermedia/intro/

================
on Ubuntu
sudo apt-get install git
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/home/XXX/bin/depot_tools
add to ~/.bashrc

23GB source code!!!
================
http://www.webrtc.org/native-code/ios
http://ninjanetic.com/how-to-get-started-with-webrtc-and-ios-without-wasting-10-hours-of-your-life/
https://tech.appear.in/2015/05/25/Getting-started-with-WebRTC-on-iOS/
https://apprtc.appspot.com/

Get depot_tools
1
2
cd ~/bin
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Add path to .bash_profile
1
export PATH=$PATH:~/bin/deport_tools

Fetch code
1
2
3
4
mkdir ~/webrtc
cd ~/webrtc
export GYP_DEFINES="OS=ios"
fetch webrtc_ios

================
build script
For armv7, target_arch=arm arm_verion=7
TODO: combine_libs x86_64

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
function build_iossim() {
  echo "-- building WebRTC for the iOS simulator"
  export GYP_GENERATORS="ninja"
  export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=ia32"
  export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_iossim"
  export GYP_CROSSCOMPILE=1
  pushd src
  gclient runhooks
  ninja -C out_iossim/Release-iphonesimulator iossim AppRTCDemo
  popd
}
 
function build_iosdevice() {
  echo "-- building WebRTC for iOS 32 devices"
  export GYP_GENERATORS="ninja"
  export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=arm arm_verion=7"
  export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios32"
  export GYP_CROSSCOMPILE=1
  pushd src
  gclient runhooks
  ninja -C out_ios32/Release-iphoneos AppRTCDemo
  popd
}

function build_iosdevice64() {
  echo "-- building WebRTC for iOS 64 devices"
  export GYP_GENERATORS="ninja"
  export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=arm64"
  export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios64"
  export GYP_CROSSCOMPILE=1
  pushd src
  gclient runhooks
  ninja -C out_ios64/Release-iphoneos AppRTCDemo
  popd
}
 
function combine_libs() {
  echo "-- combining libraries"
  libtool -static -o src/out_ios/Release-iphonesimulator/libWebRTC-sim.a src/out_ios/Release-iphonesimulator/*.a
  strip -S -x -o src/out_ios/Release-iphonesimulator/libWebRTC-sim-min.a -r src/out_ios/Release-iphonesimulator/libWebRTC-sim.a
  libtool -static -o src/out_ios/Release-iphoneos/libWebRTC-ios.a src/out_ios/Release-iphoneos/*.a
  strip -S -x -o src/out_ios/Release-iphoneos/libWebRTC-ios-min.a -r src/out_ios/Release-iphoneos/libWebRTC-ios.a
  lipo -create src/out_ios/Release-iphonesimulator/libWebRTC-sim-min.a src/out_ios/Release-iphoneos/libWebRTC-ios-min.a -output libWebRTC.a
  echo "The public headers are located in ./src/talk/app/webrtc/objc/public/*.h"
}
 
function build_all() {
  build_iossim && build_iosdevice32 && build_iosdevice64 && combine_libs
}
 
function run_simulator() {
  echo "-- running webrtc appdemo on iOS simulator"
  src/out_iossim/Release-iphonesimulator/iossim src/out_ios/Release-iphonesimulator/AppRTCDemo.app
}
 
function run_on_device32() {
  echo "-- launching on device"
  ideviceinstaller -i src/out_ios32/Release-iphoneos/AppRTCDemo.app
  echo "-- launch complete"
}
 
function run_on_device64() {
  echo "-- launching on device"
  ideviceinstaller -i src/out_ios64/Release-iphoneos/AppRTCDemo.app
  echo "-- launch complete"
}
 
# Run the function specified by the first parameter on the command line
$@

Wednesday, September 9, 2015

Grub related.

For EFI boot, there could be an independent directory and its grub.cfg.

Display on both monitor and ttyS2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Automatically created by OE
serial --unit=2 --speed=115200 --word=8 --parity=no --stop=1
default=0
timeout=2

menuentry 'boot-by-label'{
insmod ext2
search -n -l rootPartition -s
#linux /boot/vmlinuz-4.1.3 root=LABEL=rootPartition ro rootwait nomodeset consoleblank=0 console=ttyS2,115200n8
#linux /boot/vmlinuz-4.1.3 root=LABEL=rootPartition ro rootwait nomodeset consoleblank=0
linux /boot/vmlinuz-4.1.3 root=LABEL=rootPartition ro rootwait nomodeset consoleblank=0 console=tty0 console=ttyS2,115200n8
initrd /boot/initrd.img-4.1.3
}


Friday, September 4, 2015

Format source code on blogspot...

I use http://www.phamngoctan.com/2013/11/format-source-code-for-blogger.html

It has line number and easy to copy / paste.

Create a USB bootable stick manually...

Partition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
nobody@nowhere:/$ sudo fdisk /dev/sde

Command (m for help): p

Disk /dev/sde: 15.6 GB, 15610576896 bytes
64 heads, 32 sectors/track, 14887 cylinders, total 30489408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x196065d9

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-30489407, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-30489407, default 30489407): 616447

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1-4, default 2): 
Using default value 2
First sector (616448-30489407, default 616448): 
Using default value 616448
Last sector, +sectors or +size{K,M,G} (616448-30489407, default 30489407): 2013183

Command (m for help): p

Disk /dev/sde: 15.6 GB, 15610576896 bytes
64 heads, 32 sectors/track, 14887 cylinders, total 30489408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x196065d9

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048      616447      307200   83  Linux
/dev/sde2          616448     2013183      698368   83  Linux

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): p

Disk /dev/sde: 15.6 GB, 15610576896 bytes
64 heads, 32 sectors/track, 14887 cylinders, total 30489408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x196065d9

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048      616447      307200    b  W95 FAT32
/dev/sde2          616448     2013183      698368   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
nobody@nowhere:/$ 

Format
EXT4:
1
nobody@nowhere:~$ sudo mkfs.ext4 -L stickroot /dev/sdf2

FAT32:
1
nobody@nowhere:~$ sudo mkfs.msdos -n STORAGE -F 32 /dev/sdf1

Staging
Make a staging tar ball by removing content in the following directories
1
2
3
/boot
/boot/grub 
/lib/modules/

Grub
Install Grub:
1
2
3
nobody@nowhere:~$ sudo grub-install --root-directory=/media/stickroot/ /dev/sde
Installation finished. No error reported.

Get UUID:
1
2
3
nobody@nowhere:/media/stickroot/boot/grub$ sudo blkid /dev/sde2
/dev/sde2: LABEL="stickroot" UUID="714de0e8-738b-4823-9019-3b0344153050" TYPE="ext4"