You are not logged in.

#1 2016-06-09 03:57:26

WeeDram
Member
From: Vancouver, B.C., Canada
Registered: 2016-04-14
Posts: 91

Solved: How to do a bootable rsync backup to multiple partitions

Presently I have two Arch Linux installations on my hard drive.

One installation is set up as sda1 /boot, sda2 /, sda4 /home and the other installation is on sda3. That is, one installation is spread across 3 partitions and the other is on a single partition.

In order to create several bootable USB backups of both of these installations,  I have successfully used the approach outlined in https://wiki.archlinux.org/index.php/fu … with_rsync . All of these USBs consist of single partition each. (The only reason I have multiple bootable USBs at present is because I repeated the procedure several times to better familiarize myself with it.) I have now been trying, unsuccessfully, to create a 3-partition, bootable USB using rsync.

After going through steps that I thought would work (see below), I get the following error message:
error: file '/boot/vmlinuz-linux' not found.
error: you need to load the kernal first.
Press any key to continue ...

These are the steps I tried: Use gparted to create a partition table of type MSDOS  and create three ext4 partitions on the USB. Flag one of the partitions as boot. Mount one of the other partitions at /media. Use mkdir to create /media/boot and /media/home and then mount the partition flagged as boot at /media/boot and the remaining partition at /media/home. Issue the same rsync command that I have used for creating the previously mentioned backup, bootable USBs.
Update the fstab. What I did here was to edit the fstab on the USB to change the original UUIDs to ones that matched those of the USB.
Installed grub using the following command:
    sudo grub-install --target=i386-pc --debug --boot-directory=/media/boot /dev/sdb
Did a mkconfig using the following:
    sudo grub-mkconfig -o /media/boot/grub/grub.cfg
(These steps come from  https://wiki.archlinux.org/index.php/GR … _USB_stick )
Both of these went through to completion and no errors were reported.

When I re-boot with the USB plugged in, I get the following menu:
Arch Linux
Advanced options for Arch Linux
Arch (on /dev/sda3)
Advanced options for Arch (on /dev/sda3)
Arch1 (on /dev/sdb3)
Advanced options for Arch (on /dev/sdb3)

However, as I said above, upon choosing Arch1 (on /dev/sdb3) I get the following error message:
error: file '/boot/vmlinuz-linux' not found.
error: you need to load the kernal first.
Press any key to continue ...

Clearly I'm doing something wrong here and I would appreciate some hints (or an outright recipe!) as to the proper procedure.
Regards
WeeDram

Last edited by WeeDram (2016-06-15 02:31:36)

Offline

#2 2016-06-09 04:15:51

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: Solved: How to do a bootable rsync backup to multiple partitions

AFAIK, booting from multipartition usb drive is not supported. I am not dead-sure though!

Offline

#3 2016-06-09 14:23:35

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Solved: How to do a bootable rsync backup to multiple partitions

You shouldn't use device nodes to mount the partitions as those can and do change. Use UUID instead.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2016-06-09 15:46:07

WeeDram
Member
From: Vancouver, B.C., Canada
Registered: 2016-04-14
Posts: 91

Re: Solved: How to do a bootable rsync backup to multiple partitions

As I said, I did edit fstab to include the correct UUIDs. Is there something else I need to do regarding UUIDs?

Offline

#5 2016-06-09 15:49:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Solved: How to do a bootable rsync backup to multiple partitions

Yes, based on the error, fstab is never even read: the problem is in the bootloader.

Multipartition usbs can definitely be bootable.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2016-06-09 22:52:08

WeeDram
Member
From: Vancouver, B.C., Canada
Registered: 2016-04-14
Posts: 91

Re: Solved: How to do a bootable rsync backup to multiple partitions

Being an absolute beginner, I know next to nothing about grub.cfg, however when I look at the grub.cfg created on the USB I can see that the UUID for the / partition on the USB is in there but the UUID for the /boot partition is not.
If this UUID does not come from the fstab on the USB, where does it come from? osprober?

Any suggestions on how I can diagnose where and what is going wrong here?

Offline

#7 2016-06-13 03:03:21

WeeDram
Member
From: Vancouver, B.C., Canada
Registered: 2016-04-14
Posts: 91

Re: Solved: How to do a bootable rsync backup to multiple partitions

I got the multi partition USB to be bootable. After mounting / & /boot, I chroot-ed into it and did a grub-mkconfig. Upon re-booting the computer, the Arch installation on the USB came up fine. Got this idea from a section of the Arch GRUB wiki.

Offline

#8 2016-06-13 04:39:17

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: Solved: How to do a bootable rsync backup to multiple partitions

nice, kindly mark this thread solved by editing your first post & prepending [SOLVED] to the title.

Last edited by Docbroke (2016-06-15 03:03:58)

Offline

#9 2016-06-15 02:31:04

WeeDram
Member
From: Vancouver, B.C., Canada
Registered: 2016-04-14
Posts: 91

Re: Solved: How to do a bootable rsync backup to multiple partitions

I'll mark this as solved but I am still trying to figure out WHY it worked. I re-did the various steps and found that it was necessary to do both the full set of steps listed in post one and the chroot etc in #7. It didn't work if I just substituted the chroot etc. for the grub-install & grub-mkconfig listed in #1. Not sure how stable the solution is.
And thanks to all for your various suggestions.

Offline

Board footer

Powered by FluxBB