1

I have two hard disks: sda & sdb. Ubuntu and all programs are installed in sda, and I use sdb to store my files; sdb is half-full.

I’m currently trying to solve a booting problem. The only way into the system is through a LiveUSB, from which I can view both sdX drives.

Before I do anything radical or stupid, I wonder whether I could use the backup tool in LiveUSB to backup my system into the sdb drive. Of course, I can sudo copy the entire /home folder to the other drive, but that won’t be much help when I’m finally able to boot or in case I finally decide to reinstall Ubuntu from scratch and need to recover my old settings.

Could anyone here help in this?

3
  • I'm not sure if I understand correctly your question, but, you could use a partitioned Live USB. In one partition, is the live Ubuntu, and, in the other partition, a free space where you can store your files. Or simply, use 2 USB devices, one to boot, and an external drive to save your files.
    – GTRONICK
    Nov 10, 2016 at 18:52
  • Do you have enough space on your /dev/sdb drive to backup your /home folder? You said this is where you already store your files on this half-full drive. Nov 10, 2016 at 19:12
  • I do have enough space in /dev/sdb. In my /home folder, I keep two 30GB virtual machine files.
    – Pabzum
    Nov 10, 2016 at 19:42

3 Answers 3

1

The backup tool in the live disk is not complete. It's tricky to install all the necessary components to get the backup working properly. You could simpler backup your /home folder with the cp command.

You can do this by, first mount your destination backup device (which may already be mounted since it's your /dev/sdb device.

Create a backup area for your destination and perform one of these two commands:

$ sudo cp -pvau ~/ /mnt/backupdir/

In the preceding command the /mnt/backupdir is the backup destination directory where you will be backing up your space. It will create a folder by the your username in the /mnt/backupdir folder.

This space could have been created on a partition off your /dev/sdb drive.

Alternatively you could backup your whole '/home` folder with this command:

$ sudo cp -pvau /home /mnt/backupdir/

This command would result in a folder called /mnt/backupdir/home with your personal home folder under there.

The copy arguments are:

p - preserve ownership and time stamps
v - give a verbose output during the process
a - archive (perform a recursive copy of all files and folders)
u - update files that have changed if they already exist in the destination.

You said you were concerned about during something "radical" which could loose your personal data.

Installing or reinstalling Ubuntu will not touch your /home folder or any other folders that you created on your installed partition unless you specifically elect the format option during the installation process. As long as you don't put a check mark in format your personal data will be preserved.

It's important to always have backups of your important data. But the install process will advise you that your data will be erased and not recoverable if you select to format. Also if you don't checkmark the format option, it'll still advise you which directorys (the system folders) that will be erased and recreated.

3
  • Thanks! You finally gave me courage to do reinstall Ubuntu. It says I won’t lose documents, programs &c. However, just at the start, it wanted to redo swap at SCSI 1, partition #3. I clicked ‘yes’ and install went on smoothly, until... it stopped with this message: «Do you want to resume partitioning? The attempt to mount a file system with type vfat in SCSI 1(0,0,0), partition #1 (sda) at /boot/efi failed. You may resume partitioning from the partitioning menu.» Is this dangerous? I suppose not, for the program itself promised I wouldn’t lose docs and progs. But then again...
    – Pabzum
    Nov 10, 2016 at 22:41
  • The fat partition you see is referenced to the boot loader area on modern computers. It's where the uefi information is located. None of your personal data is there. It's already used for booting the OS. Nov 11, 2016 at 0:56
  • Thank you! It’s done. How do I mark a questions as ‘solved’?
    – Pabzum
    Nov 13, 2016 at 13:15
-1

Your settings are intact within the /Home, so if you even take it with USB drive, you will be fine. Else, you can try Clonezilla. It's a live linux.

-1

If you are having separate partition for home directory then you don't need to move those files. You can just format root partition and your data will be remain intact in /home partition. And if you need to copy your data then attach another USB HDD or Flash Drive.

2
  • Thank you for illuminating an aspect of this I wasn’t aware of before. If I format the root partition, which I think is /deb/sda1, what should I install in it so that I can boot into Ubuntu?
    – Pabzum
    Nov 10, 2016 at 19:45
  • You need to reinstall Ubuntu if you want keeping same login user name so that home partition can be remounted under /home while reinstalling OS.
    – Kshitij
    Nov 11, 2016 at 19:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .