Slackware This Forum is for the discussion of Slackware Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
05-05-2014, 03:05 AM
|
#1
|
Member
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108
Rep:
|
ReiserFS root partition can't be mounted on boot. superblock cannot be found
Hi,
I have a dual boot laptop with Windows 7 and Slackware64 14.1. Yesterday after switching between the two OS several times I ended up with kernel panic which said it couldn't mount any filesystem on root partition. I tried to boot several times with no luck. Then I booted Win7 and it was running fine.
I used a DVD of Slack 13.37 to have a look at the disk.
cfdisk showed the partition table intact but the boot flag has moved to the windows partition /dev/sda2 when it used to be on linux root (/dev/sda3 ) before. I put it back, hit Write and got "no primary partitions are marked bootable ..." . But /dev/sda3 is a primary partition.
I tried to manually mount it :
mount /dev/sda3 /mnt/t
mount: /dev/sda3: can't read superblock
reiserfsck --check /dev/sda3
...
reiserfs_open: the reiserfs superblock cannot be found on /dev/sda3
...
It advised me to run reiserfsck with --rebuild-sb. I started it but it wanted info on block size which I didn't know where to get from (dumpe2fs said can't read superblock too) so I Ctrl+c
I did badblocks -vns /dev/sda3 and after 12 hours it had processed 30% of the 500GB partition and I dropped it. Someone on the web advised to use bigger block size for faster check but I didn't understand much. Some talked about block size of HDD others about block size of filesystem and I got confused .
Now I don't know what to do. The disk is Toshiba MK6461GSYN but I couldn't find info about block size googling or didn't know where to look.
Please help. I need to boot up to get the info out before making other checks on the drive.
Thank you
|
|
|
05-05-2014, 04:14 AM
|
#2
|
Senior Member
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052
|
Hello,
AFAIK, the default block size of a reiserfs is 4096 bytes. So, you can use this value unless you have specified something else when you have created the partition.
Note that you can get the block size of a reiserfs partition using the command debugreiserfs. However, if you boot from the slackware dvd, this command is not available. To workaround this, you can proceed as below once you have booted from slackware dvd :
Code:
$ mkdir slackdvd reiserfstools
$ mount /dev/sr0 /slackdvd
$ cd reiserfstools
$ cat /slackdvd/slackware64/a/reiserfsprogs-*.txz | xz -dc | tar xf -
$ ./sbin/debugreiserfs /dev/sda3 | grep -i blocksize
If you need to get the sector size(s) of your hdd, you can use the command parted as below :
Code:
$ parted /dev/sda print | grep -i "sector size"
--
SeB
|
|
|
05-05-2014, 05:21 AM
|
#3
|
Member
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108
Original Poster
Rep:
|
Thank you for your help
I run reiserfsck --rebuild-sb then run --check twice and it said everything is OK but I still can't mount the partition. Any ideas?
|
|
|
05-05-2014, 07:01 AM
|
#4
|
Senior Member
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052
|
Hello,
Quote:
Originally Posted by kairen
I run reiserfsck --rebuild-sb then run --check twice and it said everything is OK but I still can't mount the partition.
|
is mount returns the same error message (i.e. can't read superblock) ?
Have you tried to mount the partition read-only ?
--
SeB
|
|
|
05-05-2014, 07:31 AM
|
#5
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,236
|
Simple solution is to restore from your latest backup.
ReiserFS was always a problem child, although it's been a good many years since I used it.
For "normal" (as in non packing) filesystems, forensic tools are generally an option to scrape files in the unlikely event that a backup isn't available. Here'e what cgsecurity have to say
Quote:
Originally Posted by photorec
ReiserFS includes some special optimizations centered around tails, a name for files and end portions of files that are smaller than a filesystem block. In order to increase performance, ReiserFS is able to store files inside the b*tree leaf nodes themselves, rather than storing the data somewhere else on the disk and pointing to it. Unfortunately, PhotoRec isn't able to deal with this - that's why it doesn't work well with ReiserFS.
|
|
|
1 members found this post helpful.
|
05-05-2014, 09:26 AM
|
#6
|
Member
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108
Original Poster
Rep:
|
Quote:
Originally Posted by syg00
Simple solution is to restore from your latest backup.
ReiserFS was always a problem child, although it's been a good many years since I used it.
For "normal" (as in non packing) filesystems, forensic tools are generally an option to scrape files in the unlikely event that a backup isn't available. Here'e what cgsecurity have to say
|
With all my respect, why do you think I insist on recovering the data from the corrupted device? It all happened in the middle of an upgrade - back up- repair hdd chaos which led me to a state of no backup available. I've been using ReiserFS for 9 years with absolutely no problems until now. If things were "simple" I would've never wasted anyone's time on fixing them.
Now I am running dd to copy data to an external drive.
phenixia2003, the error is the same. I also cheked dmesg : "... 7000: search_by_entry_key: search_by_key returned item position == 0... " and the volume was mounted read only but in fact it was not mounted at all.
Thank you
|
|
|
05-05-2014, 12:57 PM
|
#8
|
Member
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108
Original Poster
Rep:
|
Quote:
Originally Posted by BratPit
|
Thank you for the help
I am making an image right now but I already did reiserfsck. I read somewhere that I should not do reiserfsck --rebuild-sb more than once on one file system for it will destroy data. Is that correct? Can I do reiserfsck --rebuild-sb again safely on the mounted image?
Thanks again
|
|
|
05-05-2014, 01:29 PM
|
#9
|
Member
Registered: Jan 2011
Posts: 253
Rep:
|
Yes.
If you did that , an something goes wrong .......... :-(
You got 1 chance so better doing it on a local copy.
If reiserfsck did not go because of bad block you still got a chance :-)
|
|
|
05-05-2014, 01:42 PM
|
#10
|
Member
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108
Original Poster
Rep:
|
On the image reiserfsck --rebuild-sb said :
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
Reiserfs super block in block 16 on 0x700 of format 3.6 with standard journal
Count of blocks on the device: 130614464
Number of bitmaps: 3987
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 72512086
Root block: 37322976
Filesystem is clean
Tree height: 5
Hash function used to sort names: not set
Objectid map size 176, max 972
Journal parameters:
Device [0x0]
Magic [0x0]
Size 8193 blocks (including 1 for journal header) (first block 18)
Max transaction length 1024 blocks
Max batch size 900 blocks
Max commit age 30
Blocks reserved by journal: 0
Fs state field: 0x0:
sb_version: 2
inode generation number: 480262
UUID: 948f48e1-5f91-41e2-8544-34057e74c4ef
LABEL:
Set flags in SB:
Mount count: 1
Maximum mount count: 30
Last fsck run: Sun May 4 17:06:40 2014
Check interval in days: 180
Super block seems to be correct
Dose it mean I repaired it the first time I run it?
|
|
|
05-06-2014, 02:22 AM
|
#11
|
Member
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108
Original Poster
Rep:
|
BratPit I can't thank you enough! I followed all steps in that post and everything worked out fine.
Quote:
Originally Posted by BratPit
|
Now I am making backups
And thank you to all people who tried to help
|
|
|
All times are GMT -5. The time now is 02:27 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|