ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Finding UUIDs numbers

Updated on February 20, 2011

UUID numbers

Being an experimentalist and willing to try things out, I had made an image (ISO) of my Ubuntu system, and wanted to place it in a virtual system. Now the original is mixed on a dual operating computer with Windows XP. So the Hard drives and partitions are mixed. Putting this in a virtual system, I would have to simplify this. So several hurdles were encountered.

Thus we are going to have new UUID numbers for identifying the drives and partitions, besides just the partition problem. Now there are other ways encountering UUID number problems , for any number of reasons: Adding an extra hard disk, a new partition, or corruption of Grub/drive, copying an identical system on different drives/new partitions. The result is a boot problem in Linux - UUID # does not exist, or some other message like "Gave up waiting for root device". Your boot then stops (and one goes oh no).

Odds are on your install of Linux you used a LiveCD, if you still have the disk/USB (it's on) than all is well. If not, and you have access to another computer download a Linux LiveCD of your favorite distro, and burn it.


What is an UUID number?

Before beginning UUID is an abbreviation standing for: Universally Unique IDentifier.  This unique number is for software to distinguish various components/or information (whether software or hardware related) uniquely.

So UUID is a unique identifier number given to a hardware or anything for that matter such that the odds for another device having the same number are extremely rare. UUIDs are a 16-byte (128-bit) number or 216 × 8 = 2128 = 25616 or about 3.4 × 1038. Or 3.4 with 38 zeros after it, ( a trillion has 12 zeros, a billion 9 zeros).

It will look something like this: ba214f51-2597-44c2-b1d2-ef4f9b10d8460000. A 36 character number composed of a 32 Hexadecimal number + 4. For computers it resolves any naming conflicts that could occur, by assigning devices/partitions a unique number. Just follow the link if you want to know more about UUIDs.

The main thing in Linux for the Grub to work, it uses UUIDs to identify the root partition of your operating system, losing or corruption of this number results in it stopping the boot process. So how do we recover it?

Finding the UUID number.

We are going to continue with the problem I had, which would be similar to most cases with missing or wrong UUIDs. If your hard drive is readable and not at fault, and grub failed due to UUID than this solution may work for you.

First we will be using a LiveCD or USB device with LiveCD installed on it. Next enter your BIOS and insure that the CDROM or USB is going to be your boot device. Boot your computer, and enter the LiveCD operating system, "don't select install the system". Navigate to the menu list find your terminal service. For ubuntu users its under applications - accessories - terminal.

In your terminal enter the commands:

sudo blkid (results are in the photo below). Listed are the two partitions /dev/sda1 (my root and home partition) and /dev/sda5 (swap). see photo 1

Photo 1 - Finding UUIDs

commands used: sudo blkid  and  ls -l /dev/disk/by-uuid
commands used: sudo blkid and ls -l /dev/disk/by-uuid

Another Command line.

Another command you can use (see photo 1):

ls -l /dev/disk/by-uuid

Here we get information of another order: the owner/permissions, date/time last accessed, and which device each UUID goes for, in my case it's sda1 and sda5.


So now what?

Once you get the information on the UUID, you now edit your grub/menu.lst. In this case in your terminal enter:

sudo gedit (or whatever the editor is on your LiveCD). This puts you in the root mode, which you need to modify and save your grub. There are several locations you must modify in menu.lst, for the boot to be proper. Now open your file manager/browser(in ubuntu it's Nautilus) to find the grub/menu.lst and drag and drop on gedit or use the open in gedit and navigate to this location:

YOUR Disk - /boot/grub/menu.lst. (Note: don't use the file system if using LiveCD, use the drive which your operating system is on. Which in my case is the 8.2 GB media) See Photo 2.

Photo 2 - Finding Grub/Menu.lst

Note select Drive with defective boot, not File System (that is for LiveCD).
Note select Drive with defective boot, not File System (that is for LiveCD).

Concluding UUID

Also note there will be other entries such as Recovery mode and older kernels, these will have to be corrected to with the proper UUID. The easiest way is to copy the UUID from the terminal, and past in the proper locations.

Save edited menu.lst. Quit (use restart function) the LiveCD and remove it. Now you will test your new Grub menu. If no other faults it should boot with the correct UUIDs.

After creating an exact copy of my regular Ubuntu system, and some manipulations using Mondo Expert mode (had to eliminate and reorder the fstab file) plus correct the UUID numbers, it works perfect in Virtualbox ( some minor tweaking is still needed but not critical). The UUID was my major stop in booting. and once corrected everything booted wonderfully.

So Cheers.

Photo 3 - Grub/Menu.lst

Kopt and Kernel locations for UUIDs
Kopt and Kernel locations for UUIDs

Now the final Act - the corrections.

The two locations in menu.lst that you need to put the new UUID are at the "Kopt=" and after the "End Default Options".

#kopt=UUID=a3b6361f-95b8-4561-9f93-f60114c0bf63 ro

and

title Ubuntu 8.04, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=a3b6361f-95b8-4561-9f93-f60114c0bf63 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic quiet

In the photo the locations are marked, however for demo purposes I temporary cut out all the other fill so you can see what you are looking for in the menu.lst. (see photo 3)

Comments

    0 of 8192 characters used
    Post Comment

    • eaglegordon profile imageAUTHOR

      eaglegordon 

      5 years ago

      If no UUID especially with our modern computers, it usually means problems booting. The UUID provides a unique identifier that stands a very little chance of being duplicated.

    • profile image

      Martin Thoma 

      5 years ago

      What does it mean when my disk doesn't have an UUID? (see http://askubuntu.com/q/194385/10425)

    • eaglegordon profile imageAUTHOR

      eaglegordon 

      6 years ago

      123386761 Thank you for sharing this. I am glad it help you, these numbers can be a killer when things go wrong.

    • profile image

      123386761 

      6 years ago

      This helped me a LOT! Without this I could not have gotten my Snow Leopard Drive to start! The sudo blkid command helped me find the UUID :D

      Thanks again!

    • eaglegordon profile imageAUTHOR

      eaglegordon 

      7 years ago

      redsonic: Thank you for the comment and suggestion, I will insert that.

    • profile image

      redsonic 

      7 years ago

      Very nice article.

      BTW, I think when speaking about UUID it is worth to describe what this abbreviation is for :)

      UUID = Universally Unique Identifier

      Good work.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://hubpages.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)