YAST Bootloader configuration picking up strange device

Move this to the Install/Boot/Login forum if it belongs there, but this problem seems to arise from the YAST Bootloader configuration.

Whenever I configure the bootloader from YAST, it will save my default disk (the first disk in the “Boot Loader Installation Details > Disk Order” list) as the disk /dev/disk/by-label/msdos. However, this device appears nowhere else on my system - I have no idea where YAST is finding the device.

If ever I try to save the Bootloader configuration in this state, YAST throws an error about “Unknown udev device /dev/disk/by-label/msdos”, which makes complete sense, but again, I don’t know why YAST put that device there in the first place.

I can’t seem to reproduce it now, but it seemed that even if I changed the “Disk Order” list, YAST would still put “/dev/disk/by-label/msdos” in the /etc/default/grub_installeddevice file. Now, if I put /dev/sda as the only entry in the “Disk Order” list, YAST appears to put the corresponding path in /dev/disk/by-id/… into the grub_installeddevice file. This may relate or it may not.

Does anyone know what is happening and why, and if I can or should do anything to change this?

On Thu, 18 Dec 2014 00:36:01 +0000, palswim wrote:

> Move this to the Install/Boot/Login forum if it belongs there, but this
> problem seems to arise from the YAST Bootloader configuration.
>
> Whenever I configure the bootloader from YAST, it will save my default
> disk (the first disk in the “Boot Loader Installation Details > Disk
> Order” list) as the disk -/dev/disk/by-label/msdos-. However, this
> device appears nowhere else on my system - I have no idea where YAST is
> finding the device.
>
> If ever I try to save the Bootloader configuration in this state, YAST
> throws an error about “Unknown udev device /dev/disk/by-label/msdos”,
> which makes complete sense, but again, I don’t know why YAST put that
> device there in the first place.
>
> I can’t seem to reproduce it now, but it seemed that even if I changed
> the “Disk Order” list, YAST would still put “-/dev/disk/by-label/msdos-”
> in the -/etc/default/grub_installeddevice- file. Now, if I put
> -/dev/sda- as the only entry in the “Disk Order” list, YAST appears to
> put the corresponding path in -/dev/disk/by-id/…- into the
> grub_installeddevice file. This may relate or it may not.
>
> Does anyone know what is happening and why, and if I can or should do
> anything to change this?

What operating systems are installed on the system?

Chances are, it’s a recovery partition or something similar.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Sorry; I completely blanked on providing relevant information.

I am running OpenSUSE 13.2 from a USB stick with a single ext4 partition (/dev/sda1) and no other disks.

What’s in “/boot/grub2/device.map”?

On Thu, 18 Dec 2014 01:36:02 +0000, palswim wrote:

> hendersj;2683624 Wrote:
>> What operating systems are installed on the system?
>>
>> Chances are, it’s a recovery partition or something similar.
>
> Sorry; I completely blanked on providing relevant information.
>
> I am running OpenSUSE 13.2 from a USB stick with a single ext4 partition
> (/dev/sda1) and no other disks.

Just to clarify, the system has no hard drive at all, just the USB stick?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Correct. I have run it with hard drives (with SATA or USB connections) in the past, which may have helped cause this issue, but I am wondering why the potential “memory” of these past disks persists still.

My device.map file has the following single line:

(hd0)  /dev/disk/by-label/msdos

Should I alter this line, delete it, delete the file, or something else?

That’s where the “strange device” is coming from. I’m not sure what to do about it.

I notice that’s a “by-label” entry. I haven’t previously seen one of those in “device.map”

I think that file is only used for installing grub2 (or re-installing). So I don’t think you can do much damage by changing it.

Make a backup copy somewhere. Then maybe put the device ID for your USB disk there.

You can find all device-IDs known to the system by:


