How to make grub-mkconfig work on a usb device?
up vote
2
down vote
favorite
AFAIK grub-mkconfig and grub-update/update-grub commands only run on the device that they are installed on.
I want to run the commands on a usb drive, but
- I don't know how to install them on the usb
- I can't make the ones that are installed on my computer to run on usb(i.e they should update the usb's grub.cfg file)
How can I do either of them?
BTW I am using manjaro KDE
grub2 live-usb
add a comment |
up vote
2
down vote
favorite
AFAIK grub-mkconfig and grub-update/update-grub commands only run on the device that they are installed on.
I want to run the commands on a usb drive, but
- I don't know how to install them on the usb
- I can't make the ones that are installed on my computer to run on usb(i.e they should update the usb's grub.cfg file)
How can I do either of them?
BTW I am using manjaro KDE
grub2 live-usb
What is it exactly what you are trying to acomplish?
– YoMismo
Sep 8 '15 at 13:44
@YoMismo unix.stackexchange.com/q/224695/55673
– Registered User
Sep 8 '15 at 14:02
Then mount your usb in /mnt,mount --bind/dev /sys /proc under mnt's respctive ones andchrootto your /mnt, modify any needed file and rungrub-mkconfig
– YoMismo
Sep 8 '15 at 14:11
@YoMismo Can you write an answer? I didn't get your comment properly.
– Registered User
Sep 8 '15 at 14:33
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
AFAIK grub-mkconfig and grub-update/update-grub commands only run on the device that they are installed on.
I want to run the commands on a usb drive, but
- I don't know how to install them on the usb
- I can't make the ones that are installed on my computer to run on usb(i.e they should update the usb's grub.cfg file)
How can I do either of them?
BTW I am using manjaro KDE
grub2 live-usb
AFAIK grub-mkconfig and grub-update/update-grub commands only run on the device that they are installed on.
I want to run the commands on a usb drive, but
- I don't know how to install them on the usb
- I can't make the ones that are installed on my computer to run on usb(i.e they should update the usb's grub.cfg file)
How can I do either of them?
BTW I am using manjaro KDE
grub2 live-usb
grub2 live-usb
asked Sep 8 '15 at 13:19
Registered User
1662722
1662722
What is it exactly what you are trying to acomplish?
– YoMismo
Sep 8 '15 at 13:44
@YoMismo unix.stackexchange.com/q/224695/55673
– Registered User
Sep 8 '15 at 14:02
Then mount your usb in /mnt,mount --bind/dev /sys /proc under mnt's respctive ones andchrootto your /mnt, modify any needed file and rungrub-mkconfig
– YoMismo
Sep 8 '15 at 14:11
@YoMismo Can you write an answer? I didn't get your comment properly.
– Registered User
Sep 8 '15 at 14:33
add a comment |
What is it exactly what you are trying to acomplish?
– YoMismo
Sep 8 '15 at 13:44
@YoMismo unix.stackexchange.com/q/224695/55673
– Registered User
Sep 8 '15 at 14:02
Then mount your usb in /mnt,mount --bind/dev /sys /proc under mnt's respctive ones andchrootto your /mnt, modify any needed file and rungrub-mkconfig
– YoMismo
Sep 8 '15 at 14:11
@YoMismo Can you write an answer? I didn't get your comment properly.
– Registered User
Sep 8 '15 at 14:33
What is it exactly what you are trying to acomplish?
– YoMismo
Sep 8 '15 at 13:44
What is it exactly what you are trying to acomplish?
– YoMismo
Sep 8 '15 at 13:44
@YoMismo unix.stackexchange.com/q/224695/55673
– Registered User
Sep 8 '15 at 14:02
@YoMismo unix.stackexchange.com/q/224695/55673
– Registered User
Sep 8 '15 at 14:02
Then mount your usb in /mnt,
mount --bind /dev /sys /proc under mnt's respctive ones and chroot to your /mnt, modify any needed file and run grub-mkconfig– YoMismo
Sep 8 '15 at 14:11
Then mount your usb in /mnt,
mount --bind /dev /sys /proc under mnt's respctive ones and chroot to your /mnt, modify any needed file and run grub-mkconfig– YoMismo
Sep 8 '15 at 14:11
@YoMismo Can you write an answer? I didn't get your comment properly.
– Registered User
Sep 8 '15 at 14:33
@YoMismo Can you write an answer? I didn't get your comment properly.
– Registered User
Sep 8 '15 at 14:33
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
- Mount your USB in /mnt:
mount /dev/your_USB /mnt
mount --bind /dev /mnt/devmount --bind /proc /mnt/procmount --bind /sys /mnt/syschroot /mnt- Modify GRUB config files.
grub-mkconfig
Beware - I find that it puts incorrect 'search hints' in thegrub.cfgthat can stop the target machine from finding kernel and initrd. You may need to clean it up (sedhelps).
– Toby Speight
Sep 8 '15 at 16:33
I get this errorchroot: failed to run command ‘/bin/bash’: No such file or directory
– Registered User
Sep 8 '15 at 16:50
Trychroot /mnt /path/to/your/shell
– YoMismo
Sep 9 '15 at 7:39
@YoMismo I triedsudo chroot /mnt /usr/bin/bashit giveschroot: failed to run command ‘/usr/bin/bash’: No such file or directory
– Registered User
Sep 19 '15 at 9:46
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
- Mount your USB in /mnt:
mount /dev/your_USB /mnt
mount --bind /dev /mnt/devmount --bind /proc /mnt/procmount --bind /sys /mnt/syschroot /mnt- Modify GRUB config files.
grub-mkconfig
Beware - I find that it puts incorrect 'search hints' in thegrub.cfgthat can stop the target machine from finding kernel and initrd. You may need to clean it up (sedhelps).
– Toby Speight
Sep 8 '15 at 16:33
I get this errorchroot: failed to run command ‘/bin/bash’: No such file or directory
– Registered User
Sep 8 '15 at 16:50
Trychroot /mnt /path/to/your/shell
– YoMismo
Sep 9 '15 at 7:39
@YoMismo I triedsudo chroot /mnt /usr/bin/bashit giveschroot: failed to run command ‘/usr/bin/bash’: No such file or directory
– Registered User
Sep 19 '15 at 9:46
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
|
show 2 more comments
up vote
0
down vote
- Mount your USB in /mnt:
mount /dev/your_USB /mnt
mount --bind /dev /mnt/devmount --bind /proc /mnt/procmount --bind /sys /mnt/syschroot /mnt- Modify GRUB config files.
grub-mkconfig
Beware - I find that it puts incorrect 'search hints' in thegrub.cfgthat can stop the target machine from finding kernel and initrd. You may need to clean it up (sedhelps).
– Toby Speight
Sep 8 '15 at 16:33
I get this errorchroot: failed to run command ‘/bin/bash’: No such file or directory
– Registered User
Sep 8 '15 at 16:50
Trychroot /mnt /path/to/your/shell
– YoMismo
Sep 9 '15 at 7:39
@YoMismo I triedsudo chroot /mnt /usr/bin/bashit giveschroot: failed to run command ‘/usr/bin/bash’: No such file or directory
– Registered User
Sep 19 '15 at 9:46
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
|
show 2 more comments
up vote
0
down vote
up vote
0
down vote
- Mount your USB in /mnt:
mount /dev/your_USB /mnt
mount --bind /dev /mnt/devmount --bind /proc /mnt/procmount --bind /sys /mnt/syschroot /mnt- Modify GRUB config files.
grub-mkconfig
- Mount your USB in /mnt:
mount /dev/your_USB /mnt
mount --bind /dev /mnt/devmount --bind /proc /mnt/procmount --bind /sys /mnt/syschroot /mnt- Modify GRUB config files.
grub-mkconfig
edited Jan 29 at 12:16
answered Sep 8 '15 at 14:57
YoMismo
3,0561724
3,0561724
Beware - I find that it puts incorrect 'search hints' in thegrub.cfgthat can stop the target machine from finding kernel and initrd. You may need to clean it up (sedhelps).
– Toby Speight
Sep 8 '15 at 16:33
I get this errorchroot: failed to run command ‘/bin/bash’: No such file or directory
– Registered User
Sep 8 '15 at 16:50
Trychroot /mnt /path/to/your/shell
– YoMismo
Sep 9 '15 at 7:39
@YoMismo I triedsudo chroot /mnt /usr/bin/bashit giveschroot: failed to run command ‘/usr/bin/bash’: No such file or directory
– Registered User
Sep 19 '15 at 9:46
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
|
show 2 more comments
Beware - I find that it puts incorrect 'search hints' in thegrub.cfgthat can stop the target machine from finding kernel and initrd. You may need to clean it up (sedhelps).
– Toby Speight
Sep 8 '15 at 16:33
I get this errorchroot: failed to run command ‘/bin/bash’: No such file or directory
– Registered User
Sep 8 '15 at 16:50
Trychroot /mnt /path/to/your/shell
– YoMismo
Sep 9 '15 at 7:39
@YoMismo I triedsudo chroot /mnt /usr/bin/bashit giveschroot: failed to run command ‘/usr/bin/bash’: No such file or directory
– Registered User
Sep 19 '15 at 9:46
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
Beware - I find that it puts incorrect 'search hints' in the
grub.cfg that can stop the target machine from finding kernel and initrd. You may need to clean it up (sed helps).– Toby Speight
Sep 8 '15 at 16:33
Beware - I find that it puts incorrect 'search hints' in the
grub.cfg that can stop the target machine from finding kernel and initrd. You may need to clean it up (sed helps).– Toby Speight
Sep 8 '15 at 16:33
I get this error
chroot: failed to run command ‘/bin/bash’: No such file or directory– Registered User
Sep 8 '15 at 16:50
I get this error
chroot: failed to run command ‘/bin/bash’: No such file or directory– Registered User
Sep 8 '15 at 16:50
Try
chroot /mnt /path/to/your/shell– YoMismo
Sep 9 '15 at 7:39
Try
chroot /mnt /path/to/your/shell– YoMismo
Sep 9 '15 at 7:39
@YoMismo I tried
sudo chroot /mnt /usr/bin/bash it gives chroot: failed to run command ‘/usr/bin/bash’: No such file or directory– Registered User
Sep 19 '15 at 9:46
@YoMismo I tried
sudo chroot /mnt /usr/bin/bash it gives chroot: failed to run command ‘/usr/bin/bash’: No such file or directory– Registered User
Sep 19 '15 at 9:46
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
Does /usr/bin/bash exist?
– YoMismo
Sep 19 '15 at 21:21
|
show 2 more comments
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%2f228267%2fhow-to-make-grub-mkconfig-work-on-a-usb-device%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
What is it exactly what you are trying to acomplish?
– YoMismo
Sep 8 '15 at 13:44
@YoMismo unix.stackexchange.com/q/224695/55673
– Registered User
Sep 8 '15 at 14:02
Then mount your usb in /mnt,
mount --bind/dev /sys /proc under mnt's respctive ones andchrootto your /mnt, modify any needed file and rungrub-mkconfig– YoMismo
Sep 8 '15 at 14:11
@YoMismo Can you write an answer? I didn't get your comment properly.
– Registered User
Sep 8 '15 at 14:33