new usb stack - boot problem from usb hdd

View: New views
8 Messages — Rating Filter:   Alert me  

new usb stack - boot problem from usb hdd

by Alex Keda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After boot, before mount, disk da0 lost, or some partition
lost/uninitialised

mobile-hdd$ uname -a
FreeBSD mobile-hdd 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Apr 13
22:55:22 MSD 2009    
lissyara@...:/usr/obj/i386/usr/src/sys/GENERIC  i386

dmesg part:
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcc7ff,0xcc800-0xcd7ff pnpid
ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 2261008423 Hz quality 800
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 480Mbps High Speed USB v2.0
WARNING: WITNESS option enabled, expect reduced performance.
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel> at usbus3
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen4.1: <Intel> at usbus4
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
Root mount waiting for: usbus4
Root mount waiting for: usbus4
Root mount waiting for: usbus4
uhub4: 8 ports with 8 removable, self powered
Root mount waiting for: usbus4
usb2_set_config_index:490: could not read device status: USB_ERR_SHORT_XFER
ugen4.2: <JMicron> at usbus4
umass0: <MSC Bulk-Only Transfer> on usbus4
umass0:  SCSI over Bulk-Only; quirks = 0x0000
Root mount waiting for: usbus4
umass0:0:0:-1: Attached to scbus0
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Hitachi HTS541680J9SA00 > Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C)
Trying to mount root from ufs:/dev/da0s1a

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:fd0
Trying to mount root from ufs:fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0 fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:fd0
Trying to mount root from ufs:fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0 fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:da0s1a
Trying to mount root from ufs:da0s1a

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0 fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:da0
Trying to mount root from ufs:da0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0s1 da0 fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:da0
Trying to mount root from ufs:da0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0s2 da0s1 da0 fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:da0
Trying to mount root from ufs:da0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  da0s1a da0s2 da0s1 da0 fd0

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:da0d\^H \^Hs1a
Trying to mount root from ufs:da0s1a
GEOM_LABEL: Label for provider da0s1a is ufsid/49e5c6c95ad61dbf.
GEOM_LABEL: Label ufsid/49e5c6c95ad61dbf removed.
GEOM_LABEL: Label for provider da0s1a is ufsid/49e5c6c95ad61dbf.
GEOM_LABEL: Label ufsid/49e5c6c95ad61dbf removed.
WARNING: TMPFS is considered to be a highly experimental feature in FreeBSD.
cryptosoft0: <software crypto> on motherboard

_______________________________________________
freebsd-current@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@..."

Re: new usb stack - boot problem from usb hdd

by Greg Lehey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday, 17 April 2009 at 18:44:27 +0400, Alex Keda wrote:

> After boot, before mount, disk da0 lost, or some partition
> lost/uninitialised
>
> ...
> umass0:0:0:-1: Attached to scbus0
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <Hitachi HTS541680J9SA00 > Fixed Direct Access SCSI-2 device
> da0: 40.000MB/s transfers
> da0: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C)
> Trying to mount root from ufs:/dev/da0s1a
>
> Manual root filesystem specification:
>  <fstype>:<device>  Mount <device> using filesystem <fstype>
>                       eg. ufs:da0s1a
>  ?                  List valid disk boot devices
>  <empty line>       Abort manual input
FWIW, I'm experiencing a similar problem with a USB stick.  I get an
error 2 on the device entry (also /dev/da0s1a), followed by a panic
with an incomplete stack backtrace.  I'm going to try remote debugging
to get more information; watch this space.

Greg
--
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft MUA reports
problems, please read http://tinyurl.com/broken-mua


attachment0 (202 bytes) Download Attachment

Re: new usb stack - boot problem from usb hdd

by Scott Long-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg 'groggy' Lehey wrote:

> On Friday, 17 April 2009 at 18:44:27 +0400, Alex Keda wrote:
>> After boot, before mount, disk da0 lost, or some partition
>> lost/uninitialised
>>
>> ...
>> umass0:0:0:-1: Attached to scbus0
>> da0 at umass-sim0 bus 0 target 0 lun 0
>> da0: <Hitachi HTS541680J9SA00 > Fixed Direct Access SCSI-2 device
>> da0: 40.000MB/s transfers
>> da0: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C)
>> Trying to mount root from ufs:/dev/da0s1a
>>
>> Manual root filesystem specification:
>>  <fstype>:<device>  Mount <device> using filesystem <fstype>
>>                       eg. ufs:da0s1a
>>  ?                  List valid disk boot devices
>>  <empty line>       Abort manual input
>
> FWIW, I'm experiencing a similar problem with a USB stick.  I get an
> error 2 on the device entry (also /dev/da0s1a), followed by a panic
> with an incomplete stack backtrace.  I'm going to try remote debugging
> to get more information; watch this space.
>

Have you followed the rest of this thread at all and seen the candidate
patch and subsequent verification??

Scott
_______________________________________________
freebsd-current@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@..."

Re: new usb stack - boot problem from usb hdd

by Marcus Reid :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Apr 18, 2009 at 07:31:25AM +1000, Greg 'groggy' Lehey wrote:

> On Friday, 17 April 2009 at 18:44:27 +0400, Alex Keda wrote:
> > After boot, before mount, disk da0 lost, or some partition
> > lost/uninitialised
> >
> > ...
> > umass0:0:0:-1: Attached to scbus0
> > da0 at umass-sim0 bus 0 target 0 lun 0
> > da0: <Hitachi HTS541680J9SA00 > Fixed Direct Access SCSI-2 device
> > da0: 40.000MB/s transfers
> > da0: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C)
> > Trying to mount root from ufs:/dev/da0s1a
> >
> > Manual root filesystem specification:
> >  <fstype>:<device>  Mount <device> using filesystem <fstype>
> >                       eg. ufs:da0s1a
> >  ?                  List valid disk boot devices
> >  <empty line>       Abort manual input
>
> FWIW, I'm experiencing a similar problem with a USB stick.  I get an
> error 2 on the device entry (also /dev/da0s1a), followed by a panic
> with an incomplete stack backtrace.  I'm going to try remote debugging
> to get more information; watch this space.

There's a thread from a few days ago regarding this with a subject of
"Booting from usb hard disk".  There is a patch that allows me to boot,
but there are still problems (I have to select usb:da0s1a at the manual
root filesystem prompt still.)

  http://people.freebsd.org/~thompsa/root_wait.diff

This was committed but then backed out as a less-than-perfect solution.
Someone said that setting kern.cam.scsi_delay=10000 in loader.conf (or
with option 6 at the boot prompt) helped them, but that was not the
case for me.

Marcus
_______________________________________________
freebsd-current@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@..."

Re: new usb stack - boot problem from usb hdd

by Greg Lehey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday, 17 April 2009 at 16:23:25 -0600, Scott Long wrote:

> Greg 'groggy' Lehey wrote:
>> On Friday, 17 April 2009 at 18:44:27 +0400, Alex Keda wrote:
>>> After boot, before mount, disk da0 lost, or some partition
>>> lost/uninitialised
>>
>> FWIW, I'm experiencing a similar problem with a USB stick.  I get an
>> error 2 on the device entry (also /dev/da0s1a), followed by a panic
>> with an incomplete stack backtrace.  I'm going to try remote debugging
>> to get more information; watch this space.
>
> Have you followed the rest of this thread at all and seen the candidate
> patch and subsequent verification??
Yes and no.  I was replying to the original message, and this thread
contains neither a candidate patch nor any verification.  As of now,
the thread has the original message, my reply, and yours and Marcus'
replies to me--see
http://lists.freebsd.org/pipermail/freebsd-current/2009-April/006042.html

I suspect you're thinking of the thread that Marcus referred to, which
I hadn't seen.

Greg
--
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft MUA reports
problems, please read http://tinyurl.com/broken-mua


attachment0 (202 bytes) Download Attachment

Re: new usb stack - boot problem from usb hdd

by Vinicius Abrahao :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Guys,

0) First sorry for this annoying and long email...

I'm probably having the same problem here:
1)  FreeBSD 8.0-CURRENT #6: Tue Jun 23 02:37:12 BRT 2009
2) When I boot from my external usb hard disk[1] :p
I had this problem with boot[2]:

"Trying to mount root from ufs:/dev/da0s1a
ROOT MOUNT ERROR: "
3) If I, at the "mountroot>" prompt,  try to mount the root filesystem with
mountroot> ufs:da0
The error occurs  again, but I don't know why, doing this It's make possible now
trying boot from da0s1a

4) mountroot> ufs:da0s1a
Now the system boot normally!

5) It's my first time for these "boot from usb" occasions, so I'm
thinking that I made
something wrong at the installation of disk.  Anyway here is my lsusb
-v result[3].

6) umass is on KERNELFILE, I put these lines at /boot/loader.conf:
umass_load="YES"
kern.cam.scsi_delay=1000
but this not affect the problem.

7) Marcus, this patch is off (404)
http://people.freebsd.org/~thompsa/root_wait.diff

8) fdisk and bsdlabel results:
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 62910477 (30718 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 62910540, size 93385845 (45598 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

# /dev/da0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 62910461       79    4.2BSD        0     0     0
  c: 62910477       63    unused        0     0         # "raw" part, don't edit
partition a: partition extends past end of unit
partition c: partition extends past end of unit
bsdlabel: partition c doesn't start at 0!
bsdlabel: An incorrect partition c may cause problems for standard
system utilities


[1]: http://www.triarius.com.br/vinicius/bsd/hd_note_usb.jpg
[2]: http://www.triarius.com.br/vinicius/bsd/dmesg.txt
[3]: http://www.triarius.com.br/vinicius/bsd/lsusb.txt


9) What I'm doing wrong?

Thanks for your attention,
Best regards,
Vinicius
_______________________________________________
freebsd-current@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@..."

Re: new usb stack - boot problem from usb hdd

by Hans Petter Selasky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 27 June 2009 06:32:54 Vinicius Abrahao wrote:
> 9) What I'm doing wrong?

I don't think this is your fault. My initial patch for this problem had a loop
in the mount root code, trying to mount the root device several times. Now
several other people did not agree about that, and made the USB enumeration
synchronous instead. That does not always work, because USB devices do not
always show up immediately when the power is turned on. I would strongly
suggest to add a flag to the mount root code in sys/kern/, allowing the mount
root code to automatically retry the medium. It is also important that the
mountroot code calls pause() and do not spin in a while loop.

--HPS
_______________________________________________
freebsd-current@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@..."

Re: new usb stack - boot problem from usb hdd

by Vinicius Abrahao :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jun 27, 2009 at 5:11 AM, Hans Petter Selasky<hselasky@...> wrote:

> On Saturday 27 June 2009 06:32:54 Vinicius Abrahao wrote:
>> 9) What I'm doing wrong?
>
> I don't think this is your fault. My initial patch for this problem had a loop
> in the mount root code, trying to mount the root device several times. Now
> several other people did not agree about that, and made the USB enumeration
> synchronous instead. That does not always work, because USB devices do not
> always show up immediately when the power is turned on. I would strongly
> suggest to add a flag to the mount root code in sys/kern/, allowing the mount
> root code to automatically retry the medium. It is also important that the
> mountroot code calls pause() and do not spin in a while loop.
>
> --HPS
>

Hi Hans,

Thanks for your reply.
I had lucky here, changing the external disk to other usb port, but
lsusb shows me
that only change is the mouse (I change the mouse port with the external hd),
by the way this usb-ide adapter has power supply by usb too.

> Bus /dev/usb Device /dev/ugen3.2: ID 0461:4d15 Primax Electronics, Ltd (mouse on new usb port, boot is working)
< Bus /dev/usb Device /dev/ugen2.2: ID 0461:4d15 Primax Electronics,
Ltd (mouse on old usb port, boot not working)

Strange that usb-ide adapter get the same ugen ports... but is working now!
If you need someone to test any modifications I have some time here.

Thanks a lot,
Vinnix / Vinicius
_______________________________________________
freebsd-current@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@..."