Unable to use backup

I have spent the last couple of weeks setting up my new Lenovo notebook the way I want it. I got a lot of help from this forum, so thank you all so very much. Now that I have it the way I want it, I made a copy of the HDD with dd to an identical HDD installed in a USB container. When it finished, I tried to boot from the USB drive with no success. I can live with that as long as I have a good backup, so I removed the internal drive from the notebook and installed the backup, just to be sure. When I boot I get:

doing fast boot
Creating device modes with udev
4.141141] [drm:drm_pci_agp_init] ERROR Cannot initialize the agpgart module.
4.141855] DRM: Fill_in_dev failed.
Welcome to emergency mode!

I installed the original HDD from the notebook in the external case and tried to boot from it. The notebook recognized it (it did not recognize the backup) and tried to boot but ended up in the same place. At this point I assume that if I install the original drive in the notebook, it will boot, but I won’t really believe it until I do it. I also assume that if I had to, I could copy the backup to the original disk and it would probably work but I would prefer to just switch disks if it ever comes up. I would appreciate any help I can get. TIA

You can’t just clone it if you have used the default naming convention for the drives. You must adjust the names in fstab and grub to the new naming of the device.

One solution is to use label naming convention but you must provide a unique label for all partition mounted at boot.

On 2013-08-18 02:46, nlgootee wrote:
>
> I have spent the last couple of weeks setting up my new Lenovo notebook
> the way I want it. I got a lot of help from this forum, so thank you all
> so very much. Now that I have it the way I want it, I made a copy of the
> HDD with dd to an identical HDD installed in a USB container.

As gogalthorp says, some of the device names used depend on the physical
drive and/or “path”. Have a look at what is under “/dev/disk/by-id/”,
study the naming.

I suppose you mean you did a dd of the entire disk on one go, not one
per partition.

The error message you get is curious, though.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Gogalthorp is correct. In my opinion, while using uuid’s for hard drives makes perfect sense in multi drive systems, on a single drive system like a notebook, it’s just more trouble than it’s worth. I would say even just use /dev/sdaX identifiers as it is exceedingly unlikely there would ever be a conflict, unless you are trying to boot to the USB disk. If you want to to that then using volume labels (see man label) would be best.

As a note: You might find the Clonezilla LiveCD a useful tool for full drive backups. As it is file system aware it will be far faster than dd. You could boot to the Clonezilla and do a full drive backup to your external USB drive very quickly.

On 2013-08-18 14:56, LewsTherinTelemon wrote:

> even just use /dev/sdaX identifiers as it is exceedingly unlikely there
> would ever be a conflict,

I see those conflicts almost every day.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

linux /boot/vmlinuz-3.7.10-1.1-desktop root=UUID=c8ccc55c-b245-4282-b7f5-4da85e2920a4 nomodeset resume=/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part1 splash=silent quiet showopts

I found this line in the grub.cfg file of the backup disk. The backup disk is not a Toshiba disk, so it appears that if I could insert the id of the backup disk, it might then boot if I switch it for the original disk. The file says “Do not edit this file”, so I am hesitant to do this. What other options do I have?

On 2013-08-18 16:56, nlgootee wrote:

> linux /boot/vmlinuz-3.7.10-1.1-desktop
> root=UUID=c8ccc55c-b245-4282-b7f5-4da85e2920a4 nomodeset
> resume=/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part1
> splash=silent quiet showopts

Please, use code tags for that: the ‘#’ button on the editor. Like this:


>> linux /boot/vmlinuz-3.7.10-1.1-desktop root=UUID=c8ccc55c-b245-4282-b7f5-4da85e2920a4 nomodeset resume=/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part1 splash=silent quiet showopts

> I found this line in the grub.cfg file of the backup disk. The backup
> disk is not a Toshiba disk, so it appears that if I could insert the id
> of the backup disk, it might then boot if I switch it for the original
> disk.

You need to edit fstab too, and maybe something else I forget.

> The file says “Do not edit this file”, so I am hesitant to do
> this. What other options do I have?

You can edit the file. The warning is because the file may be
re-generated on certain updates, so you lose your changes.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I read an extensive thread about booting from an external drive and they discussed using a different naming convention for the drives but I am very new to Linux in general and openSUSE in particular (a bit over 2 weeks) so I didn’t understand how to go about it. It seems to me that if I could find what the device # of the usb drive is and modify the grub.cfg to use it (currently set to hd0, msdos2) then it might be able to boot, but I don’t know how to discover the device # and I am not sure that it would be a good idea for me to edit grub.cfg. At least not until I know more about what I am doing. I found grub.cfg and I can see how that affects the boot process, but I could only find a file named fstab.h and I don’t see how it applies. How can you change the way the drives are named?

As gogalthorp says, some of the device names used depend on the physical
drive and/or “path”. Have a look at what is under “/dev/disk/by-id/”,
study the naming.

I looked at it and it is kind of confusing. There are actually 8 entries for the Toshiba disk. In the grub.cfg file it lists “/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part1” which is confusing because 4 of the listings start with “ata-TOSHIBA” and 4 of them start with “scsi-SATA_TOSHIBA” and the disk is a SATA disk so why does it use the ata listing and why part1? There are also 4 listings for the backup disk that start with “usb-HGST_HTS_and a very long number” which might be the device # for the HGST disk, but it may be different because it is intalled in a usb case.

Does “(see man label)” mean that there is a manual that explains how to do this, somewhere?

On 2013-08-18 17:46, nlgootee wrote:
>
>> As gogalthorp says, some of the device names used depend on the physical
>> drive and/or “path”. Have a look at what is under “/dev/disk/by-id/”,
>> study the naming.
>
>
> I looked at it and it is kind of confusing. There are actually 8
> entries for the Toshiba disk. In the grub.cfg file it lists
> “/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part1” which is
> confusing because 4 of the listings start with “ata-TOSHIBA” and 4 of
> them start with “scsi-SATA_TOSHIBA” and the disk is a SATA disk so why
> does it use the ata listing and why part1? There are also 4 listings for
> the backup disk that start with “usb-HGST_HTS_and a very long number”
> which might be the device # for the HGST disk, but it may be different
> because it is intalled in a usb case.

All of them work. Well, all of them that point to the right partition :slight_smile:

But I goofed in my post, because I wanted to point you at
“/dev/disk/by-id/”, but also “by-path”, “by-uuid”, and “by-label”.

Look, in my machine, look at the many names, all valid, that I can use
to refer to “/dev/sda12”, one of my many partitions:


> cer@Telcontar:~> ls -l /dev/disk/*/* | grep sda12
> lrwxrwxrwx 1 root root 11 Aug 18 13:39 /dev/disk/by-id/ata-ST3500418AS_5VM2RSY4-part12 -> ../../sda12
> lrwxrwxrwx 1 root root 11 Aug 18 13:39 /dev/disk/by-id/scsi-SATA_ST3500418AS_5VM2RSY4-part12 -> ../../sda12
> lrwxrwxrwx 1 root root 11 Aug 18 13:39 /dev/disk/by-id/wwn-0x5000c5001914354b-part12 -> ../../sda12
> lrwxrwxrwx 1 root root 11 Aug 18 13:39 /dev/disk/by-label/a_storage -> ../../sda12
> lrwxrwxrwx 1 root root 11 Aug 18 13:39 /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part12 -> ../../sda1
> lrwxrwxrwx 1 root root 11 Aug 18 13:39 /dev/disk/by-uuid/03bb5087-f623-41a4-9c9c-26837bd7c3d0 -> ../../sda1
> cer@Telcontar:~>

Each different name has different advantages and disadvantages.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-08-18 17:46, nlgootee wrote:

> Does “(see man label)” mean that there is a manual that explains how to
> do this, somewhere?

The command “man label” IS the manual :wink:

But it is the wrong one. You want “man e2label”, in a terminal.
The YaST partitioner can set them.

Warning: linux MANuals take effort getting used to.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-08-18 17:26, nlgootee wrote:
> but I could only find a file named
> fstab.h and I don’t see how it applies.

It is /etc/fstab. See part of mine:


> LABEL=a_main            /                       ext4            acl,user_xattr  1 1
> LABEL=a_boot_2          /boot                   ext2            acl,user_xattr                          1 2
> LABEL=b_swap            swap                    swap            pri=-1                                  0 0
>
> LABEL=c_home            /home                   xfs             defaults                                1 2
>
> /dev/disk/by-id/md-uuid-825b22e8:af550e83:93727666:fb8987fd    /data/raid      xfs     defaults,nofail 1 3


> How can you change the way the
> drives are named?

I’m not sure I can describe it in enough detail and simplicity, and not
leave out something important…

Anyway, your backup should work “as backup” without changing anything.
Just copy with dd everything from the backup to the original… it is
when you want to run the “backup” when you get into trouble.

If you want to do that, I think you should use yast partitioner to
change to labels, then create again the backup. I’m unsure about grub.

Why don’t you have a look at doc.opensuse.org? There are a lot of things
there you should read.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I still can’t find it. I looked at /etc and it isn’t there. I logged in as root because some things are apparently not available if you are not logged in as root, but it is not there. I did a search in Dolphin file manager and it couldn’t find it.

Thanks, but I don’t have “by-label” and I am unable to look at the files. Is there some program that I can get to look at them?

Yes, I figured that I could copy the backup back to the original disk and it would probably work but that is not really my goal. I am trying to learn how Linux works and to do that I need to play with it and try different things and make mistakes and fix them. This forum and you, especially, have been very helpful. I am also reading a lot but my present level of ignorance makes it hard to understand everything that I read. I would like to get the backup disk to run as an external usb drive, but even if I can’t, I plan to put in a new drive and install Windows 8 with openSUSE as a dual boot with VMware 9 and Windows 7 in a virtual machine. That is the setup that I have at work and our IT guy originally set up my notebook that way so that I could work at home. I decided to experiment and managed to mess it up so that nothing would boot (a blow to my ego, believe me) and ended up reformatting and starting over. I could get him to do it again, but then I would still know nothing about how it all works, so until I get comfortable with Linux, this is my new hobby. Thanks again for all of your help.

by-label you have to set. ie you have to add labels to the partitions. This can be done in Yast.- partition manager

On 2013-08-18 22:56, nlgootee wrote:
>
> robin_listas;2580021 Wrote:
>> On 2013-08-18 17:46, nlgootee wrote:
>>
>>
>> But I goofed in my post, because I wanted to point you at
>> “/dev/disk/by-id/”, but also “by-path”, “by-uuid”, and “by-label”.
>
> Thanks, but I don’t have “by-label” and I am unable to look at the
> files. Is there some program that I can get to look at them?

You don’t look at the files, just at the names.
You don’t have a label unless you define it first.

When you create a new partition in YaST, at install time or later, if
you click in the button “fstab options” you see several posibilities,
and one of them is to create a name for the partition (the label), and
another is to mount by label (or something else).

Alternatively, each filesystem type has a different program to create
labels; for ext2/3/4 it is “e2label”.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-08-18 22:36, nlgootee wrote:
>
> robin_listas;2580028 Wrote:
>> On 2013-08-18 17:26, nlgootee wrote:
>>> but I could only find a file named
>>> fstab.h and I don’t see how it applies.
>>
>> It is /etc/fstab. See part of mine:
>
> I still can’t find it. I looked at /etc and it isn’t there.

Impossible.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

My bad. I was looking for a folder instead of a file. I scrolled down and found it. I don’t know why it didn’t come up when I searched in Dolphin.

/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-TOSHIBA_MK5055GSX_99JAF9XMS-part3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0