Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 12 (Bookworm) - No operating system detectable after storage reconnect

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
drenriza
Posts: 14
Joined: 2013-03-20 14:21

Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#1 Post by drenriza »

Hi all
I have a problem where if i install Debian 12 stable on any storage device
- HDD, SDD or M.2 NVMe
boot into another OS and reconnect the 1'st storage device again, than no OS is detected.

So the process is as follows.
1) installed Debian 12 stable with LVM or LUKS and LVM
2) Disconnected the storage device
3) Inserted a fresh storage device
4) installed Debian 12 stable with LVM or LUKS and LVM
5) Disconnected the storage device
6) Inserted the 1'st storage device back to the same hardware from which it was taken.
Error no OS detected
7) Inserted the 2'nd storage device back to the same hardware from which it was taken.
Error no OS detected

Windows does not have this problem, and i can unplug my Windows install and boot something else and still boot Windows afterwards.

My questions are as follows.
- Is this an error with Debian 12?
- Is this expected behaviour?
- If yes, why?

If i don't unplug the storage device after install, Debian will work as intended also after restarts and shutdowns, but the second i unplug the storage device, try and boot something else and try to re-boot Debian, it cant detect the OS.

Thank you in advance
Best regards
Last edited by drenriza on 2024-04-17 17:43, edited 8 times in total.

Linuxgaming1824
Posts: 109
Joined: 2024-04-16 18:30
Been thanked: 8 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#2 Post by Linuxgaming1824 »

The way you are representing your problem is extremely complicated, like a programmed loop for our own logic to run through.

Try isolating the issue you are representing in the space of three sentences, and make it as simple as possible.
Then see if that solves your problem.

drenriza
Posts: 14
Joined: 2013-03-20 14:21

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#3 Post by drenriza »

I am not sure how you would simplify the explanation.

I install debian 12 on Disk 1.
I unplug disk 1.

I install debian 12 on Disk 2.
I unplug disk 2.

I plug in disk 1 = no operating system detectable.
I plug in disk 2 = no operating system detectable.

If i don't unplug the disk = no issues,
the second i unplug the disk = no operating system detectable at next boot.

Best regards

Aki
Global Moderator
Global Moderator
Posts: 3086
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 76 times
Been thanked: 418 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#4 Post by Aki »

Hello,

Some questions:
  1. Does the computer boot a Debian Live ISO (for example, from a USB stick) ?
    • If yes, can you report the output of the inxi program to describe hardware and software computer configuration when an unrecognized Debian installation is physically connected to the computer ? The command could be:

      Code: Select all

      inxi - Fxxxza
  2. How are the swapped devices physically connected to the computer ?
  3. Are there any other disks in the computer ?
  4. Does the computer boot in UEFI or legacy mode ?
  5. Do you connect the media with Debian before or after turning on the computer ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Linuxgaming1824
Posts: 109
Joined: 2024-04-16 18:30
Been thanked: 8 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#5 Post by Linuxgaming1824 »

If i don't unplug the disk = no issues,
the second i unplug the disk = no operating system detectable at next boot.
O.O

Hold on let me guess!

You're not turning off your computer properly, and disengaging your hardware properly!

drenriza
Posts: 14
Joined: 2013-03-20 14:21

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#6 Post by drenriza »

Linuxgaming1824 wrote: 2024-04-17 18:20
If i don't unplug the disk = no issues,
the second i unplug the disk = no operating system detectable at next boot.
O.O

Hold on let me guess!

You're not turning off your computer properly, and disengaging your hardware properly!
I assume that i am

On a laptop I
1) shutdown and halt the laptop
2) open the back plate
3) disconnect the battery
4) change the storage device
5) re-assemble.

On a desktop I
1) shutdown and halt the desktop
2) unplug the PSU power cord
3) discharge the system
4) change the storage device
5) plug everything back in.

This exact process works fine with a Windows bootable disk.

Is there any error in this approach in your opinion?
Last edited by drenriza on 2024-04-17 18:41, edited 4 times in total.

drenriza
Posts: 14
Joined: 2013-03-20 14:21

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#7 Post by drenriza »

Aki wrote: 2024-04-17 17:50 Hello,

Some questions:
  1. Does the computer boot a Debian Live ISO (for example, from a USB stick) ?
    • If yes, can you report the output of the inxi program to describe hardware and software computer configuration when an unrecognized Debian installation is physically connected to the computer ? The command could be:

      Code: Select all

      inxi - Fxxxza
  2. How are the swapped devices physically connected to the computer ?
  3. Are there any other disks in the computer ?
  4. Does the computer boot in UEFI or legacy mode ?
  5. Do you connect the media with Debian before or after turning on the computer ?
Answers to questions
1) I will test but i don't see why not.
2) M.2 NVMe or SATA (SSD)
3) Nope
4) UEFI
5) Not sure i understand this question, all disks are only disconnected to reconnected when the system is halted and discharged or disconnected battery.
Depending on if it is laptop or desktop.

I got experienced this on the following
- Lenovo Thinkpad
- HP elitebook G5
- Desktop With Asus MB (Sabertooth 990FX R2.0)

Linuxgaming1824
Posts: 109
Joined: 2024-04-16 18:30
Been thanked: 8 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#8 Post by Linuxgaming1824 »

Did you try plugging it back in again, and found that it works!

it's not clear to me whether or not you want to solve the problem you're having or if you want to identify what you sense is a problem at all.

If you want to simply solve the problem, that is the easiest thing to do after all.

If you want to identify exactly what is happening, and why you are observing this behavior within your unique system, that is
going to take dedicated effort as well, but also a lot more time.

