LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-26-2022, 01:24 PM   #1
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382
Blog Entries: 1

Rep: Reputation: 71
Boot device not found


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
What is going on?
 
Old 02-26-2022, 01:48 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Quote:
On reboot I get a "boot device not found" message
Look at /etc/fstab

If you are in chroot
Quote:
/usr/sbin/grub-mkconfig: 257: cannot create /boot/grub.grub.cfg.new:
Code:
grub-mkconfig -o /mnt/boot/grub/grub.cfg
Look at the man page for update-grub that you have.

https://wiki.debian.org/Grub
https://wiki.debian.org/GrubConfiguration
https://wiki.debian.org/GrubEFIReinstall
https://www.debian.org/security/2021...FI-SecureBoot/
 
Old 02-26-2022, 02:20 PM   #3
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71
Thanks for answering, I only looked at your answer when I fixed it.

Fixed by running grub-install in rescue mode from a debian-11.0.0-amd64-DVD-1.iso
 
Old 02-27-2022, 05:08 AM   #4
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Rep: Reputation: 47
Quote:
Originally Posted by Debian6to11 View Post
Thanks for answering, I only looked at your answer when I fixed it.

Fixed by running grub-install in rescue mode from a debian-11.0.0-amd64-DVD-1.iso
Can you post here exact steps which fixed the problem. It will help many users with similar problems.
 
Old 02-27-2022, 06:31 AM   #5
Purdee1
LQ Newbie
 
Registered: Feb 2022
Location: Liverpool
Distribution: Debian(s)
Posts: 24

Rep: Reputation: 3
Generally I'll boot an MX live and use it's included boot repair tool.
Make sure and know the drive/partition your after when you do it.
 
Old 02-27-2022, 10:30 AM   #6
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71
Quote:
Originally Posted by rng View Post
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).
 
Old 02-27-2022, 11:16 AM   #7
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 141

Rep: Reputation: 29
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.
 
Old 03-01-2022, 12:43 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ It is, however, very likely.

Quote:
Originally Posted by djk44883 View Post
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.
 
Old 03-01-2022, 04:14 AM   #9
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498

Rep: Reputation: Disabled
Quote:
Originally Posted by Debian6to11 View Post
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.
 
Old 03-02-2022, 12:54 AM   #10
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71
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.
 
Old 03-02-2022, 03:41 PM   #11
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 141

Rep: Reputation: 29
Quote:
Originally Posted by Debian6to11 View Post
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.
 
Old 03-03-2022, 04:50 AM   #12
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382

Original Poster
Blog Entries: 1

Rep: Reputation: 71
Weird things happen, let me rewrite this mess.

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.
 
Old 03-03-2022, 12:51 PM   #13
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498

Rep: Reputation: Disabled
If it is UEFI in Legacy mode, it may well be Secure Boot causing the problem.
 
Old 02-08-2024, 02:19 PM   #14
xmanitu
LQ Newbie
 
Registered: Aug 2018
Posts: 1

Rep: Reputation: Disabled
Lenovo z50-70 block device not found

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

Last edited by xmanitu; 02-08-2024 at 02:22 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
Directory not found; -xzvf not found; Makefile not found RealGomer Linux - Software 4 09-20-2010 10:02 AM
Port:0x180 failed (device not found ) Port:0 failed (device not found ) aaliya Linux - Hardware 0 10-05-2006 05:46 AM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration