Score:0

Can't mount drive without using e2fsck every boot

ธง vg

If i want to mount this drive, i need to run e2fsck or fsck.ext4 after every boot. All data is visible and accessable after that.

uuid only appears in system listings after "fsck.ext4" or "e2fsck". The uuid appearing after "fsck.ext4" is inside fstab and after "sudo mount -a" it mounts successfully. But next boot i have to do "fsck.ext4" or "e2fsck" and mount again.

I remember accidentally deleting one small first partition on this disk through gparted usb. This is probably the reason for this behaviour, right? How to solve this problem?

FV42JOA:~$ sudo mount /dev/sdb /mnt/wsl/hdd10 mount: /mnt/wsl/hdd10: wrong fs type, bad option, bad superblock on /dev/sdc, missing codepage or helper program, or other error. ( before e2fsck)

lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 256G 0 disk / sdb 8:16 0 10.9T 0 disk

FV42JOA:~$ sudo fsck.ext4 /dev/sdb e2fsck 1.45.5 (07-Jan-2020) ext2fs_open2: Bad magic number in super-block fsck.ext4: Superblock invalid, trying backup blocks... Superblock needs_recovery flag is clear, but journal has data. Recovery flag not set in backup superblock, so running journal anyway. hdd4: recovering journal Pass 1: Checking inodes, blocks, and sizes ... Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Free blocks count wrong for group #0 (30649, counted=1461). Fix<y>?

...( a lot of numbers after pressing "a" at "Fix?")

Free inodes count wrong for group #0 (21, counted=0). Fix? yes Free inodes count wrong for group #1 (32, counted=0). Fix? yes Free inodes count wrong for group #2 (32, counted=0). Fix? yes Free inodes count wrong for group #3 (32, counted=7). Fix? yes Free inodes count wrong (2861045, counted=2860935). Fix? yes Padding at end of inode bitmap is not set. Fix? yes Block bitmap differences: Group 0 block bitmap does not match checksum. FIXED. hdd4: ***** FILE SYSTEM WAS MODIFIED ***** hdd4: 121/2861056 files (0.8% non-contiguous), 2923633429/2929721344 blocks

FV42JOA:~$ sudo smartctl --all /dev/sdb smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.72-microsoft-standard-WSL2] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: WDC Product: WD121KRYZ-01W0RB Revision: 01.0 User Capacity: 12,000,138,625,024 bytes [12.0 TB] Logical block size: 512 bytes Physical block size: 4096 bytes LU is fully provisioned Rotation Rate: 7200 rpm Form Factor: 3.5 inches >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

FV42JOA:~$ sudo skdump /dev/sdb Device: sat16:/dev/sdb Type: 16 Byte SCSI ATA SAT Passthru Size: 11444224 MiB Awake: Operation not supported ATA SMART not supported.

FV42JOA:~$ sudo df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda 263174212 3337580 246398476 2% / /dev/sdb 11716272064 11691920404 24335276 100% /mnt/wsl/hdd10(after e2fsck and mount)

FV42JOA:~$ sudo hdparm -I /dev/sdb /dev/sdb: SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 07 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ATA device, with non-removable media Standards: Likely used: 1 Configuration: Logical max current cylinders 0 0 heads 0 0 sectors/track 0 0 -- Logical/Physical Sector size: 512 bytes device size with M = 1024*1024: 0 MBytes device size with M = 1000*1000: 0 MBytes cache/buffer size = unknown Capabilities: IORDY not likely Cannot perform double-word IO R/W multiple sector transfer: not supported DMA: not supported PIO: pio0 (after e2fsck and mount)

As requested by heynnema, i want to notice that i switched to ubuntu live usb and below is not the same disk constellation as everything above, i plugged some drives in and out.

In this case (fdisk below before fsck) i have this problem with disks /dev/sdb, /dev/sde and /dev/sdf

Disk /dev/loop0: 2.1 GiB, 2160009216 bytes, 4218768 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


Disk /dev/loop1: 55.45 MiB, 58130432 bytes, 113536 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


Disk /dev/loop2: 219 MiB, 229638144 bytes, 448512 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


Disk /dev/loop3: 50.98 MiB, 53432320 bytes, 104360 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


Disk /dev/loop4: 65.1 MiB, 68259840 bytes, 133320 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


Disk /dev/loop5: 32.3 MiB, 33865728 bytes, 66144 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


Disk /dev/sda: 111.81 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Crucial_CT120M50
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 379DAC7C-9EF1-4077-B2C6-5828602E3F12

Device         Start       End  Sectors  Size Type
/dev/sda1       2048  39063551 39061504 18.6G Linux swap
/dev/sda2   39063552  78125055 39061504 18.6G Linux filesystem
/dev/sda3   78125056 117186559 39061504 18.6G Linux filesystem
/dev/sda4  117186560 118163455   976896  477M Linux filesystem
/dev/sda5  118163456 129882111 11718656  5.6G Linux filesystem
/dev/sda6  129882112 141600767 11718656  5.6G Linux filesystem


Disk /dev/sdg: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sde: 12.75 TiB, 14000519643136 bytes, 27344764928 sectors
Disk model: ST14000NM001G-2K
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A968E824-8EEC-4F6F-9297-E0AED5A66EEF

Device     Start   End Sectors Size Type
/dev/sde1     34 32767   32734  16M Microsoft reserved

Partition 1 does not start on physical sector boundary.


Disk /dev/sdf: 10.94 TiB, 12000138625024 bytes, 23437770752 sectors
Disk model: WDC WD120EMFZ-11
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: CDD1B551-4A3D-4FDE-BD6D-08CC02D6875C


Disk /dev/sdb: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 296AB478-D5B3-4E6E-8EC6-1330DD7C6AD4


Disk /dev/sdc: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2E53662E-3F2E-43B0-A5CA-3DA685BAF97C

Device      Start         End     Sectors  Size Type
/dev/sdc2  264192 15628052479 15627788288  7.3T Microsoft basic data


Disk /dev/sdh: 12.75 TiB, 14000519643136 bytes, 27344764928 sectors
Disk model: ST14000NM001G-2K
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdd: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 12103BA4-CED8-4E6B-9B9B-DE5F407F9B77

Device      Start         End     Sectors  Size Type
/dev/sdd1      34      262177      262144  128M Microsoft reserved
/dev/sdd2  264192 15628052479 15627788288  7.3T Microsoft basic data

Partition 1 does not start on physical sector boundary.


Disk /dev/sdi: 29.74 GiB, 31914983424 bytes, 62333952 sectors
Disk model: SD  Transcend   
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: 0x7722bf23

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdi1  *     2048 62333951 62331904 29.7G  c W95 FAT32 (LBA)```

**Thank you!**
heynnema avatar
ru flag
คุณไม่สามารถเมานต์หรือ fsck อุปกรณ์เช่น /dev/sdb คุณต้องใช้พาร์ติชันเช่น /dev/sdb1 คุณไม่สามารถ fsck พาร์ติชันได้หากติดตั้งอยู่ หากคุณบู๊ตคู่กับ Windows และคุณได้ติดตั้งไดรเวอร์ Windows ที่จะช่วยให้คุณอ่าน/เขียนไปยังพาร์ติชัน linux ext/2/3/4 ได้ ให้ถอนการติดตั้งโดยเร็วที่สุด เนื่องจากจะทำให้ระบบไฟล์ของ linux เสียหายตลอดเวลา
halpplz avatar
vg flag
ขอบคุณสำหรับความคิดเห็น "คุณไม่สามารถเมานต์หรือ fsck อุปกรณ์เช่น /dev/sdbคุณต้องใช้พาร์ติชันเช่น /dev/sdb1" ไม่ ไม่เป็นความจริง ฉันสามารถเมานต์ได้หลังจาก fsck.ext4 และไม่มี dev/sdb1 "คุณไม่สามารถ fsck พาร์ติชันได้หากติดตั้งแล้ว " ใช่ จริง ฉันไม่เคยทำอย่างนั้น" หากคุณบูตคู่กับ Windows และคุณมีไดรเวอร์ Windows ติดตั้งอยู่ ซึ่งจะช่วยให้คุณอ่าน/เขียนไปยังพาร์ติชัน linux ext/2/3/4 ได้ ให้ถอนการติดตั้งโดยเร็วที่สุด เพราะจะทำให้เสียหาย ระบบไฟล์ linux ตลอดเวลา" ตกลงฉันไม่ได้ใช้ WSL อีกต่อไป มีเพียง linux เท่านั้น... ที่ยังคงเป็นปัญหาเดิม
heynnema avatar
ru flag
Ubuntu รุ่นอะไร หากคุณดูที่ **ส่วนใหญ่** ของคำสั่งในคำถามของคุณ ส่วนใหญ่ล้มเหลว ส่วนใหญ่มีปัญหา superblock... นั่นเป็นเพราะคุณระบุ /dev/sdb
halpplz avatar
vg flag
อูบุนตู 20.04.3 LTS
Score:2
ธง ru

หากต้องการ fsck ระบบไฟล์อย่างถูกต้อง นี่คือวิธีที่ถูกต้อง...

  • บูตเป็น Ubuntu Live DVD/USB ในโหมด âTry Ubuntuâ mode
  • เปิด เทอร์มินัล หน้าต่างโดยการกด Ctrl+Alt+
  • พิมพ์ sudo fdisk -l
  • ระบุชื่ออุปกรณ์ /dev/sdXX สำหรับ "Linux Filesystem" ของคุณ
  • พิมพ์ sudo fsck -f /dev/sdXXแทนที่ sdXX ด้วยเลขที่พบก่อนหน้านี้
  • ทำซ้ำ ฟค คำสั่งหากมีข้อผิดพลาด
  • พิมพ์ รีบูต

อัปเดต #1:

สำรองข้อมูล ฟอร์แมตไดรฟ์ใหม่ มีพาร์ติชันอยู่ในขณะนี้ ทุกอย่างทำงานได้อีกครั้ง

halpplz avatar
vg flag
ฉันมีดิสก์ 2 แผ่นที่มีปัญหานี้ หลังจากเรียกใช้ fsck มีคนพูดว่า "ext2fs_open2: Bad magic number in super-block fsck.ext2: Superblock ไม่ถูกต้อง กำลังพยายามบล็อกสำรองข้อมูล..." บางครั้งดิสก์อื่นๆ จะพูดมากกว่านี้หลังจากนั้น "ค่าสถานะ Superblock needs_recovery นั้นชัดเจน แต่เจอร์นัลมีข้อมูล Recovery Flag ไม่ได้ตั้งค่าใน superblock สำรอง ดังนั้นจึงรันเจอร์นัลอยู่ดี" หลังจากนั้นทั้งคู่ก็รอการยืนยันสำหรับการแก้ไขจำนวนมาก ครั้งที่สอง fsck ไม่มีข้อผิดพลาด หลังจากรีบูตดิสก์ทั้งสองก็มีปัญหา/ข้อผิดพลาดเหมือนเดิม ราวกับว่า fsck ไม่ได้ทำอะไรเลย
heynnema avatar
ru flag
@halpplz คุณบูทเป็น Ubuntu Live USB หรือไม่ โปรดบอกคำสั่ง fsck ที่แน่นอนที่คุณใช้แก้ไขคำถามของคุณและแสดง `sudo fdisk -l`
halpplz avatar
vg flag
ฉันใช้ Ubuntu Live USB ฉันทำตามคำแนะนำของคุณอย่างแน่นอน ฉันใช้ "sudo fsck -f /dev/sdb" ฉันอัปเดตคำถามด้วย sudo fdisk -l
heynnema avatar
ru flag
@halpplz การกำหนดค่าดิสก์ที่ดูแปลก ๆ ดิสก์เหล่านี้เริ่มต้น/จัดรูปแบบ/สร้างภายใต้ WSL หรือไม่ ฉันไม่เห็นพาร์ติชันในส่วนใหญ่ ฉันไม่รู้จัก WSL ดังนั้นฉันจึงไม่สามารถอธิบายได้ว่าทำไมดิสก์เหล่านี้ถึงมีลักษณะเช่นนี้ ... แต่เนื่องจากคุณไม่ได้ใช้ WSL อีกต่อไป ... คุณอาจต้องสำรองข้อมูลใด ๆ บน sdb และ reinit/ ฟอร์แมตใหม่/สร้าง sdb ใหม่โดยใช้ขั้นตอนมาตรฐานของ Ubuntu เพื่อแก้ไขปัญหาของคุณ ขอโทษที่ฉันไม่สามารถช่วยอะไรได้มากกว่านี้ คุณดูข้อมูล SMART สำหรับ sdb แล้วหรือยัง
heynnema avatar
ru flag
@halpplz halpplz อ้างอิงถึงภาพยนตร์เรื่อง Fifth Element หรือไม่?
halpplz avatar
vg flag
ไม่ พวกเขาไม่ได้สร้างใน WSL ฉันคิดว่าปัญหาเกิดจากความผิดพลาดของฉันโดยการลบพาร์ติชันในไดรฟ์เหล่านี้หรือ wsl เสียหายจริงๆ ตอนนี้ เนื่องจากดูเหมือนว่าจะไม่มีวิธีแก้ปัญหาสำหรับ porblem ของฉัน ฉันเพิ่งย้ายไฟล์ไปยังไดรฟ์ว่างอีกไดรฟ์หนึ่ง แล้วฟอร์แมตใหม่และสร้างใหม่เพื่อให้มี 1 อยู่ข้างหลังชื่ออุปกรณ์ เช่น sdb1 ทุกอย่างทำงานได้ดีจนถึงตอนนี้ อย่างไรก็ตาม ขอบคุณสำหรับความช่วยเหลือของคุณ ฉันไม่ได้ดูหนังเรื่องนี้ ฉันควรดูไหม
heynnema avatar
ru flag
@halpplz ใช่! ตอนนี้คุณเข้าใจสิ่งที่ฉันพูดถึงแล้ว พาร์ติชัน... เช่น sdb1 ไดรฟ์ของคุณไม่มีสิ่งเหล่านี้จนกว่าคุณจะฟอร์แมตใหม่ และใช่... ดู "The Fifth Element" เมื่อคุณสามารถ แต่... ดูตั้งแต่ต้นจนจบ... แล้วบอกฉันว่ามันไม่ใช่ภาพยนตร์ที่มีการออกแบบท่าเต้นที่ดีที่สุดเรื่องหนึ่งที่คุณเคยดูมาหรือไม่... และการแสดงก็ยอดเยี่ยมมาก... โดยเฉพาะจาก Mila J. และคอยดูฉาก halpplz
heynnema avatar
ru flag
@halpplz ฉันอัปเดตคำตอบแล้วหากคำตอบของฉันและการแชทของเรามีประโยชน์ โปรดอย่าลืมยอมรับคำตอบของฉันโดยคลิกที่ไอคอนเครื่องหมายถูกที่ปรากฏทางด้านซ้ายของคำตอบของฉัน ขอบคุณ!

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา