You are not logged in.

#1 2015-07-29 00:29:39

michaelgira
Member
Registered: 2015-07-29
Posts: 25

The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Hey guys

I have installed arch a few times before and didn't have a problem. However, this time i seem to have a big problem which i am unable to see an answer to.

I have always had 2 drives when doing an install of anything Linux.

SDA
The drive i would like to format and create a fresh Arch Linux install on.

SDB
The USB stick that has the installation media to install Arch Linux.

When going booting from USB and then using lsblk i get the results:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:16   1    15G  0 disk 
├─sda1   8:17   1   646M  0 part /run/media//ARCH_201507
└─sda2   8:18   1    31M  0 part 
sdb      8:0    0 465.8G  0 disk 
├─sdb1   8:1    0   512M  0 part /boot
├─sdb2   8:2    0     4G  0 part [SWAP]
├─sdb3   8:3    0    20G  0 part /
└─sdb4   8:4    0 441.3G  0 part /home
something about loops (i can't remember)

The strange thing is, in my current Arch install, if i use the same command, i get the opposite results.

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   512M  0 part /boot
├─sda2   8:2    0     4G  0 part [SWAP]
├─sda3   8:3    0    20G  0 part /
└─sda4   8:4    0 441.3G  0 part /home
sdb      8:16   1    15G  0 disk 
├─sdb1   8:17   1   646M  0 part /run/media//ARCH_201507
└─sdb2   8:18   1    31M  0 part 

I am hesitant to try and install Arch on SDB, because that has always been my USB.

I will try to give as much info as i can. I am not too sure what info is helpful, and what isn't. So if you need more, please let me know and i will do my best to provide it.

  • I wrote it to USB using the dd command provided in Arch wiki, i normally do it that way.

  • I am on a UEFI motherboard.

  • My boot loader is gummiboot.

I would really like to solve this problem. I would be very grateful for any help, thank you.

Last edited by michaelgira (2015-07-29 01:54:17)

Offline

#2 2015-07-29 00:31:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,135
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

The names are completely arbitrary: https://wiki.archlinux.org/index.php/Pe … ice_naming

Just focus on installing to the correct device...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-07-29 01:29:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,298
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

jasonwryan wrote:

Just focus on installing to the correct device...

And use UUIDs (or labels) for the bootloader config and fstab - which is just generally a good idea anyways.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2015-07-29 01:46:35

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

jasonwryan wrote:

The names are completely arbitrary: https://wiki.archlinux.org/index.php/Pe … ice_naming

Just focus on installing to the correct device...

Hi, thanks for the reply.

I went through the article and I'm a little confused.

It says

If your machine has more than one SATA, SCSI or IDE disk controller, the order in which their corresponding device nodes are added is arbitrary. This may result in device names like /dev/sda and /dev/sdb switching around on each boot, culminating in an unbootable system, kernel panic, or a block device disappearing. Persistent naming solves these issues.

I do not have more than one SATA, SCSI, or IDE disk controller. At least, I'm pretty sure i don't.

When you say the names are completely arbitrary, I'm not quite sure how that works, since no matter how many times i have distro hopped, refromatted, etc, the names have always been static. It still stays static in the Arch system i am currently in. My drive does not change from sda. However once i boot through USB to do a new installation of Arch, it mixes theem up. It willl always say my drive is sdb. This did not happen in the past when i have installed Arch.

I went through the article and went through how to give it a persistant name, though everything related me (gpt, uefi) the things that are needed to be done in order to achieve persistent naming have already been done. I have checked my fstab and my gummiboot arch config.

I see your main point is that the sdx names do not matter and that i could still install Arch to the correct device, although i would like my disk to be sda anyway. It has always been that way.
Is there any possible way to achieve that during the new Arch install?

What i checked was through my current install. Is there something i can edit while in the new installation to change it, or is this not possible?

Offline

#5 2015-07-29 01:52:48

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Trilby wrote:
jasonwryan wrote:

Just focus on installing to the correct device...

And use UUIDs (or labels) for the bootloader config and fstab - which is just generally a good idea anyways.

The thing is, i am using UUIDs, the GPT equivelent, partuuid.

sdx has always remained static, in this install and all other past installations, it just changes when i boot into the installation media.
I would really like my drive to continue staying as sda. I'm becoming pretty confused about this whole situation.

Offline

#6 2015-07-29 02:23:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,135
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Well, you will only boot into the installation media rarely, so it is not an issue, is it?

As I said, just make sure that, during the installation, you choose the correct device to partition.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2015-07-29 02:44:20

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

jasonwryan wrote:

Well, you will only boot into the installation media rarely, so it is not an issue, is it?

As I said, just make sure that, during the installation, you choose the correct device to partition.

Okay, I will try to do so since i guess the sdx names aren't that big of a deal.

It may be rare that i boot into the installation media, but it wouldn't be rare for me to use commands such as fdisk -l, lsblk, and using disk managing/CL tools in general.
those types of tools would show my disk sdb.

Although, are you saying that when the installation is over and the installation media is removed, my disk would be reffered to as sda again? If so, i would be completely fine with that. Maybe I'm misunderstanding how the naming works.

I know that it is better to refer to the disk by UUID, but those commands and tools always refer to them as sdx. I mean i can't just type in gparted /dev/UUID. I don't think that works, and even if it did it would be extremely hard to remember the UUiD name of the partitions. This is making me think that i am misunderstanding how naming works.

Last edited by michaelgira (2015-07-29 02:44:46)

Offline

#8 2015-07-29 02:55:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,135
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

michaelgira wrote:

re you saying that when the installation is over and the installation media is removed, my disk would be reffered to as sda again?

Assuming that it is the only disk present, yes. It is a good idea to just accept that the naming convention is unpredictable, and work around it with UUIDs/labels, etc.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2015-07-29 04:04:26

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

jasonwryan wrote:
michaelgira wrote:

re you saying that when the installation is over and the installation media is removed, my disk would be reffered to as sda again?

Assuming that it is the only disk present, yes. It is a good idea to just accept that the naming convention is unpredictable, and work around it with UUIDs/labels, etc.

Something very strange just happened. After checking the devices a number of times so I would choose the correct device, I wiped the correct drive even though it was under a different name, and then I partitioned it. It looked like everything was going fine, although I was a bit uneasy about it since I've never had sdx swap names before.

After the partitioning was done, I rebooted just to make sure the installation media would be writing to the new partitions, I know you don't need to, but I do it just to be safe. Once booted I was met with a screen of errors. It went something a long the lines of this:

sdb can't find cache
Assuming drive cache write through
ERROR device partuid=(numbers and letters I can't remember) not found skipping fsck
ERROR unable to find root device partuid=(see above)
    You are being dropped to a recovery shell
     Exit to try and continue booting
     Can't access tty job control is off

After using exit to try and boot again, I was met with the same errors. I tried a few more times and then my computer started going KERNEL PANIC! My caps lock started flashing too, the fan started getting louder and louder. I had to manually shut down to stop the kernel panic. My heart kind of sank.

I eventually decided to boot and see what happens, know I partitioned my disk, I hit the key to let me go to boot menu and the installation media booted successfully, on top of that, after using lsblk, it finally started showing my disk as sda again.

I rebooted again normally, just to be sure that it wouldn't give me those errors again In the future. It ended up giving me the same errors and putting me in recovery shell.

I'm really unsure of what I  should do from here. When I boot, the computer looks for sdb and puts me in the shell because it can't find the root uuid. I don't know how to shut down properly from here, or if there is a command that can help? Or maybe even manually shutting down and hitting the key to put me into boot menu so I can select the usb installation media ( it worked after the kernel panic). But then I'm worried after the full install this will happen every time I reboot.

I don't know what to do, I don't want to make another kernel panic happen, it didn't sound healthy.

Please can anyone help me?

Sorry for any typos or format problems, I'm typing from a very slow phone

Offline

#10 2015-07-29 10:50:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,298
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

So you did something not recommended and you got poor results.  Try doing things as recommended in the wiki.

I don't see anything at all surprising about a disk failing to boot immediately after you have repartitioned it but before you have installed an OS on it.  It sounds like the MBR code still remained (which is fine, you'll overwrite it when you actually install arch) but that MBR code pointed to a recently repartitioned region of the disk with a new UUID - so the results you get sound exactly like what should happen.  What did you expect to happen after you partitioned the disk?

Curiosity is fine, but you have two experienced arch users telling you that what you are seeing is completely normal and that despite your concerns the sky is not falling.  But you are presenting nonsensical claims like the fact that sda/sdb in your experience are completely static and never change - but what you are describing is contradictory to that: sda/sdb do change when you boot the iso.  Again this is normal, this is expected, this is no cause for concern.

So are you going to install on your disk, or are you going to stand with one foot in the door wondering why your only-partially-complete install doesn't work the way a complete install should?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2015-07-29 11:01:37

Raynman
Member
Registered: 2011-10-22
Posts: 1,250

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

michaelgira wrote:

I mean i can't just type in gparted /dev/UUID.

You get symlinks for that, in /dev/disk/by-uuid/ (or by-partuuid, by-label, etc.).

I don't think that works, and even if it did it would be extremely hard to remember the UUiD name of the partitions.

Which is why I prefer labels over UUIDs.

Offline

#12 2015-07-29 11:11:20

ayekat
Member
Registered: 2011-01-17
Posts: 1,356
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Just for sanity's sake, put UUID's in your fstab and GRUB configuration. If you wish to have more clarity with labels, put comments in your fstab. That's what I do, and I get the benefits of both: human readability and reliability.

The problem is that at the installation, if your target drive is recognised and mounted as /dev/sdb, and you genfstab without UUIDs, you will get into the trouble you are in. Drive labels swap. They may not now, but some day when you forget to unplug a USB drive while booting. Or you add a new hard disk. Or you swap hard disk orders in the BIOS because Windows. Or...


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#13 2015-07-29 11:45:57

Raynman
Member
Registered: 2011-10-22
Posts: 1,250

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

ayekat wrote:

Just for sanity's sake, put UUID's in your fstab and GRUB configuration. If you wish to have more clarity with labels, put comments in your fstab. That's what I do, and I get the benefits of both: human readability and reliability.

The problem is that at the installation, if your target drive is recognised and mounted as /dev/sdb, and you genfstab without UUIDs, you will get into the trouble you are in. Drive labels swap.

So when you say "label", you are actually referring to names such as "sdb" and not filesystem labels (or partition labels for GPT)?

Offline

#14 2015-07-29 12:06:16

ayekat
Member
Registered: 2011-01-17
Posts: 1,356
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Raynman wrote:

So when you say "label", you are actually referring to names such as "sdb" and not filesystem labels (or partition labels for GPT)?

Yes, sdX/hdX/... although "label" is perhaps not a correct name for that. Rather a description à la "sdb3 is the third partition on disk two", which is always relative and has no identifying meaning without other disks/other partitions around. And those may change, sometimes arbitrarily.


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#15 2015-07-29 13:32:03

Raynman
Member
Registered: 2011-10-22
Posts: 1,250

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

ayekat wrote:

Yes, sdX/hdX/... although "label" is perhaps not a correct name for that.

No, especially after Trilby says (just like the wiki) "use UUIDs (or labels)" and I say I prefer labels. Now it sounded like you were disagreeing and that might confuse the OP, while I think all you were trying to do was summarize and reinforce the points already made here.

Offline

#16 2015-07-29 13:46:22

tcmdvm
Member
From: Columbia, TN USA
Registered: 2007-06-12
Posts: 40
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

I have had the same problem with my notebook getting the drives mixed up when trying to install from a USB drive. I have even booted multiple times and sometimes it would get the drives correctly, but most times it wouldn't. I never found a solution for it other than using a CD instead of a USB drive. I always make sure the drives are identified correctly before installing. I learned the hard way after wiping a partition that I didn't intend to.

Even though use can use the UUID for the correct drive during installation from the USB drive, however, grub will install to the wrong disk because the drives are mixed up.

Offline

#17 2015-07-29 15:03:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,823

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

michaelgira wrote:

After using exit to try and boot again, I was met with the same errors. I tried a few more times and then my computer started going KERNEL PANIC! My caps lock started flashing too, the fan started getting louder and louder. I had to manually shut down to stop the kernel panic. My heart kind of sank.
...
I don't know what to do, I don't want to make another kernel panic happen, it didn't sound healthy.

Kernel panics, when setting up a new machine[1], are not that scary.   All that means is that the kernel reached a point where nothing made sense and, rather than making things worse, it decided to stick a fork in it and call it done.   Its last act is to communicate what it has done and enter an infinite loop.  When the panic happens, it does not have a lot of resources that are known to work at its disposal.  One method it uses to telemeter its distress is by blinking the caps lock.  The fan runs because the kernel just enters a tight loop without sleep states.   

Once a kernel panic happens, just about [2] all you can, and should, do is push the power button until the system shuts off.


[1]  Here, I assume kernel panics are because of poor configuration.  Experimentation may be required to sort out drivers. interrupts, drive partitions, boot loaders, etc...   Panics in systems that have proven to be stable are a bit more disconcerting.   Anyone who has ever configured and built their own kernel will generally fall out of their chair the first time a kernel does not panic when they try it smile
[2] For things like servers, headless, embedded, and other unattended systems, the kernel does have panic timeout settings that cause a hard reboot after a defined amount of time.  Stock arch kernels do not use auto restart after panic.


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

#18 2015-07-31 05:40:23

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Trilby wrote:

So you did something not recommended and you got poor results.  Try doing things as recommended in the wiki.

I don't see anything at all surprising about a disk failing to boot immediately after you have repartitioned it but before you have installed an OS on it.  It sounds like the MBR code still remained (which is fine, you'll overwrite it when you actually install arch) but that MBR code pointed to a recently repartitioned region of the disk with a new UUID - so the results you get sound exactly like what should happen.  What did you expect to happen after you partitioned the disk?

Curiosity is fine, but you have two experienced arch users telling you that what you are seeing is completely normal and that despite your concerns the sky is not falling.  But you are presenting nonsensical claims like the fact that sda/sdb in your experience are completely static and never change - but what you are describing is contradictory to that: sda/sdb do change when you boot the iso.  Again this is normal, this is expected, this is no cause for concern.


Rebooting after partitioning is a habit i developed, albeit not a good one, at least i know now. I thought it was a good saftey measure just so i could make sure it would be writing to the new partitions. I have done this on previous installs with arch and many other distros, what did i expect to happen? I expected it to boot into the installatioon media like it always has done in the past. Regardless, now i know it is not a good thing to do.. Failure is part of learning.

Nonsensical claimes? sda and sdb has always remained static in MY experience, untill now. That is part of the reason i made this post. I was confsed about the situation. I didn't know if it was safe to continue, if it would lead to further problems down the road, and i generally did not understand the concepts of how the naming works with sdx, even after reading the wiki.

I'm sorry I'm not an experienced arch user like you. The topic may seem simple to you, but not to someone who posted this question into the newbie corner.

Trilby wrote:

So are you going to install on your disk, or are you going to stand with one foot in the door wondering why your only-partially-complete install doesn't work the way a complete install should?

Posts like this aren't helpful. You can cearly see that i did not understand what was happening, i haven't had these experiences before. What's up with the hostility?

Offline

#19 2015-07-31 05:53:59

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

ewaller wrote:
michaelgira wrote:

After using exit to try and boot again, I was met with the same errors. I tried a few more times and then my computer started going KERNEL PANIC! My caps lock started flashing too, the fan started getting louder and louder. I had to manually shut down to stop the kernel panic. My heart kind of sank.
...
I don't know what to do, I don't want to make another kernel panic happen, it didn't sound healthy.

Kernel panics, when setting up a new machine[1], are not that scary.   All that means is that the kernel reached a point where nothing made sense and, rather than making things worse, it decided to stick a fork in it and call it done.   Its last act is to communicate what it has done and enter an infinite loop.  When the panic happens, it does not have a lot of resources that are known to work at its disposal.  One method it uses to telemeter its distress is by blinking the caps lock.  The fan runs because the kernel just enters a tight loop without sleep states.   

Once a kernel panic happens, just about [2] all you can, and should, do is push the power button until the system shuts off.


[1]  Here, I assume kernel panics are because of poor configuration.  Experimentation may be required to sort out drivers. interrupts, drive partitions, boot loaders, etc...   Panics in systems that have proven to be stable are a bit more disconcerting.   Anyone who has ever configured and built their own kernel will generally fall out of their chair the first time a kernel does not panic when they try it smile
[2] For things like servers, headless, embedded, and other unattended systems, the kernel does have panic timeout settings that cause a hard reboot after a defined amount of time.  Stock arch kernels do not use auto restart after panic.

Thanks for the informatice explanation. To be honest, i didn't really know what a kernel panic was. I had only heard the term a few times, i thought i messed up my PC, but fortunately everything ended up working and i managed to install arch in the end. Though it was quite strange.

This actually clears quite a lot of things up for me, i was pretty confused about why it was happening. Thanks smile

Offline

#20 2015-07-31 11:10:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,298
Website

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Anything you sense as hostility is simply frustration.  There is nothing wrong with asking basic questions - your initial post(s) in this thread were perfectly reasonable.  But you seem to refuse to accept an answer.  You are convinced something is wrong when everything is perfectly normal.

No one can help you solve a nonexistent problem.  So I'm done here.  Either install, or don't.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#21 2015-08-02 03:31:24

michaelgira
Member
Registered: 2015-07-29
Posts: 25

Re: The Arch ISO installation is confusing SDA (hard drive) with SDB (USB)

Trilby wrote:

Anything you sense as hostility is simply frustration.  There is nothing wrong with asking basic questions - your initial post(s) in this thread were perfectly reasonable.  But you seem to refuse to accept an answer.  You are convinced something is wrong when everything is perfectly normal.

No one can help you solve a nonexistent problem.  So I'm done here.  Either install, or don't.

It came off as haughtiness to me.

I did not refuse to accept an answer. I was confused, i did not understand. Isn't part of the arch philosophy for the user to understand what they are doing, when they do it? You wouldn't enter a command without knowing what it does, would you? I did not want to continue untill i understood what was happening.

The other posters in this thread helped me. They helped me understand how it works, i was still a little confused, but i got it in the end. When i had a kernel panic, which i have not experienced before (remember, i posted this in the newbie corner), the other moderator gave me a good reply that explained things to me. His post helped me understand. Your post seemed condescending.

I already installed arch the night i made this thread, mostly thanks to the other posters.

Offline

Board footer

Powered by FluxBB