Jump to content

Get GUID from the console?


JustinAiken

Recommended Posts

Is there a way to find the GUID of your flash drive from the actual unRaid, without having to connect it to a network and using the webviewer?

Yes,

 

Try this command:

 wget localhost/devices.htm -q -O - | sed -n "/Flash/,/tr\\>/p"

 

It will output something like this:

root@Tower:/# wget localhost/devices.htm -q -O - | sed -n "/Flash/,/tr\\>/p"

     <td width="25%">Flash Vendor:</td>

     <td width="75%">SanDisk_Corporation</td>

   </tr>

     <td width="25%">Flash Product:</td>

     <td width="75%">MobileMate</td>

   </tr>

     <td width="25%">Flash GUID:</td>

     <td width="75%">0783-5258-4326-9214R56T95D7</td>

   </tr>

 

The trick is to use wget to get the html that would be sent to the browser if you had one connected and were to browse the "devices" page  (at http://tower/devices.htm) and to access it from the "localhost" port.

 

Then, the stream edit command prints only the html from between from the word "Flash" to the subsequent "</tr>

 

Joe L.

Link to comment

Hi Joe,

 

Thanks for your detailed answer... I never would have guessed how to do that!!

 

I can't get it to work though... I can't the the network to work on my mobo (my main i7 computer, I haven't bought my unraid hardware yet)... so when I use wget it tells me that 127.0.0.1 is unreachable.  Is there some other console command for me to remind the system that 127.0.0.1 is yourself and to quit being dumb? :P

 

Or is there a file locally I can cd to to find the devices.htm, or is it only generated when connected to a network?

 

Thanks!

Link to comment

Hi Joe,

 

Thanks for your detailed answer... I never would have guessed how to do that!!

 

I can't get it to work though... I can't the the network to work on my mobo (my main i7 computer, I haven't bought my unraid hardware yet)... so when I use wget it tells me that 127.0.0.1 is unreachable.  Is there some other console command for me to remind the system that 127.0.0.1 is yourself and to quit being dumb? :P

 

Or is there a file locally I can cd to to find the devices.htm, or is it only generated when connected to a network?

 

Thanks!

If you set up your flash drive correctly, "localhost" would be present.

 

Type

 

ifconfig

 

What does it say?

 

It should show two entries, one for localhost, the other for eth0.

 

type

ls -l /dev/disk/by-label

 

It should show your flash drive.  If not, you forgot to label it UNRAID and that is why you have no connectivity.

 

You did not ask originally about connectivity, you asked about the GUID of the flash drive.  I assumed you had no network connection since if you did it would be the asiest way to learn the GUID of the flash drive as unRAID needs to see it for registration.

 

All of the web-services/html/control interface are embedded in the emhttp execuitable that is part of the unRAID release.  There is not a stand-alone web-server, nor are there stand-alone web-pages.

 

If emhttp is not running, you'll not get anything from "localhost" on port 80.

 

Type

ps -ef | grep emhttp | grep -v grep

do you see anything running?

 

If not, did you copy the

config

folder to your flash drive.  In it should be some basic configuration files and a "go" file.

 

Type

ls /boot

and

ls /boot/config

to see if they are in place.

 

Joe L.

Link to comment
If you set up your flash drive correctly, "localhost" would be present.

 

Type

 

ifconfig

 

What does it say?

 

It should show two entries, one for localhost, the other for eth0.

 

type

ls -l /dev/disk/by-label

 

It should show your flash drive.  If not, you forgot to label it UNRAID and that is why you have no connectivity.

 

You did not ask originally about connectivity, you asked about the GUID of the flash drive.   I assumed you had no network connection since if you did it would be the asiest way to learn the GUID of the flash drive as unRAID needs to see it for registration.

 

All of the web-services/html/control interface are embedded in the emhttp execuitable that is part of the unRAID release.  There is not a stand-alone web-server, nor are there stand-alone web-pages.

 

If emhttp is not running, you'll not get anything from "localhost" on port 80.

 

Type

ps -ef | grep emhttp | grep -v grep

do you see anything running?

 

If not, did you copy the

config

folder to your flash drive.  In it should be some basic configuration files and a "go" file.

 

Type

ls /boot

and

ls /boot/config

to see if they are in place.

 

Joe L.

 

Ah, the plot thickens...

 

If I do    ls- l /dev/disk/by-label then I see my flash drive there, named UNRAID.

 

But ps -ef | grep emhttp | grep -v grep returns nothing.

 

And looking in /boot shows it to be empty, with no config file.

 

But then I rebooted back into Windows, and I see the config folder sitting in the root of the drive, full of config files.

 

After that, I tried redoing the flash drive from FAT32 to FAT16, and got the exact same results... the flash drive is a 2GB Cruzer, as seen here: http://www.compuplus.com/Drives-and-storage/SanDisk-CRUZER-2GB-USB-FLASH-1125012.html

Link to comment

Apparently, the flash drive was not mounted at /boot.

 

Typically this is because the drive was not labeled as UNRAID.  (6 letters, all capitals)

 

I suppose it could also happen if there were other partitions on the flash drive.  Is it a U3 type drive?  I think it is...

It (the U3 feature) will need to be removed.  See here:

http://kb.sandisk.com/app/answers/detail/a_id/2550/kw/flash%20drive/page/3/r_id/101834

 

what do you see if you type:

mount

 

You should see the flash drive mounted at /boot

If not, that is why you have no network interface, because the config files and the web-server itself are not in place to be started.

 

 

Link to comment

There is no U3 on, just the one FAT partition (MBR table), named exactly UNRAID

 

Typing mount gives me:

 

fusectrl on /sys/fs/fuse/connections type fusectrl (rw)

usbfs on /proc/bus/usb type usbfs (rw)

 

And that is not what you should see.  You should also see the UNRAID labeled partition mounted at /boot like this:

fusectl on /sys/fs/fuse/connections type fusectl (rw)

usbfs on /proc/bus/usb type usbfs (rw)

/dev/sdb1 on /boot type vfat (rw,noatime,nodiratime,umask=0,shortname=mixed)

(On my server, the flash drive is assigned /dev/sdb and the first partition on it, /dev/sdb1.  Your server may be different)

What exactly does it say when you type:

ls -l /dev/disk/by-label

?

 

According to the Sandisk web-site, your flash drive does have a hidden U3 partition.  You will not see it as it is hidden.  Yo will need to use the software on the page I linked to to remove it if it is there.

 

You can always look at the syslog to see if it gives any clues, but without somewhere to copy it, there is no way to post it.

Type

pg /var/log/syslog

and look for anything related to the flash drive.

Link to comment

Hmm...that U3 is sneaky! It was hiding there... weird that partition managers don't even see it!

 

Removed it w/ the tool, redid everything, and still getting the same error... the only thing I see in the syslog is:

device descriptor read/64, error -71

 

Don't know if that's any clues or not...

 

Here's what the ls- l says:

 

lwwxrwxrwx 1 root root 10 Jul  2 22:47 UNRAID -> ../../sdg1

Link to comment

It doesn't give me any feedback, but looking in boot after doing that, I see all the correct files there... the bz files, and the config folder.

 

I tried running the "go" file inside the config folder, but it told me it had a bad interpreter or something like that....

Link to comment

It doesn't give me any feedback, but looking in boot after doing that, I see all the correct files there... the bz files, and the config folder.

 

I tried running the "go" file inside the config folder, but it told me it had a bad interpreter or something like that....

invoke this instead... it invokes the config/go script after first getting rid of the MS-DOS style line endings:

/etc/rc.d/rc.local

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...