Subject: Re: initialization order & permanently mounting USB drives?
To: James Hartley <jjhartley@gmail.com>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-users
Date: 09/10/2007 07:31:39
On 9/10/07, James Hartley <jjhartley@gmail.com> wrote:
> Although I suspect the answer is to add mount(8) commands to
> /etc/rc.local, I'll ask anyways...
>
> I'd like to mount multiple partitions on a USB drive at system
> startup. If I add the appropriate entries to /etc/fstab, the order of
> initialization appears to check /etc/fstab before the USB drive is
> detected. Below is the contents of /etc/fstab:
>
> # NetBSD /etc/fstab
> # See /usr/share/examples/fstab/ for more examples.
> /dev/sd0a / ffs rw 1 1
> /dev/sd0b none swap sw 0 0
> /dev/sd0e /usr ffs rw 1 2
> /dev/sd0f /var ffs rw 1 2
> /dev/sd0g /home ffs rw 1 2
> /dev/sd0b /tmp mfs rw,-s=263070
> kernfs /kern kernfs rw
> procfs /proc procfs rw,noauto
> /dev/sd1k /mnt ffs rw 1 2
>
> ...where the desired USB drive partition is /dev/sd1k. Yet at boot, I
> see the following at the end of the displayed dmesg:
>
> Starting file system checks:
> /dev/rsd0a: file system is clean; not checking
> Can't open /dev/sd1k: Device not configured
> CAN'T CHECK FILESYSTEM.
> /dev/rsd1k: UNEXPECTED INCONSISTENCY; RUN fsck_ffs MANUALLY.
> /dev/rsd0e: file system is clean; not checking
> /dev/rsd0f: file system is clean; not checking
> /dev/rsd0g: file system is clean; not checking
> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY: ffs:
> /dev/rsd1k (/mnt)
> Automatic file system check failed; help!
> Sep 9 23:12:01 init: '/bin/sh' on '/etc/rc' terminated abnormally,
> going to single user mode
> Enter pathname of shell or RETURN for /bin/sh: umass0 at uhub4 port 3
> configuration 1 interface 0
> umass0: Genesys Logic USB TO IDE, rev 2.00/0.33, addr 3
> umass0: using SCSI over Bulk-Only
> scsibus1 at umass0: 2 targets, 1 lun per target
> sd1 at scsibus1 target 0 lun 0: <ST980821, 0A, 0811> disk fixed
> sd1: fabricating a geometry
> sd1: 76319 MB, 76219 cyl, 64 head, 32 sec, 512 bytes/sect x 156301488 sectors
> #
>
> Should I simply add the appropriate mount(8) commands to
> /etc/rc.local, is there some place better, or is something else going
> on?
>
> Thanks for any candor which can be shared.
Does "device not configured" mean it wasn't detected or there isn't a
/dev/{r}sd0k device file for it, or something?
Is there some other USB device which is also "in the process" of being
detected or whatever this problem is?
This is weird. I've never used USB devices through reboots and
expected them to be available at the same mount point every time, but
I have been considering trying this as they get cheaper and cheaper.
Andy