Recovery specific directory from a deleted partition - disk

I know that this question is very common, but sometimes are special cases.
I used dd if=/dev/zero of=/dev/sda bs=4M to fix a HDD with many badblocks. (I`m using Ubuntu live USB).
All 8 partitions (3 of them are big, 1 windows, 1 linux, and 1 to storage) were lost.
I`d like to try to recovery at least the storage partition or even some specifics directories within.
I tried grep on /dev/sda with -a option but I got this error grep: memory exhausted.
Also, I'm not able to install foremost or ddrescue. For this last one I got this message
$ sudo apt-get install -f ddrescue-gui
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ddrescue-gui : Depends: python3-wxgtk4.0 but it is not installable
Depends: gddrescue but it is not installable
E: Unable to correct problems, you have held broken packages.
But even to install lzip I`m getting errors.
At least 1 recent folder I need to getting from there.
Would you help me?
thanks in advance

Related

Metasploit Framework .go module can't be loaded

This is my first post, so I might get the format wrong.. Anyway, after searching for a solution online (which I could not find), I resorted to asking here.
Upon launching my msfconsole a few days ago, I started getting all of these warnings/errors which were not showing before.
$ sudo msfconsole
[!] The following modules could not be loaded!..\
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/host_id.go
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/exchange_enum.go
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/onprem_enum.go
[!] Please see /root/.msf4/logs/framework.log for details.
metasploit v6.0.31-dev
I could not find any solution to this .go module loading issue. I might have screwed something over some time ago, but my last VM snapshot is just too far away.
Thank you all for your help!
just install go in your kali:
sudo apt install gccgo-go
I also got the same problem.
But, since the error message clearly ask me to check error log file, actually there is clear solution too.
[!] Please see /root/.msf4/logs/framework.log for details.
[09/05/2021 22:29:56] [e(0)] core: /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/onprem_enum.go failed to load - LoadError Failed to execute external Go module. Please ensure you have Go installed on your environment.
And after the Go installation, the problem is solved.
Therefore, the solutions is that you just need to install Go on your machine.

Is there a YAML config fix for `Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease`

I've seen a lot around this issue but so far nothing that works in my circumstance. I have a Hexo blog deployed over CircleCI that had no issues, and without making any changes to my YAML config the build began failing when I pushed updates. Of the existing issue reports and fixes I've seen nothing has worked when applying to my circle.yml file, and I'm not sure where to go from here.
Many solutions recommend adding some script to update the URL, but I think that's taking me in the wrong direction, and frankly beyond my current knowledge.
During CircleCI's build when it gets to the AWS CLI build:
name: Install AWS CLI
command: |
apt-get update
apt-get install -y awscli
it completes 6 successful gets but then I see:
Fetched 10.1 MB in 1s (6749 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
Exited with code 100
That step previously gave me:
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
So despite this being well documented, I've struggled to find a solution that works in my Hexo, Node-based setup. If you can teach me something new I'd be much appreciative!

glibc local install on clusters

I am running some algorithm on my machine that requires a version of glibc 2.14 or above. For computing time improvements, I am migrating my whole code to the clusters of my university. However, the glibc version is 2.12 and they don't want to upgrade it. I am therefore trying to directly install the library on my allocated space and somehow link my algorithm to this library. I downloaded the 2.19 version.
I ran the following lines on my allocated space in the clusters
glibc-2.19/configure --prefix=/
make
make install
and I am facing the following issues when I am running the last command
/usr/bin/install -c -m 644 /home/myusername/libc.a //lib/libc.a
/usr/bin/install: cannot create regular file `//lib/libc.a': Permission denied
it's trying to create a file in a folder where I don't have permission but I don't know how to override that.
Any help is greatly appreciated!
glibc-2.19/configure --prefix=/
This is just wrong. You likely don't understand what --prefix does.
The default prefix is /usr/local. For system GLIBC, the prefix should most often be /usr.
What you likely want is --prefix=/home/$USER/glibc-install or something like that.
You should also read this answer.

rubygems error installing rails

I get this error when trying to install ruby gems on my amazon instance. Can anyone explain?
ubuntu#ip-myinstance:~$ sudo apt-get install rubygems
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package rubygems is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
ruby
E: Package 'rubygems' has no installation candidate
I didn't understand that message. I was following directions from http://www.frontcoded.com/rails-on-amazon-ec2-ubuntu.html which says to do that. Also I tried
which rubygems
And that came out blank. If possible I would like to take down this question to stop the negative votes. Thank you.
You are trying to install the wrong package. In modern Ruby, rubygems come as part of it. The message you got also says so.
Even if there were a problem on the server side, not being able to download something through apt-get has nothing to do with whether rubygems site is down.
The message you got, which gives you an alternative suggestion, indicates that the relevant site (apt-get) is not down.
You can check the status of certain websites by using services like this.

Mounting HDFS in Ubuntu platform

Using Ubuntu platform, I am trying to mount HDFS (hadoop 2.2) using HDFS-FUSE but it keeps failing as shown below:
$ sudo apt-get install hadoop-0.20-fuse
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
hadoop-0.20-fuse : Depends: fuse-utils but it is not installable
E: Unable to correct problems, you have held broken packages.
$ sudo apt-get install fuse-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package fuse-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'fuse-utils' has no installation candidate
Could you anybody let me know if I need to use any other package to get this working.
Even i get the same error. Things have changed it seems, if you want to mount HDFS. try something like this.
http://www.spaggiari.org/index.php/hbase/hadoop-hdfs-fuse-installation#.U5BROPmSwkM

Resources