Re: Timeout broken with serial port

2011-09-06 Thread Michal Suchanek
On 5 September 2011 22:51, Aleš Nesrsta star...@volny.cz wrote:
 Hi,

 I think it is not GRUB related problem, more probably there is some HW
 problem on Your serial port. Try to check idle voltage on RxD pin of
 serial port (best with oscilloscope... :-) ). Or You can have some
 unwanted leakage between pins of connector or wires in cable (check
 resistance between wires of cable) etc.

 Normal serial port should NEVER do anything if there is nothing
 connected to it. According to RS232 (V24) specification there should be
 voltage in range from -12V to -3V on RxD pin in idle state (in simplest
 case there is some internal pull-up resistor connected from RxD to -Vcc
 directly inside UART or something else...).
 In this normal case nothing is received by serial port and nothing will
 be interpreted as keypress in GRUB, i.e. GRUB will boot normally.

 In Your case, probably something causes some noise on RxD pin or there
 is bad voltage level on RxD pin (e.g. = +3V or near to 0V etc.) when
 nothing is connected - so serial port interprets it as receiving some
 character(s).
 When You connect Your serial port to another device (notebook in Your
 case), RxD is set to correct idle voltage from connected idle TxD, so
 the problem is corrected.

 From my long praxis with serial ports on different PCs and another
 (non-PC) devices, manufacturers very very often don't respect RS232
 (V24) specification (mainly for RxD/TxD signals voltage levels). It
 often caused bad situations, some of them were in fact the same as Your
 case.

 Using of DTR line is fine but if You have some HW problem on RxD line,
 there could be the same problem also on DTR (RTS, CTS ...) line and
 final effect will be the same...
 Additionally, lot of devices are working without using any additional
 link/modem state signals (i.e., only signals RxD, TxD and GND are used),
 it is simplest and almost working solution (and working well - of course
 it depends of kind of communication and it also expects that RS232
 specification is not violated and all HW is in order...).


FWIW I am using

   description: Motherboard
   product: DQ45CB
   vendor: Intel Corporation
   physical id: 0
   version: AAE30148-302

Since the BIOS does not support serial boot it is not tested for this
I guess. I don't have an oscilloscope so I can't tell what is going on
on the wires.

Is there some alternative to using the onboard port? Does Grub support
some serial addon cards?

Also since this seems to be a common problem with PC hardware perhaps
a warning in the manual and the configuration file should be added.

Thanks

Michal

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Bug#632048: segfault in grub-setup

2011-09-06 Thread Colin Watson
On Tue, Sep 06, 2011 at 08:39:24AM +0100, Stephane Chazelas wrote:
 I do get a segfault as well when doing a grub-setup/grub-install
 on a mdraid with 1.2 metadata.
 
 The segv is in:
 
 grub_util_biosdisk_is_floppy() because the disk-id for the root
 device is not a bios disk id, but a big number that is the
 array id. The patch below seems to fix it for me, though I
 can't tell it's the right fix or not (probably not).

This fix makes sense to me; calling grub_util_biosdisk_is_floppy on
disks that aren't GRUB_DISK_DEVICE_BIOSDISK_ID doesn't make sense.
grub-devel, second opinion?

 --- a/util/grub-setup.c   2011-09-05 12:11:31.864955442 +0100
 +++ b/util/grub-setup.c   2011-09-05 13:00:24.891368760 +0100
 @@ -315,7 +315,7 @@
  /* If DEST_DRIVE is a hard disk, enable the workaround, which is
 for buggy BIOSes which don't pass boot drive correctly. Instead,
 they pass 0x00 or 0x01 even when booted from 0x80.  */
 -if (!allow_floppy  !grub_util_biosdisk_is_floppy (dest_dev-disk))
 +if (!allow_floppy  dest_dev-disk-dev-id == 
 GRUB_DISK_DEVICE_BIOSDISK_ID  !grub_util_biosdisk_is_floppy 
 (dest_dev-disk))
/* Replace the jmp (2 bytes) with double nop's.  */
*boot_drive_check = 0x9090;
}

Thanks,

-- 
Colin Watson   [cjwat...@ubuntu.com]

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


How to call isolinux.bin from grub2 ?

2011-09-06 Thread J. Bakshi

Hello list,

How can I call isolinux.bin from grub2 ?

TIA

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


no -o option for grub-mkrescue although grub manual 1.99 says there is

2011-09-06 Thread Drake Donahue



___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: no -o option for grub-mkrescue although grub manual 1.99 says there is

2011-09-06 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 06.09.2011 21:44, Drake Donahue
wrote:phcoder@debian.x201.phnet:~/compile$ grub-mkrescue -o
grub.isoEnabling BIOS support ...
Enabling x86_64-efi support ...
GNU xorriso 0.5.5 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:grub.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 3902m free
Added to ISO image: directory '/'='/tmp/tmp.dj0bpBDi4Q'
xorriso : UPDATE : 420 files added in 1 seconds
xorriso : UPDATE : 420 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 29221 bytes from file
'/tmp/tmp.IbskYK40ea'
ISO image produced: 4114 sectors
Written to media  : 4288 sectors at LBA 32
Writing to 'stdio:grub.iso' completed sucessfully.

phcoder@debian.x201.phnet:~/compile$ kvm -cdrom grub.iso


 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/grub-devel



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Timeout broken with serial port

2011-09-06 Thread starous
Michal Suchanek wrote:
 On 5 September 2011 22:51, Aleš Nesrsta
 star...@volny.cz wrote:
  Hi,
 
  I think it is not GRUB related problem, more
  probably there is some HW
   problem on Your serial port. Try to check idle
  voltage on RxD pin of
   serial port (best with oscilloscope... :-) ). Or
  You can have some
   unwanted leakage between pins of connector or
  wires in cable (check
   resistance between wires of cable) etc.
 
  Normal serial port should NEVER do anything if
  there is nothing
   connected to it. According to RS232 (V24)
  specification there should be
   voltage in range from -12V to -3V on RxD pin in
  idle state (in simplest
   case there is some internal pull-up resistor
  connected from RxD to -Vcc
   directly inside UART or something else...).
  In this normal case nothing is received by
  serial port and nothing will
   be interpreted as keypress in GRUB, i.e. GRUB
  will boot normally.
  
  In Your case, probably something causes some
  noise on RxD pin or there
   is bad voltage level on RxD pin (e.g. = +3V or
  near to 0V etc.) when
   nothing is connected - so serial port interprets
  it as receiving some
   character(s).
  When You connect Your serial port to another
  device (notebook in Your
   case), RxD is set to correct idle voltage from
  connected idle TxD, so
   the problem is corrected.
 
  From my long praxis with serial ports on
  different PCs and another
   (non-PC) devices, manufacturers very very often
  don't respect RS232
   (V24) specification (mainly for RxD/TxD signals
  voltage levels). It
   often caused bad situations, some of them were
  in fact the same as Your
   case.
 
  Using of DTR line is fine but if You have some
  HW problem on RxD line,
   there could be the same problem also on DTR
  (RTS, CTS ...) line and
   final effect will be the same...
  Additionally, lot of devices are working without
  using any additional
   link/modem state signals (i.e., only signals
  RxD, TxD and GND are used),
   it is simplest and almost working solution (and
  working well - of course
   it depends of kind of communication and it also
  expects that RS232
   specification is not violated and all HW is in
  order...).
  
 
 FWIW I am using
 
 description: Motherboard
 product: DQ45CB
 vendor: Intel Corporation
 physical id: 0
 version: AAE30148-302
 
 Since the BIOS does not support serial boot it is
 not tested for this
 I guess. I don't have an oscilloscope so I can't
 tell what is going on
 on the wires.

If You can, try at least simply measure voltage between pins 2 (RxD)
and 5 (GND) - if You have commonly used 9 pins connector on PC.
Common (minus - often black color) measuring wire should be
connected to pin 5 (GND). If You will measure voltage  outside the
range approx. -12..-3V then most probably there is something wrong
with Your serial port - from HW point of view.

There is also question (but maybe I don't understand Your original
post) - why do You use serial module in GRUB when You don't need
serial port ?
I think, if serial module will not be loaded in GRUB, You should
don't care about serial port even if it is broken or buggy...

 
 Is there some alternative to using the onboard
 port? Does Grub support
 some serial addon cards?

AFAIK, GRUB supports at least USB serial port converter.
Or probably any addon card which looks from HW side as standard COM
port...

 
 Also since this seems to be a common problem with
 PC hardware perhaps
 a warning in the manual and the configuration file
 should be added.

Hm, why not, it is maybe not bad idea - but I am not maintainer of
related GRUB parts (serial port nor configuration etc.), maybe
somebody else will discuse it with You...
But, generally, there could be many partially or fully broken HW
parts on PC and it is impossible to warn everybody against all of
them... :-)

BR,
Ales

 
 Thanks
 
 Michal


 
 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/grub-devel
 


-- 
Užitečné rady a tipy pro studenty i jejich rodiče a blízké čtěte ve
speciálu portálu VOLNÝ.cz Škola volá.
http://web.volny.cz/data/click.php?id=1267


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Timeout broken with serial port

2011-09-06 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 06.09.2011 02:05, Lennart Sorensen wrote:
 If the UART (not grub) interprets noise as valid data, then it will pass
 that to grub which legitimately sees that as keypresses.
I agree with both sides of dispute. It's a hardware bug but GRUB has
reliability and unattended boot as one of its goals. And this noise can
be detected. Noise is likely to have two neighbouring bits equal (due to
noise not being on the same frequency as serial speed) and unlikely to
produce a lot of valid characters. I propose to buffer serial input for
200/speed seconds and after this period do a small analysis and in case
of bad data discard the whole buffer.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: no -o option for grub-mkrescue although grub manual 1.99 says there is

2011-09-06 Thread Drake Donahue
what do you get from grub-mkrescue -v 


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: no -o option for grub-mkrescue although grub manual 1.99 says there is

2011-09-06 Thread Drake Donahue
what does grub-mkrescue -v produce for you?


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Timeout broken with serial port

2011-09-06 Thread Vladimir 'φ-coder/phcoder' Serbinenko
 But, generally, there could be many partially or fully broken HW
 parts on PC and it is impossible to warn everybody against all of
 them... :-)

Why not? Your computer is manufactured by Sony/Apple/..., it may have
hardware defects and exhibit any kind of known or unknown, predictable
or unpredictable, explainable or mysterious misbehavior subject to laws
of physics as we know them or yet undiscovered proprietary extensions

 BR,
 Ales

 Thanks

 Michal

 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 https://lists.gnu.org/mailman/listinfo/grub-devel




-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Bug#632048: segfault in grub-setup

2011-09-06 Thread Stephane Chazelas
2011-09-06 09:18:57 +0100, Colin Watson:
 On Tue, Sep 06, 2011 at 08:39:24AM +0100, Stephane Chazelas wrote:
  I do get a segfault as well when doing a grub-setup/grub-install
  on a mdraid with 1.2 metadata.
  
  The segv is in:
  
  grub_util_biosdisk_is_floppy() because the disk-id for the root
  device is not a bios disk id, but a big number that is the
  array id. The patch below seems to fix it for me, though I
  can't tell it's the right fix or not (probably not).
 
 This fix makes sense to me; calling grub_util_biosdisk_is_floppy on
 disks that aren't GRUB_DISK_DEVICE_BIOSDISK_ID doesn't make sense.
 grub-devel, second opinion?
 
  --- a/util/grub-setup.c 2011-09-05 12:11:31.864955442 +0100
  +++ b/util/grub-setup.c 2011-09-05 13:00:24.891368760 +0100
  @@ -315,7 +315,7 @@
   /* If DEST_DRIVE is a hard disk, enable the workaround, which is
  for buggy BIOSes which don't pass boot drive correctly. Instead,
  they pass 0x00 or 0x01 even when booted from 0x80.  */
  -if (!allow_floppy  !grub_util_biosdisk_is_floppy (dest_dev-disk))
  +if (!allow_floppy  dest_dev-disk-dev-id == 
  GRUB_DISK_DEVICE_BIOSDISK_ID  !grub_util_biosdisk_is_floppy 
  (dest_dev-disk))
 /* Replace the jmp (2 bytes) with double nop's.  */
 *boot_drive_check = 0x9090;
 }
[...]

The fact that the problem doesn't occur with mdraid-0.9 makes me
think the problem might be somewhere else though (like that
dest_dev-disk should be a biosdisk above)..

-- 
Stephane

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Bug#632048: segfault in grub-setup

2011-09-06 Thread Stephane Chazelas
2011-09-06 09:18:57 +0100, Colin Watson:
 On Tue, Sep 06, 2011 at 08:39:24AM +0100, Stephane Chazelas wrote:
  I do get a segfault as well when doing a grub-setup/grub-install
  on a mdraid with 1.2 metadata.
  
  The segv is in:
  
  grub_util_biosdisk_is_floppy() because the disk-id for the root
  device is not a bios disk id, but a big number that is the
  array id. The patch below seems to fix it for me, though I
  can't tell it's the right fix or not (probably not).
 
 This fix makes sense to me; calling grub_util_biosdisk_is_floppy on
 disks that aren't GRUB_DISK_DEVICE_BIOSDISK_ID doesn't make sense.
 grub-devel, second opinion?
 
  --- a/util/grub-setup.c 2011-09-05 12:11:31.864955442 +0100
  +++ b/util/grub-setup.c 2011-09-05 13:00:24.891368760 +0100
  @@ -315,7 +315,7 @@
   /* If DEST_DRIVE is a hard disk, enable the workaround, which is
  for buggy BIOSes which don't pass boot drive correctly. Instead,
  they pass 0x00 or 0x01 even when booted from 0x80.  */
  -if (!allow_floppy  !grub_util_biosdisk_is_floppy (dest_dev-disk))
  +if (!allow_floppy  dest_dev-disk-dev-id == 
  GRUB_DISK_DEVICE_BIOSDISK_ID  !grub_util_biosdisk_is_floppy 
  (dest_dev-disk))
 /* Replace the jmp (2 bytes) with double nop's.  */
 *boot_drive_check = 0x9090;
 }
[...]

Well, anyway, even after that patch, it still doesn't work

grub-install /dev/md0
reports success for nothing is written to any disk.

grub-install /dev/sda
  or /dev/sdb

doesn't work because it complains about a partition-less disk.

Looks like it's not supported. Strange, as when started, grub
can happily see files on 1.2 raids (using mdraid1x). Or did I
miss something.

I'll have to revert to 0.9 metadata for now.

-- 
Stephane

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Bug#632048: segfault in grub-setup

2011-09-06 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 06.09.2011 18:50, Stephane Chazelas wrote:
 2011-09-06 09:18:57 +0100, Colin Watson:
 On Tue, Sep 06, 2011 at 08:39:24AM +0100, Stephane Chazelas wrote:
 I do get a segfault as well when doing a grub-setup/grub-install
 on a mdraid with 1.2 metadata.

 The segv is in:

 grub_util_biosdisk_is_floppy() because the disk-id for the root
 device is not a bios disk id, but a big number that is the
 array id. The patch below seems to fix it for me, though I
 can't tell it's the right fix or not (probably not).
 This fix makes sense to me; calling grub_util_biosdisk_is_floppy on
 disks that aren't GRUB_DISK_DEVICE_BIOSDISK_ID doesn't make sense.
 grub-devel, second opinion?

 --- a/util/grub-setup.c 2011-09-05 12:11:31.864955442 +0100
 +++ b/util/grub-setup.c 2011-09-05 13:00:24.891368760 +0100
 @@ -315,7 +315,7 @@
  /* If DEST_DRIVE is a hard disk, enable the workaround, which is
 for buggy BIOSes which don't pass boot drive correctly. Instead,
 they pass 0x00 or 0x01 even when booted from 0x80.  */
 -if (!allow_floppy  !grub_util_biosdisk_is_floppy (dest_dev-disk))
 +if (!allow_floppy  dest_dev-disk-dev-id == 
 GRUB_DISK_DEVICE_BIOSDISK_ID  !grub_util_biosdisk_is_floppy 
 (dest_dev-disk))
