View previous topic :: View next topic |
Author |
Message |
elmar283 Guru
Joined: 06 Dec 2004 Posts: 316 Location: Haarlem, Netherlands
|
Posted: Sun Sep 04, 2016 10:33 am Post subject: [solved] /dev/sda and /dev/sdb keep switching |
|
|
I have installed gentoo on my Macbook Pro 2015.
I use refind to boot my system. In the kernel I define the path to the root directory (CONFIG_CMDLINE="root=/dev/sdb7").
This is my partition scheme:
Code: |
/dev/sdb5 /boot ext2 noatime 1 2
/dev/sdb7 / ext4 noatime 0 1
/dev/sdb6 none swap sw 0 0
/dev/sdb1 /boot/efi vfat noatime 0 0
/dev/sdb4 /mnt/files vfat noatime 0 0
|
After building the kernel I copy the kernel to '/boot/efi/EFI/Boot/Gentoo_446_x64.efi'
What goes wrong is that after every build the sda becomes sdb and back.
The other sd is the sd cardreader.
I have two questions:
1: What is causing the sda sdb switch after rebuilding the kernel?
2: How can make shure sda and sdb doesn't switch anymore?
Here are some configs:
Code: |
elmar@randomdentgentoo /boot/efi/EFI $ sudo lspci -k
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
Subsystem: Apple Inc. Broadwell-U Host Bridge -OPI
Kernel driver in use: bdw_uncore
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
Subsystem: Apple Inc. Broadwell-U Integrated Graphics
Kernel driver in use: i915
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
Subsystem: Apple Inc. Broadwell-U Audio Controller
Kernel driver in use: snd_hda_intel
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP USB xHCI Controller
Kernel driver in use: xhci_hcd
00:15.0 DMA controller: Intel Corporation Wildcat Point-LP Serial IO DMA Controller (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP Serial IO DMA Controller
00:15.4 Serial bus controller [0c80]: Intel Corporation Wildcat Point-LP Serial IO GSPI Controller #1 (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP Serial IO GSPI Controller
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP MEI Controller
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP High Definition Audio Controller
Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #2 (rev e3)
Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3)
Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3)
Kernel driver in use: pcieport
00:1c.5 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #6 (rev e3)
Kernel driver in use: pcieport
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP LPC Controller
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP SMBus Controller
00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
Subsystem: Intel Corporation Wildcat Point-LP Thermal Management Controller
02:00.0 Multimedia controller: Broadcom Corporation 720p FaceTime HD Camera
Subsystem: Broadcom Corporation 720p FaceTime HD Camera
03:00.0 Network controller: Broadcom Corporation BCM43602 802.11ac Wireless LAN SoC (rev 01)
Subsystem: Apple Inc. BCM43602 802.11ac Wireless LAN SoC
Kernel driver in use: brcmfmac
Kernel modules: brcmfmac
04:00.0 SATA controller: Samsung Electronics Co Ltd Device a801 (rev 01)
Subsystem: Samsung Electronics Co Ltd Device a801
Kernel driver in use: ahci
05:00.0 PCI bridge: Intel Corporation Device 156d
Kernel driver in use: pcieport
06:00.0 PCI bridge: Intel Corporation Device 156d
Kernel driver in use: pcieport
06:03.0 PCI bridge: Intel Corporation Device 156d
Kernel driver in use: pcieport
06:04.0 PCI bridge: Intel Corporation Device 156d
Kernel driver in use: pcieport
06:05.0 PCI bridge: Intel Corporation Device 156d
Kernel driver in use: pcieport
06:06.0 PCI bridge: Intel Corporation Device 156d
Kernel driver in use: pcieport
07:00.0 System peripheral: Intel Corporation Device 156c
Kernel driver in use: thunderbolt
|
Code: |
elmar@randomdentgentoo /boot/efi/EFI $ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
stepping : 4
microcode : 0x21
cpu MHz : 1200.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs :
bogomips : 5399.78
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
stepping : 4
microcode : 0x21
cpu MHz : 700.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs :
bogomips : 5399.78
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
stepping : 4
microcode : 0x21
cpu MHz : 1200.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs :
bogomips : 5399.78
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
stepping : 4
microcode : 0x21
cpu MHz : 1200.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt
bugs :
bogomips : 5399.78
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
|
Code: |
elmar@randomdentgentoo /boot/efi/EFI $ ls /boot/efi/EFI/
APPLE Boot refind tools
|
Code: | elmar@randomdentgentoo ~ $ ls /dev/sd*
/dev/sda /dev/sdb /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4 /dev/sdb5 /dev/sdb6 /dev/sdb7
|
Code: |
elmar@randomdentgentoo ~ $ udevadm info -a /dev/sda
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/host1/target1:0:0/1:0:0:0/block/sda':
KERNEL=="sda"
SUBSYSTEM=="block"
DRIVER==""
ATTR{ro}=="0"
ATTR{size}=="0"
ATTR{stat}==" 0 0 0 0 0 0 0 0 0 0 0"
ATTR{range}=="16"
ATTR{discard_alignment}=="0"
ATTR{events}=="media_change"
ATTR{ext_range}=="256"
ATTR{events_poll_msecs}=="-1"
ATTR{alignment_offset}=="0"
ATTR{inflight}==" 0 0"
ATTR{removable}=="1"
ATTR{capability}=="51"
ATTR{events_async}==""
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/host1/target1:0:0/1:0:0:0':
KERNELS=="1:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{rev}=="3.00"
ATTRS{type}=="0"
ATTRS{scsi_level}=="7"
ATTRS{model}=="SD Card Reader "
ATTRS{state}=="running"
ATTRS{queue_type}=="none"
ATTRS{iodone_cnt}=="0x33d"
ATTRS{iorequest_cnt}=="0x33d"
ATTRS{device_busy}=="0"
ATTRS{evt_capacity_change_reported}=="0"
ATTRS{timeout}=="30"
ATTRS{evt_media_change}=="0"
ATTRS{max_sectors}=="240"
ATTRS{ioerr_cnt}=="0x33c"
ATTRS{queue_depth}=="1"
ATTRS{vendor}=="APPLE "
ATTRS{evt_soft_threshold_reached}=="0"
ATTRS{device_blocked}=="0"
ATTRS{evt_mode_parameter_change_reported}=="0"
ATTRS{evt_lun_change_reported}=="0"
ATTRS{evt_inquiry_change_reported}=="0"
ATTRS{iocounterbits}=="32"
ATTRS{inquiry}==""
ATTRS{eh_timeout}=="10"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/host1/target1:0:0':
KERNELS=="target1:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/host1':
KERNELS=="host1"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0':
KERNELS=="2-3:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{bInterfaceClass}=="08"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{bNumEndpoints}=="02"
ATTRS{authorized}=="1"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb2/2-3':
KERNELS=="2-3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="3"
ATTRS{idVendor}=="05ac"
ATTRS{speed}=="5000"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="9"
ATTRS{busnum}=="2"
ATTRS{devnum}=="2"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="896mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0820"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="000000000820"
ATTRS{version}==" 3.00"
ATTRS{urbnum}=="5822"
ATTRS{ltm_capable}=="yes"
ATTRS{manufacturer}=="Apple"
ATTRS{removable}=="fixed"
ATTRS{idProduct}=="8406"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="Card Reader"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="03"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}=="5000"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="9"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="2"
ATTRS{devnum}=="1"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="4"
ATTRS{interface_authorized_default}=="1"
ATTRS{bcdDevice}=="0404"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0000:00:14.0"
ATTRS{version}==" 3.00"
ATTRS{urbnum}=="39"
ATTRS{ltm_capable}=="yes"
ATTRS{manufacturer}=="Linux 4.4.6-gentoo xhci-hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0003"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="xHCI Host Controller"
looking at parent device '/devices/pci0000:00/0000:00:14.0':
KERNELS=="0000:00:14.0"
SUBSYSTEMS=="pci"
DRIVERS=="xhci_hcd"
ATTRS{irq}=="50"
ATTRS{subsystem_vendor}=="0x8086"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0330"
ATTRS{driver_override}=="(null)"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{dma_mask_bits}=="64"
ATTRS{local_cpus}=="0f"
ATTRS{device}=="0x9cb1"
ATTRS{enable}=="1"
ATTRS{msi_bus}=="1"
ATTRS{local_cpulist}=="0-3"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x7270"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
|
Code: |
elmar@randomdentgentoo ~ $ udevadm info -a /dev/sdb
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1c.5/0000:04:00.0/ata1/host0/target0:0:0/0:0:0:0/block/sdb':
KERNEL=="sdb"
SUBSYSTEM=="block"
DRIVER==""
ATTR{ro}=="0"
ATTR{size}=="490234752"
ATTR{stat}==" 48299 96 1185015 8164 30467 64495 2731898 72698 0 8638 81137"
ATTR{range}=="16"
ATTR{discard_alignment}=="0"
ATTR{events}==""
ATTR{ext_range}=="256"
ATTR{events_poll_msecs}=="-1"
ATTR{alignment_offset}=="0"
ATTR{inflight}==" 0 0"
ATTR{removable}=="0"
ATTR{capability}=="50"
ATTR{events_async}==""
looking at parent device '/devices/pci0000:00/0000:00:1c.5/0000:04:00.0/ata1/host0/target0:0:0/0:0:0:0':
KERNELS=="0:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{rev}=="SA0Q"
ATTRS{type}=="0"
ATTRS{scsi_level}=="6"
ATTRS{model}=="APPLE SSD SM0256"
ATTRS{state}=="running"
ATTRS{queue_type}=="none"
ATTRS{iodone_cnt}=="0x13720"
ATTRS{iorequest_cnt}=="0x1386a"
ATTRS{queue_ramp_up_period}=="120000"
ATTRS{device_busy}=="0"
ATTRS{evt_capacity_change_reported}=="0"
ATTRS{timeout}=="30"
ATTRS{evt_media_change}=="0"
ATTRS{ioerr_cnt}=="0x11"
ATTRS{queue_depth}=="31"
ATTRS{vendor}=="ATA "
ATTRS{evt_soft_threshold_reached}=="0"
ATTRS{device_blocked}=="0"
ATTRS{evt_mode_parameter_change_reported}=="0"
ATTRS{evt_lun_change_reported}=="0"
ATTRS{evt_inquiry_change_reported}=="0"
ATTRS{iocounterbits}=="32"
ATTRS{inquiry}==""
ATTRS{vpd_pg80}==""
ATTRS{vpd_pg83}==""
ATTRS{eh_timeout}=="10"
looking at parent device '/devices/pci0000:00/0000:00:1c.5/0000:04:00.0/ata1/host0/target0:0:0':
KERNELS=="target0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1c.5/0000:04:00.0/ata1/host0':
KERNELS=="host0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1c.5/0000:04:00.0/ata1':
KERNELS=="ata1"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1c.5/0000:04:00.0':
KERNELS=="0000:04:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="ahci"
ATTRS{irq}=="49"
ATTRS{subsystem_vendor}=="0x144d"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x010601"
ATTRS{driver_override}=="(null)"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{dma_mask_bits}=="64"
ATTRS{local_cpus}=="0f"
ATTRS{device}=="0xa801"
ATTRS{enable}=="1"
ATTRS{msi_bus}=="1"
ATTRS{local_cpulist}=="0-3"
ATTRS{vendor}=="0x144d"
ATTRS{subsystem_device}=="0xa801"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1c.5':
KERNELS=="0000:00:1c.5"
SUBSYSTEMS=="pci"
DRIVERS=="pcieport"
ATTRS{irq}=="17"
ATTRS{subsystem_vendor}=="0x8086"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x060400"
ATTRS{driver_override}=="(null)"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="0f"
ATTRS{device}=="0x9c9a"
ATTRS{enable}=="1"
ATTRS{msi_bus}=="1"
ATTRS{local_cpulist}=="0-3"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x7270"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="0"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
|
Last edited by elmar283 on Sun Sep 04, 2016 11:58 am; edited 1 time in total |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Sun Sep 04, 2016 10:51 am Post subject: |
|
|
You can use PARTUID on kernel command line, you need to modify fstab, too.
Or you can build whatever driver is needed for your SD as module, then it won't be loaded before / is mounted. |
|
Back to top |
|
|
i4dnf Apprentice
Joined: 18 Sep 2005 Posts: 271 Location: Bucharest, Romania
|
Posted: Sun Sep 04, 2016 10:59 am Post subject: |
|
|
You can pass
Code: |
options "root=PARTUUID=sdb7partuuid"
|
or
Code: |
options "root=UUID=sdb7uuid"
|
to the kernel in refind.conf.
You get sdb7partuuid and sdb7uuid by running:
You can also mount by UUID or PARTUUID or even LABEL in fstab, instead of /dev/sdXy, thus regardless of the order the kernel discovers the drives they will be mounted to the same constant mountpoints, e.g.:
Code: |
PARTUUID=sdb5partuuid /boot ext2 noatime 1 2
UUID=sdb7uuid / ext4 noatime 0 1
LABEL=SWAP none swap sw 0 0
UUID=sdb1uuid /boot/efi vfat noatime 0 0
PARTUUID=sdb4partuuid /mnt/files vfat noatime 0 0
|
_________________ "The only difference between me and a madman is that I am not MAD" (SALVATOR DALI) |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Sun Sep 04, 2016 11:03 am Post subject: |
|
|
Kernel cannot handle UUID, to use UUID initrd is needed. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Sun Sep 04, 2016 11:05 am Post subject: |
|
|
elmar283,
sda is the first HDD detected by the kernel, sdb the second and so on.
Its not deterministic but the detection order is normally fixed.
Consider it a feature.
The fix is to use deterministic names for your partitions or filesystems.
You may use filesystem labels, if your filesystems support labels.
You may use filesystem UUIDs. These are created by mkfs.
You may use partition UUIDs. Created by partitioning tools.
There is a constraint for mounting root. For filesystem lables and filesystem UUIDs, the userspace mount command needs to be available.
It probably is if you have an initrd. The kernel can use partition UUIDs without any userspace help.
Code: | $ /sbin/blkid
/dev/sda1: UUID="9392926d-6408-6e7a-8663-82834138a597" TYPE="linux_raid_member" PARTUUID="0553caf4-01"
... |
blkid will tell you the values you need. Notice that the filesystem UUID="9392926d-6408-6e7a-8663-82834138a597" is not the same as the PARTUUID="0553caf4-01".
You will need to fix your root= on the kernel command line and /etc/fstab.
By way of a fstab example, I have
Code: | # now ssd
UUID=cf559dbe-81bb-45b7-bbdd-0bcdc81e066b / ext4 noatime,discard 0 1 |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
elmar283 Guru
Joined: 06 Dec 2004 Posts: 316 Location: Haarlem, Netherlands
|
Posted: Sun Sep 04, 2016 11:10 am Post subject: |
|
|
Thanks all.
I don not have an initrd, so uuid's etc are not supported.
So I'm trying the dirty fix by making my ssd card reader a module. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6780
|
Posted: Sun Sep 04, 2016 11:23 am Post subject: |
|
|
elmar283 wrote: | I don not have an initrd, so uuid's etc are not supported. |
But PARTUUID's are (and in /etc/fstab you can use UUID=... or LABEL=... without any initrd) |
|
Back to top |
|
|
elmar283 Guru
Joined: 06 Dec 2004 Posts: 316 Location: Haarlem, Netherlands
|
Posted: Sun Sep 04, 2016 11:26 am Post subject: |
|
|
Yes that part I understand.
It is the kernel part I'm not shure about.
I'll get a kernel panic because /dev/sdb7 or /dev/sda7 is not known.
If the kernel understands the uuid then I will do that, but from the reactions I understand it cannot. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Sun Sep 04, 2016 11:35 am Post subject: |
|
|
elmar283,
root=PARTUUID=<your_root_RARTUUID> will work for you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
elmar283 Guru
Joined: 06 Dec 2004 Posts: 316 Location: Haarlem, Netherlands
|
Posted: Sun Sep 04, 2016 11:57 am Post subject: |
|
|
Thanks, it worked:
Code: |
elmar@randomdentgentoo /boot $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/sda5 /boot ext2 noatime 1 2
#/dev/sda7 / ext4 noatime 0 1
#/dev/sda6 none swap sw 0 0
#/dev/sda1 /boot/efi vfat noatime 0 0
#/dev/sda4 /mnt/files vfat noatime 0 0
UUID=d4fd369a-0e36-42cf-9fda-9b20cd78724d /boot ext2 noatime 1 2
UUID=923da334-aedf-428a-b6cc-860c98edcdf1 / ext4 noatime 0 1
UUID=2a9a5c98-1747-44f8-ba64-02f5d266563a none swap sw 0 0
UUID=67E3-17ED /boot/efi vfat noatime 0 0
UUID=ECAA-4358 /mnt/files vfat noatime 0 0
|
Code: |
elmar@randomdentgentoo /boot $ cat /usr/src/linux/.config |grep root=
CONFIG_CMDLINE="root=PARTUUID=a0c18905-ed0b-48c2-9cbd-ca9f3a25f6d6" |
|
|
Back to top |
|
|
|