Bad file descriptor

Walter Hurry walterhurry at
Fri Apr 18 23:07:02 UTC 2014

On Sat, 19 Apr 2014 00:31:06 +0200, Polytropon wrote:

> On Fri, 18 Apr 2014 22:13:10 +0000 (UTC), Walter Hurry wrote:
>> Booted from a USB stick. I was disconcerted for a minute or two when
>> fsck said it couldn't recognise the filesystem, but after I inserted
>> '-t ufs' into the fsck command*, all was well.
> This is intended. The fsck program determines the file system type which
> should be apllied by examining /etc/fstab, which obviously does not
> match your hard disk partitions when you boot from a USB stick. In
> /etc/fstab, the connection of device, mount directory, and file system
> (as well as mount and dump options) is made.
>> (Reminder to self: Keep a bootable USB stick handy.)
>> * fsck -fy -t ufs /dev/ada0s2 (or whatever / is)
> Correct. Just remember to be _sure_ you know what you're doing when
> using the -y option. In a ultra-worst case, this can damage your chances
> in a data recovery setting. See "man fsck" for details.
> Also note that in your case, / is probably ada0s2a (MBR partitioning
> type concluded), because 'a' usually denotes a bootable partition, and
> ada0s2 would be the same as ada0s2c where 'c' means "the whole
> partition"
> (or even "the whole disk" in case slices are omitted).
> So you will surely run this command:
> 	# fsck -yf -t ufs /dev/ada2s1a
> Partition letters 'd' to 'h' may denote further partitions inside the
> slice. It won't hurt to also check them.

Noted. Yes, it's MBR partitioning as I dual boot with Linux.

Thanks again.

More information about the freebsd-questions mailing list