You are not logged in.

#1 2016-06-27 17:40:59

amlamarra
Member
Registered: 2015-06-25
Posts: 50

[Solved] Hard drive device name changes from /dev/sda to /dev/sdb

I have a laptop that I'm dual booting Windows 10 & Arch with (after much struggling, I might add). It's in UEFI mode and uses systemd-boot. The laptop has an empty hard drive bay, so I added a drive from an older laptop, boot into Windows, and formatted it as NTFS. Then I try to boot into Arch with no success. Looks like the primary hard drive device name changed from /dev/sda to /dev/sdb. I'm not exactly new to linux, but still have a lot to learn. I tried reading the Persistent block device naming article but couldn't really figure out what to do in my situation. Should I do something like that or can I just update my /etc/fstab file and be done with it?

Thanks!

Last edited by amlamarra (2016-07-05 12:18:13)

Offline

#2 2016-06-27 18:04:55

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,797

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

My suggestion is to use UUIDs.  You will need to update your /etc/fstab.

As to the boot loader, which one are you using? Is it being used? or is the the one that comes with windows on the new drive controlling the boot?
In other words, does the systemd-boot menu display at startup, or does it boot directly into Windows?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-06-27 18:18:33

Expeto
Member
Registered: 2016-06-27
Posts: 9

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

If you are using grub you need select the arch entry and press "e". In the edit screen you can change the "set root='' parameter and get booted in arch. Don't worry if boot fails at another stage, arch will give you a recovery shell. In there you can fix your problem. You need to update your grub config and /etc/fstab. Use UUIDs as suggested.

https://wiki.archlinux.org/index.php/GR … ation_file
https://wiki.archlinux.org/index.php/fstab#UUIDs

You can also use chroot from liveCD as an alternative method of getting a shell.
https://wiki.archlinux.org/index.php/ch … rch-chroot

Offline

#4 2016-06-28 10:12:47

ymf331
Banned
Registered: 2015-04-18
Posts: 9

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

mostly in my experience /dev/sdb is like the usb installation media or an external hard-drive etc, so maybe you're just confused about what shows up on lsblk?


i can't put this zsh config on the forum: http://dotshare.it/dots/1144/

Offline

#5 2016-06-28 13:45:11

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

ewaller wrote:

My suggestion is to use UUIDs.  You will need to update your /etc/fstab.

As to the boot loader, which one are you using? Is it being used? or is the the one that comes with windows on the new drive controlling the boot?
In other words, does the systemd-boot menu display at startup, or does it boot directly into Windows?

My /etc/fstab file is already using UUIDs. It looks like this:

# /dev/sda5
UUID=<random hex digits>	/	ext4		rw,relatime,data=ordered		0 1

#/dev/sda1 LABEL=ESP
UUID=EACA-64B6			/boot	vfat		rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

#/dev/sda4
UUID=<random hex digits>	none	swap	defaults	0 0

sda1 is the EFI partition that was already created & came with Windows 10. That's mounted to /mnt/boot and I'm actually using the systemd-boot menu.

Offline

#6 2016-06-28 13:46:05

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

Expeto wrote:

If you are using grub you need select the arch entry and press "e". In the edit screen you can change the "set root='' parameter and get booted in arch. Don't worry if boot fails at another stage, arch will give you a recovery shell. In there you can fix your problem. You need to update your grub config and /etc/fstab. Use UUIDs as suggested.

https://wiki.archlinux.org/index.php/GR … ation_file
https://wiki.archlinux.org/index.php/fstab#UUIDs

You can also use chroot from liveCD as an alternative method of getting a shell.
https://wiki.archlinux.org/index.php/ch … rch-chroot

I'm using systemd-boot, not grub.

Offline

#7 2016-06-28 13:47:37

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

ymf331 wrote:

mostly in my experience /dev/sdb is like the usb installation media or an external hard-drive etc, so maybe you're just confused about what shows up on lsblk?

No confusion here. Using lsblk shows the expected hard drive sizes for both sda & sdb. When booting from a USB, it also shows sdc with the expected USB drive size.

Offline

#8 2016-06-28 17:50:58

stanhope
Member
Registered: 2016-04-18
Posts: 6

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

I don't want to hijack your thread, but you might have the same issue that I've had forever with ARCH. I have an older box from when SATA disks were new; it has a 160G Sata disk and an 80G IDE disk. Every Arch install cd/dvd I've ever used, from as far back as 2007 "Don't Panic" to the current June 2016 ISO always sees the 80G IDE first and calls it /dev/sda (or hda back when). Yet every other boot disk, live CD, disk utility, partition utility, and importantly Grub/Grub2 has always seen the 80G IDE _second_, and hence calls it /dev/sdb. Perhaps systemd-boot sees the disk order the same as the rest of the world. It might be worth your while to boot from your install media and see if lsblk shows your disks reversed (in case you ever want to use it for some disk work).

