public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Grub hangs when a USB disk is attached
@ 2008-02-28 15:00 andrea
  2008-02-28 16:48 ` Andrea Momesso
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: andrea @ 2008-02-28 15:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

I had no problem booting since last time I partitoned my USB external
disk.

==========================================
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        2433    19543041   83  Linux
/dev/sdc2            2434        4866    19543072+  83  Linux
/dev/sdc3            4867        7299    19543072+  83  Linux
/dev/sdc4            7300        9729    19518975   83  Linux
===========================================

When I boot and the disk is plugged, right after BIOS screen I get a
"GRUB_" and the boot process hangs.

I guessed it was a BIOS problem so I tried to edit boot order and also
to disable USB boot (that I don't need).

BTW when the disk is unplugged grub loads perfectly.

Thanks in advance.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 15:00 [gentoo-user] Grub hangs when a USB disk is attached andrea
@ 2008-02-28 16:48 ` Andrea Momesso
  2008-02-28 17:54 ` Don Jerman
  2008-02-28 17:54 ` Don Jerman
  2 siblings, 0 replies; 10+ messages in thread
From: Andrea Momesso @ 2008-02-28 16:48 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 953 bytes --]

I had no problem booting since last time I partitoned my USB external
disk.

==========================================
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

  Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        2433    19543041   83  Linux
/dev/sdc2            2434        4866    19543072+  83  Linux
/dev/sdc3            4867        7299    19543072+  83  Linux
/dev/sdc4            7300        9729    19518975   83  Linux
===========================================

When I boot and the disk is plugged, right after BIOS screen I get a
"GRUB_" and the boot process hangs.

I guessed it was a BIOS problem so I tried to edit boot order and also
to disable USB boot (that I don't need).

BTW when the disk is unplugged grub loads perfectly.

Thanks in advance.



-- 
Momesso Andrea

[-- Attachment #1.2: Type: text/html, Size: 1473 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: text/plain, Size: 189 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQBHxsyXTusdC+HYtiIRAgM/AKC/hksdT1s0FVrrQP8erkKvS3WvwACgw+jV
BqnY2+QyuVUfHM55I5iuvIk=
=Owxp
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 15:00 [gentoo-user] Grub hangs when a USB disk is attached andrea
  2008-02-28 16:48 ` Andrea Momesso
@ 2008-02-28 17:54 ` Don Jerman
  2008-02-28 18:12   ` andrea
  2008-02-28 17:54 ` Don Jerman
  2 siblings, 1 reply; 10+ messages in thread
From: Don Jerman @ 2008-02-28 17:54 UTC (permalink / raw
  To: gentoo-user

I've had problems with disk presentation order changing (fairly
randomly) when USB disks are attached during boot.  Apparently there's
a race between the SCSI controller and the USB controller(s).  If you
attach the USB disk later the SCSI stuff has all been discovered so of
course it gets allocated later in the list, but if it's attached while
booting the USB disk might come first or in the middle somewhere.

This might lead to grub looking for its files in the wrong place,
which might explain the hang.

If you want to test this theory, boot from a CD while the USB is
installed and see where it winds up in /dev, then boot without it.  Be
very careful about assuming drive identities!  That's how I lost my
system disk last time -- /dev/sdb seemed to be partitioned funny and I
figured it out just a little too late.


On 2/28/08, andrea <momesso.andrea@gmail.com> wrote:
> I had no problem booting since last time I partitoned my USB external
> disk.
>
> ==========================================
> Disk /dev/sdc: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x00000000
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1               1        2433    19543041   83  Linux
> /dev/sdc2            2434        4866    19543072+  83  Linux
> /dev/sdc3            4867        7299    19543072+  83  Linux
> /dev/sdc4            7300        9729    19518975   83  Linux
> ===========================================
>
> When I boot and the disk is plugged, right after BIOS screen I get a
> "GRUB_" and the boot process hangs.
>
> I guessed it was a BIOS problem so I tried to edit boot order and also
> to disable USB boot (that I don't need).
>
> BTW when the disk is unplugged grub loads perfectly.
>
> Thanks in advance.
>
>
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 15:00 [gentoo-user] Grub hangs when a USB disk is attached andrea
  2008-02-28 16:48 ` Andrea Momesso
  2008-02-28 17:54 ` Don Jerman
@ 2008-02-28 17:54 ` Don Jerman
  2 siblings, 0 replies; 10+ messages in thread
From: Don Jerman @ 2008-02-28 17:54 UTC (permalink / raw
  To: gentoo-user

I've had problems with disk presentation order changing (fairly
randomly) when USB disks are attached during boot.  Apparently there's
a race between the SCSI controller and the USB controller(s).  If you
attach the USB disk later the SCSI stuff has all been discovered so of
course it gets allocated later in the list, but if it's attached while
booting the USB disk might come first or in the middle somewhere.

This might lead to grub looking for its files in the wrong place,
which might explain the hang.

If you want to test this theory, boot from a CD while the USB is
installed and see where it winds up in /dev, then boot without it.  Be
very careful about assuming drive identities!  That's how I lost my
system disk last time -- /dev/sdb seemed to be partitioned funny and I
figured it out just a little too late.


On 2/28/08, andrea <momesso.andrea@gmail.com> wrote:
> I had no problem booting since last time I partitoned my USB external
> disk.
>
> ==========================================
> Disk /dev/sdc: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x00000000
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1               1        2433    19543041   83  Linux
> /dev/sdc2            2434        4866    19543072+  83  Linux
> /dev/sdc3            4867        7299    19543072+  83  Linux
> /dev/sdc4            7300        9729    19518975   83  Linux
> ===========================================
>
> When I boot and the disk is plugged, right after BIOS screen I get a
> "GRUB_" and the boot process hangs.
>
> I guessed it was a BIOS problem so I tried to edit boot order and also
> to disable USB boot (that I don't need).
>
> BTW when the disk is unplugged grub loads perfectly.
>
> Thanks in advance.
>
>
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 17:54 ` Don Jerman
@ 2008-02-28 18:12   ` andrea
  2008-02-28 18:23     ` KH
  0 siblings, 1 reply; 10+ messages in thread
From: andrea @ 2008-02-28 18:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]


On gio, 2008-02-28 at 12:54 -0500, Don Jerman wrote:
> I've had problems with disk presentation order changing (fairly
> randomly) when USB disks are attached during boot.  Apparently there's
> a race between the SCSI controller and the USB controller(s).  If you
> attach the USB disk later the SCSI stuff has all been discovered so of
> course it gets allocated later in the list, but if it's attached while
> booting the USB disk might come first or in the middle somewhere.
> 
> This might lead to grub looking for its files in the wrong place,
> which might explain the hang.

This is exactly what happens here.

> 
> If you want to test this theory, boot from a CD while the USB is
> installed and see where it winds up in /dev, then boot without it.  Be
> very careful about assuming drive  identities!  That's how I lost my
> system disk last time -- /dev/sdb seemed to be partitioned funny and I
> figured it out just a little too late.
> 

I booted in a livecd and opened a grub command line. It reads my usb
disk as (hd0,0).

By the way I don't like this behavior and I need a solution to fix it.
It is a laptop and I don't want to umount and unplug my usb disk every
time I need to hibernate my system.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 18:12   ` andrea
@ 2008-02-28 18:23     ` KH
  2008-02-28 18:31       ` andrea
  0 siblings, 1 reply; 10+ messages in thread
From: KH @ 2008-02-28 18:23 UTC (permalink / raw
  To: gentoo-user

Hi,

never tried that and might only be a temporary workaround. You could 
install grub in the mbr of both disk and then point them only to your 
internal disk. That way you should always be able to boot, shouldn't you?

kh

andrea wrote:
> On gio, 2008-02-28 at 12:54 -0500, Don Jerman wrote:
>   
>> I've had problems with disk presentation order changing (fairly
>> randomly) when USB disks are attached during boot.  Apparently there's
>> a race between the SCSI controller and the USB controller(s).  If you
>> attach the USB disk later the SCSI stuff has all been discovered so of
>> course it gets allocated later in the list, but if it's attached while
>> booting the USB disk might come first or in the middle somewhere.
>>
>> This might lead to grub looking for its files in the wrong place,
>> which might explain the hang.
>>     
>
> This is exactly what happens here.
>
>   
>> If you want to test this theory, boot from a CD while the USB is
>> installed and see where it winds up in /dev, then boot without it.  Be
>> very careful about assuming drive  identities!  That's how I lost my
>> system disk last time -- /dev/sdb seemed to be partitioned funny and I
>> figured it out just a little too late.
>>
>>     
>
> I booted in a livecd and opened a grub command line. It reads my usb
> disk as (hd0,0).
>
> By the way I don't like this behavior and I need a solution to fix it.
> It is a laptop and I don't want to umount and unplug my usb disk every
> time I need to hibernate my system.
>
>
>   

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 18:23     ` KH
@ 2008-02-28 18:31       ` andrea
  2008-02-29 18:00         ` Don Jerman
  0 siblings, 1 reply; 10+ messages in thread
From: andrea @ 2008-02-28 18:31 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]


On gio, 2008-02-28 at 19:23 +0100, KH wrote:
> Hi,
> 
> never tried that and might only be a temporary workaround. You could 
> install grub in the mbr of both disk and then point them only to your 
> internal disk. That way you should always be able to boot, shouldn't you?
> 
> kh

┌─(ROOT@fandango:pts/4)────────────────────────────────────────────(~)─┐
└─(19:29:#)── grub-install /dev/sdd                      ──(gio,feb28)─┘
/dev/sdd does not have any corresponding BIOS drive.

mmmh... what does it mean?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-28 18:31       ` andrea
@ 2008-02-29 18:00         ` Don Jerman
  2008-02-29 18:54           ` andrea
  0 siblings, 1 reply; 10+ messages in thread
From: Don Jerman @ 2008-02-29 18:00 UTC (permalink / raw
  To: gentoo-user

On 2/28/08, andrea <momesso.andrea@gmail.com> wrote:
>
> On gio, 2008-02-28 at 19:23 +0100, KH wrote:
> > Hi,
> >
> > never tried that and might only be a temporary workaround. You could
> > install grub in the mbr of both disk and then point them only to your
> > internal disk. That way you should always be able to boot, shouldn't you?
> >
> /dev/sdd does not have any corresponding BIOS drive.
>
> mmmh... what does it mean?
>
>
When the usb disk is attached after boot the BIOS doesn't give it a HD
number in the series 0x80,0x81, etc, where 0x80 = (hd0) in grub or
/dev/sda.  The OS handles all the controller events and connects the
USB device up through udev.

When it is attached at boot-time it does get one(!) because the BIOS
sees it before the OS has hooked in.

To accomplish this you probably need to boot from the CD while the USB
is attached.  To me it seems risky, but possible.  I wonder what will
happen when you disconnect the USB drive after booting is complete?
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-29 18:00         ` Don Jerman
@ 2008-02-29 18:54           ` andrea
  2008-03-01  0:41             ` Don Jerman
  0 siblings, 1 reply; 10+ messages in thread
From: andrea @ 2008-02-29 18:54 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]


On ven, 2008-02-29 at 13:00 -0500, Don Jerman wrote:

> When the usb disk is attached after boot the BIOS doesn't give it a HD
> number in the series 0x80,0x81, etc, where 0x80 = (hd0) in grub or
> /dev/sda.  The OS handles all the controller events and connects the
> USB device up through udev.
> 
> When it is attached at boot-time it does get one(!) because the BIOS
> sees it before the OS has hooked in.
> 
> To accomplish this you probably need to boot from the CD while the USB
> is attached.  To me it seems risky, but possible.  I wonder what will
> happen when you disconnect the USB drive after booting is complete?

No way. Even if booting from a livecd (and the usb disk is seen as
(hd0,0) grub unstall still complain about missing BIOS driver.
 
I also tried from the grub shell:
grub> root (hd0,0)
grub> setup (hd0)
but at this point the program exits whit a segmentation fault message.




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Grub hangs when a USB disk is attached
  2008-02-29 18:54           ` andrea
@ 2008-03-01  0:41             ` Don Jerman
  0 siblings, 0 replies; 10+ messages in thread
From: Don Jerman @ 2008-03-01  0:41 UTC (permalink / raw
  To: gentoo-user

On 2/29/08, andrea <momesso.andrea@gmail.com> wrote:
>
> On ven, 2008-02-29 at 13:00 -0500, Don Jerman wrote:
>
> > When the usb disk is attached after boot the BIOS doesn't give it a HD
> > number in the series 0x80,0x81, etc, where 0x80 = (hd0) in grub or
> > /dev/sda.  The OS handles all the controller events and connects the
> > USB device up through udev.
> >
> > When it is attached at boot-time it does get one(!) because the BIOS
> > sees it before the OS has hooked in.
> >
> > To accomplish this you probably need to boot from the CD while the USB
> > is attached.  To me it seems risky, but possible.  I wonder what will
> > happen when you disconnect the USB drive after booting is complete?
>
> No way. Even if booting from a livecd (and the usb disk is seen as
> (hd0,0) grub unstall still complain about missing BIOS driver.
>
> I also tried from the grub shell:
> grub> root (hd0,0)
> grub> setup (hd0)
> but at this point the program exits whit a segmentation fault message.
>
Well that's what I get for answering off-the-cuff :)  Let us know if
you get a solution, I need it too!
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-03-01  0:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 15:00 [gentoo-user] Grub hangs when a USB disk is attached andrea
2008-02-28 16:48 ` Andrea Momesso
2008-02-28 17:54 ` Don Jerman
2008-02-28 18:12   ` andrea
2008-02-28 18:23     ` KH
2008-02-28 18:31       ` andrea
2008-02-29 18:00         ` Don Jerman
2008-02-29 18:54           ` andrea
2008-03-01  0:41             ` Don Jerman
2008-02-28 17:54 ` Don Jerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox