Score:0

ls: reading directory '.': Input/output error trying to mount a freebsd ufs partition in ubuntu 21.04

in flag

On ubuntu 21.04

#fdisk -l

Disk /dev/sdc: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: WDC WD3200AAJS-0
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: 0x90909090

Device     Boot Start   End Sectors  Size Id Type
/dev/sdc4  *        0 49999   50000 24.4M a5 FreeBSD

#sudo modprobe ufs

#sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdc4 /mnt/sdc4

#/home/ziomario# cd /mnt/sdc4

#/mnt/sdc4# ls

ls: reading directory '.': Input/output error

PS : the freebsd partition is working great,there aren't problems connected to bad sectors,I have checked and rececked under Freebsd in single user mode. that's odd that ubuntu detects a disk of 24.4M when it is 300GB large

dumetrulo avatar
in flag
Look at the starting sector: it's 0; this means that the MBR is fake, and the BSD disklabel occupies the entire disk. Let me check what can be done to mount such media in Linux.
dumetrulo avatar
in flag
Since the MBR on the disk is only protective, try backing it up (`dd if=/dev/sdc of=/path/to/sdc.mbr bs=512 count=1`), zeroing it out (`dd if=/dev/zero of=/dev/sdc bs=512 count=1`), and mounting again. You can later cooy the MBR back by swapping if and of parameters of the dd command. If this is not an option for you, or it fails, try guestfish (https://libguestfs.org/guestfish.1.html).
dumetrulo avatar
in flag
Could you edit your post and provide the output of `fdisk -l -t bsd /dev/sdc`?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.