[SOLVED] restoring grub for dual boot with windows
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
just an FYI as I just thought of it after my previous post
Code:
nick@debian:~/tor-browser_en-US$ su
Password:
root@debian:/home/nick/tor-browser_en-US# cp /boot/grub/grub.cfg /mnt/boot/grub/grub.cfg
cp: cannot create regular file '/mnt/boot/grub/grub.cfg': No such file or directory
root@debian:/home/nick/tor-browser_en-US# cd /mnt/boot/grub
bash: cd: /mnt/boot/grub: No such file or directory
root@debian:/home/nick/tor-browser_en-US# cd /mnt/boot/
bash: cd: /mnt/boot/: No such file or directory
root@debian:/home/nick/tor-browser_en-US# cd /mnt/
root@debian:/mnt# ls
boot-repair EFI System Volume Information
root@debian:/mnt# md boot
bash: md: command not found
root@debian:/mnt# mkdir boot
root@debian:/mnt# cd boot
root@debian:/mnt/boot# mkdir grub
root@debian:/mnt/boot# cp /boot/grub/grub.cfg /mnt/boot/grub/grub.cfg
You need sudo/root rights to write to anything outside your user /home directory unless you change ownership/permission. Run the cp command preceded with sudo or logged in as root user. I see you posted again while I was writing so have you resolved your problem?
This is all wrong, you can delete the boot directory you created under /mnt
Quote:
root@debian:/mnt# ls
boot-repair EFI System Volume Information
root@debian:/mnt# md boot
bash: md: command not found
root@debian:/mnt# mkdir boot
root@debian:/mnt# cd boot
root@debian:/mnt/boot# mkdir grub
root@debian:/mnt/boot# cp /boot/grub/grub.cfg /mnt/boot/grub/grub.cfg
apparently I only have a file EFI in /boot not a folder:
Code:
# cp /boot/grub/grub.cfg /boot/EFI/ubuntu/grub.cfg
cp: cannot create regular file '/boot/EFI/ubuntu/grub.cfg': No such file or directory
root@debian:/usr/bin# cp /boot/grub/grub.cfg /boot/efi/ubuntu/grub.cfg
cp: cannot create regular file '/boot/efi/ubuntu/grub.cfg': No such file or directory
root@debian:/usr/bin# cd /boot
root@debian:/boot# ls ef*
boot boot-repair EFI System Volume Information
root@debian:/boot# cd EFI
bash: cd: EFI: No such file or directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.