LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-05-2014, 03:05 AM   #1
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Rep: Reputation: 15
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
 
Old 05-05-2014, 04:14 AM   #2
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
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
 
Old 05-05-2014, 05:21 AM   #3
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
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?
 
Old 05-05-2014, 07:01 AM   #4
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by kairen View Post
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
 
Old 05-05-2014, 07:31 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
Old 05-05-2014, 09:26 AM   #6
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
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
 
Old 05-05-2014, 12:42 PM   #7
BratPit
Member
 
Registered: Jan 2011
Posts: 250

Rep: Reputation: 100Reputation: 100
Reiserfsck do not repair filesystem's superblock if bad block exist on disk.
You should make image partition using dd od dd_rescue .
It fills bad block with zeros and then mount image and go with
raiserfsck .

Examples:
http://www.krazyworks.com/reiserfs-filesystem-recovery/
http://www.cyberciti.biz/tips/repair...eiserfsck.html
 
1 members found this post helpful.
Old 05-05-2014, 12:57 PM   #8
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by BratPit View Post
Reiserfsck do not repair filesystem's superblock if bad block exist on disk.
You should make image partition using dd od dd_rescue .
It fills bad block with zeros and then mount image and go with
raiserfsck .

Examples:
http://www.krazyworks.com/reiserfs-filesystem-recovery/
http://www.cyberciti.biz/tips/repair...eiserfsck.html
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
 
Old 05-05-2014, 01:29 PM   #9
BratPit
Member
 
Registered: Jan 2011
Posts: 250

Rep: Reputation: 100Reputation: 100
Quote:
Is that correct?
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 :-)
 
Old 05-05-2014, 01:42 PM   #10
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
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?
 
Old 05-06-2014, 02:22 AM   #11
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
BratPit I can't thank you enough! I followed all steps in that post and everything worked out fine.

Quote:
Originally Posted by BratPit View Post
Now I am making backups

And thank you to all people who tried to help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fedora 18: reiserfs_open: the reiserfs superblock cannot be found ThePowerTool Linux - Server 2 03-22-2013 10:51 AM
partition /dev/sda2 is mounted with write permissions, cannot check it fsck.reiserfs kkgil Linux - Server 1 06-02-2012 12:21 PM
[SOLVED] root partition mounted:/dev/root on / type ext4 (rw,relatime,barrier=1,data=ordered) costasdk Slackware 2 06-30-2011 02:09 PM
Autorepaired SUSE 10 for GRUB reinstall - now hda4 reiserfs superblock not found Dagny's Gimp Linux - Newbie 1 05-28-2006 07:00 AM
Resizing a root reiserfs partition Insodus Linux - General 2 09-16-2003 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration