this post was submitted on 10 Nov 2023
31 points (91.9% liked)

Linux

48220 readers
654 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi everyone! I'm trying to prepare a live iso with a USB stick including the additional rescuezilla package (or, alternatively, additional packages for a live rescuezilla .iso). Sadly rescuezilla does not support encryption, and so I'd like to be able to create/encrypt an image on one single live iso, not having to do a double iso boot just for this. I'm trying to do this in a manner that I won't need internet once I need to use this USB stick. And hence...I found the most quoted command as:

apt-get download $(apt-rdepends |grep -v "^ ")

But this seems to work ONLY if your package is also part of the repo. If it's an external .deb such as rescuezilla_2.4.2-1_all.deb is, then the command just fails with:

Reading state information... Done
W: Unable to locate package ./rescuezilla_2.4.2-1_all.deb
E: Handler silently failed

So...what can I do to download the many dependencies of rescuezilla onto a USB stick? Thanks!

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago (1 children)

I’m not at a computer to verify, but dpkg -I package.deb will list dependencies of a deb file, so apt-get download $(dpkg -I rescuezilla_2.4.2-1_all.deb) might work.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

apt-get download $(dpkg -I rescuezilla_2.4.2-1_all.deb)

Thanks a lot! While it wasn't as simple as that, it did indeed point me onto the right direction. This command did the trick for me:

apt download $(dpkg -I rescuezilla_2.4.2-1_all.deb | grep -oP '(?<=Depends: ).*' | tr -d ',')

The grep goes there to list only what comes after "Depends:". The -oP enables the python command to remove the string matching itself, so it leaves the whole list after the match... otherwise it also tries to download a package named "Depends:". And the tr -d ',' is to remove the commas separating each package, otherwise it fails to find them.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Install Distrobox first and work inside that container.

Messing with dependencies of a program not in your package manager can result in bricking your OS (which will take some time to fix and that will be annoying).
In DB, all dependencies will be self contained and your host OS will stay clean. You can imagine it similar to how Flatpaks work.

Then, follow the other's procedures.

[–] [email protected] 1 points 1 year ago (1 children)

Thanks! How does this work with OS permissions? As it's rescuezilla and veracrypt I'm trying to use, both need access to the system partitions in order to be able to mount/read/copy to them. Flatpak can be a bit limited regarding permissions...Moreso on a live iso I guess.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

DB only gives you the dependencies, but is otherwise not sheltered. It still has access to all host OS files, including hard drives and other stuff.

Sadly, I'm not super experienced with it, and I use it on an immutable distro, where can't change that much, at least nothing on the root level.

You would have to read the documentation or google it yourself sadly, I'm out of luck here for you.

I still hope my suggestion was successful :)

[–] [email protected] 2 points 1 year ago (1 children)

Would it be easier to use Clonezilla? It looks like it supports encryption.

[–] [email protected] 2 points 1 year ago (1 children)

The whole mechanism of working of Clonezilla is about the least intuitive I have ever found. So many chances for errors/mistakes, especially if you're trying to do a network backup. Rescuezilla invokes clonezilla as a backup mechanism, but it saves you all the trouble with a way more intuitive UI. It's been a revelation to me since I found about it, and refuse to use clonezilla alone.

[–] [email protected] 1 points 1 year ago

Yeah that's for sure, it's pretty user hostile.

It's not open source but I absolutely love Veeam Agent, it will backup an online system with encryption, very easy to use, and they provide a bootable recovery image to restore from.

[–] [email protected] 1 points 1 year ago (1 children)

This seems like a trick question, but app the repo to your apt sources first, then try to install. Step through for each unresolved dep if needed.

[–] [email protected] 2 points 1 year ago (1 children)

That's...a lot of dependencies to manually get. This wouldn't have worked. And I need a reproducible method so I can do this fully offline without having to match apt to anything online.

[–] [email protected] 1 points 1 year ago

If the dependencies are in the repos you've added since, then apt-rdepends should be able to pull them.
I had to keep chaining grep -v to ignore packages that didn't exist but the result was a success.

[–] [email protected] -2 points 1 year ago (1 children)

# apt install /path/to/package.deb

[–] [email protected] 3 points 1 year ago (1 children)

Something something reading the post...

[–] [email protected] -2 points 1 year ago* (last edited 1 year ago) (1 children)

You missed the correct path.

W: Unable to locate package ./rescuezilla_2.4.2-1_all.deb

Use the correct path to your deb file.

[–] [email protected] 1 points 1 year ago (1 children)

Still not correct. The path is perfectly correct. Even using full path. This method EXPECTS a repo package, not a file. I already figured the answer, it's in this thread.

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (1 children)

I think you have confused the apt command with the apt-get command. apt-get doesn't handle files, while apt has it since the very first version. This is one of the important differences between the two commands. This was one of the main reasons why I have been using only apt for years.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Again, incorrect. The answer is above. And still, you haven't read the thread. This is NOT about getting rescuezilla to install in the current PC. This is to get it to install in a DIFFERENT PC, which happens to be OFFLINE. So apt by itself will FAIL when it tries to resolve dependencies.