Installed GRUB on the wrong disk during a Debian install
I had installed Debian on my external HDD but for some reasons GRUB didn't get installed on the HDD EFI partition but instead on has been installed on the man disk where I was doing the Debian install.
I would like instead to 're' install manually GRUB with the grub-install binaries in the EFI partition of my HDD like that I can simply plug it in any computer I be able to boot into Debian.
I'm unsure how to do it with grub-install.
lsblk gives (removes the other disks):
sdd 8:48 0 931.5G 0 disk
├─sdd1 8:49 0 200M 0 part /mnt/efi
├─sdd2 8:50 0 819.4G 0 part /media/ubuntu/John
├─sdd3 8:51 0 104G 0 part /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996
└─sdd4 8:52 0 7.9G 0 part
what argument should I pass to grub install?
grub-install sdd1 ?
or
grub-install --efi-directory=/mnt/efi?
(I have mounted myself sdd1 to /mnt/efi)
(I'm doing this from a live Unbuntu usb)
grub external-hdd
add a comment |
I had installed Debian on my external HDD but for some reasons GRUB didn't get installed on the HDD EFI partition but instead on has been installed on the man disk where I was doing the Debian install.
I would like instead to 're' install manually GRUB with the grub-install binaries in the EFI partition of my HDD like that I can simply plug it in any computer I be able to boot into Debian.
I'm unsure how to do it with grub-install.
lsblk gives (removes the other disks):
sdd 8:48 0 931.5G 0 disk
├─sdd1 8:49 0 200M 0 part /mnt/efi
├─sdd2 8:50 0 819.4G 0 part /media/ubuntu/John
├─sdd3 8:51 0 104G 0 part /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996
└─sdd4 8:52 0 7.9G 0 part
what argument should I pass to grub install?
grub-install sdd1 ?
or
grub-install --efi-directory=/mnt/efi?
(I have mounted myself sdd1 to /mnt/efi)
(I'm doing this from a live Unbuntu usb)
grub external-hdd
add a comment |
I had installed Debian on my external HDD but for some reasons GRUB didn't get installed on the HDD EFI partition but instead on has been installed on the man disk where I was doing the Debian install.
I would like instead to 're' install manually GRUB with the grub-install binaries in the EFI partition of my HDD like that I can simply plug it in any computer I be able to boot into Debian.
I'm unsure how to do it with grub-install.
lsblk gives (removes the other disks):
sdd 8:48 0 931.5G 0 disk
├─sdd1 8:49 0 200M 0 part /mnt/efi
├─sdd2 8:50 0 819.4G 0 part /media/ubuntu/John
├─sdd3 8:51 0 104G 0 part /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996
└─sdd4 8:52 0 7.9G 0 part
what argument should I pass to grub install?
grub-install sdd1 ?
or
grub-install --efi-directory=/mnt/efi?
(I have mounted myself sdd1 to /mnt/efi)
(I'm doing this from a live Unbuntu usb)
grub external-hdd
I had installed Debian on my external HDD but for some reasons GRUB didn't get installed on the HDD EFI partition but instead on has been installed on the man disk where I was doing the Debian install.
I would like instead to 're' install manually GRUB with the grub-install binaries in the EFI partition of my HDD like that I can simply plug it in any computer I be able to boot into Debian.
I'm unsure how to do it with grub-install.
lsblk gives (removes the other disks):
sdd 8:48 0 931.5G 0 disk
├─sdd1 8:49 0 200M 0 part /mnt/efi
├─sdd2 8:50 0 819.4G 0 part /media/ubuntu/John
├─sdd3 8:51 0 104G 0 part /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996
└─sdd4 8:52 0 7.9G 0 part
what argument should I pass to grub install?
grub-install sdd1 ?
or
grub-install --efi-directory=/mnt/efi?
(I have mounted myself sdd1 to /mnt/efi)
(I'm doing this from a live Unbuntu usb)
grub external-hdd
grub external-hdd
asked 1 hour ago
Marco
563
563
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The command should be:
grub-install /dev/sdd
The command grub-install
without options should print un error if some additional option are required such as the target
and the directory
.
You can set the --efi-directory
and --target
option:
grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sdd
--efi-directory=DIR
Use DIR as the EFI System Partition root. This option is only available on the EFI target platform.
Debian wiki: GrubEFIReinstall
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
@Marco--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco you can rungrub-install
without any option. See here to cleanly create the chroot env.
– GAD3R
56 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f491303%2finstalled-grub-on-the-wrong-disk-during-a-debian-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The command should be:
grub-install /dev/sdd
The command grub-install
without options should print un error if some additional option are required such as the target
and the directory
.
You can set the --efi-directory
and --target
option:
grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sdd
--efi-directory=DIR
Use DIR as the EFI System Partition root. This option is only available on the EFI target platform.
Debian wiki: GrubEFIReinstall
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
@Marco--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco you can rungrub-install
without any option. See here to cleanly create the chroot env.
– GAD3R
56 mins ago
add a comment |
The command should be:
grub-install /dev/sdd
The command grub-install
without options should print un error if some additional option are required such as the target
and the directory
.
You can set the --efi-directory
and --target
option:
grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sdd
--efi-directory=DIR
Use DIR as the EFI System Partition root. This option is only available on the EFI target platform.
Debian wiki: GrubEFIReinstall
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
@Marco--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco you can rungrub-install
without any option. See here to cleanly create the chroot env.
– GAD3R
56 mins ago
add a comment |
The command should be:
grub-install /dev/sdd
The command grub-install
without options should print un error if some additional option are required such as the target
and the directory
.
You can set the --efi-directory
and --target
option:
grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sdd
--efi-directory=DIR
Use DIR as the EFI System Partition root. This option is only available on the EFI target platform.
Debian wiki: GrubEFIReinstall
The command should be:
grub-install /dev/sdd
The command grub-install
without options should print un error if some additional option are required such as the target
and the directory
.
You can set the --efi-directory
and --target
option:
grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sdd
--efi-directory=DIR
Use DIR as the EFI System Partition root. This option is only available on the EFI target platform.
Debian wiki: GrubEFIReinstall
edited 43 mins ago
answered 1 hour ago
GAD3R
25.4k1750106
25.4k1750106
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
@Marco--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco you can rungrub-install
without any option. See here to cleanly create the chroot env.
– GAD3R
56 mins ago
add a comment |
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
@Marco--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco you can rungrub-install
without any option. See here to cleanly create the chroot env.
– GAD3R
56 mins ago
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
– Marco
1 hour ago
@Marco
--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco
--boot-directory=/mnt/efi/boot/efi
– GAD3R
57 mins ago
@Marco you can run
grub-install
without any option. See here to cleanly create the chroot env.– GAD3R
56 mins ago
@Marco you can run
grub-install
without any option. See here to cleanly create the chroot env.– GAD3R
56 mins ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f491303%2finstalled-grub-on-the-wrong-disk-during-a-debian-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown