cramfsck: superblock magic not found (Scientific Linux)
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
cramfsck: superblock magic not found (Scientific Linux)
Good evening everyone!
I have come across a problem on my Scientific Linux, I have searched the forum but couldn't find what I am looking for, so I decided to post my question here.
well, here what I did: under the Terminal I got Cramfs-1.1.tar.gz installed, and then i used the "make" command to build the cramfsck and mkcramfs and it was all successful.
so now I have an image I called it "backup.img", and I tried following command:
./cramfsck -x ./output backup.img
but unfortunetly I got the following message:
./cramfsck: superblock magic not found
So I kept on thinking what is this Superblock magic thingy? I did a google search but I kind of got lost and didn't end up finding anything useful, but I am just thinking it could be some kind of package which I need to install? I tried the following command:
apt-get install magic
but it seems there is not such package exists with that name.
So, could anyone please guide me to the right way or help me with few tips or hints? I would really appreciate it!
Cramfsck is a Cram File System ChecKer. In your command, It should be putting a cramfs, backup.img in ./output/ Correct?
Now it's not finding superblock magic in backup.img. Superblock magic is a code that identifies this as a cramfs, extfs, whatever, That leads me to suspect backup.img, as many .img files are compressed with cpio
Hi Business,
thanks for the reply. I have switched off the bold, I am sorry about that, it is just that I have certain vision problems due to my diabetis condition and I thought the bold would help me see the fonts better but now I see it is only when it gets posted the bold shows off.
Thanks for the explaination Business, now I understand what that message meant, I'll use the "file" command and see what it gives me and I'll post it on here.
Hi Business,
I tried the "File" command and It gave me quite a nice report, I am not sure how to embed the code or the repotr in here so I decided to take a snapshot and attache it with this post. but it did report that the backup.img file is a "linux compressed Rom File system data, big endian size 1093632 version #2 stored_dirs CRC 0x44c75ad4, edition 0, 282 blocks, 6 files".
I think I can understand some of it, but not sure what a big endian is, and it has some kind of version too, and it actually doesn't mention cramfs file system, so I guess that means that this img file won't work with "cramfsck" and probably needs something else.
what do you think Business? can you make out anything useful out of this report?
Big endian & little endian refers to data storage. If you have a 64 bit number occupying 8 consecutive bytes, do you start with the big(most significant) or little(least significant) end? The answer is I don't care, as long as you start with the same one always. x86 systems use little endian, and that file is big endian, so you have a problem. You also have a non native file (i.e. not for a pc)
There are utilities to swap the endian-ness of a file, but they are usually wrapped up in java objects or compilers. They have to be able to read this thing,and to do that they have to know how wide to read. There is also middle endian, but I don't want to be responsible for headaches. http://en.wikipedia.org/wiki/Endianness
Hi Business,
Thanks for the reply!
that is really interesting. I'm going through the Wikipedia link which you have shared with me and I'll try to learn more about this.
Thank you very much! This is going to be a fun experience for me, this is really all new for me so I am all excited about learning it.
Good afternoon Business! Good afternoon everyone!
I am glad to say that I managed to mount the image file I was having trouble with, I read a bit more about converting a big endian to a little endian and found out that there is a package that does that, I also found that it the convertion can be done by swaping bytes done programmtically with a simple say perl or c++ script and I would feel that would be more exciting, but here what I did:
First I went on searching for things related to Cramfs:
apt-cache search cramfs
and cameup with the following list of packages (attachement Capture1.jpg).
now the interesting thing is I found a package called: "cramfsswap", and it has a description next to it that says "swap endian file system", so I got it installed with the following command:
apt-get install cramfsswap
after that it was very simple, just used the default command for it:
cramfsswap backup.img newbackup.img
and It did it
Then I was able to mount the newbackup.img onto a new directory I made, here what I did:
mkdir tmpMount
then
mount -o loop newbackup.img ./tmpMount
and that is it! then I was able to access the mount point like this:
cd ./tmpMount
and I was able to access the content of the image file. how cool is that
But I must admit, I was a bit disappointed after accessing the backup img filee, because its content wasn't as I expected, I found that the content is organized into folders, it is like this:
root> platform > kernel
and within the "kernel" folder I found two files "bild" and "os". it is not really what I expected, I thought I would see more files and folders, so now I am trying to find out what those two files are. my main objective when I first started this is to retrieve certain files from the img file, but now I can see it is not as simple as it sounds, but I am having alot of fun trying to find a way.
Thanks again Business Kid for putting me on the right tarck!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.