You are not logged in.

#1 2013-11-28 17:36:50

Gerontius
Member
Registered: 2013-11-28
Posts: 3

Hard Drive Numbering

This is my first post.  smile

I  have a 200 GB hard drive with several partitions on which Winxp and Gentoo Linux are currently installed.

According to Gentoo my partition scheme is as follows:

/dev/sda1    Windows xp
/dev/sda2    Free space
/dev/sda3    Linux swap
/dev/sda4    Extended partition
/dev/sda5    Gentoo /boot
/dev/sda6    Free space
/dev/sda7    Gentoo /home
/dev/sda8    Gentoo /

Live distros like Knoppix and Suse describe the partitions in the same way.

I want to install Arch on the free space of /dev/sda2 and possibly /dev/sda6 and use /dev/sda5 as /boot for both distros.   When I boot the Arch installation disk, lsblk and other utilities such as fdisk report the partitions as /dev/sdcX, (not sda).  That will not prevent me installing Arch, but when configuring GRUB, I need to know how to describe the partitions so that both Linux distros will boot.

There are no other hard drives on the computer.  Architecture is x86_64.

What is going on?

Offline

#2 2013-11-28 17:42:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Hard Drive Numbering

This is why you should never use /dev/sdX, as the naming is in no way gauranteed.  If you use udev, you can use the /dev/disk/by-* directories.  But typically filesystem labels, UUIDs, or GPT PARTUUIDs are preferable.  You can use LABEL=<whatever> or UUID=<super-unique-uuid-string> etc.

Last edited by WonderWoofy (2013-11-28 17:43:24)

Offline

#3 2013-11-28 17:44:44

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: Hard Drive Numbering

Do you have USB drives or anything like that (maybe even some card readers) plugged in? Is your installation disk a USB drive?

Devices in /dev labeled sdXY are storage devices (most typically hard drives, but include SSDs, USB drives and, on occasion, some card readers). So, the presence of those other things are likely what is causing the sd label to shift. However, filesystem labels, partition labels and UUIDs don't change (though the labels can be changed if you choose to do so). So, with GRUB, or any bootloader, you can specify the boot device and filesystem without using the /dev/sd labels since they are so prone to changing.

[Edit]: WW beat me to it sad

All the best,

-HG

Last edited by HalosGhost (2013-11-28 17:45:12)

Offline

#4 2013-11-28 17:55:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Offline

#5 2013-11-28 18:22:42

Gerontius
Member
Registered: 2013-11-28
Posts: 3

Re: Hard Drive Numbering

Many thanks.

Offline

Board footer

Powered by FluxBB