Не монтируется диск hdd
После переустановки системы, подключил к компу диск с данными /dev/sdb
Делаю mount -t ext4 /dev/sdb /usr/local
Выводит следующее:
В dmesg : EXT4-fs (sdb): VFS: Can’t find ext4 filesystem
Команда: fsck -fy /dev/sdb
Выводит:
Если сделать fsck -fy /dev/sdb1
То будет следующее сообщение, а далее тысячи исправлений:
Больше ничего не делал, боюсь потерять данные.
Как восстановить диск? точнее примонтировать и не потерять даные.
ФС ведь не была создана прямо на диске? Раз уж это жёсткий диск, наверное, там есть таблица разделов.
Поздно, потери уже в пути.
После переустановки системы, подключил к компу диск с данными /dev/sdb
Что именно произошло с диском между переустановкой и переподключением?
Перестало работать после того , как я через gparted изменил UUID
mount -t ext4 -o sb=32768 /dev/sdb1 /mnt тоже не сработает?
Если есть место, лучше считать весь sdb1 куда-нибудь и работать с его копиями.
Testdisk может прочитать список файлов на разделе?
К сожалению, нет возможности скопировать данные куданить
Testdisk выдаёт это
Народ. ну что? делать Write partition structure to disk ? ничего лишнего не затрёт?
Список файлов прочесть с помощью Testdisk можно!
Какие ошибки появляются в dmesg при попытке смонтировать sdb с -o sb=8193, -o sb=32768 и без -o?
Если ФС так и не смонтируется, можно попробовать считать самые важные файлы при помощи testdisk.
На все вырианты одно
sdb1 же — запарили уже тупить
[ 267.924107] EXT4-fs (sdb): VFS: Can’t find ext4 filesystem
featurelles , прошу прощения, моя опечатка. Естественно, в предыдущем сообщении имелся в виду sdb1.
Если через testdisk попробовать сделать востановление суперблока, выбором Write partition structure to disk это ведь на диске ничего не попортит?
Просто запускайте testdisk /dev/sdb1 и выбирайте Non partitioned media.
Я пробовал и sdb и sdb1 , везде одно и тоже.
Но эт уже не важно, сейчас копии файлов делаю. И далее через testdisk попробую восстановить хард.(раньше об этой проге и не слышал)
AITap — огромное спасибо за помощь!
Источник
mount: неправильный тип fs, плохой параметр, плохой суперблок
Я добавил новый жесткий диск ( /dev/sdb ) в Ubuntu Server 16, запустил parted /dev/sdb mklabel gpt и sudo parted /dev/sdb mkpart primary ext4 0G 1074GB . Все прошло нормально. Затем я попытался смонтировать диск
Я пытался mount -t ext4 /dev/sdb1 /mnt/storage2 с одинаковым результатом. Я делал это много раз прежде и никогда не сталкивался ни с чем подобным. Я уже читал это монтирование: неправильный тип fs, плохая опция, плохой суперблок в / dev / sdb на CentOS 6.0 безрезультатно.
вывод fdisk относительно накопителя
Вам все еще нужно создать файловую систему
Команда: mkpart [имя типа fs-type] start end
Создает новый раздел без создания новой файловой системы в этом разделе.
У меня была эта проблема с / dev / sda в Ubuntu 16.04. Я решил ее, загрузившись с живого usb и выполнив следующие действия:
Чтобы увидеть ваши диски используйте lsblk
Если вы видите, что ваш диск хорош, запустите, fdisk -l чтобы увидеть, может ли система использовать его.
Запустите эту команду, чтобы попытаться восстановить неисправные суперблоки на диске.
fsck /dev/sda1 (замените / dev / sda1 на диск, который вы хотите исправить).
Когда он просит восстановить блоки, выберите «да», нажав « y »
Разрешить fsck восстанавливать все поврежденные блоки.
Тогда я смог смонтировать устройство с помощью
Это решило это для меня.
У меня есть другой процесс для этого, который заменил плохой суперблок одной из альтернатив. FSCK может быть процессом с потерями, потому что FSCK может захотеть удалить слишком много данных или удалить данные из уязвимого места (например, каталог данных для базы данных), поэтому бывают случаи, когда я не хочу его использовать или не работает
Вы можете покончить с собой или просто стать корнем этого процесса. Просто помните, что когда вы являетесь пользователем root, Linux предполагает, что вы знаете, что делаете, когда запускаете команды. Если так будет указано, он быстро доставит мистера Пуля к мистеру Футу. Как и многие другие вещи, с великой силой приходит большая ответственность. На этом мое предупреждение о запуске вашей системы от имени root завершено.
Выясните, какое устройство — предполагая / dev / sdc1 для этого примера вместе с EXT4 как наиболее распространенное для этого объяснения.
Ваше устройство и ваша файловая система (ZFS, UFS, XFS и т. Д.) Могут различаться, поэтому сначала узнайте, что у вас есть. Не думайте, что это EXT4. Игнорирование этого шага может вызвать проблемы позже, если это НЕ файловая система EXT4.
Получите сообщение об ошибке, в котором говорится, что суперблок плохой. Вы не хотите делать это, если ваш суперблок в порядке.
Это выведет альтернативные суперблоки, хранящиеся в вашем разделе.
Выберите альтернативный суперблок — имейте в виду, что первый — по умолчанию, и он плохой, поэтому давайте не будем его использовать. Вы также можете выбрать один из списка, который вы получаете из вашего раздела. Не используйте пример. Ваши суперблоки могут храниться в другом месте .
Перезагрузитесь и посмотрите, сработало ли это. Если нет, попробуйте следующий суперблок в списке. Я должен был пойти третий или четвертый пару раз.
Теперь попробуйте команду проверить диск еще раз. Посмотрите, получите ли вы то же сообщение о плохих суперблоках.
Продолжайте пробовать, пока у вас не кончатся суперблоки или все заработает. Если у вас закончились, у вас, вероятно, есть большие проблемы, и я надеюсь, что у вас есть хорошие резервные копии. Вы можете попробовать запустить FSCK на этом этапе.
Источник
Почему я получаю ошибку «неправильный тип fs, плохая опция, плохой суперблок»?
При монтировании каталога NFS выполните:
Я получаю следующую ошибку:
Вопрос уже задавался (например, здесь и здесь ), но либо не получил ответа, либо ответы не помогли в моем случае.
В сообщении об ошибке упоминается:
(для нескольких файловых систем (например, nfs, cifs) вам может понадобиться вспомогательная программа / sbin / mount.)
Это актуально, учитывая, что вы пытаетесь смонтировать NFS. /sbin/mount.nfs Вспомогательная программа обеспечивается nfs-common . Вы можете установить его с помощью:
С другой стороны, если вы пытаетесь смонтировать CIFS, вспомогательная программа предоставляется cifs-utils . Вы можете установить его с помощью:
Убедитесь, что mount.cifs указан в /sbin :
Проверьте, cifs-utils установлен ли пакет :
Если это не так, установите библиотеки cifs с
Похоже, что nfs-common пакет должен быть установлен для того, чтобы иметь возможность монтировать каталоги NFS.
Когда это не так, монтирование каталога NFS приводит к ошибке, которую я получил.
Я решил это, установив virtualbox. Делать
Это устанавливает mount.vboxsf
У меня была такая же проблема в Ubuntu 14.04 LTS. Я попытался установить пакет nfs-common безуспешно.
Я смог решить ту же проблему, что и у вас:
- Собираюсь в Linux «диски» приложения.
- Нажав на USB-накопитель, который я пытался установить в разделе «Устройства» (окно слева).
- Нажатие на дополнительные действия в разделе раздела файловой системы Volumes (две маленькие шестерни справа от знака минус / плюс).
- Нажмите кнопку Изменить параметры монтирования (в верхней части окна параметров монтирования).
- Нажмите, чтобы ВКЛЮЧИТЬ Параметры автоматического монтирования.
- Затем нажмите кнопку монтирования (+ знак под объемами) — это должно измениться на квадрат.
Это смонтировало мой USB-накопитель и решило проблему.
Источник
Linux: Recover Corrupted Partition From A Bad Superblock
Q. How can I Recover a bad superblock from a corrupted ext3 partition to get back my data? I’m getting following error:
/dev/sda2: Input/output error
mount: /dev/sda2: can’t read superblock
How do I fix this error?
A. Linux ext2/3 filesystem stores superblock at different backup location so it is possible to get back data from corrupted partition.
If your system will give you a terminal type the following command, else boot Linux system from rescue disk (boot from 1st CD/DVD. At boot: prompt type command linux rescue).
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
Mount partition using alternate superblock
Find out superblock location for /dev/sda2:
# dumpe2fs /dev/sda2 | grep superblock
Sample output:
Now check and repair a Linux file system using alternate superblock # 32768:
# fsck -b 32768 /dev/sda2
Sample output:
Now try to mount file system using mount command:
# mount /dev/sda2 /mnt
You can also use superblock stored at 32768 to mount partition, enter:
# mount sb= < alternative-superblock >/dev/device /mnt
# mount sb=32768 /dev/sda2 /mnt
Try to browse and access file system:
# cd /mnt
# mkdir test
# ls -l
# cp file /path/to/safe/location
You should always keep backup of all important data including configuration files.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Category | List of Unix and Linux commands |
---|---|
Documentation | help • mandb • man • pinfo |
Disk space analyzers | df • duf • ncdu • pydf |
File Management | cat • cp • less • mkdir • more • tree |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Linux Desktop Apps | Skype • Spotify • VLC 3 |
Modern utilities | bat • exa |
Network Utilities | NetHogs • dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop |
Searching | ag • grep • whereis • which |
Shell builtins | compgen • echo • printf |
Text processing | cut • rev |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Comments on this entry are closed.
Well written article with lots of good information.
Does any of this work on OpenBSD and the ffs
file system?
if using mount command on BSD OSs (FreeBSD, FreeNAS, etc), you will always receive the error in the OP as it’s not the proper syntax.
To mount ext2 on BSD OSs, the correct command would be:
mount -t ext2fs /dev/YourDevice /mnt/YourMountPoint
Please refer to the ext2fs man page:
thank you very much for the valuable inforamation
Lately I’ve noticed that when I Google on Linux questions, this site consistently returns the best or one of the best responses to what I was trying to solve. Because of that, I have signed up for your daily newsletter. Thanks for the great site!!
Very good information.
Awesome. Thanks.
This is exactly what I needed instead of all the opinion with no solution.
Awesome. Worked Perfectly on RHEL5
Worked perfectly under RHEL5. Notes on my issue are below
I was getting following error when mounting.
Wrong fs type, bad option, bad superblock on /dev/sdd1
missing codepage or other error
In some cases usefull info is foinf in syslog – try
dmesg | tail or so
dmeg | tail displayed
EXT3-fs: filesystem has both journal and inode journals!
I tried useing the tune2fs -f -O ^has_journal /dev/sdd1 to remove the journal and try recreating but it did not work. tune2fs just hung there sucking 100% CPU when trying to remove the journal
The command given here worked great.
Does not seem to work, when I run dumpefs all it says:
“Bad magic number in super-block while trying to open…”
I already know the superblock is bad.
Another way to cut to the quick of finding out where your superblocks should be after losing your primary is to use the following command:
# mke2fs -n /dev/[device and partition number]
This is making the utility you used to create the filesystem tell you where the backups are. You get a response similar to this:
# mke2fs -n /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
62248 inodes, 248976 blocks
12448 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
31 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
Now, remember when using this command, you need to use the same flags you used when you created the filesystem originally, and just add ‘-n’ to them. If you made an ext3 filesystem, you would use:
# mke2fs -j -n /dev/[device and partition number]
Yes. Indeed this is a great shortcut – mke2fs -n /dev/XX .
Thank you for suggesting this.
This is a wonderful website with easy to understand and clear text linux resource. Simply, one of the best Linux learning sites on the net.
Also you can use mkfs command, for example for ext4 fs:
mkfs.ext4 -n /dev/XX
Hi, this looks like a potential lifesaver. Great Stuff. Question: do superblocks ever move?? Obviously i don’t know ext3 filesystem internals — too much to learn, so little time… My point is: would there be any value in storing the list of superblock locations offline?
You can.. but I strongly recommend backup instead of just superblocks. Linux comes with rsnapshot backup tool that can make hourly, daily and weekly backup of all your servers. If you are old school UNIX person, tar, dump and restore are regular tools for backup.
thank you so much, this is valuable information, and it saved me a LOT of work.
thanks for the write up, awesome, worked like a charm on ubuntu 9.10 off live cd rescuing a / partition on my HDD
Thank you! Successfully recovered my data, and with much less stress than I might have had due to the clear explanations. Thanks also to ShadowCat8 – I was getting magic error numbers with the other method of finding the superblock locations.
hi.. Even after i run d command i m gettin a ‘couldnt find ext2 superblock. Tryin backup blocks’ n then a bad magic number in superblock again! I ve lot of data n desperately need to retrieve them..
Good and simple.
I believe we will be able to mount the fs using a diff super block “only” if we r running system in rescue mode with cd media mounted,
I could not mount the fs when the system was live.. instead i was seeing help of mount command
mount sb=”204801″ /dev/hda1 /vol1
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere’.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] … : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount –bind olddir newdir
or move a subtree:
mount –move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
any clues on this?
Here is what I did that worked for me.
$ dumpe2fs /dev/sda6
– got just the “Bad magic number in super-block while trying to open…” message
used
$ mke2fs -n /dev/sda6
got the 2nd super block same as in the example.
Used:
$ fsck -b 32768 /dev/sda6
to fix.
Should have used “-a” option to automatically accept fixes because it had a gazillion complaints and I had to lean on the “y” key for 20 minutes. My disk may not be optimally fixed, but I can see the data I was missing before which is a big step forward.
Hi there!
Sorry, I can’t find, here in this place, the example where was the explanation in how to recover a NTFS partition with linux utils; I remember I red, that the program asks if the partition was created under Vista.
A friend of mine, needs back his HD, at least, recover his important data, I told him that it could be possible to restore the whole drive too.
Thx!
Hi, I still have a problem. Have tried all things suggested in comments, still no luck, just get these errors
freenas:/mnt# mke2fs /dev/ad1
mke2fs 1.41.14 (22-Dec-2010)
/dev/ad1: Operation not permitted while setting up superblock
dumpe2fs /dev/ad1
dumpe2fs 1.41.14 (22-Dec-2010)
dumpe2fs: Bad magic number in super-block while trying to open /dev/ad1
Couldn’t find valid filesystem superblock.
fsck -t ufs /dev/ad1
** /dev/ad1 (NO WRITE)
Cannot find file system superblock
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ufs: /dev/ad1: can’t read disk label
Источник