Home
Collections
Build Your Own
Catalog
How To Videos
Quick Reference
View Order Pad

About Us
Contact Us
FAQ
Linux News
Blog


 
 
Acceptance Mark
Amazon Pay





 

The LinuxCollections.com Blog

 

LinuxCollections.com's Blog

Cloned Drives and UUIDs
written April 28, 2021 by Time Traveler
Category: Tags: UUID; lsblk; fstab;    #34
 

Let's say you did a hard disk clone and it won't boot. This outlines specific steps to fix a cloned hard drive on /dev/sda that did not boot after cloning. The main issue was a different UUID for the hard drive. If you have the option during cloning to preserve the UUID, all this would not be necessary. So this is a duplicated drive that does not have the UUID of the original. When the system tried to boot, it did not, and this was shown:

Gave up waiting for root device

ALERT! /dev/disk/by-uuid/[UUID] does not exist!

So this is a problem with /etc/fstab and/or GRUB - here are some steps to resolve the problem:

NOTE: All examples assume single hard drive device as /dev/sda and booting rescue from USB or Disc

Get to a Shell with root/superuser prompt
Plug in handy Debian Complete Collection on USB (or suitable boot media with shell access)
Select Live Standard (Shell prompt)
Type sudo su[Enter] to get to root/superuser prompt

Figure out new UUIDs (main boot partition/swap/etc.)
You can use blkid (/sbin/blkid[Enter]) to view current UUID for drives
To save off for use in editing, you can do something like this:
lsblk -l -o +UUID | grep sda1 | cut -b 80-115 > newuuid.txt[Enter]
(List 36 characters for UUID into file)
Now we want to actually make changes to the boot drive (not our USB drive), so mount the root partition (be sure you know correct partition/layout of drive for this step!)
mount /dev/sda1 /mnt[Enter]
cd /mnt/etc[Enter]
nano fstab[Enter]
In nano, use insert key, then enter /home/user/newuuid.txt to insert text for new hard drive UUID - edit as appropriate to replace/update the UUID. Note old UUID that you are updating/replacing, as this may be used in grub.cfg, and also need an update.

You will also need to do a similar process for the swap partition

EXAMPLE FSTAB FOR REFERENCE/WHAT UUID ENTRY LOOKS LIKE
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda1 during installation
UUID=c3447a5c-d4d9-4327-af71-393723761edd / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=75eef9cf-24c1-4b1a-9a3e-8a3c625bd62a none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0


At this point, you should remove USB / DVD boot media, and reboot system to boot hard drive. You should at least get to the grub menu (startup menu)

Ideally you will be able to boot the default item or get into the advanced options (if available) and get a rescue mode/option to boot