/* Replace the jmp (2 bytes) with double nop's.  */
*boot_drive_check = 0x9090;
}
 [...]

 Well, anyway, even after that patch, it still doesn't work

 grub-install /dev/md0
 reports success for nothing is written to any disk.

This command supposes that md0 is used as a disk for a VM
 grub-install /dev/sda
   or /dev/sdb

 doesn't work because it complains about a partition-less disk.

Because you can't use RAID on disks for booting (except some cases but
it's not recommended even if they apply). Make a RAID of partitions and
leave 1M before the start of the single partition on the disk.
GRUB has done its job in telling that your setup is unbootable.
 Looks like it's not supported. Strange, as when started, grub
 can happily see files on 1.2 raids (using mdraid1x). Or did I
 miss something.

 I'll have to revert to 0.9 metadata for now.



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Timeout broken with serial port

2011-09-06 Thread richardvo...@gmail.com
On Mon, Sep 5, 2011 at 3:51 PM, Aleš Nesrsta star...@volny.cz wrote:
 Hi,

 I think it is not GRUB related problem, more probably there is some HW
 problem on Your serial port. Try to check idle voltage on RxD pin of
 serial port (best with oscilloscope... :-) ). Or You can have some
 unwanted leakage between pins of connector or wires in cable (check
 resistance between wires of cable) etc.

 Normal serial port should NEVER do anything if there is nothing
 connected to it. According to RS232 (V24) specification there should be
 voltage in range from -12V to -3V on RxD pin in idle state (in simplest
 case there is some internal pull-up resistor connected from RxD to -Vcc
 directly inside UART or something else...).
 In this normal case nothing is received by serial port and nothing will
 be interpreted as keypress in GRUB, i.e. GRUB will boot normally.

 In Your case, probably something causes some noise on RxD pin or there
 is bad voltage level on RxD pin (e.g. = +3V or near to 0V etc.) when
 nothing is connected - so serial port interprets it as receiving some
 character(s).


An idle transmitter should be in the range -3V...-12V.  But here there
is no transmitter.  I would not be at all surprised if some hardware
implements cable detect using a weak pull to 0V.

Still, data shouldn't be reported by the receiver unless the voltage
is in the valid range, and the input should not be left floating
either.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Merge request: more-mingw32-support

2011-09-06 Thread Mario Limonciello
Hello,

I've assembled a small collection of patches that get mingw support a little 
bit futher along, particularly for grub-setup.  With these patches i'm able to 
build a MinGW target by:

# ./autogetn.sh
# CC=i586-mingw32msvc-gcc ./configure --host=i586-mingw32msvc
# make grub-setup.exe

The collection is at this URL :
https://code.launchpad.net/~superm1/grub/more-mingw32-support 
https://code.launchpad.net/%7Esuperm1/grub/more-mingw32-support
And can be merged from lp:~superm1/grub/more-mingw32-support

Specifically here are links for the individual patches:
http://bazaar.launchpad.net/~superm1/grub/more-mingw32-support/revision/3423
http://bazaar.launchpad.net/~superm1/grub/more-mingw32-support/revision/3424
http://bazaar.launchpad.net/~superm1/grub/more-mingw32-support/revision/3425
http://bazaar.launchpad.net/~superm1/grub/more-mingw32-support/revision/3426
http://bazaar.launchpad.net/~superm1/grub/more-mingw32-support/revision/3427

If requested, i'll be happy to resend all of these as individual patches to the 
mailing list as well.

Thanks,

-- 
*Mario Limonciello*
Linux Engineer
*Dell*| OS Engineering


signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel