Date: Fri, 18 Apr 2014 23:06:48 +0000 (UTC) From: Walter Hurry <walterhurry@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Bad file descriptor Message-ID: <lisb68$t7r$1@ger.gmane.org> References: <lirg9p$khs$1@ger.gmane.org> <lis81l$gro$1@ger.gmane.org> < 20140419003106.41d39858.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lisb68$t7r$1>