You are not logged in.

#1 2018-12-14 21:17:00

UglyBob
Member
Registered: 2015-11-29
Posts: 54

Not booting if external drive is connected

I have a strange issue with my little server. If I have a external hdd connected (which has an external power supply if that matters), my server will not usually boot, but stops directly after BIOS with a blinking underscore forever. Only thing I could guess is that for some reason it tries to boot from it, but I can't figure out why. It's not marked as bootable or anything and I can't find any reason in bios for it to try.

$ sudo fdisk -l
Disk /dev/sda: 28 GiB, 30016659456 bytes, 58626288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 272048D6-D710-478D-8BC4-EF34AB19E8EA

Device       Start      End  Sectors  Size Type
/dev/sda1     2048  1050623  1048576  512M EFI System
/dev/sda2  1050624  9437183  8386560    4G Linux swap
/dev/sda3  9437184 58626047 49188864 23.5G Linux filesystem


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcaae3266

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953523711 1953521664 931.5G 83 Linux

Offline

#2 2018-12-14 21:20:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: Not booting if external drive is connected

What bootloader/manager do you use?  What's in the config files for it?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-12-14 23:54:26

Buck
Member
Registered: 2011-03-15
Posts: 4

Re: Not booting if external drive is connected

Do you use bus device names in your /etc/fstab (like /dev/sda1) or UUID's?

See:
https://wiki.archlinux.org/index.php/Pe … ice_naming

Adding another device may cause boot problems if you don't use UUID's.

Offline

#4 2018-12-15 12:48:56

UglyBob
Member
Registered: 2015-11-29
Posts: 54

Re: Not booting if external drive is connected

Trilby wrote:

What bootloader/manager do you use?  What's in the config files for it?

This was confusing to me at first, as I thought I used GRUB as I usually do. But it seems on this machine I have used systemd-boot. The configs I know about are these:

$ cat /boot/loader/loader.conf
timeout 3
default arch
$ cat /boot/loader/entries/arch.conf
title           Arch Linux
linux           /vmlinuz-linux
initrd          /initramfs-linux.img
options         root=/dev/sda3 rw

I wonder if there is a problem with the drive somehow as it is powered and never really turns off. But I don't know...

Offline

#5 2018-12-15 12:50:20

UglyBob
Member
Registered: 2015-11-29
Posts: 54

Re: Not booting if external drive is connected

Buck wrote:

Do you use bus device names in your /etc/fstab (like /dev/sda1) or UUID's?

See:
https://wiki.archlinux.org/index.php/Pe … ice_naming

Adding another device may cause boot problems if you don't use UUID's.

I use UUIDs:

$ cat /etc/fstab
# /dev/sda3
UUID=725b7f04-8836-4306-b4d5-ab7111548837       /               ext4            rw,relatime,data=ordered        0 1

# /dev/sda1
UUID=CD68-3473          /boot                   vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

# /dev/sda2
UUID=e8c07592-e461-4dd3-b91e-45d53fee95ba       none            swap            defaults        0 0

databob:/Video          /mnt/video              nfs     auto,x-systemd.automount,x-systemd.requires=network.target,x-systemd.device-timeout=10,rsize=8192,wsize=8192,timeo=14,_netdev    0       0
databob:/Pictures       /mnt/pictures           nfs     auto,x-systemd.automount,x-systemd.requires=network.target,x-systemd.device-timeout=10,rsize=8192,wsize=8192,timeo=14,_netdev    0       0
databob:/Books          /mnt/books              nfs     auto,x-systemd.automount,x-systemd.requires=network.target,x-systemd.device-timeout=10,rsize=8192,wsize=8192,timeo=14,_netdev    0       0
databob:/Backup         /mnt/backup             nfs     auto,x-systemd.automount,x-systemd.requires=network.target,x-systemd.device-timeout=10,rsize=8192,wsize=8192,timeo=14,_netdev    0       0
databob:/Roms           /mnt/roms               nfs     auto,x-systemd.automount,x-systemd.requires=network.target,x-systemd.device-timeout=10,rsize=8192,wsize=8192,timeo=14,_netdev    0       0

# /dev/sdb1
UUID=a5ba59b2-754f-41df-9af2-35dffb94f30b       /mnt/download   ext4            rw,relatime,data=ordered        0 1

/opt/openhab2           /srv/nfs/openhab2       none    bind    0       0
/docker/appdaemon       /srv/nfs/appdaemon      none    bind    0       0

Offline

#6 2018-12-15 13:00:53

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,538

Re: Not booting if external drive is connected

options         root=/dev/sda3 rw

try replacing that with the UUID


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2018-12-15 16:04:49

UglyBob
Member
Registered: 2015-11-29
Posts: 54

Re: Not booting if external drive is connected

Lone_Wolf wrote:
options         root=/dev/sda3 rw

try replacing that with the UUID

So you just write it like this?

options         root=725b7f04-8836-4306-b4d5-ab7111548837 rw

Don't feel like making myself a usb disk right now if I ruin it smile

Offline

#8 2018-12-15 16:13:34

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Not booting if external drive is connected

UglyBob wrote:

So you just write it like this?

options         root=725b7f04-8836-4306-b4d5-ab7111548837 rw

Don't feel like making myself a usb disk right now if I ruin it smile

https://www.freedesktop.org/wiki/Softwa … temd-boot/ and https://wiki.archlinux.org/index.php/Pe … t_managers

say it should be

options root=UUID=725b7f04-8836-4306-b4d5-ab7111548837 rw

(assuming that's the correct UUID)

Last edited by 2ManyDogs (2018-12-15 16:17:40)

Offline

#9 2018-12-15 19:33:25

UglyBob
Member
Registered: 2015-11-29
Posts: 54

Re: Not booting if external drive is connected

2ManyDogs wrote:
UglyBob wrote:

So you just write it like this?

options         root=725b7f04-8836-4306-b4d5-ab7111548837 rw

Don't feel like making myself a usb disk right now if I ruin it smile

https://www.freedesktop.org/wiki/Softwa … temd-boot/ and https://wiki.archlinux.org/index.php/Pe … t_managers

say it should be

options root=UUID=725b7f04-8836-4306-b4d5-ab7111548837 rw

(assuming that's the correct UUID)

Still same problem, just a blinking underscore... I feel something is wonky with this hdd.... sad The thing is I'm going to leave this server for several months and really want it to be stable, so I need to solve this. But worst case I can run without the disk I think.

Offline

#10 2018-12-15 20:16:14

UglyBob
Member
Registered: 2015-11-29
Posts: 54

Re: Not booting if external drive is connected

I think it is something going on with BIOS. Most of the time I have only seen my internal drive in the boot order in the BIOS. But now when I did a ctrl+alt+del and went into BIOS, the external hdd was first in the list. I changed to the correct drive and disabled slot 2. Hope this solves it.

Offline

#11 2018-12-16 13:11:45

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,538

Re: Not booting if external drive is connected

EFI systems are supposed to stick to the boot entries in NVRAM to determine what to start, but bios systems tend to use the first drive they find.

I know of atleast one system where the efi firmware looks for an MBR disk and activates CSM if it finds one before it tries to execute efi boot entries.
Disabling the CSM autodetection solved several boot problems.

Check the firmware for CSM related options to verify whether your system might do the same.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB