Logical sector size is zero как исправить

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • Hardware
  • [ubuntu] rescuing FAT32 partition “Logical sector size is zero”

  1. rescuing FAT32 partition “Logical sector size is zero”

    Hi, I was in the process of resizing a FAT32 partition on an external hard drive with Gparted when something happened (not really sure what) and now it’s not recognised….

    Running dosfsck comes up with the error “Logical sector size is zero” and quits. If I check it i disk utility it says the partition is ‘healthy’ whatever that means….

    Any ideas if it can be rescued?


  2. Re: rescuing FAT32 partition “Logical sector size is zero”

    Post this:

    sudo sfdisk -l -uS

    Backup current partition table to another device just in case. If not sdb change to correct device.
    sudo sfdisk -d /dev/sdb > parts.txt

    And take a look with testdisk to see what it says, it may be able to revert to old partition table?

    If not rebooted recover partition:
    http://ubuntuforums.org/showpost.php…7&postcount=34
    Used testdisk but see caveats in Post#7:
    http://ubuntuforums.org/showthread.php?t=1669418

    repairs including testdisk info & link to testdisk, testdisk is in repository and on most repairCDs
    http://members.iinet.net.au/~herman546/p21.html
    http://www.psychocats.net/ubuntucat/…rdeletedfiles/
    download TestDisk http://www.cgsecurity.org/wiki/TestDisk

    Instructions
    http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
    http://www.cgsecurity.org/wiki/Menu_Analyse


  3. Re: rescuing FAT32 partition “Logical sector size is zero”

    Ah thank you! Hadn’t heard of testdisk but after reading your links, a bit of fiddling around with it got the partition restored.


  4. Re: rescuing FAT32 partition “Logical sector size is zero”

    Glad it worked. You can post solved using thread tools.


  5. Re: rescuing FAT32 partition “Logical sector size is zero”

    Hi, only just saw your post about marking it as solved…
    I’m actually having some more trouble with the same HDD. Not sure if I should start a new thread for it?

    My problem is that I can’t just take everything off the disk and reformat it as I don’t have enough storage. I’ve copied everything really important into various places but there’s still about 250 gig on there that’s currently not backed up so I’m a little scared to mess with it!

    I managed to move this onto an ext4 partition but now both disk utility and gparted are refusing to create a fat32 partition on the drive.

    I had the following error from testdisk but wasn’t sure what to do about it:

    Warning: the current number of heads per cylinder is 255 but the correct value may be 128.

    When trying to create the fat32 partition I had the following error from gparted:

    create new fat32 file system 00:04:05 ( ERROR )

    mkdosfs -F32 -v -n “media” /dev/sdb1

    mkdosfs 3.0.9 (31 Jan 2010)
    /dev/sdb1 has 255 heads and 63 sectors per track,
    logical sector size is 512,
    using 0xf8 media descriptor, with 1480435712 sectors;
    file system has 2 32-bit FATs and 32 sectors per cluster.
    FAT size is 361280 sectors, and provides 46241035 clusters.
    There are 32 reserved sectors.
    Volume ID is 461b07dd, volume label media .
    mkdosfs: failed whilst writing FAT


  6. Re: rescuing FAT32 partition “Logical sector size is zero”

    What setting do you have in BIOS. It should be LBA or large or large block allocation?
    Does Disk Utility show Smart Status as ok?

    Actually cylinders, heads, sectors have not been used since drives went over 8GB. So most drives default to 255 heads & 63 sectors per track with the number of sectors calculated to be the drive size. I often see strange heads & sectors on flash drives with FAT formats.

    Why FAT32? It is fine for small flash devices. But it cannot store a file over 4GB and it does not have a journal so recovery is more difficult. IF you need compatibility with Windows NTFS is much better.


  7. Re: rescuing FAT32 partition “Logical sector size is zero”

    Ah OK I didn’t realise that stuff was irrelevant.
    fat32 is just the lowest common denominator. It works on my housemate’s old PC, my kids wii media player, my prehistoric G4 mac, my ubuntu box and pretty much anything else. I’m keeping an ext4 partition too for larger files, backups of important stuff etc though there’s not too many of those.

    Disk utility says SMART is ‘not supported’ It’s a pretty new SATA drive in a cheapish USB2 enclosure.

    Not sure where to look for LBA info.


  8. Re: rescuing FAT32 partition “Logical sector size is zero”

    I guess FAT is the common denominator across old Macs and some gaming devices.

    Not familiar with errors on manual partitioning. I have always just used gparted since DOS days.


Bookmarks

Bookmarks


Posting Permissions

I have a 320GB USB drive with a single large FAT32 partition. The volume mounts perfectly fine on my Mac OS X 10.5.8 machine and Disk Utility on the mac reports no issues with the volume. I can read/write all data on the drive.

However when I connect the drive to my Ubuntu 9.10 Karmic system, the partition does not mount. dmesg|tail says:

[ 2752.334822] scsi3 : SCSI emulation for USB Mass Storage devices
[ 2752.335040] usb-storage: device found at 3
[ 2752.335044] usb-storage: waiting for device to settle before scanning
[ 2757.330301] usb-storage: device scan complete
[ 2757.331005] scsi 3:0:0:0: Direct-Access     WD       3200AAK External 1.65 PQ: 0 ANSI: 0
[ 2757.331772] sd 3:0:0:0: Attached scsi generic sg2 type 0
[ 2757.355647] sd 3:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[ 2757.360737] sd 3:0:0:0: [sdb] Write Protect is off
[ 2757.360749] sd 3:0:0:0: [sdb] Mode Sense: 00 00 00 00
[ 2757.360755] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 2757.367618] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 2757.367631]  sdb: sdb1
[ 2762.797622] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 2762.797636] sd 3:0:0:0: [sdb] Attached SCSI disk
[ 2822.866228] FAT: bogus number of reserved sectors
[ 2822.866237] VFS: Can't find a valid FAT filesystem on dev sdb1.

When I run fsck.vfat -a /dev/sdb1 I get:

root@cartman:~# fsck.vfat -a /dev/sdb1
dosfsck 3.0.3, 18 May 2009, FAT32, LFN
Logical sector size is zero.

Googling “vfat Logical sector size is zero” produced no consensus as to the solution. I would prefer not to have to completely reformat the disk if possible because it contains about 280GB of data I would rather not have to find a temporary home for. Any suggestions?

  • Печать

Страницы: 1 [2]  Все   Вниз

Тема: Флешка доступна только для чтения  (Прочитано 39598 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Codeblight

Вот сейчас такие же грабли отхватил, но выяснилось что это что-то с наутилусом, т.к. в mc все копируется без проблем.


Оффлайн
luu

Аналогичная фигня.
В thunar – все без проблем копируется. Nautilus – ни в какую не хочет копировать. Говорит, что флешка доступна только для чтения.


Оффлайн
Pashkan

это, конечно, не решение, но
ctrl+alt+t

sudo nautilus


Оффлайн
luu

Pashkan,

это, конечно, не решение


Оффлайн
Pashkan

luu
если так открывается, можно попробовать

gpasswd -a [юзер] uucp


Оффлайн
vovk_v

    Помогла проверка файловой системы флешки:

    • вставляем флешку, запускаем терминал
    • смотрим куда смонтирована флешка df -Th
    • запускаем проверку с помощью dosfsck /dev/<имя_устройства> (например dosfsck /dev/sde1)
    • если спрашивает действие, выбираем 1) Remove dirty bits
    • на perform changes? пишем y и нажимаем Enter
    • извлекаем флешку, вставляем снова

Оффлайн
red_python

.. такая же проблема, команда не помогла. Записал загрузочную флешку на usb с дистрибутивом UBUNTU. Думал потом закину папку “backup”. Но всё заблокировано  :( , пробовал через терминал в режиме супер-пользователя “устройство доступно только для чтения”, что делать?

Даже не может отформатировать..

Результат команды выше возвращает инфо:

fsck.fat 3.0.28 (2015-05-16)
Logical sector size is zero.

вставил эту же флешку в Windows 7, там видит директорию efi и два файлика внутри.. можно создавать папки, но их не видно в Ubuntu

« Последнее редактирование: 10 Сентября 2017, 22:15:12 от red_python »


Оффлайн
abovery

Горе от ума, слишком многих заводит дебри. :)  Лечится это так: sudo apt install –reinstall nautilus* (звездочка обязательна) Если не помогло: миднайт коммандер или любой двух-панельный файловый менеджер, вам в помощь.

.

Я верю, разум когда-нибудь победит…


Оффлайн
ZugDuk

Такая же фигня – запорол sd карточку. Начал заливать на нее образ, понял что лью блоками по 512 байт, отменил, попробовал снова – система доступна только для чтения. Прикол в том, что ничего не успело запороться – с этой sd карточки грузится старая система и в ней такой фигни не пишет, но если из этой старой системы записать sd карточку нулями, то система никуда не исчезает и после перезагрузки целая как ни в чем небывало.


Оффлайн
cargan

ребята есть такие флэшки – и они могут быть доступны только для чтения. Это делается для флэшек на которых записываются к примеры продаваемые фильмы и другие материалы. Блокировка происходит на уровне внутренего контролера. Чтобы разблокировать такую флэшку нужно фактически влезть в схему самой флэшки, и что то там обнулить.
Покажите вывод этой команды

sudo hdparm /dev/sdXи там увидите – что есть на самом деле с флэшкой


Пользователь добавил сообщение 13 Ноября 2018, 20:49:00:


А так же в помощь сходи сюда почитай – о тех же проблемах
https://forum.ubuntu.ru/index.php?topic=282060.0

« Последнее редактирование: 13 Ноября 2018, 20:49:00 от cargan »


  • Печать

Страницы: 1 [2]  Все   Вверх

The drive was working normally until yesterday. Today when tyring to mount from Thunar it says:

Error mounting /dev/sdd1 at /media/myname/ARCH_201511: 
Command-line 
`mount -t "iso9660" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500" "/dev/sdd1" "/media/myname/ARCH_201511"'
exited with non-zero exit status 32: 
mount: wrong fs type, bad option, bad superblock on /dev/sdd1,

missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

I mabe a backup with: ddrescue -f -n /dev/sdd backup.img rescue.log

$ dmesg

[ 4303.845743] usb 2-1.5: new high-speed USB device number 4 using ehci-pci
[ 4303.961832] usb 2-1.5: New USB device found, idVendor=058f, idProduct=6387
[ 4303.961837] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4303.961839] usb 2-1.5: Product: Mass Storage
[ 4303.961841] usb 2-1.5: Manufacturer: Generic
[ 4303.961843] usb 2-1.5: SerialNumber: 2D9FF525
[ 4303.962201] usb-storage 2-1.5:1.0: USB Mass Storage device detected
[ 4303.962355] scsi host4: usb-storage 2-1.5:1.0
[ 4304.979880] scsi 4:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
[ 4304.980361] sd 4:0:0:0: Attached scsi generic sg4 type 0
[ 4304.981562] sd 4:0:0:0: [sdd] 3915776 512-byte logical blocks: (2.00 GB/1.87 GiB)
[ 4304.982702] sd 4:0:0:0: [sdd] Write Protect is off
[ 4304.982706] sd 4:0:0:0: [sdd] Mode Sense: 23 00 00 00
[ 4304.983834] sd 4:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 4304.989441]  sdd: sdd1
[ 4304.992906] sd 4:0:0:0: [sdd] Attached SCSI removable disk
[ 4310.608865] ISOFS: Unable to identify CD-ROM format.
[ 4315.815846] ISOFS: Unable to identify CD-ROM format.

$ lsblk

NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdd              8:48   1   1,9G  0 disk  
└─sdd1           8:49   1   1,9G  0 part  

$ fdisk -l /dev/sdd

Disk /dev/sdd: 1,9 GiB, 2004877312 bytes, 3915776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x687bd47c

Device     Boot Start     End Sectors  Size Id Type
/dev/sdd1        2048 3915775 3913728  1,9G  b W95 FAT32

$ mmls backup.img

DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors

      Slot      Start        End          Length       Description
000:  Meta      0000000000   0000000000   0000000001   Primary Table (#0)
001:  -------   0000000000   0000002047   0000002048   Unallocated
002:  000:000   0000002048   0003915775   0003913728   Win95 FAT32 (0x0b)

$ mmls /dev/sdd1

Cannot determine partition type

$ dosfsck -w -r -l -a -v /dev/sdd

fsck.fat 3.0.28 (2015-05-16)
Logical sector size (37008 bytes) is not a multiple of the physical sector size.

$ dosfsck -w -r -l -a -v /dev/sdd1

fsck.fat 3.0.28 (2015-05-16)
Logical sector size is zero.

How can i recover a file from this drive?

I’ve got a USB pen drive with a corrupted FAT filesystem. Now I try to repair it. So to first try what I can get from it without endangering the original hardware further, I’ve created an image with dd using the following command line:

$ sudo dd if=/dev/sdb of=pendrive.img

Now I want to repair the filesystem in the image by running fsck.

But fsck immediately terminates as follows:

$ sudo fsck.vfat -a -t -v pendrive.img
fsck.fat 3.0.27 (2014-11-12)
Logical sector size is zero.

Is there any trick how I can tell fsck to assume a sector size or what does this message mean? Can somebody help interpreting this output?

This question is similar to fsck a filesystem in a file but this was about ext2.
Also https://superuser.com/questions/129189/cant-mount-fat32-drive-under-ubuntu-linux gave no answer.

asked Oct 14, 2016 at 14:27

white_gecko's user avatar

white_geckowhite_gecko

2571 gold badge3 silver badges11 bronze badges

2

You have made the image of your whole USB pen drive with your dd command. This means that the image includes also a partition table.

That is why you cannot mount the image directly as a file system.

To mount the filesystem inside the image, you need to use kpartx utility to generate virtual devices from the partition table in your image.

kpartx -v -a /path/to/image

will create new partition mappings inside your /dev/mapper directory, which will point to the actual partitions inside your image. Then you can use these entries as the device for mount command or for fsck.vfat command.

answered Oct 14, 2016 at 15:06

Tero Kilkanen's user avatar

Tero KilkanenTero Kilkanen

36.3k3 gold badges40 silver badges62 bronze badges

3

Добавить комментарий