Offline

#9 2016-06-28 21:34:52

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

Use UUIDS. In the bootloader configuration, in fstab, wherever you want.
https://wiki.archlinux.org/index.php/Sy … tallations

Offline

#10 2016-06-29 13:08:05

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

teateawhy wrote:

Use UUIDS. In the bootloader configuration, in fstab, wherever you want.
https://wiki.archlinux.org/index.php/Sy … tallations

YES! That's what I was looking for, thank you. I remember seeing this when I was installing Arch, modifying that /boot/loader/entries/arch.conf file, and wondering if I should use the PARTUUID but figured I wouldn't need to hmm

Anyway, I just modified it and arch won't boot... I don't even have the extra hard drive plugged into my laptop at the moment (I'm at work and left it at home). I put the arch.conf file back to the way it was before (pretty sure the one line just said "options root=/dev/sda5 rw") and it still won't boot. Is there anything I need to do after modifying that boot entry file or should I just be able to reboot & load arch?

Edit: During the boot process, it stops after showing this:

[    4.0xxxxx] pcieport 0000:00:1d.2: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00ea(Receiver ID)
[    4.0xxxxx] pcieport 0000:00:1d.2:   device [8086:9d1a] error status/mask=00000001/00000000
[    4.0xxxxx] pcieport 0000:00:1d.2:    [ 0] Receiver Error         (First)
[    4.0xxxxx] pcieport 0000:00:1d.2: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=00ea(Receiver ID)
[    4.0xxxxx] pcieport 0000:00:1d.2:   device [8086:9d1a] error status/mask=00000001/00000000
[    4.0xxxxx] pcieport 0000:00:1d.2:    [ 0] Receiver Error

After rebooting several times, it sometimes show these extra lines at the end:

[    4.0xxxxx] pcieport 0000:00:1d.2:    [ 6] Bad TLP
[    4.0xxxxx] pcieport 0000:00:1d.2:    [13] Advisory Non-Fatal

Yesterday, I did install TLP & powertop in an attempt to get some better battery performance. So I just now arch-chrooted and removed those packages. Still won't boot.

Last edited by amlamarra (2016-06-29 13:56:38)

Offline

#11 2016-06-30 11:22:19

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

By the way, right now my /boot/loader/entries/arch.conf file looks like this:

title	Arch Linux
linux	/vmlinuz-linux
initrd	/intel-ucode.img
initrd	/initramfs-linux.img
options	root=PARTUUID=c14d31d4-9f97-4d37-be87-bb3f4d7394e7 rootfstype=ext4 rw

Before I ever added this new hard drive, it looked like this & worked just fine:

title	Arch Linux
linux	/vmlinuz-linux
initrd	/initramfs-linux.img
options	root=/dev/sda5 rw

But now that won't work, even if I take the additional hard drive out & the primary goes back to /dev/sda. Maybe TLP made some changes that caused this. I think I actually had this problem after I initially installed Arch and forgot to install nvidia drivers. Maybe I'll try reinstalling that.

Offline

#12 2016-06-30 14:00:03

jsoy9pQbYVNu5nfU
Member
Registered: 2013-04-19
Posts: 108

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

You're confusing TLP the power management tool with TLP the transaction layer packets that get send over the PCIe the bus; the latter is what you should be looking into.

Offline

#13 2016-06-30 14:11:09

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

2ion wrote:

You're confusing TLP the power management tool with TLP the transaction layer packets that get send over the PCIe the bus; the latter is what you should be looking into.

Ahh, thanks for the hint. Got any leads?

Offline

#14 2016-07-04 22:23:53

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

This seems to be a display driver issue. I'm able to boot just find now after using UUIDs in my /boot/loader/entries/arch.conf file. Now, when I go into the /etc/X11/xorg.conf file and comment out the "Device" section, I'm able able to boot to my display manager (Plasma 5) just fine, however, everything is at a really low resolution & I can't change it. The "Device" section specifies the nvidia drivers. Should I be using /etc/X11/xorg.conf.d/20-nvidia.conf instead? If so, how? The "Device" section of the xorg.conf file looks like this:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Should I start a new thread for this since it's a different issue?

Last edited by amlamarra (2016-07-05 00:46:21)

Offline

#15 2016-07-05 12:10:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved] Hard drive device name changes from /dev/sda to /dev/sdb

Might be a good idea, and include xrandr output, the xorg log, exactly what card you have, pacman -Qs nvidia, what the native resolution of the monitor is and other relevant info.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB