DebianThis forum is for the discussion of Debian Linux.
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.
The problem arised after installing Debian on a USB disk. The Debian installation on the USB works as intended but it broke my hard disk installation. I get an error "boot device not found" on poweron.
The hard disk has a separate /boot partition
/dev/sda1 /boot
/dev/sda3 / (debian)
I have tried the following
Code:
mount /dev/sda3 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
chroot /mnt
update-grub
On reboot I get a "boot device not found" message
I have also tried the above including mounting the /boot partition and I get an error on update-grub
Code:
mount /dev/sda1 /mnt/boot
update-grub
/usr/sbin/grub-mkconfig: 257: cannot create /boot/grub.grub.cfg.new: Directory nonexistend
ls /boot
EFI
Can you post here exact steps which fixed the problem. It will help many users with similar problems.
Not really, but I entered rescue mode and after a few steps I went to the grub-install step. Then just rebooted and everything was there as before.
What I do not understand is why the separate installation on a USB stick broke my hard disk installation. And to complicate the matter more, the USB disk installation does not boot any more (after fixing the hard disk boot problem).
Without really knowing what you did - It's likely during your installation when asked to install grub, it didn't know it was going to be "portable" and installed the boot loader as though it was on the system it was going to always boot up.
So it hijacked the the book loader from your drive... actually you would have told it to. So the 1st stage was looking for the USB device for stage 2.
As for recovery, update-grub likely only updates the flubbed up grub. You needed grub-install then update-grub.
But this is highly speculation and it's not completely clear what actually happened.
It's likely during your installation when asked to install grub, it didn't know it was going to be "portable" and installed the boot loader as though it was on the system it was going to always boot up.
... actually you would have told it to.
I'm sure that the Debian installer asks where you want to install GRUB to - in a dropdown, there's your internal hard drive and your USB stick.
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498
Rep:
Quote:
Originally Posted by Debian6to11
What I do not understand is why the separate installation on a USB stick broke my hard disk installation. And to complicate the matter more, the USB disk installation does not boot any more (after fixing the hard disk boot problem).
You told grub to boot the USB from your hard disk, not the USB - it should have been installed to the USB drive, it has to be the first disk to boot.
I have tried installing again on a USB disk. It does not boot. I had disconnected the hard disks from the computer and the only things connected were the two USB disks, the installer and the receiver. It does not boot through the USB. It does not want to for some reason unclear to me.
I have tried installing again on a USB disk. It does not boot. I had disconnected the hard disks from the computer and the only things connected were the two USB disks, the installer and the receiver. It does not boot through the USB. It does not want to for some reason unclear to me.
Without knowing everything specifically - did you direct your BIOS to boot from removable media?
Things like EUFI or Legacy Boot, which device is your BIOS directing to boot from... the boot device, handing off to where ever you install the boot loader. All this needs to be in sync.
Installing with drives attached - the one your BIOS is looking for, unless you specify removable media, then expecting it to boot from a USB, changes the "order" of things ...maybe.
Again, not sure what your configuration is nor how you tried booting your system. If you want a Live boot, or a portable system... you may need more research. Use CloneZilla to take a functioning system to "clone" it to another device. But again, generally an external device isn't a default boot device.
First, laptop1, with a working Debian system on a hard disk. Insert USB1 with the installer and an empty USB2 to install Debian to use as a portable system. Finished installing on the USB2 and both the hard disk and the USB2 did not boot. Fixed the hard disk using the rescue mode of the Debian installer.
Second, after these results I took my laptop2, removed the hard disks from it (laptop2 hard disks are easy to remove) and tried again installing installing on USB2 from USB1. After finishing and restarting, this laptop2 was going through a loop. Powering on, showing the splash screen logo, powering off, and repeat (about 3-4 seconds). It's BIOS setup is locked and maybe there is something wrong with secure boot, just guessing here (but the installer on USB1 and other installers I tried do boot).
Before erasing USB2 to use it for something else, I thought to try it again on laptop1. And to my surprise, it booted. Now I have a working Debian system on a portable USB stick (I want to use it for an LFS system).
Still not sure what's going on, if someone has an explanation of this please post, I am curious why this has happened.
As far as the first try on laptop1, I tried to fix the USB2 by the rescue mode and by using the link teckk posted (https://wiki.debian.org/GrubEFIReinstall) without any positive results.
This is my experience with a Lenovo z50-70 laptop dual boot with zorin OS.
I first tried fresh install with Zorin OS 17 but couldn't even after trying grub install. Assuming the win 10 was messing up the hard disk I replaced it with a brand new SSD drive. I tried several live linux distributions with zero result.
When trying a live linux mint usb I ran hardware check option as I ran the memtest86 bingo found that the memory was corrupted.
I replaced the sodimm memory also upgrading from 8 gb to 16 gb and installed mx linux
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.