0

I am trying to make a bootable LiveUSB backup of my system. After getting into trouble with Systemback, I am trying PinguyBuilder. It seems nice, since it is a simple script that can be adapted.

However, I fail to boot from the ISO files it creates. I am suspecting (but I don't know) that the problem is within the creation or burning process of the ISO. My (compressed) system is larger than 4GB. So I hat to tweak PinguyBuilder a little bit to generate these larger images. Nevertheless I can generate a bootable USB stick based on it.

The error I am encountering occurs when booting from the stick. After choosing from a dialog to boot the LiveUSB, it will show a message that it failed to mount my squashfs. However, the contained squashfs mounts just fine on my working system.

I am wondering If I can generate my bootable LiveUSB directly from the files (mostly the squashfs) that PinguyBuilder generated. It leaves a working directory ISOTMP containing boot casper dists EFI install isolinux md5sum.txt pool preseed README.diskdefines ubuntu.

The casper subdirectory contains essentials like filesystem.squashfs and vmlinuz. But how can I generate a bootable USB stick from it? Note that I don't necessarily need a tool. I can partition the USB stick and copy files myself, if necessary.

  • Do you need a bootable USB stick, or an ISO file, or both. There are ways to copy your system to a bootable USB stick without making an ISO. – C.S.Cameron Mar 11 '18 at 18:48
  • I don't need the ISO file, but the bootable USB stick. Thus I am very interested in how to copy the system to a stick without ISO. Note that the file size can be an issue too. The squashfs file system is larger than 4GB and may not be supported by FAT16. – highsciguy Mar 11 '18 at 20:19
  • The error that I am seeing at boot time is this one askubuntu.com/questions/193896/… – highsciguy Mar 11 '18 at 20:37
  • I have just tested a method based on making a base for the boot stick using mkusb and replacing the OS and casper-rw partitions with a clone of the partition you want to boot. It should work on BIOS and UEFI. I will make this comment an answer. – C.S.Cameron Mar 12 '18 at 3:05
1

mkusb is a great tool for making boot drives. The boot system works for both BIOS and UEFI. Following shows a method to clone an existing OS drive to USB.

Create a persistent USB drive using mkusb, use defaults, use any handy ISO.

Boot computer from a second live USB.

Using gparted delete the OS partition and the casper-rw partition from the persistent USB. Leave the NTFS data partition if you want a partition Windows and Linux can access. confirm there is room for the cloned partition.

Select the drive whose partition(s) you want to copy, right click the partition, select copy.

Select the Target drive and select the empty space, right click and paste.

After gparted is complete, copy the OS menuentry from boot/grub/grub.cfg of the new partition to be the first menuentry in the grub.cfg of the USB's boot partition.

The boot drive will not work as an installer drive.

  • I did something similar, as I describe below. Unfortunately, I still don't understand why my other attempts (like booting with UEFI from a USB stick that contains a single boot partition) will not work. Since this answer helped me quite a bit, it deserves the credits. – highsciguy Mar 15 '18 at 21:10
0

I eventually used an approach similar to that proposed by C.S.Cameron:

First, I created the backup with PinguyBuilder (as described in the question).

Then I downloaded a bootable Rescatux (Super Grub2 Disk) ISO and created a USB from it. I used Rosa Image Writer, but other tools should do as well.

I then examined the bootable ISO with a partition editor - I used partitionmanager, but gparted should do as well - and created an ext2 partition in the free space.

Finally, I mounted the new partition and copied the contents of PinguyBuilder/ISOTMP/ folder created by PinguyBuilder to the partition.

When booting from this stick I get the Rescatux menu with all its useful options. In addition, that menu allows to run all discovered grub installations.

Note that the partition on the USB-stick may appear as (hdd0,msdos1), or similar, even though it is not.

In particular, it finds the system on my ext2 partition and allows me to boot from it. The advantage here is that it gets me the menu from the system created by PinguyBuilder, including the option to install my system from the live USB without the need to edit grub.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.