How to stop update-grub from scanning all drives?
Clash Royale CLAN TAG#URR8PPP
up vote
13
down vote
favorite
Every time update-grub
is run all hard drives are scanned. Each drives that is in standby state will spin up to go idle. This is a waste of energy. We use update-grub version 1.98:
# update-grub -v
grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1
Regression
There is a
GRUB_DISABLE_OS_PROBER=true
option in the/etc/default/grub
file. But that seems to only work from version 2 and up. At least it doesn't stop scanning all drives in our version 1.98.There is a
/etc/grub.d/20_linux_xen
script that might be run as a part of update-grub. After removing execute rights for all users withchmod a-x /etc/grub.d/20_linux_xen
all drives do still spin up.
How to stop update-grub
from scanning each and every hard drive?
debian grub
add a comment |Â
up vote
13
down vote
favorite
Every time update-grub
is run all hard drives are scanned. Each drives that is in standby state will spin up to go idle. This is a waste of energy. We use update-grub version 1.98:
# update-grub -v
grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1
Regression
There is a
GRUB_DISABLE_OS_PROBER=true
option in the/etc/default/grub
file. But that seems to only work from version 2 and up. At least it doesn't stop scanning all drives in our version 1.98.There is a
/etc/grub.d/20_linux_xen
script that might be run as a part of update-grub. After removing execute rights for all users withchmod a-x /etc/grub.d/20_linux_xen
all drives do still spin up.
How to stop update-grub
from scanning each and every hard drive?
debian grub
It's just a shell script... Modify it? It should only run after kernel updates, which doesn't occur very often.
â jordanm
Nov 17 '12 at 23:04
One of the script lines executes/usr/sbin/grub-probe --target=device /
. That command also causes all drives to spin up. The/usr/sbin/grub-probe
is not a shell script.
â Pro Backup
Nov 17 '12 at 23:17
How often are you runningupdate-grub
? This should only happen when you install a new kernel, so who cares?
â psusi
Nov 18 '12 at 3:00
I know, that entire picojoule it uses is such a waste - if you ran update-grub 24/7 for a month on 1000 computers with 3 HDDs each, it might add a cent or two to your electric bill.
â tkbx
Dec 29 '12 at 21:01
add a comment |Â
up vote
13
down vote
favorite
up vote
13
down vote
favorite
Every time update-grub
is run all hard drives are scanned. Each drives that is in standby state will spin up to go idle. This is a waste of energy. We use update-grub version 1.98:
# update-grub -v
grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1
Regression
There is a
GRUB_DISABLE_OS_PROBER=true
option in the/etc/default/grub
file. But that seems to only work from version 2 and up. At least it doesn't stop scanning all drives in our version 1.98.There is a
/etc/grub.d/20_linux_xen
script that might be run as a part of update-grub. After removing execute rights for all users withchmod a-x /etc/grub.d/20_linux_xen
all drives do still spin up.
How to stop update-grub
from scanning each and every hard drive?
debian grub
Every time update-grub
is run all hard drives are scanned. Each drives that is in standby state will spin up to go idle. This is a waste of energy. We use update-grub version 1.98:
# update-grub -v
grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1
Regression
There is a
GRUB_DISABLE_OS_PROBER=true
option in the/etc/default/grub
file. But that seems to only work from version 2 and up. At least it doesn't stop scanning all drives in our version 1.98.There is a
/etc/grub.d/20_linux_xen
script that might be run as a part of update-grub. After removing execute rights for all users withchmod a-x /etc/grub.d/20_linux_xen
all drives do still spin up.
How to stop update-grub
from scanning each and every hard drive?
debian grub
debian grub
edited Nov 17 '12 at 21:40
asked Nov 17 '12 at 21:30
Pro Backup
1,92362856
1,92362856
It's just a shell script... Modify it? It should only run after kernel updates, which doesn't occur very often.
â jordanm
Nov 17 '12 at 23:04
One of the script lines executes/usr/sbin/grub-probe --target=device /
. That command also causes all drives to spin up. The/usr/sbin/grub-probe
is not a shell script.
â Pro Backup
Nov 17 '12 at 23:17
How often are you runningupdate-grub
? This should only happen when you install a new kernel, so who cares?
â psusi
Nov 18 '12 at 3:00
I know, that entire picojoule it uses is such a waste - if you ran update-grub 24/7 for a month on 1000 computers with 3 HDDs each, it might add a cent or two to your electric bill.
â tkbx
Dec 29 '12 at 21:01
add a comment |Â
It's just a shell script... Modify it? It should only run after kernel updates, which doesn't occur very often.
â jordanm
Nov 17 '12 at 23:04
One of the script lines executes/usr/sbin/grub-probe --target=device /
. That command also causes all drives to spin up. The/usr/sbin/grub-probe
is not a shell script.
â Pro Backup
Nov 17 '12 at 23:17
How often are you runningupdate-grub
? This should only happen when you install a new kernel, so who cares?
â psusi
Nov 18 '12 at 3:00
I know, that entire picojoule it uses is such a waste - if you ran update-grub 24/7 for a month on 1000 computers with 3 HDDs each, it might add a cent or two to your electric bill.
â tkbx
Dec 29 '12 at 21:01
It's just a shell script... Modify it? It should only run after kernel updates, which doesn't occur very often.
â jordanm
Nov 17 '12 at 23:04
It's just a shell script... Modify it? It should only run after kernel updates, which doesn't occur very often.
â jordanm
Nov 17 '12 at 23:04
One of the script lines executes
/usr/sbin/grub-probe --target=device /
. That command also causes all drives to spin up. The /usr/sbin/grub-probe
is not a shell script.â Pro Backup
Nov 17 '12 at 23:17
One of the script lines executes
/usr/sbin/grub-probe --target=device /
. That command also causes all drives to spin up. The /usr/sbin/grub-probe
is not a shell script.â Pro Backup
Nov 17 '12 at 23:17
How often are you running
update-grub
? This should only happen when you install a new kernel, so who cares?â psusi
Nov 18 '12 at 3:00
How often are you running
update-grub
? This should only happen when you install a new kernel, so who cares?â psusi
Nov 18 '12 at 3:00
I know, that entire picojoule it uses is such a waste - if you ran update-grub 24/7 for a month on 1000 computers with 3 HDDs each, it might add a cent or two to your electric bill.
â tkbx
Dec 29 '12 at 21:01
I know, that entire picojoule it uses is such a waste - if you ran update-grub 24/7 for a month on 1000 computers with 3 HDDs each, it might add a cent or two to your electric bill.
â tkbx
Dec 29 '12 at 21:01
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
10
down vote
accepted
In file /etc/grub.d/30_os-prober the line
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the os-prober
that needs to be disabled.
- One way is to remove the package:
apt-get --purge remove os-prober
. - Another way is to remove executable rights for os-prober. First find the location of os-prober using
$ which os-prober
. Output might look like:/usr/bin/os-prober
. The remove the executable rights for all users for that file:# chmod a-x /usr/bin/os-prober
- Another way is to remove executable rights for 30_os-prober. Find the location of 30_os-prober using
$ locate /30_os-prober
. Output might look like:/etc/grub.d/30_os-prober
. The remove the executable rights for all users for that file:# chmod a-x /etc/grub.d/30_os-prober
- Yet another way is to skip the execution of
/etc/grub.d/30_os-prober
. For example by making theGRUB_DISABLE_OS_PROBER=true
option work in our grub version 1.98. This can be done by inserting in file/etc/grub.d/30_os-prober
the code below the lineset -e
:
...
if [ "x$GRUB_DISABLE_OS_PROBER" = "xtrue" ]; then
exit 0
fi
add a comment |Â
up vote
5
down vote
For those wondering if it's really worth the effort, yes it is. Perhaps not for energy saving but today I encountered a problem with update-grub as it wanted to probe for both /dev/sda (my harddisk) and /dev/sdc (a USB-stick). Without the latter inserted into my laptop, update-grub would hang, even though there is actually no OS on my USB-stick installed nor did I ever boot from this stick. As the USB-stick recently broke, I needed a way for update-grub to continue (alive) without it. Fortuately, GRUB_DISABLE_OS_PROBER=true
just did the trick. :)
1
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
add a comment |Â
up vote
3
down vote
(Is this really worth the time and effort to fix?)
As you mentioned, the probing is probably happening when grub-mkconfig
calls grub-probe
. You could modify grub-mkconfig
by simply hardcoding the result of the grub-probe
calls. It is used to fill GRUB_DEVICE
, GRUB_DEVICE_UUID
, GRUB_DEVICE_BOOT
, GRUB_DEVICE_BOOT_UUID
, and GRUB_FS
.
add a comment |Â
up vote
0
down vote
See my solution here to selectively disable which partitions are checked by os-prober
with a small patch
.
The configuration of GRUB_OS_PROBER_SKIP_LIST="UUID@device_path"
in /etc/default/grub
:
reduces the numbers of devices in
$OSPROBED
used by/etc/grub.d/30_os-prober
which stops the check with
$grub_probe --target=fs_uuid --device
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
In file /etc/grub.d/30_os-prober the line
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the os-prober
that needs to be disabled.
- One way is to remove the package:
apt-get --purge remove os-prober
. - Another way is to remove executable rights for os-prober. First find the location of os-prober using
$ which os-prober
. Output might look like:/usr/bin/os-prober
. The remove the executable rights for all users for that file:# chmod a-x /usr/bin/os-prober
- Another way is to remove executable rights for 30_os-prober. Find the location of 30_os-prober using
$ locate /30_os-prober
. Output might look like:/etc/grub.d/30_os-prober
. The remove the executable rights for all users for that file:# chmod a-x /etc/grub.d/30_os-prober
- Yet another way is to skip the execution of
/etc/grub.d/30_os-prober
. For example by making theGRUB_DISABLE_OS_PROBER=true
option work in our grub version 1.98. This can be done by inserting in file/etc/grub.d/30_os-prober
the code below the lineset -e
:
...
if [ "x$GRUB_DISABLE_OS_PROBER" = "xtrue" ]; then
exit 0
fi
add a comment |Â
up vote
10
down vote
accepted
In file /etc/grub.d/30_os-prober the line
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the os-prober
that needs to be disabled.
- One way is to remove the package:
apt-get --purge remove os-prober
. - Another way is to remove executable rights for os-prober. First find the location of os-prober using
$ which os-prober
. Output might look like:/usr/bin/os-prober
. The remove the executable rights for all users for that file:# chmod a-x /usr/bin/os-prober
- Another way is to remove executable rights for 30_os-prober. Find the location of 30_os-prober using
$ locate /30_os-prober
. Output might look like:/etc/grub.d/30_os-prober
. The remove the executable rights for all users for that file:# chmod a-x /etc/grub.d/30_os-prober
- Yet another way is to skip the execution of
/etc/grub.d/30_os-prober
. For example by making theGRUB_DISABLE_OS_PROBER=true
option work in our grub version 1.98. This can be done by inserting in file/etc/grub.d/30_os-prober
the code below the lineset -e
:
...
if [ "x$GRUB_DISABLE_OS_PROBER" = "xtrue" ]; then
exit 0
fi
add a comment |Â
up vote
10
down vote
accepted
up vote
10
down vote
accepted
In file /etc/grub.d/30_os-prober the line
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the os-prober
that needs to be disabled.
- One way is to remove the package:
apt-get --purge remove os-prober
. - Another way is to remove executable rights for os-prober. First find the location of os-prober using
$ which os-prober
. Output might look like:/usr/bin/os-prober
. The remove the executable rights for all users for that file:# chmod a-x /usr/bin/os-prober
- Another way is to remove executable rights for 30_os-prober. Find the location of 30_os-prober using
$ locate /30_os-prober
. Output might look like:/etc/grub.d/30_os-prober
. The remove the executable rights for all users for that file:# chmod a-x /etc/grub.d/30_os-prober
- Yet another way is to skip the execution of
/etc/grub.d/30_os-prober
. For example by making theGRUB_DISABLE_OS_PROBER=true
option work in our grub version 1.98. This can be done by inserting in file/etc/grub.d/30_os-prober
the code below the lineset -e
:
...
if [ "x$GRUB_DISABLE_OS_PROBER" = "xtrue" ]; then
exit 0
fi
In file /etc/grub.d/30_os-prober the line
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the os-prober
that needs to be disabled.
- One way is to remove the package:
apt-get --purge remove os-prober
. - Another way is to remove executable rights for os-prober. First find the location of os-prober using
$ which os-prober
. Output might look like:/usr/bin/os-prober
. The remove the executable rights for all users for that file:# chmod a-x /usr/bin/os-prober
- Another way is to remove executable rights for 30_os-prober. Find the location of 30_os-prober using
$ locate /30_os-prober
. Output might look like:/etc/grub.d/30_os-prober
. The remove the executable rights for all users for that file:# chmod a-x /etc/grub.d/30_os-prober
- Yet another way is to skip the execution of
/etc/grub.d/30_os-prober
. For example by making theGRUB_DISABLE_OS_PROBER=true
option work in our grub version 1.98. This can be done by inserting in file/etc/grub.d/30_os-prober
the code below the lineset -e
:
...
if [ "x$GRUB_DISABLE_OS_PROBER" = "xtrue" ]; then
exit 0
fi
answered Dec 29 '12 at 17:34
Pro Backup
1,92362856
1,92362856
add a comment |Â
add a comment |Â
up vote
5
down vote
For those wondering if it's really worth the effort, yes it is. Perhaps not for energy saving but today I encountered a problem with update-grub as it wanted to probe for both /dev/sda (my harddisk) and /dev/sdc (a USB-stick). Without the latter inserted into my laptop, update-grub would hang, even though there is actually no OS on my USB-stick installed nor did I ever boot from this stick. As the USB-stick recently broke, I needed a way for update-grub to continue (alive) without it. Fortuately, GRUB_DISABLE_OS_PROBER=true
just did the trick. :)
1
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
add a comment |Â
up vote
5
down vote
For those wondering if it's really worth the effort, yes it is. Perhaps not for energy saving but today I encountered a problem with update-grub as it wanted to probe for both /dev/sda (my harddisk) and /dev/sdc (a USB-stick). Without the latter inserted into my laptop, update-grub would hang, even though there is actually no OS on my USB-stick installed nor did I ever boot from this stick. As the USB-stick recently broke, I needed a way for update-grub to continue (alive) without it. Fortuately, GRUB_DISABLE_OS_PROBER=true
just did the trick. :)
1
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
add a comment |Â
up vote
5
down vote
up vote
5
down vote
For those wondering if it's really worth the effort, yes it is. Perhaps not for energy saving but today I encountered a problem with update-grub as it wanted to probe for both /dev/sda (my harddisk) and /dev/sdc (a USB-stick). Without the latter inserted into my laptop, update-grub would hang, even though there is actually no OS on my USB-stick installed nor did I ever boot from this stick. As the USB-stick recently broke, I needed a way for update-grub to continue (alive) without it. Fortuately, GRUB_DISABLE_OS_PROBER=true
just did the trick. :)
For those wondering if it's really worth the effort, yes it is. Perhaps not for energy saving but today I encountered a problem with update-grub as it wanted to probe for both /dev/sda (my harddisk) and /dev/sdc (a USB-stick). Without the latter inserted into my laptop, update-grub would hang, even though there is actually no OS on my USB-stick installed nor did I ever boot from this stick. As the USB-stick recently broke, I needed a way for update-grub to continue (alive) without it. Fortuately, GRUB_DISABLE_OS_PROBER=true
just did the trick. :)
answered Apr 25 '14 at 9:19
PPP
5111
5111
1
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
add a comment |Â
1
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
1
1
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
I had the inverse problem: update-grub failing if an USB stick was present. The USB stick was a bit unusual, since it has Easy2Boot installed. But since this was on a kiosk with the update-grub command being issued from a script placed on that very USB stick, this solution was very welcome.
â noamik
Jul 10 '17 at 15:48
add a comment |Â
up vote
3
down vote
(Is this really worth the time and effort to fix?)
As you mentioned, the probing is probably happening when grub-mkconfig
calls grub-probe
. You could modify grub-mkconfig
by simply hardcoding the result of the grub-probe
calls. It is used to fill GRUB_DEVICE
, GRUB_DEVICE_UUID
, GRUB_DEVICE_BOOT
, GRUB_DEVICE_BOOT_UUID
, and GRUB_FS
.
add a comment |Â
up vote
3
down vote
(Is this really worth the time and effort to fix?)
As you mentioned, the probing is probably happening when grub-mkconfig
calls grub-probe
. You could modify grub-mkconfig
by simply hardcoding the result of the grub-probe
calls. It is used to fill GRUB_DEVICE
, GRUB_DEVICE_UUID
, GRUB_DEVICE_BOOT
, GRUB_DEVICE_BOOT_UUID
, and GRUB_FS
.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
(Is this really worth the time and effort to fix?)
As you mentioned, the probing is probably happening when grub-mkconfig
calls grub-probe
. You could modify grub-mkconfig
by simply hardcoding the result of the grub-probe
calls. It is used to fill GRUB_DEVICE
, GRUB_DEVICE_UUID
, GRUB_DEVICE_BOOT
, GRUB_DEVICE_BOOT_UUID
, and GRUB_FS
.
(Is this really worth the time and effort to fix?)
As you mentioned, the probing is probably happening when grub-mkconfig
calls grub-probe
. You could modify grub-mkconfig
by simply hardcoding the result of the grub-probe
calls. It is used to fill GRUB_DEVICE
, GRUB_DEVICE_UUID
, GRUB_DEVICE_BOOT
, GRUB_DEVICE_BOOT_UUID
, and GRUB_FS
.
answered Nov 18 '12 at 0:26
Jim Paris
11.2k42330
11.2k42330
add a comment |Â
add a comment |Â
up vote
0
down vote
See my solution here to selectively disable which partitions are checked by os-prober
with a small patch
.
The configuration of GRUB_OS_PROBER_SKIP_LIST="UUID@device_path"
in /etc/default/grub
:
reduces the numbers of devices in
$OSPROBED
used by/etc/grub.d/30_os-prober
which stops the check with
$grub_probe --target=fs_uuid --device
add a comment |Â
up vote
0
down vote
See my solution here to selectively disable which partitions are checked by os-prober
with a small patch
.
The configuration of GRUB_OS_PROBER_SKIP_LIST="UUID@device_path"
in /etc/default/grub
:
reduces the numbers of devices in
$OSPROBED
used by/etc/grub.d/30_os-prober
which stops the check with
$grub_probe --target=fs_uuid --device
add a comment |Â
up vote
0
down vote
up vote
0
down vote
See my solution here to selectively disable which partitions are checked by os-prober
with a small patch
.
The configuration of GRUB_OS_PROBER_SKIP_LIST="UUID@device_path"
in /etc/default/grub
:
reduces the numbers of devices in
$OSPROBED
used by/etc/grub.d/30_os-prober
which stops the check with
$grub_probe --target=fs_uuid --device
See my solution here to selectively disable which partitions are checked by os-prober
with a small patch
.
The configuration of GRUB_OS_PROBER_SKIP_LIST="UUID@device_path"
in /etc/default/grub
:
reduces the numbers of devices in
$OSPROBED
used by/etc/grub.d/30_os-prober
which stops the check with
$grub_probe --target=fs_uuid --device
answered 9 mins ago
Stuart Cardall
70659
70659
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f56004%2fhow-to-stop-update-grub-from-scanning-all-drives%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
It's just a shell script... Modify it? It should only run after kernel updates, which doesn't occur very often.
â jordanm
Nov 17 '12 at 23:04
One of the script lines executes
/usr/sbin/grub-probe --target=device /
. That command also causes all drives to spin up. The/usr/sbin/grub-probe
is not a shell script.â Pro Backup
Nov 17 '12 at 23:17
How often are you running
update-grub
? This should only happen when you install a new kernel, so who cares?â psusi
Nov 18 '12 at 3:00
I know, that entire picojoule it uses is such a waste - if you ran update-grub 24/7 for a month on 1000 computers with 3 HDDs each, it might add a cent or two to your electric bill.
â tkbx
Dec 29 '12 at 21:01