1

I have encountered an interesting scenario. I have some Debian Live CD images (I have tried debian-8.11.0-amd64-netinst.iso, debian-9.6.0-amd64-netinst.iso and some custom images I built using live-build) and dd the image onto an USB drive. I boot the computer with the USB drive and install Debian onto hard drive. When the installation finishes, the computer reboots. At this time, after I login, I find I am not able to use the USB drive, which is still plugged in. I can see it being /dev/sdb, but /dev does not show any partitions of the USB drive. I tried fdisk -l /dev/sdb but gets fdisk: cannot open /dev/sdb: No medium found. In dmesg the only two lines I see related are

sd 2:0:0:0: Attached scsi generic sg1 type0
sd 2:0:0:0: [sdb] Attached SCSI removable disk

Here's the interesting part. If I unplug the drive and plug back in, it gets detected and works fine. If I reboot the box (either reboot or poweroff and then power on), it doesn't work. However, if after the box is powered off, I unplug the drive and plug in back it, upon the next boot it works. I wondered if there's some mechanism in Debian Installer that prevents the USB drive from working to avoid reboot-install loop. I looked into some of the files and in /bin/live-medium-eject I find it's not doing anything to usb devices and has the following comment:

# ignoring usb mass storage devices
# (they need coldreboot to recover)

What could be the cause of this behavior?

EDIT1: I also tried Ubuntu 18.04 and CentOS 7.6. Ubuntu produces the same behavior as Debian, but CentOS can recognize the USB drive upon the first boot.

  • I don't think there's some designed mechanism in Debian Installer that prevents the USB drive from working to avoid reboot-install loop. I think that the tool to recognize the USB drive is not ready at boot (maybe one part of it tries to use another part, that is not started yet). Things may behave in a different way in another computer. – sudodus Jan 23 at 5:42
  • Thank you for the response. By "tool to recognize the USB drive" do you mean an OS component or something more hardware related? It's purely in OS, I'm puzzled why it works if I unplug and plug back during the time the box is powered off. – user274602 Jan 23 at 18:19
  • It could be a hardware or software component or the cooperation between hardware and software, where there is a slow starter. It is interesting that it works with Centos 7.6, which has an older kernel series than current Ubuntu and Debian. The behavior that you describe does not affect my Ubuntu 18.04.1 LTS in a Dell Precision M4800. I tested right now with an installed (and up to date) system, when booted with a USB pendrive (with Ubuntu 18.04.1 LTS persistent live) plugged in. -- What is your computer's name and model? – sudodus Jan 23 at 18:37
  • My box is a Protectli Vault. I only see this behavior when booting from hard drive right after installation from usb drive. If I unplug the usb drive once, everything went back to normal. – user274602 Jan 23 at 19:28
  • I see (and I did not understand this before; probably did not read your original question well enough). - This is the first time I read about Protectli Vault (and I found some information via the internet). How do you intend to use it? Now that you have installed several operating systems and rebooted a few times, is it working like it should? -- And I am curious: Which operating system do you think works best in this computer (except the special problem with the USB drive right after the installation)? – sudodus Jan 23 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.