drenriza
Posts: 14
Joined: 2013-03-20 14:21

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#9 Post by drenriza »

Linuxgaming1824 wrote: 2024-04-17 18:39 Did you try plugging it back in again, and found that it works!
If i were able to plug it back in and have it working i would not write here, as i with three different storage devices on three different machines get the same result.

That when the storage device is unplugged with Debian 12 installed on it, the machine cannot locate the OS when the storage device is plugged back in.

As this works fine for a Windows bootable storage device, i don't personally see a fault in the process, as if this was the case the Windows storage device should also not be able to boot.

As none of my systems are unique in any way, i don't see this as a "unique" problem.
Linuxgaming1824 wrote: 2024-04-17 18:39 If you want to simply solve the problem, that is the easiest thing to do after all.
How would you suggest i solve the problem?

I have tried to re-install debian 12 multiple times, when i unplug the disk in a normal and safe way and boot something else like Windows which works fine, than Debian 12 cant boot after being plugged back in.

Linuxgaming1824
Posts: 109
Joined: 2024-04-16 18:30
Been thanked: 8 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#10 Post by Linuxgaming1824 »

Can you boot up debian via the bios boot menu?

There are typically, a couple options in the bios boot menu that represent your storage device.

One option will show the plain device itself

another will show the device itself with the debian operating system

That is what is typically present.

The thing is, all of our systems are actually unique. Even if you and I bought the same computer, from the same organization, and took them to the same house, and sat in the same room, now that same computer from the same organization and in the same house, and in the same room, are systems that we are uniquely using individually.

Please also describe your partitioning scheme for debian, and your bios configuration generally. (you should examine those next)

User avatar
pbear
Posts: 387
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 2 times
Been thanked: 63 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#11 Post by pbear »

This smells to me like an NVRAM problem. Try running efibootmgr before and after swapping drives.

Caveat: I've never done anything like what you're attempting, so may have no practical advice to offer.

User avatar
oZu
Posts: 4
Joined: 2024-03-19 18:55
Been thanked: 1 time

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#12 Post by oZu »

Limit your efforts at troubleshooting to one system at least for now.
Attach one of the problematic drives carrying Debian Bookworm
and boot into your installation media to post the output of commands
other users already recommended.

Augie77
Posts: 71
Joined: 2024-03-23 04:05
Has thanked: 19 times
Been thanked: 9 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#13 Post by Augie77 »

drenriza wrote: 2024-04-17 18:46 .
.

That when the storage device is unplugged with Debian 12 installed on it, the machine cannot locate the OS when the storage device is plugged back in.
.
.
I have had this problem as well, on a SanDisk Extreme Portable SSD.

By your first post, you are hot plugging your external USB devices that have a bootable ( I presume ) OS on them? You also say that hot plugging fails regardless of the external storage device you use. Are you certain your .iso burns are good? I have never found hot plugging a bootable device into a working OS to always work, as in, the device being seen by the system.

Once the USB is reinserted, is the device seen but not the OS, or no device seen at all? Did you use disks or gparted to see if the device is visible and mounted?

If what you want to do is plug the external USB device in and then boot, I would not be concerned if Thunar, etc. does not see the device, but you want to see if the USB device is visible in the UEFI as a boot device.

Linuxgaming1824
Posts: 109
Joined: 2024-04-16 18:30
Been thanked: 8 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#14 Post by Linuxgaming1824 »

I think it's cool if you have identified a unique problem such as this...It should be important to identify exactly what is wrong in this case, so the problem can be resolved.

Please identify some information for others to help resolve the issue...

What is the installation medium for your install?
How are you producing the installation medium?
What kind of computer are you using?
How are you initiating the install?
How are you installing debian?
What is the partitioning scheme for your install?
Are there any customization's you make to the operating system (or the computer) prior to, or after installation?

It might seem painstaking to answer all these questions, but after installing linux probably 1000 times, these are the questions I myself have to answer every time, to resolve issues. If you have identified a serious issue, than we should work to identify exactly what is wrong in this case, so it can be resolved.

Also there are lots of "troubleshooting" or testing steps to take to help identify the issue as well.

If you install debian, turn off the computer fully

discharge it's electricity... for desktop and laptop these actually have different procedures... for the desktop you actually leave the power cable in, with the power switch off, and hold down the power button to discharge it, for 10-20 seconds, for laptop you remove the battery and attempt to discharge it after

remove the hard disk storage device, being careful to place your hands on the external metal, and/or external metal of the powersupply to equalize your electric potential with the computer system, and then carefully removing the target device

reset the storage device, similarly with great care

restore power to the machine, enter bios/uefi settings to see that the device is recognized by the firmware device drivers, attempt to boot from the device with debian installed
I install debian 12 on Disk 1.
I unplug disk 1.

I install debian 12 on Disk 2.
I unplug disk 2.

I plug in disk 1 = no operating system detectable.
I plug in disk 2 = no operating system detectable.
Does it work if you install on disk 1, unplug disk 1, install on disk 2, unplug disk 2, and then plug in disk 2?

User avatar
pbear
Posts: 387
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 2 times
Been thanked: 63 times

Re: Debian 12 (Bookworm) - No operating system detectable after storage reconnect

#15 Post by pbear »

I'm willing to wager a bright shiny nickel the problem is as simple as that the firmware is clearing Debian's NVRAM entry when the storage device is removed.
One solution would be to restore the entry manually (with efibootmgr). Another would be to boot from a rEFInd flash drive, which bypasses NVRAM.

What method the OP used to install almost certainly has no bearing on the problem.

Post Reply