I’ve got a weird bug sinds I’ve updated to 11.4. On boot, the main hard drive isn’t recognized as /dev/sda but it changes from time to time (probably according to other removable medias plugged in or not). It has been sdb, sde… but not sda anymore.
The trouble is that it boots and then it tries to find /dev/sda2 (the root partition). As it doesn’t find it asks me sether he should take “SAMSUNG…whathever…-part2”. Answering Yes solves the problem. But then, if I change in Grub the /dev/sde2, it still keeps changing of name. How could I have my hard drive back to /dev/sda2 ?
You should use the by-id (or by-label, etc.) names. They are there just for this case.
Thus not only in your fstab, but also in your GRUB menu.lst. openSUSE does this by fefault, thus I do not know why it is different in your system.
On 2011-03-14 22:36, jeancayron wrote:
>
> Hello,
>
> I’ve got a weird bug sinds I’ve updated to 11.4. On boot, the main hard
> drive isn’t recognized as /dev/sda but it changes from time to time
> (probably according to other removable medias plugged in or not). It has
> been sdb, sde… but not sda anymore.
Aha.
You can not influence those changes, except by controlling what you plug
in. What we do is not use those names that change.
Do you, per chance, have both SATA and PATA disks? The mixture causes problems.
> The trouble is that it boots and then it tries to find /dev/sda2 (the
> root partition). As it doesn’t find it asks me sether he should take
> “SAMSUNG…whathever…-part2”. Answering Yes solves the problem. But
> then, if I change in Grub the /dev/sde2, it still keeps changing of
> name. How could I have my hard drive back to /dev/sda2 ?
Grubs actually knows nothing about sd* names, it uses bios numbers inside,
and a file to map them.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
I would also check my BIOS Advanced to verify that your boot device is defaults to the correct HD.
As Hvv writes make sure your /boot/grub/menu.lst matches /etc/fstab and both are correct.
It does change from time to time. But it should not bother you if you do not use device names (in /etc/fstab, /boot/grub/menu.lst and anywhere).
Here’s the last interesting discussion we had on that topic: OpenSuse 11.4 Hard drive order?
Notice that you might have some influence of the names by loading the modules in a different order an rebuilding the ramdisk, as suggested at the end of this thread. I couldn’t test it though.
I wish they would explain why openSUSE defaults to the /dev/disk/by-id method while most others mount by UUID (not to be confused with /dev/disk/by-uuid). Those links are generated by udev at boot time, while UUIDs are written in partition superblocks and cached in /dev/.blkid.cache (under openSUSE). Also a comparison of /etc/blkid.conf between openSUSE and Ubuntu is kind of interesting … and might help explain a couple things.
openSUSE has:
# never try to sequentially scan all devices in /dev
EVALUATE=udev
while Ubuntu has:
# Perform simple UUID and LABEL lookups using udev information first,
# fall back to scanning if not found
EVALUATE=udev,scan
Ubuntu also has:
# Send a change uevent if we discover that a symlink is wrong
SEND_UEVENT=yes
Whether you mount by-id or by-uuid will behave differently depending on what you are doing. uuids won’t mount if they are duplicated (like if you copy a partition with dd and mount both the copy and the original) but will stay consistent if you add/remove partitions. by-id will be a mess if partitions change but don’t pose a problem when you duplicate disks. by-id and by-uuid are both symlinks and can go missing or wrong indeed - if you play back and forth with partitions.
On 2011-03-15 12:06, please try again wrote:
> I wish they would explain why openSUSE defaults to the /dev/disk/by-id
> method while most others mount by UUID (not to be confused with
> /dev/disk/by-uuid).
I fail to see how you can mount without using the symlinks. I don’t see the
difference you mention.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
I think he means the* -U (and -L*) options of the mount command (see* man mount*) and their equivalent in* /etc/fstab* using* UUID=* (or* LABEL=) as described in man fstab*.
On 2011-03-15 16:36, hcvv wrote:
>
> I think he means the- -U -(and- -L-) options of the -mount- command
> (see- man mount-) and their equivalent in- /etc/fstab- using- UUID=-
> (or- LABEL=-) as described in- man fstab-.
Ah, I see. But it ends using the same thing, I believe.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
But my 11.4 /etc/fstab specifies which partitions to mount by LABEL=home and /dev/disk/by-id/. Wouldn’t the -L and -U only apply to the CLI mount command?
Thanks for all the answers. It seems to inspire all of you
The problem occured after I made an update. I first did a zypper up but I think my 11.3 was to much different from the original one (all my KDE was in 4.6) that it didn’t succeed: after reboot, only the grub menu had the 11.4 branding, the rest had the 11.3 one and more or less the half of the packages were 11.3 and the other 11.4… openSUSE 11.35 indeed lol! But the boot was OK
So, as I didn’t want to waste my time, I did an update with the network-install CD and the problem appeared after that. I didn’t change anything to the automatic configuration of grub. But, at that time, I had some external hard drive plugged in, and I think the problem comes partially from there.
But the problem described above happens even without them plugged in.
This is my menu.lst from grub now:
# Modified by YaST2. Last modification on dim mås 13 18:14:41 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.4 - 2.6.37.1-1.2
root (hd0,1)
kernel /boot/vmlinuz-2.6.37.1-1.2-desktop root=/dev/sdb2 resume=/dev/disk/by-id/ata-SAMSUNG_SP2004C_S07GJ1UYB03169-part1 splash=silent quiet nomodeset showopts vga=0x317
initrd /boot/initrd-2.6.37.1-1.2-desktop
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.4 - 2.6.37.1-1.2
root (hd0,1)
kernel /boot/vmlinuz-2.6.37.1-1.2-desktop root=/dev/sdb2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe nomodeset vga=0x317
initrd /boot/initrd-2.6.37.1-1.2-desktop
No need to change the title. Those interested after 6 months will read to the end and will be satisfied (but they will have a task in seeing the difference between the to listings, a little bit of red couldd have helped here