ls /dev/disk/by-id/*

The names that end in “-partN” (where N is a number) are for partitions. The ones without a “-partN” are for whole disks.

Find a name for your disk, and put it in that file (with the “(hd0)” string still there.

There will be several different “by-id” entries for the same disk. There seems to be a preference to use the one that begins “/dev/disk/by-id/ata=”. So I would find that one, and use it in the “device.map” file.

I don’t know whether the name will stick. Maybe it will change back to “/dev/disk/by-label/msdos” if you use Yast bootloader again.

I guess you can think of that “device.map” file as a small memo note that Yast bootloader uses as a reminder. You can may try


ls -l   /dev/disk/by-label/msdos

to see which disk Yast thinks it is referring to. You will either see an error message (no such file), or a symbolic link to “/dev/sda” or similar. I’m guessing that you will see an error message, because otherwise Yast bootloader should be translating that string to the actual device.

On Thu, 18 Dec 2014 06:36:01 +0000, palswim wrote:

> hendersj;2683634 Wrote:
>> Just to clarify, the system has no hard drive at all, just the USB
>> stick?
>
> Correct. I have run it with hard drives (with SATA or USB connections)
> in the past, which may have helped cause this issue, but I am wondering
> why the potential “memory” of these past disks persists still.

The reference is to (hd0), which should be the USB stick itself.

What’s the output of fdisk -l for the device in question?

Was the USB stick installed using Live media?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Yep, /dev/disk/by-label/msdos does not exist on my system. If I set device.map to contain a different disk, YaST will overwrite the contents of that file with the msdos disk again. My main question is where YaST is determining that information and how to update the system so that YaST uses the correct data. I can easily change the files manually and use the grub2-install program to install my bootloader correctly.

fdisk -l:

Disk /dev/sda: 14.9 GiB, 16008609792 bytes, 31266816 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: 0x000b99dc

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2048 31266815 31264768 14.9G 83 Linux

I installed the system with one of the media in the OpenSUSE Downloads section.

Everything in /dev is files representing the hardware on the system either or as reported by the BIOS or by it’s own scans. How ever there is memory here to speed booting. Things are initial recorded by initrd files. So did you try mkinitrd to force a new scan??

This is where it is getting the information.

Try this:

In Yast=>Partitioner, select your root partition (sda1), click on Edit button at the bottom of the window, make certain before proceeding that you have Do not format partition selected in the left column under Formatting Options, then on the right under Mounting Options click on Fstab Options.

I suggest giving the partition (sda1) a label. To do this, select under Mount in etc/fstab by the circle for Volume Label, then under the blank under Volume Label, give it a name.

Then:

In Yast=>Boot Loader=>Boot Loader Installation Details (button middle bottom)

Fix the device here, or make certain it is correct.

After doing this, you might also want to make sure Grub is rewritten by using the CLI:

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

If you have been installing Grub to the MBR of that device, use sda, if you have been installing to the root partition, use sda1 in that grub2-install line.

[quote="“Fraser_Bell,post:12,topic:105476”]

This is where it is getting the information.

Try this:

In Yast=>Partitioner, select your root partition (sda1), click on Edit button at the bottom of the window, make certain before proceeding that you have Do not format partition selected in the left column under Formatting Options, then on the right under Mounting Options click on Fstab Options.[/QUOTE]

I tried all that and the “Disklabel type” still read “dos”. And the issues with the msdos disk still persisted, unfortunately.

I checked another OpenSUSE installation that has no such issues, and the “Disklabel type” of that single disk read “dos” as well.

I ran sudo mkinitrd, and after a reboot, the msdos device still showed everywhere. Did I need to pass it any specific parameters?

No… Sorry was my only idea that thing has to be coming from somewhere.

Hmmm.

Well, at the moment, I am stumped.

There is something nagging the dusty cobwebs in the back of my mind, but until it comes out … :\

Post the outputs of these commands (in code tags in the message editor) and we can see what else we might try:

ls -l /dev/disk/by-id/
ls -l /dev/disk/by-path/
ls -l /dev/disk/by-uuid/

Might as well add this, as well:

ls -l /dev/disk/by-label/

… although I really do not expect much enlightenment from it.

Often view different information when look with fdisk -l /dev/sdc

then with gdisk /dev/sdc
using p for partition

With very different results on larger hard drives.

What does YaST partitioner use ?

user@host:~> ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root  9 Jan  2 20:29 ata-MATSHITADVD-RAM_UJ-####_####_###### -> ../../sr0
lrwxrwxrwx 1 root root  9 Jan  2 20:57 scsi-1SanDisk_#################### -> ../../sda
lrwxrwxrwx 1 root root 10 Jan  2 20:57 scsi-1SanDisk_####################-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Jan  2 20:57 scsi-SSanDisk__#################### -> ../../sda
lrwxrwxrwx 1 root root 10 Jan  2 20:57 scsi-SSanDisk__####################-part1 -> ../../sda1
user@host:~> ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root  9 Jan  2 20:57 pci-0000:00:13.2-usb-0:5:1.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jan  2 20:57 pci-0000:00:13.2-usb-0:5:1.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Jan  2 20:29 pci-0000:00:14.1-ata-1.0 -> ../../sr0
user@host:~> ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Jan  2 20:57 ########-####-####-####-############ -> ../../sda1
user@host:~> ls -l /dev/disk/by-label/
total 0
lrwxrwxrwx 1 root root 10 Jan  2 20:57 Label1 -> ../../sda1