If this does not work, or there is still boot issue (and you can't use rescue option to boot to hard drive), then, you will have to get to same spot as updating fstab and then update a grub.cfg menu item (change root UUID from original/old UUID to new hard drive UUID (e.g. what was saved in newuuid.txt)) e.g. nano /boot/grub/grub.cfg[Enter] - you will want to find the old/original UUID and replace with new current hard drive UUID - you can do the whole file, but easiest to do the main boot option or use edit option from grub menu. The reason we suggest editing grub.cfg is because you can use newuuid.txt vs. recording/manually entering new UUID.

EXAMPLE LINE IN GRUB.CFG WHERE UUID WOULD NEED TO CHANGE
echo 'Loading Linux 4.19.0-14-amd64 ...'
linux /boot/vmlinuz-4.19.0-14-amd64 root=UUID=c3447a5c-d4d9-4327-af71-393723761edd ro quiet


If you still can't get booted on the actual hard drive (never see GRUB errors or just reboot without starting GRUB), then you may have to do some work to run / fix grub - here is one (simple) approach:
After booting to the rescue prompt:
$>sudo su
#>mount /dev/sda1 /mnt
#>cd /mnt
(Now map rescue system to critical mount points proc/sys/dev on /mnt to prep for chroot)
#>mount -t proc /proc proc/
(if that fails, try rbind), e.g. mount --rbind /proc proc/
#>mount --rbind /sys sys/
#>mount --rbind /dev dev/
(Now chroot to make this root folder)
#>chroot /mnt
(Now fall into fix below, e.g. run update-grub then grub-install /dev/sda)

Once booted, you will want to formally update grub/fix all references to hard drive
get to root/superuser prompt and run
update-grub[Enter]
grub-install /dev/sda[Enter]

Then reboot, and your system now is reconfigured for cloned drive!

Delay/Warning: Gave up waiting for suspend/resume device

This can happen if the original drive had a device configured for suspend/resume with a UUID - now that the UUID has changed, it will cause a delay are reboot. Here are some quick notes on where to find / how to resolve this situation.

Once you have your correct UUID, as root/superuser, go to /etc/initramfs-tools/conf.d/ and edit the file resume. Use RESUME=UUID=75eef9cf-24c1-4b1a-9a3e-8a3c625bd62a (where UUID matches correct device). Alternatively, use RESUME=none if this capability is not needed/wanted.
Make sure your root user has /sbin in the path, e.g. PATH=$PATH:/sbin, then run update-initramfs -u to update correct files. Now reboot and this should remove & resolve delay, warning display.

View Current
View News & Commentary
View Support Items
View All

Blog Information

Debian Updates, some customer feedback, news clip
September 9, 2024
Time Traveler
Category: BlogEntry
Tags: Debian 12.7.0; Debian 11.11.0; Customer feedback; news;
 

USB Collection Updates - Most Popular, Fedora, Ubuntu
May 1, 2024
Time Traveler
Category: BlogEntry
Tags: USB Collection Updates;Most Popular;Fedora;Ubuntu
 

Testimonials, Feedback, Input & Updates
March 27, 2024
Time Traveler
Category: BlogEntry
Tags: Testimonials; Feedback; Input; Updates;
 

Happy New Year 2024!
January 2, 2024
Time Traveler
Category: BlogEntry
Tags: USB; Notes; Price; Amazon Pay; What's happening;
 

First Steps - How To Boot from USB
October 30, 2023
Time Traveler
Category: BlogEntry
Tags: USB; Booting; Intro; How To;
 

A few notes and happenings…
September 12, 2023
Time Traveler
Category: BlogEntry
Tags: USB; Notes; What's happening;
 

Debian 12 Bookworm now available!
June 16, 2023
Time Traveler
Category: BlogEntry
Tags: New; Debian; Bookworm; Debian 12;
 

Updates & Info
May 11, 2023
Time Traveler
Category: BlogEntry
Tags: New; Debian; Ubuntu; Kubuntu; OpenMandriva
 

Random Notes, What's Happening…
February 8, 2023
Time Traveler
Category: BlogEntry
Tags: New; UEFI; Debian
 

Debian Complete Collection USB now has hardware .deb packages
January 5, 2023
TimeTraveler
Category: BlogEntry
Tags: Debian; Debian Complete Collection USB; Drivers; Hardware
 

USB Promo / Ubuntu 22.10 updates and notes
October 27, 2022
TimeTraveler
Category: BlogEntry
Tags: Ubuntu; Ubuntu Studio; USB Promo
 

Partitions, setup and configuration of the Debian Complete Collection USB
September 28, 2022
TimeTraveler
Category: BlogEntry
Tags: Debian; USB Partitions; GRUB;
 

Some notes on Debian and Firmware
April 7, 2022
TimeTraveler
Category: BlogEntry
Tags: Debian; Ubuntu; Firmware; non-free;
 

Read only USB (physical write protect switch)
January 12, 2022
TimeTraveler
Category: BlogEntry
Tags: USB; Physical write protect switch; Read Only
 

Raspberry Pi: Reducing file system to fit on smaller SD Card
December 22, 2021
TimeTraveler
Category: BlogEntry
Tags: Debian; Raspberry Pi; Raspbian; resize2fs
 

Some notes on Live Linux distros
December 10, 2021
TimeTraveler
Category: SupportNote
Tags: Debian; Fedora; Ubuntu; Most Popular; USB Collections
 

All USB Collections updated!
November 10, 2021
TimeTraveler
Category: BlogEntry
Tags: Debian; Fedora; Ubuntu; Most Popular; USB Collections
 

LinuxCollections.com media production has been green for years
September 20, 2021
TimeTraveler
Category: BlogEntry
Tags: Media Production
 

Debian 11.0.0 Release
August 26, 2021
TimeTraveler
Category: BlogEntry
Tags: Debian; Debian 11; Release;
 

Debian 10.10.0 USB Developer Collection
July 8, 2021
Time Traveler
Category: BlogEntry
Tags: New; Updates; Debian;
 

Notes on WiFi Drivers
May 12, 2021
Time Traveler
Category:
Tags: WiFi; Wireless; Drivers; Firmware;
 

Cloned Drives and UUIDs
April 28, 2021
Time Traveler
Category:
Tags: UUID; lsblk; fstab;
 

Debian Buster (10) sources.list example
March 2, 2021
Time Traveler
Category: SupportNote
Tags: Debian; Buster; sources.list; apt; apt-get
 

Debian 10.8.0 USB Complete Collection
February 15, 2021
Time Traveler
Category: BlogEntry
Tags: New; Updates; Debian;
 

Random Notes, What's New 2021
January 22, 2021
Time Traveler
Category: BlogEntry
Tags: New; Hardware;
 

New! The By Request page
December 10, 2020
Time Traveler
Category: BlogEntry
Tags: New; Requests;
 

How to create a separate bootable USB for specific Live version from Debian USB Complete Collection
September 2, 2020
Time Traveler
Category: SupportNote
Tags: Debian; USB Complete Collection; Install; Create Live USB;
 

Debian catalog backfilled a bit
August 19, 2020
Time Traveler
Category: BlogEntry
Tags: Debian; Hamm; Slink; Potato; Woody;
 

Understanding Debian main, contrib, non-free in sources.list
August 17, 2020
Time Traveler
Category: BlogEntry
Tags: Debian; sources.list; apt-get; apt; /etc/apt;
 

Most Popular USB Collection now available!
July 23, 2020
Time Traveler
Category: BlogEntry
Tags: USB Collections; Fedora; Linux Lite; LinuxMint; Manjaro; MX Linux; openSuSE; Ubuntu; Kubuntu
 

How do I learn about all the programs available in the Debian USB Complete Collection (or the Debian all discs option)?
June 16, 2020
Time Traveler
Category: SupportNote
Tags: Debian Packages, Debian USB Complete Collection, mountusb, ISO, Synaptic, apt
 

How to access ALL Debian packages from LinuxCollections.com's Debian Complete Collection on USB
June 4, 2020
Time Traveler
Category: SupportNote
Tags: mountusb, ISO, Debian Packages, Debian USB Complete Collection
 

Older Linux Distributions
May 26, 2020
Time Traveler
Category: SupportNote
Tags: Old distributions, BIOS, UEFI, hd vs. sd
 

Updates - new LinuxCollections.com Disc case, Facebook Links
May 6, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Disc Case, Facebook, Advertising
 

Ubuntu 20.04 LTS now available in all flavors on USB!
April 20, 2020
Time Traveler
Category: BlogEntry
Tags: Ubuntu; Kubuntu; Lubuntu; Xubuntu; Ubuntu Studio; Ubuntu Budgie; Ubuntu MATE; USB Complete Collection;
 

Understanding Linux on a USB Flash drive
April 20, 2020
Time Traveler
Category: SupportNote
Tags: USB Flash Drive; USB Complete Collections
 

What NOT to do with a Bootable USB Drive or Collection
March 31, 2020
Time Traveler
Category: SupportNote
Tags: USB Flash Drive; USB Complete Collections
 

Lost or forgot Admin password (root user password)
March 25, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

What to expect from a Linux Disc
March 24, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Issues with new Debian 10 install - no Desktop / login prompt only
March 14, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

Solving Problems
January 28, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

US Postage rates go up
January 28, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Need a different operating system
January 25, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Support Stories - Disc Data
January 15, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

The Facebook Link Conundrum
January 10, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Welcome to the LinuxCollections.com Blog!
January 6, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

 
 

LinuxCollections.com Logo
  • LinuxCollections.com News, Technical information, and other interesting items.
  • LinuxCollections.com is your premier source for Linux distros on CD/DVD/USB.

Send LinuxCollections.com a note via e-mail...