Error msg on boot of near-clone (UUID prob)

Hi All, BACKGROUND: Am a single-system home-office user of Linux. Not a professional sysadmin. Running Linux Mint 17 Qiana, desktop, 64-bit Intel. My "total system backup" scheme has been (for the last ~10 years) to run rsync (in a script, from / recursively), onto similarly-formatted/installed disks. Has worked perfectly over the years, on Fedora, Ubuntu, and Mint... as backups are essentially clones, and become new master disks in the event of crashes. Am currently doing backups while in Recovery mode, after mounting the target as an external USB drive. (I originally powered up with the backups as a second IDE or SATA, but recent versions of Ubuntu/Mint won't allow booting like that. Found that going via USB does work, although probably much slower.) Have spent MANY hours researching the bootup process, and sending questions relevant to my objectives to LUV, SiliconValley LUG, LinuxMint Forum, GRUB Developers, etc. Questions not suitably answered. So gave up getting help, and have edited... /etc/default/grub /usr/share/grub/grub-mkconfig_lib /etc/fstab /etc/initramfs-tools/conf.d/resume ... in ways that worked previously and/or seemed the most logical to one barely grasping the mechanisms. Then ran update-grub If interested: I can email you directly with copies of those 4 files, or lists of the 4 edits that I performed. I can also email you the you-beaut backup script utilising rsync. PROBLEM: When booting up with a backup (near-clone), in place of the master disk, I get the following error message, just after the GRUB2 (?) menu... Error: No such device: c2oc...07CB (i.e. the UUID of the master/source disk) Press any key to continue... Then, after ~4 seconds, and without tapping any key, it just continues with the boot-up sequence and the entire system seems to run normally. QUESTIONS: Should I harbour any concerns? Suggestions on how to refine/bulletproof the current general scheme (rather than use a different scheme)? Thanks very much in advance. Carl Turney Bayswater, Victoria

On Fri, May 15, 2015 at 12:18:36PM +1000, Carl Turney wrote:
When booting up with a backup (near-clone), in place of the master disk, I get the following error message, just after the GRUB2 (?) menu...
Error: No such device: c2oc...07CB (i.e. the UUID of the master/source disk) Press any key to continue...
Then, after ~4 seconds, and without tapping any key, it just continues with the boot-up sequence and the entire system seems to run normally.
Should I harbour any concerns?
sounds like it finds the new root partition and boots successfully anyway. if you're going to keep running on the backup, you could run update-grub as root at this point to fix up the grub.cfg if the error message during the first-time boot bothers you, you can run sed to change the UUIDs in the backed up /boot/grub/grub.cfg after running the rsync backup. just put something like the following at the end of your rsync backup script (assuming you are backing up to a partition mounted as /target): sed -i -e 's/OLD_UUID/NEW_UUID/g' /target/boot/grub/grub.cfg if you need to change multiple UUIDs (e.g. for /, /boot, /home) then you can either run multiple sed commands or use multiple "-e 's/old/new/g'" options. you can find the old and new UUIDs by running the 'blkid' program when both old and new disks are plugged in. cut and paste them with a mouse to avoid typing errors. e.g. on one of my systems it produces output like this: # blkid /dev/sda2: UUID="db8bda5f-4f18-4abb-a151-08494e398047" TYPE="swap" PARTUUID="3a1e16ae-02" /dev/sda1: UUID="08799b67-8ed7-4cee-aea1-0f9e7bd1fc04" TYPE="ext4" PARTUUID="3a1e16ae-01" /dev/sda3: UUID="fc967791-b9cf-4145-9047-8a8b223ac4bb" TYPE="xfs" PARTUUID="3a1e16ae-03" if there were a second disk installed, it would show them too. NOTE: if your /etc/fstab uses UUIDs (rather than device names like /dev/sda1) to specify which partitions to mount and where, you will certainly need to use sed to modify /target/etc/fstab after backing it up as well as /target/boot/grub/grub.cfg sed -i -e 's/OLD_UUID/NEW_UUID/g' /target/boot/grub/grub.cfg /target/etc/fstab craig -- craig sanders <cas@taz.net.au>

On 15/05/15 13:49, Craig Sanders wrote:
On Fri, May 15, 2015 at 12:18:36PM +1000, Carl Turney wrote:
When booting up with a backup (near-clone), in place of the master disk, I get the following error message, just after the GRUB2 (?) menu...
Error: No such device: c2oc...07CB (i.e. the UUID of the master/source disk) Press any key to continue... sounds like it finds the new root partition and boots successfully anyway. if you're going to keep running on the backup, you could run update-grub as root at this point to fix up the grub.cfg
Thanks to the posters for the suggestions. Will look into them. Carl

On 15/05/15 12:18, Carl Turney wrote:
Hi All,
BACKGROUND:
Am a single-system home-office user of Linux. Not a professional sysadmin. Running Linux Mint 17 Qiana, desktop, 64-bit Intel.
My "total system backup" scheme has been (for the last ~10 years) to run rsync (in a script, from / recursively), onto similarly-formatted/installed disks. Has worked perfectly over the years, on Fedora, Ubuntu, and Mint... as backups are essentially clones, and become new master disks in the event of crashes.
I'm definitely not a pro sysadmin either, but I tend to live dangerously. I think the crucial word here is "essentially". I presume your system is using the venerable MBR booting method which contains a direct reference to a spot on the disk where there is bootstrap code, and this ref. is set when grub2-install is run either implicitly or explicitly. When you copy the grub first-stage bootstrap binary to another disk it will not be in the same position on the disk - I think it is a disk not a partition reference that is used, so if you wish to change which is to to be the bootstrap that will run _its_ grub.cfg then you need to run grub2-install to configure what you want. Having a bootable USB stick with all your favourite things makes this easier. I find that the SanDisk Extreme 16G or larger gives the best performance here. I have lots of OS partitions spread around multiple disks and machines mostly on SSD, each exactly the same 15G size, and I back them up using dd to an external HD via eSATA-III to make an exact partition clone to a file. It only takes a few minutes each. The fun bit is when you put two clones on the one system - you need to change one of the UUIDs (tune2fs -U <>) and edit the UUID in the grub.cfg of the booting one to match. Btw - this implies that you clone the MBR to a file as well - every time that you make a change to the partition table or run grub2-install. You may find documentation at /usr/share/doc/grub2-tools/grub.html Be aware that it can be dated - it describes grub2-install as just a script, but I had a look and on my FC21 it is a full blown binary.
participants (3)
-
Allan Duncan
-
Carl Turney
-
Craig Sanders