Skip to contentSkip to conversation

Searching UUID on floppies

DISCUSSION Pavel Roskin 4 participants 12 messages May 30, 2008 – Jun 1, 2008

lore
Share & tools
lore
#0 lore raw

Hello!

An old system with a floppy drive has a minor regression with the current GRUB. It makes some noises for a second or two when GRUB loads, apparently trying to find a floppy disk in the drive.

It's possible that some misconfigured systems may even hang or wait for a long time if the floppy drive is absent, but BIOS expects it to be present. It's easy to blame users, but it will be seen as a regression.

Perhaps the UUID search should start with the hard drives and then go to the floppies as the last resort?

Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw
Quoted 6 lines · Pavel Roskin

Hello!

An old system with a floppy drive has a minor regression with the current GRUB. It makes some noises for a second or two when GRUB loads, apparently trying to find a floppy disk in the drive.

Quoted 6 lines

It's possible that some misconfigured systems may even hang or wait for a long time if the floppy drive is absent, but BIOS expects it to be present. It's easy to blame users, but it will be seen as a regression.

Perhaps the UUID search should start with the hard drives and then go to the floppies as the last resort?

Good point, but I think we shouldn't hard coded the scan method in search. Perhaps we can add a option to search to skip some device, something such as:

search --ignore-device=fd /file

Or we can use a variable like:

noscan=fd

The advantage of using variable is that we can use it in findroot as well.

Signature · 1 line
Bean
#2 lore raw
Quoted 18 lines · Bean
Quoted 6 lines · Pavel Roskin

Hello!

An old system with a floppy drive has a minor regression with the current GRUB. It makes some noises for a second or two when GRUB loads, apparently trying to find a floppy disk in the drive.

Quoted 6 lines

It's possible that some misconfigured systems may even hang or wait for a long time if the floppy drive is absent, but BIOS expects it to be present. It's easy to blame users, but it will be seen as a regression.

Perhaps the UUID search should start with the hard drives and then go to the floppies as the last resort?

Good point, but I think we shouldn't hard coded the scan method in search. Perhaps we can add a option to search to skip some device, something such as:

Quoted 7 lines

search --ignore-device=fd /file

Or we can use a variable like:

noscan=fd

The advantage of using variable is that we can use it in findroot as well.

BTW, if you merely need to change the scan order instead of disabling it, you can just change the order the device is reported in biosdisk.

Signature · 1 line
Bean
#3 lore raw
Quoted 3 lines · Bean

BTW, if you merely need to change the scan order instead of disabling it, you can just change the order the device is reported in biosdisk.

Sounds nice. I see you already included this change with your patch in the "findroot" thread. Do you mind if we check this in before resolving the other stuff? I uploaded the UUID-capable version to Debian yesterday and almost can hear the users complaining about annoying floppy probes ;-)

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
#4 lore raw
Quoted 9 lines · Robert Millan
Quoted 3 lines · Bean

BTW, if you merely need to change the scan order instead of disabling it, you can just change the order the device is reported in biosdisk.

Sounds nice. I see you already included this change with your patch in the "findroot" thread. Do you mind if we check this in before resolving the other stuff? I uploaded the UUID-capable version to Debian yesterday and almost can hear the users complaining about annoying floppy probes ;-)

Feel free to commit it.

Signature · 1 line
Bean
#5 lore raw
In reply to Bean
Quoted 18 lines · Bean
Quoted 6 lines · Pavel Roskin

Hello!

An old system with a floppy drive has a minor regression with the current GRUB. It makes some noises for a second or two when GRUB loads, apparently trying to find a floppy disk in the drive.

Quoted 6 lines

It's possible that some misconfigured systems may even hang or wait for a long time if the floppy drive is absent, but BIOS expects it to be present. It's easy to blame users, but it will be seen as a regression.

Perhaps the UUID search should start with the hard drives and then go to the floppies as the last resort?

Good point, but I think we shouldn't hard coded the scan method in search. Perhaps we can add a option to search to skip some device, something such as:

Quoted 7 lines

search --ignore-device=fd /file

Or we can use a variable like:

noscan=fd

The advantage of using variable is that we can use it in findroot as well.

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find' or so, can't remember). Perhaps it's better to use that for consistency? It is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

./util/i386/pc/grub-install.in: --no-floppy do not probe any floppy drive
./util/i386/pc/grub-install.in: --no-floppy)
./util/i386/pc/grub-install.in: no_floppy="--no-floppy" ;;
./util/i386/efi/grub-install.in: --no-floppy do not probe any floppy drive
./util/i386/efi/grub-install.in: --no-floppy)
./util/i386/efi/grub-install.in: no_floppy="--no-floppy" ;;
./util/grub-mkdevicemap.c: {"no-floppy", no_argument, 0, 'n'},
./util/grub-mkdevicemap.c: -n, --no-floppy do not probe any floppy drive\n\
./docs/grub.texi:@item --no-floppy

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
#6 lore raw
Quoted 4 lines · Robert Millan

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find' or so, can't remember). Perhaps it's better to use that for consistency? It is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

I don't know if it's relevant... but there is a situation that is maybe similar when my MacBook boots up (before it even gets to GRUB), if there's a CD in the drive, it wastes about 15 extra seconds spinning it up to look at it, even if I'm not booting from CD. So that might be a sort of thing to watch out for, when making GRUB search?

-Isaac

#7 lore raw
Quoted 8 lines · Isaac Dupree
Quoted 6 lines · Robert Millan

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find'
or so, can't remember). Perhaps it's better to use that for consistency? It
is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

Quoted 5 lines

I don't know if it's relevant... but there is a situation that is maybe similar when my MacBook boots up (before it even gets to GRUB), if there's a CD in the drive, it wastes about 15 extra seconds spinning it up to look at it, even if I'm not booting from CD. So that might be a sort of thing to watch out for, when making GRUB search?

Does it happen before or after you get the "Welcome to GRUB!" message?

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
#8 lore raw
Quoted 9 lines · Robert Millan
Quoted 6 lines · Isaac Dupree
Quoted 4 lines · Robert Millan

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find' or so, can't remember). Perhaps it's better to use that for consistency? It is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

I don't know if it's relevant... but there is a situation that is maybe similar when my MacBook boots up (before it even gets to GRUB), if there's a CD in the drive, it wastes about 15 extra seconds spinning it up to look at it, even if I'm not booting from CD. So that might be a sort of thing to watch out for, when making GRUB search?

Does it happen before or after you get the "Welcome to GRUB!" message?

*That* happens even if I never enter grub at all -- so I guess you would say "before". GRUB doesn't have that problem for me as far as I know, but the only things I have in my config are (hd0,x) -- no boot-from-CD option, only the Linuxes on the disk that I have configured precisely and numerically.

look, here is my boot sequence:
EFI firmware boots the MacOSX partition by default, if I don't hold down "option"/"alt" (if I do, then the firmware puts up a menu of choices).

rEFIt is installed in such a way that it is booted rather the standard MacOSX at that point. It puts up a nice menu of choices including MacOS, any bootable CD/DVDs, and all the GRUBs it can find. It's rEFIt's appearance that is delayed when there's a CD in the drive. rEFIt knows how to boot both EFI and BIOS GRUBs. -- MacOSX: boots normally if selected in rEFIt.
-- GRUB2: well, you know about that. From there, I can potentially boot my Linuxes that are on various of my partitions.

-Isaac

#9 lore raw
Quoted 15 lines · Isaac Dupree
Quoted 14 lines · Robert Millan
Quoted 12 lines · Isaac Dupree
Quoted 6 lines · Robert Millan

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find'
or so, can't remember). Perhaps it's better to use that for consistency? It
is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

I don't know if it's relevant... but there is a situation that is maybe similar when my MacBook boots up (before it even gets to GRUB), if there's a CD in the drive, it wastes about 15 extra seconds spinning it up to look at it, even if I'm not booting from CD. So that might be a sort of thing to watch out for, when making GRUB search?

Quoted 7 lines
Quoted 1 line

Does it happen before or after you get the "Welcome to GRUB!" message?

*That* happens even if I never enter grub at all -- so I guess you would say "before". GRUB doesn't have that problem for me as far as I know, but the only things I have in my config are (hd0,x) -- no boot-from-CD option, only the Linuxes on the disk that I have configured precisely and numerically.

Definitely not a GRUB bug, then ;-)

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
#10 lore raw
In reply to Robert Millan
Quoted 4 lines · Robert Millan

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find' or so, can't remember). Perhaps it's better to use that for consistency? It is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

Sure, --no-floppy would be consistent with the installers, but it will take some effort to get right. Let's not forget CD floppy emulation, by the way. You wrote that sometimes a hard drive can be reported as a floppy. Perhaps we still want to search floppies as the last resort.

Besides, I'd prefer to avoid floppy search is all "search" commands. I have a custom rule to boot another distro, and it uses "search" by label. I don't want to add --no-floppy to that command because it's an extra effort. It's not hard for GRUB to do things nicely without having users edit their custom rules.

That's why I would prefer optimized search order. But I'm not strongly opposing --no-floppy as long as it's done right.

We could also start search with the current drive and then go through the list of other drives, without changing anything else in the order. Most installations will rely on one disk. Spinning up more devices unnecessarily is not nice.

Signature · 2 lines
Regards,
Pavel Roskin
#11 lore raw
Quoted 12 lines · Pavel Roskin
Quoted 4 lines · Robert Millan

Some of our commands use --no-floppy. Also supported in GRUB Legacy (by 'find' or so, can't remember). Perhaps it's better to use that for consistency? It is the floppy scan which everyone hates; for other devices I don't think people will mind if GRUB spends a few ms on them.

Sure, --no-floppy would be consistent with the installers, but it will take some effort to get right. Let's not forget CD floppy emulation, by the way. You wrote that sometimes a hard drive can be reported as a floppy. Perhaps we still want to search floppies as the last resort.

Quoted 8 lines

Besides, I'd prefer to avoid floppy search is all "search" commands. I have a custom rule to boot another distro, and it uses "search" by label. I don't want to add --no-floppy to that command because it's an extra effort. It's not hard for GRUB to do things nicely without having users edit their custom rules.

That's why I would prefer optimized search order. But I'm not strongly opposing --no-floppy as long as it's done right.

Search order has been optimized now (see the other sub-thread). But there's still room for improvement, of course..

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)